convert string to plurals and add some "one" items to others to allow

removing [s]. There's more to do still.
This commit is contained in:
Eric House 2015-07-23 06:56:12 -07:00
parent f626d6ca4c
commit fa00eef151
5 changed files with 350 additions and 307 deletions

File diff suppressed because it is too large Load diff

View file

@ -1916,8 +1916,12 @@
<!-- -->
<string name="button_sms_add">Import contact</string>
<!-- -->
<plurals name="invite_sms_desc_fmt"><item quantity="other">Please check the %1$d phone
number[s] you want to invite to your new game, then tap \"%2$s\".</item></plurals>
<plurals name="invite_sms_desc_fmt">
<item quantity="one">Please check the phone number you want to
invite to your new game, then tap \"%2$s\".</item>
<item quantity="other">Please check the %1$d phone numbers you
want to invite to your new game, then tap \"%2$s\".</item>
</plurals>
<!-- -->
<string name="manual_owner_name">(Not in contacts)</string>
<!-- -->
@ -1930,8 +1934,12 @@
<!-- -->
<string name="get_sms_number">Enter phone number:</string>
<!-- -->
<string name="confirm_clear">Are you sure you want to delete the
checked phone number[s]?</string>
<plurals name="confirm_clear_fmt">
<item quantity="one">Are you sure you want to delete the checked
phone number?</item>
<item quantity="other">Are you sure you want to delete the
%1$d checked phone numbers?</item>
</plurals>
<!-- -->
<string name="connect_label_sms">Connection (via SMS/text)</string>
<!-- -->
@ -2296,9 +2304,18 @@
are used to build a string based on the length of time that's then
inserted in the fourth. E.g "PlayerName moved more than 2 day[s],
4 hour[s] ago." -->
<plurals name="nag_minutes_fmt"><item quantity="other">%1$d minute[s]</item></plurals>
<plurals name="nag_hours_fmt"><item quantity="other">%1$d hour[s]</item></plurals>
<plurals name="nag_days_fmt"><item quantity="other">%1$d day[s]</item></plurals>
<plurals name="nag_minutes_fmt">
<item quantity="one">%1$d minute</item>
<item quantity="other">%1$d minutes</item>
</plurals>
<plurals name="nag_hours_fmt">
<item quantity="one">%1$d hour</item>
<item quantity="other">%1$d hours</item>
</plurals>
<plurals name="nag_days_fmt">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<string name="nag_body_fmt">%1$s moved more than %2$s ago.</string>
<!-- above is inserted in this the last time I warn -->
<string name="nag_warn_last_fmt">Last warning: %1$s</string>
@ -2344,7 +2361,10 @@
<string name="use_defaults">Use defaults</string>
<string name="nplayers_prompt">Number on this device</string>
<plurals name="nplayers_fmt"><item quantity="other">%1$d player[s]</item></plurals>
<plurals name="nplayers_fmt">
<item quantity="one">One player</item>
<item quantity="other">%1$d players</item>
</plurals>
<string name="err_dup_invite_fmt">Duplicate invitation rejected:
device \"%1$s\" has already accepted an invitation to this
game.</string>

View file

