mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-06 20:45:54 +01:00
put up more user-friendly message when dicts don't match.
This commit is contained in:
parent
5f247db29c
commit
eb47e75c50
2 changed files with 31 additions and 6 deletions
|
@ -2118,4 +2118,14 @@
|
|||
<!-- Used in formatting final scores display -->
|
||||
<string name="str_winner">Winner</string>
|
||||
|
||||
<!-- -->
|
||||
<string name="inform_dict_diffversionf">You and the host of this
|
||||
game are using different versions of the wordlist %1$s.</string>
|
||||
<!-- -->
|
||||
<string name="inform_dict_diffdictf">You are using the wordlist
|
||||
%1$s but the game host is using %2$s.</string>
|
||||
<!-- -->
|
||||
<string name="inform_dict_phonies">\u0020(Remember that phonies
|
||||
will be discarded based on the host\'s wordlist.)</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1485,12 +1485,27 @@ public class BoardActivity extends XWActivity
|
|||
// should be the normal case. Otherwise: if same name but
|
||||
// different sum, notify and offer to upgrade. If
|
||||
// different name, offer to install.
|
||||
String oldSum = DictLangCache.getDictMD5Sum( BoardActivity.this,
|
||||
oldName );
|
||||
String str = String.format( "informNetDict(%s, %s, %s, %s, %s)",
|
||||
oldName, oldSum, newName, newSum,
|
||||
phonies.toString() );
|
||||
nonBlockingDialog( DLG_OKONLY, str );
|
||||
String msg = null;
|
||||
if ( oldName.equals( newName ) ) {
|
||||
String oldSum = DictLangCache.getDictMD5Sum( BoardActivity.this,
|
||||
oldName );
|
||||
if ( !oldSum.equals( newSum ) ) {
|
||||
// Same dict, different versions
|
||||
msg = getString( R.string. inform_dict_diffversionf,
|
||||
oldName );
|
||||
}
|
||||
} else {
|
||||
// Different dict! If we have the other one, switch
|
||||
// to it. Otherwise offer to download
|
||||
msg = getString( R.string.inform_dict_diffdictf,
|
||||
oldName, newName );
|
||||
}
|
||||
if ( null != msg ) {
|
||||
if ( CurGameInfo.XWPhoniesChoice.PHONIES_DISALLOW == phonies ) {
|
||||
msg += getString( R.string.inform_dict_phonies );
|
||||
}
|
||||
nonBlockingDialog( DLG_OKONLY, msg );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue