more use of LocUtils.getString()

This commit is contained in:
Eric House 2014-04-15 07:34:14 -07:00
parent 01c94d91cd
commit e12fbcce8e
3 changed files with 7 additions and 4 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;
}