use localized language names; add some quantity="one" plurals items

for English; revert one <plural> to <string> because the quantity is
fixed and knowable and a pain to pass to getQuantityString().
This commit is contained in:
Eric House 2015-03-20 07:28:40 -07:00
parent 36839ac82b
commit bd7bfb328e
7 changed files with 406 additions and 356 deletions

File diff suppressed because it is too large Load diff

View file

@ -2356,12 +2356,8 @@ voyez pas un périphérique que vous attendez.</item>
%2$d seconds.</string>-->
<!--<string name="bt_resend_fmt">Un envoi Bluetooth à %1$s a échoué ; essai
%3$d dans %2$d secondes.</string>-->
<plurals name="bt_resend_fmt">
<item quantity="one">Un envoi Bluetooth à %1$s a échoué ; essai
%3$d dans %2$d seconde.</item>
<item quantity="other">Un envoi Bluetooth à %1$s a échoué ; essai
%3$d dans %2$d secondes.</item>
</plurals>
<string name="bt_resend_fmt">Un envoi Bluetooth à %1$s a échoué ; essai
%3$d dans %2$d secondes.</string>
<!-- -->
<!--<string name="bt_fail_fmt">Bluetooth sends to %1$s have failed too many
times. Re-open the game to try again.</string>-->

View file

@ -195,25 +195,25 @@
<string-array name="language_names">
<item>@string/lang_unknown</item> <!-- Unknown -->
<item>English</item> <!-- 1 -->
<item>French</item> <!-- 2 -->
<item>German</item> <!-- 3 -->
<item>Turkish</item> <!-- 4 -->
<item>Arabic</item> <!-- 5 -->
<item>Spanish</item> <!-- 6 -->
<item>Swedish</item> <!-- 7 -->
<item>Polish</item> <!-- 8 -->
<item>Danish</item> <!-- 9 -->
<item>Italian</item> <!-- A -->
<item>Dutch</item> <!-- B -->
<item>Catalan</item> <!-- C -->
<item>Portuguese</item> <!-- D -->
<item>@string/lang_name_english</item> <!-- 1 -->
<item>@string/lang_name_french</item> <!-- 2 -->
<item>@string/lang_name_german</item> <!-- 3 -->
<item>@string/lang_name_turkish</item> <!-- 4 -->
<item>@string/lang_name_arabic</item> <!-- 5 -->
<item>@string/lang_name_spanish</item> <!-- 6 -->
<item>@string/lang_name_swedish</item> <!-- 7 -->
<item>@string/lang_name_polish</item> <!-- 8 -->
<item>@string/lang_name_danish</item> <!-- 9 -->
<item>@string/lang_name_italian</item> <!-- A -->
<item>@string/lang_name_dutch</item> <!-- B -->
<item>@string/lang_name_catalan</item> <!-- C -->
<item>@string/lang_name_portuguese</item> <!-- D -->
<item></item> <!-- E -->
<item>Russian</item>
<item>@string/lang_name_russian</item>
<item></item> <!-- 10 -->
<item>Czech</item>
<item>Greek</item>
<item>Slovak</item>
<item>@string/lang_name_czech</item>
<item>@string/lang_name_greek</item>
<item>@string/lang_name_slovak</item>
</string-array>
<string-array name="language_codes">

View file

@ -162,15 +162,22 @@
(on this device only) to:</string>
<plurals name="confirm_seldeletes_fmt">
<item quantity="one">Are you sure you want to delete
the %1$d selected game? This action cannot be undone.</item>
<item quantity="other">Are you sure you want to delete
the %1$d selected game[s]? This action cannot be undone.</item>
the %1$d selected games? This action cannot be undone.</item>
</plurals>
<!-- Text of confirmation dialog posted when list_item_reset menu
is selected -->
<plurals name="confirm_reset_fmt"><item quantity="other">Are you sure you want to reset the %1$d
selected game[s]?\n\n(Resetting erases all moves and any connection
information.)</item></plurals>
<plurals name="confirm_reset_fmt">
<item quantity="one">Are you sure you want to reset the %1$d
selected game?\n\n(Resetting erases all moves and any connection
information.)</item>
<item quantity="other">Are you sure you want to reset the %1$d
selected games?\n\n(Resetting erases all moves and any connection
information.)</item>
</plurals>
<!--
############################################################
@ -526,9 +533,14 @@
open such a game I give the user a chance to issue an
invititation while trying to warn him not to send duplicates.
The number of players missing is substituted for "%1$d". -->
<plurals name="invite_msg_fmt"><item quantity="other">This game is waiting for %1$d remote
player[s]. Would you like to invite someone to join -- assuming
you haven\'t already?</item></plurals>
<plurals name="invite_msg_fmt">
<item quantity="one">This game is waiting for %1$d remote
player. Would you like to invite someone to join -- assuming you
haven\'t already?</item>
<item quantity="other">This game is waiting for %1$d remote
players. Would you like to invite someone to join -- assuming
you haven\'t already?</item>
</plurals>
<!-- Appended to message above if local device has NFC available -->
<string name="invite_if_nfc">Or just Tap to Invite -- if the other
@ -536,7 +548,10 @@
<!-- Toast shown when players are missing, same time as above
but more subtle. -->
<plurals name="players_miss_fmt"><item quantity="other">%1$d player[s] missing</item></plurals>
<plurals name="players_miss_fmt">
<item quantity="one">%1$d player missing</item>
<item quantity="other">%1$d players missing</item>
</plurals>
<!-- Most users create games with only two players, which is the
default, but Crosswords supports up to four. When I'm using
@ -559,8 +574,12 @@
the room, and how many additional players have not yet
registered with the relay in this game. This should be seen
only once per game. -->
<plurals name="msg_relay_waiting_fmt"><item quantity="other">Device %1$d connected to relay in
room \"%2$s\". Waiting for %3$d player[s].</item></plurals>
<plurals name="msg_relay_waiting_fmt">
<item quantity="one">Device %1$d connected to relay in
room \"%2$s\". Waiting for %3$d player.</item>
<item quantity="other">Device %1$d connected to relay in
room \"%2$s\". Waiting for %3$d players.</item>
</plurals>
<!-- Text of "toast" shown when a game is notified by the relay
that all expected players have registered. At this point
@ -672,7 +691,10 @@
able to remove this from non-debug versions of the game
because users should not have to do do this EVER. -->
<string name="board_menu_game_resend">Resend messages</string>
<plurals name="resend_finished_fmt"><item quantity="other">Resend finished; sent %1$d message[s].</item></plurals>
<plurals name="resend_finished_fmt">
<item quantity="one">Resend finished; sent %1$d message.</item>
<item quantity="other">Resend finished; sent %1$d messages.</item>
</plurals>
<!--
############################################################
@ -1343,7 +1365,7 @@
many players are expected and only connects devices where the
numbers match. -->
<string name="str_reg_unexpected_user">Refused attempt to register
unexpected user[s].</string>
unexpected user.</string>
<!-- Shown when a remote device tries to join a game and wants to
play in a different language. As with the above, this should
@ -1851,12 +1873,14 @@
<!-- -->
<string name="new_move_body">One or more moves has arrived</string>
<!-- -->
<plurals name="invite_bt_desc_fmt"><item quantity="other">Please select up to %1$d device[s]
<plurals name="invite_bt_desc_fmt">
<item quantity="other">Please select up to %1$d device[s]
you want to include in this game. Use the \"%2$s\"
button if you don\'t see a device you expect.</item></plurals>
button if you don\'t see a device you expect.</item>
</plurals>
<!-- -->
<plurals name="bt_resend_fmt"><item quantity="other">Bluetooth send to %1$s failed; retry %3$d in
%2$d seconds.</item></plurals>
<string name="bt_resend_fmt">Bluetooth send to %1$s failed; retry
%3$d in %2$d seconds.</string>
<!-- -->
<string name="bt_fail_fmt">Bluetooth sends to %1$s have failed too many
times. Re-open the game to try again.</string>
@ -2084,7 +2108,10 @@
<string name="cannot_delete_default_group_fmt">The group for new games, %1$s,
cannot be deleted.</string>
<plurals name="group_name_fmt"><item quantity="other">%1$s (%2$d games)</item></plurals>
<plurals name="group_name_fmt">
<item quantity="one">%1$s (%2$d game)</item>
<item quantity="other">%1$s (%2$d games)</item>
</plurals>
<!-- Button shown in game over dialog triggering creation of new
game with the same players and parameters as the one that
@ -2240,12 +2267,15 @@
%2$dK\nNote: %3$s</string>
<string name="note_none">(None)</string>
<string name="dict_on_server">Tap to download</string>
<plurals name="lang_name_fmt"><item quantity="other">%1$s (%2$d wordlists)</item></plurals>
<plurals name="lang_name_fmt">
<item quantity="one">%1$s (%2$d wordlist)</item>
<item quantity="other">%1$s (%2$d wordlists)</item>
</plurals>
<string name="lang_unknown">Unknown</string>
<string name="not_again_dicts">This screen lets you install new
wordslists and view the ones you already have.\n\nWhat wordlists
wordlists and view the ones you already have.\n\nWhat wordlists
you have installed determines:\n• What languages you can play
in\n• How smart the robot player is\n• What words are
legal.\n\nCheck the \"Show downloadable\" box at the top to see

View file

@ -142,14 +142,19 @@
<string name="rename_label_caveat">Egnahc eht eman fo siht emag
no( siht ecived )ylno ot:</string>
<plurals name="confirm_seldeletes_fmt">
<item quantity="one">Era uoy erus uoy tnaw ot eteled
eht %1$d detceles ?emag Siht noitca tonnac eb enodnu.</item>
<item quantity="other">Era uoy erus uoy tnaw ot eteled
eht %1$d detceles ?]s[emag Siht noitca tonnac eb enodnu.</item>
eht %1$d detceles ?semag Siht noitca tonnac eb enodnu.</item>
</plurals>
<!-- Text of confirmation dialog posted when list_item_reset menu
is selected -->
<plurals name="confirm_reset_fmt">
<item quantity="one">Era uoy erus uoy tnaw ot teser eht %1$d
detceles ?emag\n\ngNitteser( sesare lla sevom dna yna noitcennoc
noitamrofni.)</item>
<item quantity="other">Era uoy erus uoy tnaw ot teser eht %1$d
detceles ?]s[emag\n\ngNitteser( sesare lla sevom dna yna noitcennoc
detceles ?semag\n\ngNitteser( sesare lla sevom dna yna noitcennoc
noitamrofni.)</item>
</plurals>
<!--
@ -448,8 +453,11 @@
invititation while trying to warn him not to send duplicates.
The number of players missing is substituted for "%1$d". -->
<plurals name="invite_msg_fmt">
<item quantity="one">Siht emag si gnitiaw rof %1$d etomer
reyalp. Dluow uoy ekil ot etivni enoemos ot nioj -- gnimussa uoy
nevah\'t ?ydaerla</item>
<item quantity="other">Siht emag si gnitiaw rof %1$d etomer
]s[reyalp. Dluow uoy ekil ot etivni enoemos ot nioj -- gnimussa
sreyalp. Dluow uoy ekil ot etivni enoemos ot nioj -- gnimussa
uoy nevah\'t ?ydaerla</item>
</plurals>
<!-- Appended to message above if local device has NFC available -->
@ -458,7 +466,8 @@
<!-- Toast shown when players are missing, same time as above
but more subtle. -->
<plurals name="players_miss_fmt">
<item quantity="other">%1$d ]s[reyalp gnissim</item>
<item quantity="one">%1$d reyalp gnissim</item>
<item quantity="other">%1$d sreyalp gnissim</item>
</plurals>
<!-- Most users create games with only two players, which is the
default, but Crosswords supports up to four. When I'm using
@ -480,8 +489,10 @@
registered with the relay in this game. This should be seen
only once per game. -->
<plurals name="msg_relay_waiting_fmt">
<item quantity="one">Ecived %1$d detcennoc ot yaler ni
moor \"%2$s\". Gnitiaw rof %3$d reyalp.</item>
<item quantity="other">Ecived %1$d detcennoc ot yaler ni
moor \"%2$s\". Gnitiaw rof %3$d ]s[reyalp.</item>
moor \"%2$s\". Gnitiaw rof %3$d sreyalp.</item>
</plurals>
<!-- Text of "toast" shown when a game is notified by the relay
that all expected players have registered. At this point
@ -576,7 +587,8 @@
because users should not have to do do this EVER. -->
<string name="board_menu_game_resend">Dneser segassem</string>
<plurals name="resend_finished_fmt">
<item quantity="other">Dneser dehsinif; tnes %1$d ]s[egassem.</item>
<item quantity="one">Dneser dehsinif; tnes %1$d egassem.</item>
<item quantity="other">Dneser dehsinif; tnes %1$d segassem.</item>
</plurals>
<!--
############################################################
@ -1163,7 +1175,7 @@
many players are expected and only connects devices where the
numbers match. -->
<string name="str_reg_unexpected_user">Desufer tpmetta ot retsiger
detcepxenu ]s[resu.</string>
detcepxenu resu.</string>
<!-- Shown when a remote device tries to join a game and wants to
play in a different language. As with the above, this should
be impossible when connecting via the relay. -->
@ -1612,10 +1624,8 @@
nottub fi uoy nod\'t ees a ecived uoy tcepxe.</item>
</plurals>
<!-- -->
<plurals name="bt_resend_fmt">
<item quantity="other">Htooteulb dnes ot %1$s deliaf; yrter %3$d ni
%2$d sdnoces.</item>
</plurals>
<string name="bt_resend_fmt">Htooteulb dnes ot %1$s deliaf; yrter
%3$d ni %2$d sdnoces.</string>
<!-- -->
<string name="bt_fail_fmt">Htooteulb sdnes ot %1$s evah deliaf oot ynam
semit. Nepo-er eht emag ot yrt niaga.</string>
@ -1822,6 +1832,7 @@
<string name="cannot_delete_default_group_fmt">Eht puorg rof wen ,semag %1$s,
tonnac eb deteled.</string>
<plurals name="group_name_fmt">
<item quantity="one">%1$s (%2$d )emag</item>
<item quantity="other">%1$s (%2$d )semag</item>
</plurals>
<!-- Button shown in game over dialog triggering creation of new
@ -1949,11 +1960,12 @@
<string name="note_none">)Enon(</string>
<string name="dict_on_server">Pat ot daolnwod</string>
<plurals name="lang_name_fmt">
<item quantity="one">%1$s (%2$d )tsildrow</item>
<item quantity="other">%1$s (%2$d )stsildrow</item>
</plurals>
<string name="lang_unknown">Nwonknu</string>
<string name="not_again_dicts">Siht neercs stel uoy llatsni wen
stsilsdrow dna weiv eht seno uoy ydaerla evah.\n\nTahw stsildrow
stsildrow dna weiv eht seno uoy ydaerla evah.\n\nTahw stsildrow
uoy evah dellatsni senimreted:\n• Tahw segaugnal uoy nac yalp
ni\n• Woh trams eht tobor reyalp si\n• Tahw sdrow era
lagel.\n\nKcehc eht \"Wohs elbadaolnwod\" xob ta eht pot ot ees

View file

@ -142,14 +142,19 @@
<string name="rename_label_caveat">CHANGE THE NAME OF THIS GAME
(ON THIS DEVICE ONLY) TO:</string>
<plurals name="confirm_seldeletes_fmt">
<item quantity="one">ARE YOU SURE YOU WANT TO DELETE
THE %1$d SELECTED GAME? THIS ACTION CANNOT BE UNDONE.</item>
<item quantity="other">ARE YOU SURE YOU WANT TO DELETE
THE %1$d SELECTED GAME[S]? THIS ACTION CANNOT BE UNDONE.</item>
THE %1$d SELECTED GAMES? THIS ACTION CANNOT BE UNDONE.</item>
</plurals>
<!-- Text of confirmation dialog posted when list_item_reset menu
is selected -->
<plurals name="confirm_reset_fmt">
<item quantity="one">ARE YOU SURE YOU WANT TO RESET THE %1$d
SELECTED GAME?\n\n(RESETTING ERASES ALL MOVES AND ANY CONNECTION
INFORMATION.)</item>
<item quantity="other">ARE YOU SURE YOU WANT TO RESET THE %1$d
SELECTED GAME[S]?\n\n(RESETTING ERASES ALL MOVES AND ANY CONNECTION
SELECTED GAMES?\n\n(RESETTING ERASES ALL MOVES AND ANY CONNECTION
INFORMATION.)</item>
</plurals>
<!--
@ -448,8 +453,11 @@
invititation while trying to warn him not to send duplicates.
The number of players missing is substituted for "%1$d". -->
<plurals name="invite_msg_fmt">
<item quantity="one">THIS GAME IS WAITING FOR %1$d REMOTE
PLAYER. WOULD YOU LIKE TO INVITE SOMEONE TO JOIN -- ASSUMING YOU
HAVEN\'T ALREADY?</item>
<item quantity="other">THIS GAME IS WAITING FOR %1$d REMOTE
PLAYER[S]. WOULD YOU LIKE TO INVITE SOMEONE TO JOIN -- ASSUMING
PLAYERS. WOULD YOU LIKE TO INVITE SOMEONE TO JOIN -- ASSUMING
YOU HAVEN\'T ALREADY?</item>
</plurals>
<!-- Appended to message above if local device has NFC available -->
@ -458,7 +466,8 @@
<!-- Toast shown when players are missing, same time as above
but more subtle. -->
<plurals name="players_miss_fmt">
<item quantity="other">%1$d PLAYER[S] MISSING</item>
<item quantity="one">%1$d PLAYER MISSING</item>
<item quantity="other">%1$d PLAYERS MISSING</item>
</plurals>
<!-- Most users create games with only two players, which is the
default, but Crosswords supports up to four. When I'm using
@ -480,8 +489,10 @@
registered with the relay in this game. This should be seen
only once per game. -->
<plurals name="msg_relay_waiting_fmt">
<item quantity="one">DEVICE %1$d CONNECTED TO RELAY IN
ROOM \"%2$s\". WAITING FOR %3$d PLAYER.</item>
<item quantity="other">DEVICE %1$d CONNECTED TO RELAY IN
ROOM \"%2$s\". WAITING FOR %3$d PLAYER[S].</item>
ROOM \"%2$s\". WAITING FOR %3$d PLAYERS.</item>
</plurals>
<!-- Text of "toast" shown when a game is notified by the relay
that all expected players have registered. At this point
@ -576,7 +587,8 @@
because users should not have to do do this EVER. -->
<string name="board_menu_game_resend">RESEND MESSAGES</string>
<plurals name="resend_finished_fmt">
<item quantity="other">RESEND FINISHED; SENT %1$d MESSAGE[S].</item>
<item quantity="one">RESEND FINISHED; SENT %1$d MESSAGE.</item>
<item quantity="other">RESEND FINISHED; SENT %1$d MESSAGES.</item>
</plurals>
<!--
############################################################
@ -1163,7 +1175,7 @@
many players are expected and only connects devices where the
numbers match. -->
<string name="str_reg_unexpected_user">REFUSED ATTEMPT TO REGISTER
UNEXPECTED USER[S].</string>
UNEXPECTED USER.</string>
<!-- Shown when a remote device tries to join a game and wants to
play in a different language. As with the above, this should
be impossible when connecting via the relay. -->
@ -1612,10 +1624,8 @@
BUTTON IF YOU DON\'T SEE A DEVICE YOU EXPECT.</item>
</plurals>
<!-- -->
<plurals name="bt_resend_fmt">
<item quantity="other">BLUETOOTH SEND TO %1$s FAILED; RETRY %3$d IN
%2$d SECONDS.</item>
</plurals>
<string name="bt_resend_fmt">BLUETOOTH SEND TO %1$s FAILED; RETRY
%3$d IN %2$d SECONDS.</string>
<!-- -->
<string name="bt_fail_fmt">BLUETOOTH SENDS TO %1$s HAVE FAILED TOO MANY
TIMES. RE-OPEN THE GAME TO TRY AGAIN.</string>
@ -1822,6 +1832,7 @@
<string name="cannot_delete_default_group_fmt">THE GROUP FOR NEW GAMES, %1$s,
CANNOT BE DELETED.</string>
<plurals name="group_name_fmt">
<item quantity="one">%1$s (%2$d GAME)</item>
<item quantity="other">%1$s (%2$d GAMES)</item>
</plurals>
<!-- Button shown in game over dialog triggering creation of new
@ -1949,11 +1960,12 @@
<string name="note_none">(NONE)</string>
<string name="dict_on_server">TAP TO DOWNLOAD</string>
<plurals name="lang_name_fmt">
<item quantity="one">%1$s (%2$d WORDLIST)</item>
<item quantity="other">%1$s (%2$d WORDLISTS)</item>
</plurals>
<string name="lang_unknown">UNKNOWN</string>
<string name="not_again_dicts">THIS SCREEN LETS YOU INSTALL NEW
WORDSLISTS AND VIEW THE ONES YOU ALREADY HAVE.\n\nWHAT WORDLISTS
WORDLISTS AND VIEW THE ONES YOU ALREADY HAVE.\n\nWHAT WORDLISTS
YOU HAVE INSTALLED DETERMINES:\n• WHAT LANGUAGES YOU CAN PLAY
IN\n• HOW SMART THE ROBOT PLAYER IS\n• WHAT WORDS ARE
LEGAL.\n\nCHECK THE \"SHOW DOWNLOADABLE\" BOX AT THE TOP TO SEE

View file

@ -457,7 +457,7 @@ public class DlgDelegate {
boolean asToast = true;
switch( event ) {
case MESSAGE_RESEND:
msg = getQuantityString( R.plurals.bt_resend_fmt, 1, (String)args[0],
msg = getString( R.string.bt_resend_fmt, (String)args[0],
(Long)args[1], (Integer)args[2] );
break;
case MESSAGE_FAILOUT: