use one message for deletion of groups, whether one or many

This commit is contained in:
Eric House 2014-03-17 07:45:09 -07:00
parent 37b2458140
commit a5f0c797bb
3 changed files with 8 additions and 19 deletions

View file

@ -2138,11 +2138,6 @@
<string name="group_cur_games">Meus jogos</string>
<string name="group_new_games">Novos jogos</string>
<string name="group_confirm_del">Você tem certeza que quer apagar
esse grupo?</string>
<string name="group_confirm_delf">\u0020(Ele contém %d jogo(s),
que também serão apagados.)</string>
<string name="rename_group_label">Mudar o nome desse grupo para:</string>
<string name="game_name_group_title">Nomear grupo</string>

View file

@ -160,7 +160,7 @@
<!-- Text of confirmation dialog posted when list_item_reset menu
is selected -->
<string name="confirm_resetf">Are you sure you want to reset the %d
selected game[s]? (Resetting erases all moves and any connection
selected game[s]?\n\n(Resetting erases all moves and any connection
information.)</string>
<!--
@ -2123,14 +2123,10 @@
<string name="group_cur_games">My games</string>
<string name="group_new_games">New games</string>
<string name="group_confirm_del">Are you sure you want to delete
the selected group?</string>
<string name="groups_confirm_del">Are you sure you want to delete
the selected groups?</string>
<string name="group_confirm_delf">\u0020(It contains %d game[s],
which will also be deleted.)</string>
<string name="groups_confirm_delf">\u0020(They contains %d game[s],
which will also be deleted.)</string>
<string name="groups_confirm_delf">Are you sure you want to delete
the %d selected group[s]?</string>
<string name="groups_confirm_del_gamesf">\n\n(%d game[s] will
also be deleted.)</string>
<string name="rename_group_label">Change the name of this group to:</string>
<string name="game_name_group_title">Name group</string>

View file

@ -878,16 +878,14 @@ public class GamesList extends XWExpandableListActivity
} else {
long[] groupIDs = getSelGroupIDs();
Assert.assertTrue( 0 < groupIDs.length );
msg = getString( 1 == groupIDs.length ? R.string.group_confirm_del
: R.string.groups_confirm_del );
msg = getString( R.string.groups_confirm_delf, groupIDs.length );
int nGames = 0;
for ( long tmp : groupIDs ) {
nGames += m_adapter.getChildrenCount( tmp );
}
if ( 0 < nGames ) {
int fmtID = 1 == groupIDs.length ? R.string.group_confirm_delf
: R.string.groups_confirm_delf;
msg += getString( fmtID, nGames );
msg += getString( R.string.groups_confirm_del_gamesf, nGames );
}
showConfirmThen( msg, GamesActions.DELETE_GROUPS.ordinal(),
groupIDs );