format "game_name (lang)" using string in resource.

This commit is contained in:
Andy2 2011-04-11 18:52:10 -07:00
parent 3c0cf176ef
commit 40116d792f
2 changed files with 7 additions and 7 deletions

View file

@ -125,6 +125,7 @@
<string name="str_commit_confirm">Commit the current move?\n</string>
<string name="str_local_name">%s</string>
<string name="str_nonlocal_name">%s (remote)</string>
<string name="str_game_namef">%s (%s)</string>
<string name="str_bonus_all">Bonus for using all tiles: 50\n</string>
<string name="strd_turn_score">Score for turn: %d\n</string>

View file

@ -97,14 +97,13 @@ public class GameListAdapter extends XWListAdapter {
if ( hideTitle ) {
view.setVisibility( View.GONE );
} else {
String format =
m_context.getString( R.string.str_game_namef );
String name = GameUtils.gameName( m_context, path );
if ( true ) { // FIXME
name += " (" +
DictLangCache.getLangName(m_context,
summary.dictName)
+ ")";
}
view.setText( name );
String lang =
DictLangCache.getLangName( m_context,
summary.dictLang );
view.setText( String.format( format, name, lang ) );
}
view = (TextView)layout.findViewById( R.id.state );
view.setText( summary.summarizeState( m_context ) );