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

removing [s]. There's more to do still.

Conflicts:
	xwords4/android/XWords4/archive/R.java
	xwords4/android/XWords4/res/values/strings.xml
	xwords4/android/XWords4/res_src/values-ba_CK/strings.xml
	xwords4/android/XWords4/res_src/values-ca_PS/strings.xml
	xwords4/android/XWords4/src/org/eehouse/android/xw4/SMSInviteDelegate.java
This commit is contained in:
Eric House 2015-07-23 07:03:47 -07:00
parent b48f83ace4
commit d4e5c9dfdf
5 changed files with 356 additions and 313 deletions

File diff suppressed because it is too large Load diff

View file

@ -1921,8 +1921,12 @@
<!-- -->
<string name="button_relay_add">Scan games</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>
<!-- -->
<plurals name="invite_relay_desc_fmt"><item
quantity="other">Please check the %1$d devices you want to invite
@ -1944,8 +1948,12 @@
<string name="get_sms_number">Enter phone number:</string>
<string name="get_relay_number">Enter device ID:</string>
<!-- -->
<string name="confirm_clear_sms">Are you sure you want to delete the
checked phone number[s]?</string>
<plurals name="confirm_clear_sms_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="confirm_clear_relay">Are you sure you want to delete the
checked device[s]?</string>
<!-- -->
@ -2312,9 +2320,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>
@ -2360,7 +2377,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

@ -1663,8 +1663,10 @@
<string name="button_relay_add">Nacs semag</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>
<!-- -->
<plurals name="invite_relay_desc_fmt">
@ -1688,8 +1690,12 @@
<string name="get_sms_number">Retne enohp rebmun:</string>
<string name="get_relay_number">Retne ecived DI:</string>
<!-- -->
<string name="confirm_clear_sms">Era uoy erus uoy tnaw ot eteled eht
dekcehc enohp ?]s[rebmun</string>
<plurals name="confirm_clear_sms_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="confirm_clear_relay">Era uoy erus uoy tnaw ot eteled eht
dekcehc ?]s[ecived</string>
<!-- -->
@ -1999,13 +2005,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 -->
@ -2049,7 +2058,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

@ -1663,8 +1663,10 @@
<string name="button_relay_add">SCAN GAMES</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>
<!-- -->
<plurals name="invite_relay_desc_fmt">
@ -1688,8 +1690,12 @@
<string name="get_sms_number">ENTER PHONE NUMBER:</string>
<string name="get_relay_number">ENTER DEVICE ID:</string>
<!-- -->
<string name="confirm_clear_sms">ARE YOU SURE YOU WANT TO DELETE THE
CHECKED PHONE NUMBER[S]?</string>
<plurals name="confirm_clear_sms_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="confirm_clear_relay">ARE YOU SURE YOU WANT TO DELETE THE
CHECKED DEVICE[S]?</string>
<!-- -->
@ -1999,13 +2005,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 -->
@ -2049,7 +2058,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_sms, Action.CLEAR_ACTION );
int count = countChecks();
String msg = getQuantityString( R.plurals.confirm_clear_sms_fmt,
count, count );
showConfirmThen( msg, Action.CLEAR_ACTION );
}
protected void listSelected( String[][] devsP, int[][] countsP )