diff --git a/android/phoenix/res/values/strings.xml b/android/phoenix/res/values/strings.xml
index 29a8ad755a..3d05468c20 100644
--- a/android/phoenix/res/values/strings.xml
+++ b/android/phoenix/res/values/strings.xml
@@ -11,4 +11,41 @@
Optimal device settings
Extracting assets, please wait …
+
+ Select Libretro core
+
+
+ Refresh rate calibration
+ Touch the screen with your fingers for more accurate measurements.
+
+
+ Recently played games
+ Loading [%1$s]…
+
+
+ Current: %1$s
+ Press key to use
+
+
+ No core
+ Welcome to RetroArch
+ This is your first time starting up RetroArch. RetroArch will now be preconfigured for the best possible gameplay experience.
+ The ideal configuration options for your device will now be preconfigured.\n\nNOTE: For optimal performance, turn off Google Account sync, GPS and Wi-Fi in your Android settings menu.
+ The ideal configuration options for your device will now be preconfigured.\n\nNOTE: For optimal performance, turn off Google Account sync, Google Play Store auto-updates, GPS and Wi-Fi in your Android settings menu.
+ NVidia Shield detected
+ GameMID detected
+ OUYA detected
+ Xperia Play detected
+ Nexus 7 2013 detected
+ Device either not detected in list or doesn\'t have any optimal settings in our database.
+ Go to \'Load Core\' and select a core first.
+ Loading [%1$s]…
+
+
+ Using OS-reported refresh rate of: %1$s Hz.
+
+
+ OK
+ Close
+
diff --git a/android/phoenix/src/org/retroarch/browser/CoreSelection.java b/android/phoenix/src/org/retroarch/browser/CoreSelection.java
index 05519d82e4..0b4a8222be 100644
--- a/android/phoenix/src/org/retroarch/browser/CoreSelection.java
+++ b/android/phoenix/src/org/retroarch/browser/CoreSelection.java
@@ -41,7 +41,7 @@ public final class CoreSelection extends Activity implements
list.setAdapter(adapter);
list.setOnItemClickListener(this);
- setTitle("Select Libretro core");
+ setTitle(R.string.select_libretro_core);
// Populate the list
final String modulePath = MainMenuActivity.getInstance()
diff --git a/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java b/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java
index 6fb10fe70d..7670e6476a 100644
--- a/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java
+++ b/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java
@@ -3,6 +3,8 @@ package org.retroarch.browser;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
+import org.retroarch.R;
+
import android.app.Activity;
import android.content.SharedPreferences;
import android.opengl.GLES20;
@@ -105,12 +107,12 @@ public final class DisplayRefreshRateTest extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- Toast.makeText(this, "Touch the screen with your fingers for more accurate measurements.", Toast.LENGTH_LONG).show();
+ Toast.makeText(this, R.string.touch_screen_with_fingers, Toast.LENGTH_LONG).show();
surfaceView = new GLSurfaceView(this);
surfaceView.setEGLContextClientVersion(2);
surfaceView.setRenderer(new Renderer(this));
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
- setTitle("Refresh rate calibration");
+ setTitle(R.string.refresh_rate_calibration);
setContentView(surfaceView);
}
diff --git a/android/phoenix/src/org/retroarch/browser/HistorySelection.java b/android/phoenix/src/org/retroarch/browser/HistorySelection.java
index b79b92c6e1..47956dde55 100644
--- a/android/phoenix/src/org/retroarch/browser/HistorySelection.java
+++ b/android/phoenix/src/org/retroarch/browser/HistorySelection.java
@@ -34,7 +34,7 @@ public final class HistorySelection extends Activity implements
list.setAdapter(adapter);
list.setOnItemClickListener(this);
- setTitle("Recently played games");
+ setTitle(R.string.recently_played_games);
File history = new File(getApplicationInfo().dataDir, "retroarch-history.txt");
@@ -71,8 +71,7 @@ public final class HistorySelection extends Activity implements
MainMenuActivity.getInstance().updateConfigFile();
- Toast.makeText(this, "Loading: [" + gamePath + "] ...",
- Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, String.format(getString(R.string.loading_gamepath), gamePath), Toast.LENGTH_SHORT).show();
myIntent = new Intent(this, RetroActivity.class);
myIntent.putExtra("ROM", gamePath);
myIntent.putExtra("LIBRETRO", corePath);
diff --git a/android/phoenix/src/org/retroarch/browser/KeyBindPreference.java b/android/phoenix/src/org/retroarch/browser/KeyBindPreference.java
index a9a51fd5b8..d676656725 100644
--- a/android/phoenix/src/org/retroarch/browser/KeyBindPreference.java
+++ b/android/phoenix/src/org/retroarch/browser/KeyBindPreference.java
@@ -45,9 +45,11 @@ final class KeyBindPreference extends DialogPreference implements View.OnKeyList
KeyBindEditText keyText;
private String[] key_labels;
private final int DEFAULT_KEYCODE = 0;
+ private final Context context;
public KeyBindPreference(Context context, AttributeSet attrs) {
super(context, attrs);
+ this.context = context;
key_labels = getContext().getResources().getStringArray(R.array.key_bind_values);
}
@@ -57,7 +59,7 @@ final class KeyBindPreference extends DialogPreference implements View.OnKeyList
{
grabKeyCode = false;
key_bind_code = keyCode;
- keyText.setText("Current: " + key_labels[key_bind_code]);
+ keyText.setText(String.format(context.getString(R.string.current_binding), key_labels[key_bind_code]));
}
}
@@ -84,7 +86,7 @@ final class KeyBindPreference extends DialogPreference implements View.OnKeyList
((Button) view.findViewById(R.id.key_bind_detect)).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
grabKeyCode = true;
- keyText.setText("Press key to use");
+ keyText.setText(R.string.press_key_to_use);
keyText.requestFocus();
}
});
diff --git a/android/phoenix/src/org/retroarch/browser/MainMenuActivity.java b/android/phoenix/src/org/retroarch/browser/MainMenuActivity.java
index c4c5592ecf..3fbddc8007 100644
--- a/android/phoenix/src/org/retroarch/browser/MainMenuActivity.java
+++ b/android/phoenix/src/org/retroarch/browser/MainMenuActivity.java
@@ -80,7 +80,7 @@ public final class MainMenuActivity extends PreferenceActivity {
SharedPreferences prefs = getPreferences();
libretro_path = prefs.getString("libretro_path", getApplicationInfo().nativeLibraryDir);
- libretro_name = prefs.getString("libretro_name", "No core");
+ libretro_name = prefs.getString("libretro_name", getString(R.string.no_core));
refreshPreferenceScreen();
@@ -94,9 +94,8 @@ public final class MainMenuActivity extends PreferenceActivity {
if (!detectDevice(false)) {
AlertDialog.Builder alert = new AlertDialog.Builder(this)
- .setTitle("Welcome to RetroArch")
- .setMessage(
- "This is your first time starting up RetroArch. RetroArch will now be preconfigured for the best possible gameplay experience.")
+ .setTitle(R.string.welcome_to_retroarch)
+ .setMessage(R.string.welcome_to_retroarch_desc)
.setPositiveButton("OK", null);
alert.show();
}
@@ -653,31 +652,23 @@ public final class MainMenuActivity extends PreferenceActivity {
boolean detectDevice(boolean show_dialog) {
boolean retval = false;
- boolean mentionPlayStore = !android.os.Build.MODEL
- .equals("OUYA Console");
- final String message = "The ideal configuration options for your device will now be preconfigured.\n\nNOTE: For optimal performance, turn off Google Account sync, "
- + (mentionPlayStore ? "Google Play Store auto-updates, " : "")
- + "GPS and Wi-Fi in your Android settings menu.";
+ final boolean mentionPlayStore = !android.os.Build.MODEL.equals("OUYA Console");
+ final String message = (mentionPlayStore ? getString(R.string.detect_device_msg_general) : getString(R.string.detect_device_msg_ouya));
Log.i("Device MODEL", android.os.Build.MODEL);
if (android.os.Build.MODEL.equals("SHIELD")) {
AlertDialog.Builder alert = new AlertDialog.Builder(this)
- .setTitle("NVidia Shield detected")
+ .setTitle(R.string.nvidia_shield_detected)
.setMessage(message)
- .setPositiveButton("OK",
+ .setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog,
- int which) {
+ public void onClick(DialogInterface dialog, int which) {
SharedPreferences prefs = getPreferences();
- SharedPreferences.Editor edit = prefs
- .edit();
- edit.putString("video_refresh_rate", Double
- .valueOf(60.00d).toString());
- edit.putBoolean("input_overlay_enable",
- false);
- edit.putBoolean("input_autodetect_enable",
- true);
+ SharedPreferences.Editor edit = prefs.edit();
+ edit.putString("video_refresh_rate", Double.toString(60.00d));
+ edit.putBoolean("input_overlay_enable", false);
+ edit.putBoolean("input_autodetect_enable", true);
edit.putString("audio_latency", "64");
edit.putBoolean("audio_latency_auto", true);
edit.commit();
@@ -687,20 +678,16 @@ public final class MainMenuActivity extends PreferenceActivity {
retval = true;
} else if (android.os.Build.MODEL.equals("GAMEMID_BT")) {
AlertDialog.Builder alert = new AlertDialog.Builder(this)
- .setTitle("GameMID detected")
+ .setTitle(R.string.game_mid_detected)
.setMessage(message)
- .setPositiveButton("OK",
+ .setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog,
- int which) {
+ public void onClick(DialogInterface dialog, int which) {
SharedPreferences prefs = getPreferences();
- SharedPreferences.Editor edit = prefs
- .edit();
- edit.putBoolean("input_overlay_enable",
- false);
- edit.putBoolean("input_autodetect_enable",
- true);
+ SharedPreferences.Editor edit = prefs.edit();
+ edit.putBoolean("input_overlay_enable", false);
+ edit.putBoolean("input_autodetect_enable", true);
edit.putString("audio_latency", "160");
edit.putBoolean("audio_latency_auto", false);
edit.commit();
@@ -710,20 +697,16 @@ public final class MainMenuActivity extends PreferenceActivity {
retval = true;
} else if (android.os.Build.MODEL.equals("OUYA Console")) {
AlertDialog.Builder alert = new AlertDialog.Builder(this)
- .setTitle("OUYA detected")
+ .setTitle(R.string.ouya_detected)
.setMessage(message)
- .setPositiveButton("OK",
+ .setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog,
- int which) {
+ public void onClick(DialogInterface dialog, int which) {
SharedPreferences prefs = getPreferences();
- SharedPreferences.Editor edit = prefs
- .edit();
- edit.putBoolean("input_overlay_enable",
- false);
- edit.putBoolean("input_autodetect_enable",
- true);
+ SharedPreferences.Editor edit = prefs.edit();
+ edit.putBoolean("input_overlay_enable", false);
+ edit.putBoolean("input_autodetect_enable", true);
edit.putString("audio_latency", "64");
edit.putBoolean("audio_latency_auto", true);
edit.commit();
@@ -733,23 +716,18 @@ public final class MainMenuActivity extends PreferenceActivity {
retval = true;
} else if (android.os.Build.MODEL.equals("R800x")) {
AlertDialog.Builder alert = new AlertDialog.Builder(this)
- .setTitle("Xperia Play detected")
+ .setTitle(R.string.xperia_play_detected)
.setMessage(message)
- .setPositiveButton("OK",
+ .setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog,
- int which) {
+ public void onClick(DialogInterface dialog, int which) {
SharedPreferences prefs = getPreferences();
- SharedPreferences.Editor edit = prefs
- .edit();
+ SharedPreferences.Editor edit = prefs.edit();
edit.putBoolean("video_threaded", false);
- edit.putBoolean("input_overlay_enable",
- false);
- edit.putBoolean("input_autodetect_enable",
- true);
- edit.putString("video_refresh_rate", Double
- .valueOf(59.19132938771038).toString());
+ edit.putBoolean("input_overlay_enable", false);
+ edit.putBoolean("input_autodetect_enable", true);
+ edit.putString("video_refresh_rate", Double.toString(59.19132938771038));
edit.putString("audio_latency", "128");
edit.putBoolean("audio_latency_auto", false);
edit.commit();
@@ -759,18 +737,15 @@ public final class MainMenuActivity extends PreferenceActivity {
retval = true;
} else if (android.os.Build.ID.equals("JSS15J")) {
AlertDialog.Builder alert = new AlertDialog.Builder(this)
- .setTitle("Nexus 7 2013 detected")
+ .setTitle(R.string.nexus_7_2013_detected)
.setMessage(message)
- .setPositiveButton("OK",
+ .setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog,
- int which) {
+ public void onClick(DialogInterface dialog, int which) {
SharedPreferences prefs = getPreferences();
- SharedPreferences.Editor edit = prefs
- .edit();
- edit.putString("video_refresh_rate", Double
- .valueOf(59.65).toString());
+ SharedPreferences.Editor edit = prefs.edit();
+ edit.putString("video_refresh_rate", Double.toString(59.65));
edit.putString("audio_latency", "64");
edit.putBoolean("audio_latency_auto", false);
edit.commit();
@@ -781,10 +756,7 @@ public final class MainMenuActivity extends PreferenceActivity {
}
if (show_dialog) {
- Toast.makeText(
- this,
- "Device either not detected in list or doesn't have any optimal settings in our database.",
- Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, R.string.no_optimal_settings, Toast.LENGTH_SHORT).show();
}
refreshPreferenceScreen();
@@ -804,9 +776,7 @@ public final class MainMenuActivity extends PreferenceActivity {
if (!new File(libretro_path).isDirectory()) {
super.startActivityForResult(intent, ACTIVITY_LOAD_ROM);
} else {
- Toast.makeText(this,
- "Go to 'Load Core' and select a core first.",
- Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, R.string.load_a_core_first, Toast.LENGTH_SHORT).show();
}
} else {
super.startActivity(intent);
@@ -819,18 +789,12 @@ public final class MainMenuActivity extends PreferenceActivity {
case ACTIVITY_LOAD_ROM: {
if (data.getStringExtra("PATH") != null) {
updateConfigFile();
- Intent myIntent;
- String current_ime = Settings.Secure.getString(
- getContentResolver(),
- Settings.Secure.DEFAULT_INPUT_METHOD);
- Toast.makeText(this,
- "Loading: [" + data.getStringExtra("PATH") + "]...",
- Toast.LENGTH_SHORT).show();
- myIntent = new Intent(this, RetroActivity.class);
+ String current_ime = Settings.Secure.getString(getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
+ Toast.makeText(this,String.format(getString(R.string.loading_data), data.getStringExtra("PATH")), Toast.LENGTH_SHORT).show();
+ Intent myIntent = new Intent(this, RetroActivity.class);
myIntent.putExtra("ROM", data.getStringExtra("PATH"));
myIntent.putExtra("LIBRETRO", libretro_path);
- myIntent.putExtra("CONFIGFILE",
- getDefaultConfigPath());
+ myIntent.putExtra("CONFIGFILE", getDefaultConfigPath());
myIntent.putExtra("IME", current_ime);
startActivity(myIntent);
}
@@ -848,10 +812,8 @@ public final class MainMenuActivity extends PreferenceActivity {
private void loadRomExternal(String rom, String core) {
updateConfigFile();
Intent myIntent = new Intent(this, RetroActivity.class);
- String current_ime = Settings.Secure.getString(getContentResolver(),
- Settings.Secure.DEFAULT_INPUT_METHOD);
- Toast.makeText(this, "Loading: [" + rom + "]...", Toast.LENGTH_SHORT)
- .show();
+ String current_ime = Settings.Secure.getString(getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
+ Toast.makeText(this, String.format(getString(R.string.loading_data), rom), Toast.LENGTH_SHORT).show();
myIntent.putExtra("ROM", rom);
myIntent.putExtra("LIBRETRO", core);
myIntent.putExtra("CONFIGFILE", getDefaultConfigPath());
diff --git a/android/phoenix/src/org/retroarch/browser/RefreshRateSetOS.java b/android/phoenix/src/org/retroarch/browser/RefreshRateSetOS.java
index 9b1f09b6d4..a7ef52749d 100644
--- a/android/phoenix/src/org/retroarch/browser/RefreshRateSetOS.java
+++ b/android/phoenix/src/org/retroarch/browser/RefreshRateSetOS.java
@@ -1,5 +1,7 @@
package org.retroarch.browser;
+import org.retroarch.R;
+
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
@@ -22,7 +24,7 @@ public final class RefreshRateSetOS extends Activity {
edit.putString("video_refresh_rate", Double.valueOf(rate).toString());
edit.commit();
- Toast.makeText(this, "Using OS-reported refresh rate of: " + rate + " Hz.", Toast.LENGTH_LONG).show();
+ Toast.makeText(this, String.format(getString(R.string.using_os_reported_refresh_rate), rate), Toast.LENGTH_LONG).show();
finish();
}
}
diff --git a/android/phoenix/src/org/retroarch/browser/ReportIME.java b/android/phoenix/src/org/retroarch/browser/ReportIME.java
index e096e3c01c..02c578c6b6 100644
--- a/android/phoenix/src/org/retroarch/browser/ReportIME.java
+++ b/android/phoenix/src/org/retroarch/browser/ReportIME.java
@@ -1,5 +1,7 @@
package org.retroarch.browser;
+import org.retroarch.R;
+
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
@@ -16,7 +18,7 @@ public final class ReportIME extends Activity {
final Activity ctx = this;
AlertDialog.Builder dialog = new AlertDialog.Builder(this)
.setMessage(current_ime)
- .setNeutralButton("Close",
+ .setNeutralButton(R.string.close,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,