mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
add xlateLang() to delegate base class
This commit is contained in:
parent
6d39a0fdca
commit
27dde57660
4 changed files with 10 additions and 5 deletions
|
@ -209,6 +209,11 @@ public class DelegateBase implements DlgClickNotify,
|
|||
return LocUtils.getString( m_activity, resID, params );
|
||||
}
|
||||
|
||||
protected String xlateLang( String langCode )
|
||||
{
|
||||
return LocUtils.xlateLang( m_activity, langCode );
|
||||
}
|
||||
|
||||
protected String getQuantityString( int resID, int quantity,
|
||||
Object... params )
|
||||
{
|
||||
|
|
|
@ -187,8 +187,9 @@ public class DictsDelegate extends ListDelegateBase
|
|||
int langCode = DictLangCache.getLangLangCode( m_context,
|
||||
langName );
|
||||
boolean expanded = ! m_closedLangs.contains( langName );
|
||||
String locLangName = LocUtils.xlateLang( m_context, langName );
|
||||
String name = getQuantityString( R.plurals.lang_name_fmt, info.m_numDicts,
|
||||
String locLangName = xlateLang( langName );
|
||||
String name = getQuantityString( R.plurals.lang_name_fmt,
|
||||
info.m_numDicts,
|
||||
locLangName, info.m_numDicts );
|
||||
result = ListGroup.make( m_context, convertView,
|
||||
DictsDelegate.this, groupPos, name,
|
||||
|
|
|
@ -1920,8 +1920,7 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
public void gotDictInfo( boolean success, String lang,
|
||||
String name ) {
|
||||
if ( success ) {
|
||||
String locLang =
|
||||
LocUtils.xlateLang( m_activity, lang );
|
||||
String locLang = xlateLang( lang );
|
||||
String msg =
|
||||
getString( R.string.confirm_get_locdict_fmt,
|
||||
locLang );
|
||||
|
|
|
@ -251,7 +251,7 @@ public class PrefsDelegate extends DelegateBase
|
|||
String[] langs = DictLangCache.listLangs( m_activity );
|
||||
String[] langsLoc = new String[langs.length];
|
||||
for ( int ii = 0; ii < langs.length; ++ii ) {
|
||||
langsLoc[ii] = LocUtils.xlateLang( m_activity, langs[ii] );
|
||||
langsLoc[ii] = xlateLang( langs[ii] );
|
||||
}
|
||||
lp.setEntries( langsLoc );
|
||||
lp.setDefaultValue( langsLoc[0] );
|
||||
|
|
Loading…
Reference in a new issue