Allow 2nd person conjugation in timer messages

Fixes #5658
// FREEBIE
This commit is contained in:
FeuRenard 2016-09-04 22:20:45 +02:00 committed by Moxie Marlinspike
parent 2d104d3783
commit f5966af781
2 changed files with 5 additions and 5 deletions

View File

@ -391,8 +391,8 @@
<string name="MessageRecord_called_s">Called %s</string>
<string name="MessageRecord_missed_call_from">Missed call from %s</string>
<string name="MessageRecord_s_is_on_signal_say_hey">%s is on Signal, say hey!</string>
<string name="MessageRecord_you">You</string>
<string name="MessageRecord_s_set_disappearing_message_time_to_s">%1$s set disappearing message time to %2$s</string>
<string name="MessageRecord_you_set_disappearing_message_time_to_s">You set disappearing message time to %1$s.</string>
<string name="MessageRecord_s_set_disappearing_message_time_to_s">%1$s set disappearing message time to %2$s.</string>
<string name="MessageRecord_your_safety_numbers_with_s_have_changed">Your safety numbers with %s have changed</string>

View File

@ -109,9 +109,9 @@ public abstract class MessageRecord extends DisplayRecord {
} else if (isJoined()) {
return emphasisAdded(context.getString(R.string.MessageRecord_s_is_on_signal_say_hey, getIndividualRecipient().toShortString()));
} else if (isExpirationTimerUpdate()) {
String sender = isOutgoing() ? context.getString(R.string.MessageRecord_you) : getIndividualRecipient().toShortString();
String time = ExpirationUtil.getExpirationDisplayValue(context, (int) (getExpiresIn() / 1000));
return emphasisAdded(context.getString(R.string.MessageRecord_s_set_disappearing_message_time_to_s, sender, time));
String time = ExpirationUtil.getExpirationDisplayValue(context, (int)(getExpiresIn() / 1000));
return isOutgoing() ? emphasisAdded(context.getString(R.string.MessageRecord_you_set_disappearing_message_time_to_s, time))
: emphasisAdded(context.getString(R.string.MessageRecord_s_set_disappearing_message_time_to_s, getIndividualRecipient().toShortString(), time));
} else if (isIdentityUpdate()) {
return emphasisAdded(context.getString(R.string.MessageRecord_your_safety_numbers_with_s_have_changed, getIndividualRecipient().toShortString()));
} else if (getBody().getBody().length() > MAX_DISPLAY_LENGTH) {