make bad-words reporting dialog blocking so robot doesn't go ahead and move and put its moved dialog up on top of the bad words one before it's dismissed; also change name of string to reflect that it's a format.

This commit is contained in:
Eric House 2014-02-06 07:22:57 -08:00
parent f6a1e06d41
commit 048ae63802
6 changed files with 12 additions and 22 deletions

View file

@ -182,7 +182,7 @@
<string name="msg_dup_room">Un altre amfitrió ha registrat una sala amb aquest nom. Canvieu el nom a la vostra o intentenu més tard.</string>
<string name="msg_lost_other">El repetidor ha perdut el contacte amb algun altre dispositiu durant aquesta partida.</string>
<string name="ids_badwords">Les paraules %s no es troben al diccionari.</string>
<string name="ids_badwordsf">Les paraules %s no es troben al diccionari.</string>
<string name="badwords_accept"> Voleu acceptar aquesta jugada?</string>
<string name="badwords_lost"> Torn perdut.</string>
<string name="badwords_title">Les paraules no són vàlides</string>

View file

@ -161,7 +161,7 @@
<string name="msg_dup_room">Jiný server si již zaregistroval místnost s tímto jménem. Přejmenujte ji nebo to zkuste později.</string>
<string name="msg_lost_other">Relay ztratil kontakt s nějakým zařízením ve hře.</string>
<string name="ids_badwords">Slovo[a] %s nebylo nalezeno ve slovníku.</string>
<string name="ids_badwordsf">Slovo[a] %s nebylo nalezeno ve slovníku.</string>
<string name="badwords_accept"> Chcete přesto přijmout tento tah?</string>
<string name="badwords_lost"> Tah ztracen.</string>
<string name="badwords_title">Neplatné slovo[a]</string>

View file

@ -605,7 +605,7 @@
phonies_disallow is the current setting and a "phony" is
played. One of the two following strings will be appended
-->
<string name="ids_badwords">Palavra(s) %1$s não encontrada(s) na
<string name="ids_badwordsf">Palavra(s) %1$s não encontrada(s) na
lista de palavras %2$s.</string>
<!-- Appended to the above in the phonies_warn case. User may

View file

@ -161,7 +161,7 @@
<string name="msg_dup_room">Iný server si už zaregistroval miestnosť s týmto menom. Premenujte ju alebo to skúste neskôr.</string>
<string name="msg_lost_other">Relay stratil kontakt s niektorým zariadením v hre.</string>
<string name="ids_badwords">Slovo[á] %s nebolo nájdené v slovníku.</string>
<string name="ids_badwordsf">Slovo[á] %s nebolo nájdené v slovníku.</string>
<string name="badwords_accept"> Chcete napriek tomu potvrdiť tento ťah?</string>
<string name="badwords_lost"> Ťah stratený.</string>
<string name="badwords_title">Neplatné slovo[á]</string>

View file

@ -601,7 +601,7 @@
phonies_disallow is the current setting and a "phony" is
played. One of the two following strings will be appended
-->
<string name="ids_badwords">Word[s] %1$s not found in
<string name="ids_badwordsf">Word[s] %1$s not found in
wordlist %2$s.</string>
<!-- Appended to the above in the phonies_warn case. User may

View file

@ -71,7 +71,7 @@ public class BoardActivity extends XWActivity
public static final String INTENT_KEY_CHAT = "chat";
private static final int DLG_OKONLY = DlgDelegate.DIALOG_LAST + 1;
private static final int DLG_BADWORDS = DLG_OKONLY + 1;
private static final int DLG_BADWORDS_BLK = DLG_OKONLY + 1;
private static final int QUERY_REQUEST_BLK = DLG_OKONLY + 2;
private static final int QUERY_INFORM_BLK = DLG_OKONLY + 3;
private static final int PICK_TILE_REQUESTBLANK_BLK = DLG_OKONLY + 4;
@ -283,7 +283,6 @@ public class BoardActivity extends XWActivity
switch ( id ) {
case DLG_OKONLY:
case DLG_BADWORDS:
case DLG_RETRY:
case GAME_OVER:
case DLG_CONNSTAT:
@ -368,6 +367,7 @@ public class BoardActivity extends XWActivity
case QUERY_REQUEST_BLK:
case QUERY_INFORM_BLK:
case DLG_SCORES_BLK:
case DLG_BADWORDS_BLK:
ab = new AlertDialog.Builder( this )
.setMessage( m_dlgBytes );
if ( 0 != m_dlgTitle ) {
@ -1776,21 +1776,14 @@ public class BoardActivity extends XWActivity
{
boolean accept = turnLost;
StringBuffer sb = new StringBuffer();
for ( int ii = 0; ; ) {
sb.append( words[ii] );
if ( ++ii == words.length ) {
break;
}
sb.append( "; " );
}
String wordsString = TextUtils.join( ", ", words );
String message =
getString( R.string.ids_badwords, sb.toString(), dict );
getString( R.string.ids_badwordsf, wordsString, dict );
if ( turnLost ) {
nonBlockingDialog( DLG_BADWORDS,
message + getString(R.string.badwords_lost) );
m_dlgBytes = message + getString( R.string.badwords_lost );
m_dlgTitle = R.string.badwords_title;
waitBlockingDialog( DLG_BADWORDS_BLK, 0 );
} else {
m_dlgBytes = message + getString( R.string.badwords_accept );
m_dlgTitle = R.string.query_title;
@ -2062,9 +2055,6 @@ public class BoardActivity extends XWActivity
case DLG_OKONLY:
m_dlgTitle = R.string.info_title;
break;
case DLG_BADWORDS:
m_dlgTitle = R.string.badwords_title;
break;
case DLG_USEDICT:
case DLG_GETDICT:
m_dlgTitle = R.string.inform_dict_title;