mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-24 07:58:34 +01:00
add progress to initial fetch of dict info from server for non-English
devices
This commit is contained in:
parent
23e6f97778
commit
276666dd1a
5 changed files with 21 additions and 3 deletions
|
@ -841,6 +841,8 @@ public final class R {
|
||||||
substituted for %1$s.
|
substituted for %1$s.
|
||||||
*/
|
*/
|
||||||
public static final int chat_title_fmt=0x7f050170;
|
public static final int chat_title_fmt=0x7f050170;
|
||||||
|
public static final int checking_for_fmt=0x7f0502f9;
|
||||||
|
public static final int checking_title=0x7f0502f8;
|
||||||
public static final int checkupdates_none_found=0x7f050225;
|
public static final int checkupdates_none_found=0x7f050225;
|
||||||
/** color of the "crosshairs", lines drawn vertically and
|
/** color of the "crosshairs", lines drawn vertically and
|
||||||
horizontally through the square the user is currently
|
horizontally through the square the user is currently
|
||||||
|
|
|
@ -2459,5 +2459,7 @@
|
||||||
<string name="pref_item_update_title">Update between releases</string>
|
<string name="pref_item_update_title">Update between releases</string>
|
||||||
<string name="pref_item_update_summary">Get intermediate builds</string>
|
<string name="pref_item_update_summary">Get intermediate builds</string>
|
||||||
|
|
||||||
|
<string name="checking_title">Checking</string>
|
||||||
|
<string name="checking_for_fmt">Checking server for %1$s wordlists…</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -2129,4 +2129,6 @@
|
||||||
<string name="pref_group_l10n_summary">Sferp detaler ot ppa-ni noitazilacol</string>
|
<string name="pref_group_l10n_summary">Sferp detaler ot ppa-ni noitazilacol</string>
|
||||||
<string name="pref_item_update_title">Etadpu neewteb sesaeler</string>
|
<string name="pref_item_update_title">Etadpu neewteb sesaeler</string>
|
||||||
<string name="pref_item_update_summary">Teg etaidemretni sdliub</string>
|
<string name="pref_item_update_summary">Teg etaidemretni sdliub</string>
|
||||||
|
<string name="checking_title">Gnikcehc</string>
|
||||||
|
<string name="checking_for_fmt">Gnikcehc revres rof %1$s stsildrow…</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -2129,4 +2129,6 @@
|
||||||
<string name="pref_group_l10n_summary">PREFS RELATED TO IN-APP LOCALIZATION</string>
|
<string name="pref_group_l10n_summary">PREFS RELATED TO IN-APP LOCALIZATION</string>
|
||||||
<string name="pref_item_update_title">UPDATE BETWEEN RELEASES</string>
|
<string name="pref_item_update_title">UPDATE BETWEEN RELEASES</string>
|
||||||
<string name="pref_item_update_summary">GET INTERMEDIATE BUILDS</string>
|
<string name="pref_item_update_summary">GET INTERMEDIATE BUILDS</string>
|
||||||
|
<string name="checking_title">CHECKING</string>
|
||||||
|
<string name="checking_for_fmt">CHECKING SERVER FOR %1$s WORDLISTS…</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -584,6 +584,7 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
private String m_origTitle;
|
private String m_origTitle;
|
||||||
private boolean m_nextIsSolo;
|
private boolean m_nextIsSolo;
|
||||||
private Button[] m_newGameButtons;
|
private Button[] m_newGameButtons;
|
||||||
|
private boolean m_haveShownGetDict;
|
||||||
|
|
||||||
public GamesListDelegate( ListDelegator delegator, Bundle sis )
|
public GamesListDelegate( ListDelegator delegator, Bundle sis )
|
||||||
{
|
{
|
||||||
|
@ -1903,8 +1904,11 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
|
|
||||||
private void getDictForLangIf()
|
private void getDictForLangIf()
|
||||||
{
|
{
|
||||||
if ( ! XWPrefs.getPrefsBoolean( m_activity, R.string.key_got_langdict,
|
if ( ! m_haveShownGetDict &&
|
||||||
|
! XWPrefs.getPrefsBoolean( m_activity, R.string.key_got_langdict,
|
||||||
false ) ) {
|
false ) ) {
|
||||||
|
m_haveShownGetDict = true;
|
||||||
|
|
||||||
String lc = Locale.getDefault().getLanguage();
|
String lc = Locale.getDefault().getLanguage();
|
||||||
if ( !lc.equals("en") ) {
|
if ( !lc.equals("en") ) {
|
||||||
int code = LocUtils.codeForLangCode( m_activity, lc );
|
int code = LocUtils.codeForLangCode( m_activity, lc );
|
||||||
|
@ -1917,14 +1921,15 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
true );
|
true );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
OnGotLcDictListener lstnr = new OnGotLcDictListener() {
|
OnGotLcDictListener lstnr = new OnGotLcDictListener() {
|
||||||
public void gotDictInfo( boolean success, String lang,
|
public void gotDictInfo( boolean success, String lang,
|
||||||
String name ) {
|
String name ) {
|
||||||
|
stopProgress();
|
||||||
if ( success ) {
|
if ( success ) {
|
||||||
String locLang = xlateLang( lang );
|
|
||||||
String msg =
|
String msg =
|
||||||
getString( R.string.confirm_get_locdict_fmt,
|
getString( R.string.confirm_get_locdict_fmt,
|
||||||
locLang );
|
xlateLang( lang ) );
|
||||||
showConfirmThen( onNA, msg, R.string
|
showConfirmThen( onNA, msg, R.string
|
||||||
.button_download,
|
.button_download,
|
||||||
Action.DWNLD_LOC_DICT,
|
Action.DWNLD_LOC_DICT,
|
||||||
|
@ -1932,6 +1937,11 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
String langName = DictLangCache.getLangName( m_activity, code );
|
||||||
|
String locLang = xlateLang( langName );
|
||||||
|
String msg = getString( R.string.checking_for_fmt, locLang );
|
||||||
|
startProgress( R.string.checking_title, msg );
|
||||||
DictsDelegate.downloadDefaultDict( m_activity, lc, lstnr );
|
DictsDelegate.downloadDefaultDict( m_activity, lc, lstnr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue