Skip to content

Commit

Permalink
Fix English use of quantity zero string.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-signal committed Oct 2, 2020
1 parent 50edb5d commit 19c74c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ public OutdatedBuildReminder(final Context context) {

private static CharSequence getPluralsText(final Context context) {
int days = getDaysUntilExpiry() - 1;
return context.getResources().getQuantityString(R.plurals.OutdatedBuildReminder_your_version_of_signal_will_expire_in_n_days, days, days);

if (days == 0) {
return context.getString(R.string.OutdatedBuildReminder_your_version_of_signal_will_expire_today);
} else {
return context.getResources().getQuantityString(R.plurals.OutdatedBuildReminder_your_version_of_signal_will_expire_in_n_days, days, days);
}
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1109,8 +1109,8 @@

<!-- OutdatedBuildReminder -->
<string name="OutdatedBuildReminder_update_now">Update now</string>
<string name="OutdatedBuildReminder_your_version_of_signal_will_expire_today">This version of Signal will expire today. Update to the most recent version.</string>
<plurals name="OutdatedBuildReminder_your_version_of_signal_will_expire_in_n_days">
<item quantity="zero">This version of Signal will expire today. Update to the most recent version.</item>
<item quantity="one">This version of Signal will expire tomorrow. Update to the most recent version.</item>
<item quantity="other">This version of Signal will expire in %d days. Update to the most recent version.</item>
</plurals>
Expand Down

0 comments on commit 19c74c8

Please sign in to comment.