@ -1660,8 +1660,10 @@
<string name="button_sms_add">Tropmi tcatnoc</string>
<!-- -->
<plurals name="invite_sms_desc_fmt">
<item quantity="other">Esaelp kcehc eht %1$d enohp
]s[rebmun uoy tnaw ot etivni ot ruoy wen ,emag neht pat \"%2$s\".</item>
<item quantity="one">Esaelp kcehc eht enohp rebmun uoy tnaw ot
etivni ot ruoy wen ,emag neht pat \"%2$s\".</item>
<item quantity="other">Esaelp kcehc eht %1$d enohp srebmun uoy
tnaw ot etivni ot ruoy wen ,emag neht pat \"%2$s\".</item>
</plurals>
<!-- -->
<string name="manual_owner_name">tOn( ni )stcatnoc</string>
@ -1675,8 +1677,12 @@
<!-- -->
<string name="get_sms_number">Retne enohp rebmun:</string>
<!-- -->
<string name="confirm_clear">Era uoy erus uoy tnaw ot eteled eht
dekcehc enohp ?]s[rebmun</string>
<plurals name="confirm_clear_fmt">
<item quantity="one">Era uoy erus uoy tnaw ot eteled eht dekcehc
enohp ?rebmun</item>
<item quantity="other">Era uoy erus uoy tnaw ot eteled eht
%1$d dekcehc enohp ?srebmun</item>
</plurals>
<!-- -->
<string name="connect_label_sms">Noitcennoc aiv( )TXet/sms</string>
<!-- -->
@ -1984,13 +1990,16 @@
inserted in the fourth. E.g "PlayerName moved more than 2 day[s],
4 hour[s] ago." -->
<plurals name="nag_minutes_fmt">
<item quantity="other">%1$d ]s[etunim</item>
<item quantity="one">%1$d etunim</item>
<item quantity="other">%1$d setunim</item>
</plurals>
<plurals name="nag_hours_fmt">
<item quantity="other">%1$d ]s[ruoh</item>
<item quantity="one">%1$d ruoh</item>
<item quantity="other">%1$d sruoh</item>
</plurals>
<plurals name="nag_days_fmt">
<item quantity="other">%1$d ]s[yad</item>
<item quantity="one">%1$d yad</item>
<item quantity="other">%1$d syad</item>
</plurals>
<string name="nag_body_fmt">%1$s devom erom naht %2$s oga.</string>
<!-- above is inserted in this the last time I warn -->
@ -2034,7 +2043,8 @@
<string name="use_defaults">Esu stluafed</string>
<string name="nplayers_prompt">Rebmun no siht ecived</string>
<plurals name="nplayers_fmt">
<item quantity="other">%1$d ]s[reyalp</item>
<item quantity="one">Eno reyalp</item>
<item quantity="other">%1$d sreyalp</item>
</plurals>
<string name="err_dup_invite_fmt">Etacilpud noitativni detcejer:
ecived \"%1$s\" sah ydaerla detpecca na noitativni ot siht

View file

@ -1660,8 +1660,10 @@
<string name="button_sms_add">IMPORT CONTACT</string>
<!-- -->
<plurals name="invite_sms_desc_fmt">
<item quantity="other">PLEASE CHECK THE %1$d PHONE
NUMBER[S] YOU WANT TO INVITE TO YOUR NEW GAME, THEN TAP \"%2$s\".</item>
<item quantity="one">PLEASE CHECK THE PHONE NUMBER YOU WANT TO
INVITE TO YOUR NEW GAME, THEN TAP \"%2$s\".</item>
<item quantity="other">PLEASE CHECK THE %1$d PHONE NUMBERS YOU
WANT TO INVITE TO YOUR NEW GAME, THEN TAP \"%2$s\".</item>
</plurals>
<!-- -->
<string name="manual_owner_name">(NOT IN CONTACTS)</string>
@ -1675,8 +1677,12 @@
<!-- -->
<string name="get_sms_number">ENTER PHONE NUMBER:</string>
<!-- -->
<string name="confirm_clear">ARE YOU SURE YOU WANT TO DELETE THE
CHECKED PHONE NUMBER[S]?</string>
<plurals name="confirm_clear_fmt">
<item quantity="one">ARE YOU SURE YOU WANT TO DELETE THE CHECKED
PHONE NUMBER?</item>
<item quantity="other">ARE YOU SURE YOU WANT TO DELETE THE
%1$d CHECKED PHONE NUMBERS?</item>
</plurals>
<!-- -->
<string name="connect_label_sms">CONNECTION (VIA SMS/TEXT)</string>
<!-- -->
@ -1984,13 +1990,16 @@
inserted in the fourth. E.g "PlayerName moved more than 2 day[s],
4 hour[s] ago." -->
<plurals name="nag_minutes_fmt">
<item quantity="other">%1$d MINUTE[S]</item>
<item quantity="one">%1$d MINUTE</item>
<item quantity="other">%1$d MINUTES</item>
</plurals>
<plurals name="nag_hours_fmt">
<item quantity="other">%1$d HOUR[S]</item>
<item quantity="one">%1$d HOUR</item>
<item quantity="other">%1$d HOURS</item>
</plurals>
<plurals name="nag_days_fmt">
<item quantity="other">%1$d DAY[S]</item>
<item quantity="one">%1$d DAY</item>
<item quantity="other">%1$d DAYS</item>
</plurals>
<string name="nag_body_fmt">%1$s MOVED MORE THAN %2$s AGO.</string>
<!-- above is inserted in this the last time I warn -->
@ -2034,7 +2043,8 @@
<string name="use_defaults">USE DEFAULTS</string>
<string name="nplayers_prompt">NUMBER ON THIS DEVICE</string>
<plurals name="nplayers_fmt">
<item quantity="other">%1$d PLAYER[S]</item>
<item quantity="one">ONE PLAYER</item>
<item quantity="other">%1$d PLAYERS</item>
</plurals>
<string name="err_dup_invite_fmt">DUPLICATE INVITATION REJECTED:
DEVICE \"%1$s\" HAS ALREADY ACCEPTED AN INVITATION TO THIS

View file

@ -173,7 +173,10 @@ public class SMSInviteDelegate extends InviteDelegate {
protected void clearSelected()
{
showConfirmThen( R.string.confirm_clear, Action.CLEAR_ACTION );
int count = countChecks();
String msg = getQuantityString( R.plurals.confirm_clear_fmt,
count, count );
showConfirmThen( msg, Action.CLEAR_ACTION );
}
protected void listSelected( String[][] devsP, int[][] countsP )