mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
more use of LocUtils.getString()
This commit is contained in:
parent
01c94d91cd
commit
e12fbcce8e
3 changed files with 7 additions and 4 deletions
|
@ -33,6 +33,7 @@ import org.eehouse.android.xw4.XWPrefs;
|
|||
import org.eehouse.android.xw4.R;
|
||||
import org.eehouse.android.xw4.DictUtils;
|
||||
import org.eehouse.android.xw4.DbgUtils;
|
||||
import org.eehouse.android.xw4.loc.LocUtils;
|
||||
|
||||
public class CommonPrefs extends XWPrefs {
|
||||
public static final int COLOR_TILE_BACK = 0;
|
||||
|
@ -185,7 +186,7 @@ public class CommonPrefs extends XWPrefs {
|
|||
result = null; // be consistent
|
||||
}
|
||||
if ( force && null == result ) {
|
||||
String fmt = context.getString( R.string.player_fmt );
|
||||
String fmt = LocUtils.getString( context, R.string.player_fmt );
|
||||
result = String.format( fmt, num + 1 );
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.eehouse.android.xw4.DbgUtils;
|
|||
import org.eehouse.android.xw4.DictUtils;
|
||||
import org.eehouse.android.xw4.R;
|
||||
import org.eehouse.android.xw4.DictLangCache;
|
||||
import org.eehouse.android.xw4.loc.LocUtils;
|
||||
|
||||
public class CurGameInfo {
|
||||
|
||||
|
@ -257,14 +258,14 @@ public class CurGameInfo {
|
|||
if ( lp.isLocal || serverRole == DeviceRole.SERVER_STANDALONE ) {
|
||||
String name;
|
||||
if ( lp.isRobot() ) {
|
||||
String format = m_context.getString( R.string.robot_name_fmt );
|
||||
String format = LocUtils.getString( m_context, R.string.robot_name_fmt );
|
||||
name = String.format( format, lp.name );
|
||||
} else {
|
||||
name = lp.name;
|
||||
}
|
||||
names[ii] = String.format( nameFmt, name, dictName(lp) );
|
||||
} else {
|
||||
names[ii] = m_context.getString( R.string.guest_name );
|
||||
names[ii] = LocUtils.getString( m_context, R.string.guest_name );
|
||||
}
|
||||
}
|
||||
return names;
|
||||
|
|
|
@ -28,6 +28,7 @@ import org.eehouse.android.xw4.DbgUtils;
|
|||
import org.eehouse.android.xw4.XWApp;
|
||||
import org.eehouse.android.xw4.XWPrefs;
|
||||
import org.eehouse.android.xw4.R;
|
||||
import org.eehouse.android.xw4.loc.LocUtils;
|
||||
|
||||
public class UtilCtxtImpl implements UtilCtxt {
|
||||
private Context m_context;
|
||||
|
@ -230,7 +231,7 @@ public class UtilCtxtImpl implements UtilCtxt {
|
|||
if ( 0 == id ) {
|
||||
result = "";
|
||||
} else {
|
||||
result = m_context.getString( id );
|
||||
result = LocUtils.getString( m_context, id );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue