diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java index def4bfb6e..3041fded6 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java @@ -161,16 +161,13 @@ public class GamesListDelegate extends DelegateBase DictLangCache.getLangName( m_activity, m_missingDictLang ); String gameName = GameUtils.getName( m_activity, m_missingDictRowId ); if ( DlgID.WARN_NODICT == dlgID ) { - message = m_activity.getString( R.string.no_dict_fmt, - gameName, langName ); + message = getString( R.string.no_dict_fmt, gameName, langName ); } else if ( DlgID.WARN_NODICT_NEW == dlgID ) { - message = - m_activity.getString( R.string.invite_dict_missing_body_noname_fmt, - null, m_missingDictName, langName ); + message = getString( R.string.invite_dict_missing_body_noname_fmt, + null, m_missingDictName, langName ); } else { - message = m_activity.getString( R.string.no_dict_subst_fmt, - gameName, m_missingDictName, - langName ); + message = getString( R.string.no_dict_subst_fmt, gameName, + m_missingDictName, langName ); } ab = makeAlertBuilder() @@ -830,7 +827,7 @@ public class GamesListDelegate extends DelegateBase break; case R.id.games_game_reset: - msg = m_activity.getString( R.string.confirm_reset_fmt, selRowIDs.length ); + msg = getString( R.string.confirm_reset_fmt, selRowIDs.length ); showConfirmThen( msg, R.string.button_reset, Action.RESET_GAMES, selRowIDs ); break; @@ -844,22 +841,22 @@ public class GamesListDelegate extends DelegateBase case R.id.games_group_delete: long dftGroup = XWPrefs.getDefaultNewGameGroup( m_activity ); if ( m_selGroupIDs.contains( dftGroup ) ) { - msg = m_activity.getString( R.string.cannot_delete_default_group_fmt, - m_adapter.groupName( dftGroup ) ); + msg = getString( R.string.cannot_delete_default_group_fmt, + m_adapter.groupName( dftGroup ) ); showOKOnlyDialog( msg ); } else { long[] groupIDs = getSelGroupIDs(); Assert.assertTrue( 0 < groupIDs.length ); - msg = m_activity.getString( R.string.groups_confirm_del_fmt, - groupIDs.length ); + msg = getString( R.string.groups_confirm_del_fmt, + groupIDs.length ); int nGames = 0; for ( long tmp : groupIDs ) { nGames += m_adapter.getChildrenCount( tmp ); } if ( 0 < nGames ) { - msg += m_activity.getString( R.string.groups_confirm_del_games_fmt, - nGames ); + msg += getString( R.string.groups_confirm_del_games_fmt, + nGames ); } showConfirmThen( msg, Action.DELETE_GROUPS, groupIDs ); } @@ -1064,8 +1061,8 @@ public class GamesListDelegate extends DelegateBase makeNewNetGame( nli ); } } else if ( XWPrefs.getSecondInviteAllowed( m_activity ) ) { - String msg = m_activity.getString( R.string.dup_game_query_fmt, - create.toString() ); + String msg = getString( R.string.dup_game_query_fmt, + create.toString() ); m_netLaunchInfo = nli; showConfirmThen( msg, Action.NEW_NET_GAME, nli ); } else { diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/Utils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/Utils.java index d56a525e6..537b6c9d6 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/Utils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/Utils.java @@ -156,13 +156,16 @@ public class Utils { Intent intent = new Intent( Intent.ACTION_SEND ); intent.setType( "message/rfc822" ); // force email intent.putExtra( Intent.EXTRA_SUBJECT, - context.getString( R.string.email_author_subject ) ); - String[] addrs = { context.getString( R.string.email_author_email ) }; + LocUtils.getString( context, + R.string.email_author_subject ) ); + String[] addrs = { LocUtils.getString( context, + R.string.email_author_email ) }; intent.putExtra( Intent.EXTRA_EMAIL, addrs ); String body = LocUtils.getString( context, R.string.email_body_rev_fmt, BuildConstants.GIT_REV ); intent.putExtra( Intent.EXTRA_TEXT, body ); - String chooserMsg = context.getString( R.string.email_author_chooser ); + String chooserMsg = LocUtils.getString( context, + R.string.email_author_chooser ); context.startActivity( Intent.createChooser( intent, chooserMsg ) ); } @@ -170,13 +173,13 @@ public class Utils { int titleID, int bodyID, int id ) { postNotification( context, intent, titleID, - context.getString( bodyID ), id ); + LocUtils.getString( context, bodyID ), id ); } public static void postNotification( Context context, Intent intent, int titleID, String body, int id ) { - String title = context.getString( titleID ); + String title = LocUtils.getString( context, titleID ); postNotification( context, intent, title, body, id ); }