move user-visible literals into string resource; shame on me :-)

This commit is contained in:
eehouse 2010-05-06 12:47:46 +00:00
parent 2966939a5a
commit 73f441bea9
2 changed files with 4 additions and 4 deletions

View file

@ -513,7 +513,7 @@ public class GameConfig extends Activity implements View.OnClickListener {
{ {
m_playerLayout.removeAllViews(); m_playerLayout.removeAllViews();
String[] names = m_gi.visibleNames(); String[] names = m_gi.visibleNames( this );
LayoutInflater factory = LayoutInflater.from(this); LayoutInflater factory = LayoutInflater.from(this);
for ( int ii = 0; ii < names.length; ++ii ) { for ( int ii = 0; ii < names.length; ++ii ) {

View file

@ -192,7 +192,7 @@ public class CurGameInfo {
} }
} }
public String[] visibleNames() public String[] visibleNames( Context context )
{ {
String[] names = new String[m_nVisiblePlayers]; String[] names = new String[m_nVisiblePlayers];
for ( int ii = 0; ii < m_nVisiblePlayers; ++ii ) { for ( int ii = 0; ii < m_nVisiblePlayers; ++ii ) {
@ -200,10 +200,10 @@ public class CurGameInfo {
if ( lp.isLocal || serverRole == DeviceRole.SERVER_STANDALONE ) { if ( lp.isLocal || serverRole == DeviceRole.SERVER_STANDALONE ) {
names[ii] = lp.name; names[ii] = lp.name;
if ( lp.isRobot ) { if ( lp.isRobot ) {
names[ii] += "(robot)"; names[ii] += context.getString( R.string.robot_name );
} }
} else { } else {
names[ii] = "(remote player)"; names[ii] = context.getString( R.string.guest_name );
} }
} }
return names; return names;