diff --git a/src/android/java/com/hydra/noods/BindingsPreference.java b/src/android/java/com/hydra/noods/BindingsPreference.java index e2a46a1..4ae35b0 100644 --- a/src/android/java/com/hydra/noods/BindingsPreference.java +++ b/src/android/java/com/hydra/noods/BindingsPreference.java @@ -52,7 +52,7 @@ protected void onClick() // Create the dialog for rebinding an input AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setTitle(getTitle()); - builder.setMessage("Press a key to bind it to this input."); + builder.setMessage(R.string.key_to_bind); builder.setNegativeButton("Cancel", null); builder.setPositiveButton("Clear", new DialogInterface.OnClickListener() diff --git a/src/android/java/com/hydra/noods/FileBrowser.java b/src/android/java/com/hydra/noods/FileBrowser.java index 5e16023..2a79439 100644 --- a/src/android/java/com/hydra/noods/FileBrowser.java +++ b/src/android/java/com/hydra/noods/FileBrowser.java @@ -222,7 +222,7 @@ private void showInfo(final boolean start) // Create the Play Store information dialog AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setTitle("Welcome to NooDS"); + builder.setTitle(R.string.welcome_to_noods); builder.setView(view); builder.setCancelable(!start); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() @@ -381,20 +381,20 @@ private void tryStartCore() switch (result) { case 1: // Missing BIOS files - builder.setTitle("Error Loading BIOS"); - builder.setMessage("Make sure the path settings point to valid BIOS files and try again. " + - "You can modify path settings in " + getExternalFilesDir(null).getPath() + "/noods.ini."); + builder.setTitle(R.string.error_bios_1); + builder.setMessage(getString(R.string.error_bios_2) + + getString(R.string.error_bios_3) + getExternalFilesDir(null).getPath() + "/noods.ini."); break; case 2: // Non-bootable firmware file - builder.setTitle("Error Loading Firmware"); - builder.setMessage("Make sure the path settings point to a bootable firmware file or try another boot method. " + - "You can modify path settings in " + getExternalFilesDir(null).getPath() + "/noods.ini."); + builder.setTitle(R.string.error_firmware_1); + builder.setMessage(getString(R.string.error_firmware_2) + + getString(R.string.error_firmware_3) + getExternalFilesDir(null).getPath() + "/noods.ini."); break; case 3: // Unreadable ROM file - builder.setTitle("Error Loading ROM"); - builder.setMessage("Make sure the ROM file is accessible and try again."); + builder.setTitle(R.string.error_rom_1); + builder.setMessage(R.string.error_rom_2); break; } @@ -471,8 +471,8 @@ public void onCancel(DialogInterface dialog) if (isNdsLoaded()) { AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setTitle("Loading GBA ROM"); - builder.setMessage("Load the previous NDS ROM alongside this ROM?"); + builder.setTitle(R.string.loading_gba_rom); + builder.setMessage(R.string.load_the_previous_nds_rom); builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() { diff --git a/src/android/java/com/hydra/noods/NooActivity.java b/src/android/java/com/hydra/noods/NooActivity.java index 076ec7b..e05b1af 100644 --- a/src/android/java/com/hydra/noods/NooActivity.java +++ b/src/android/java/com/hydra/noods/NooActivity.java @@ -189,13 +189,13 @@ public void onClick(DialogInterface dialog, int id) // Use the message with extra information if a state file doesn't exist yet if (checkState() == 1) // File fail - builder.setMessage("Saving and loading states is dangerous and can lead to data " + - "loss. States are also not guaranteed to be compatible across emulator " + - "versions. Please rely on in-game saving to keep your progress, and back up " + - ".sav files before using this feature. Do you want to save the current state?"); + builder.setMessage(getString(R.string.save_warning_1) + + getString(R.string.save_warning_2) + + getString(R.string.save_warning_3) + + getString(R.string.save_warning_4)); else - builder.setMessage("Do you want to overwrite the saved " + - "state with the current state? This can't be undone!"); + builder.setMessage(getString(R.string.overwrite_save_1) + + getString(R.string.overwrite_save_2)); builder.create().show(); return true; @@ -206,8 +206,8 @@ public void onClick(DialogInterface dialog, int id) switch (checkState()) { case 0: // Success - builder2.setMessage("Do you want to load the saved state " + - "and lose the current state? This can't be undone!"); + builder2.setMessage(getString(R.string.load_warning_1) + + getString(R.string.load_warning_2)); builder2.setNegativeButton("Cancel", null); builder2.setPositiveButton("OK", new DialogInterface.OnClickListener() { @@ -223,17 +223,17 @@ public void onClick(DialogInterface dialog, int id) break; case 1: // File fail - builder2.setMessage("The state file doesn't exist or couldn't be opened."); + builder2.setMessage(R.string.File_fail); builder2.setNegativeButton("OK", null); break; case 2: // Format fail - builder2.setMessage("The state file doesn't have a valid format."); + builder2.setMessage(R.string.Format_fail); builder2.setNegativeButton("OK", null); break; case 3: // Version fail - builder2.setMessage("The state file isn't compatible with this version of NooDS."); + builder2.setMessage(R.string.Version_fail); builder2.setPositiveButton("OK", null); break; } @@ -256,7 +256,7 @@ public void onClick(DialogInterface dialog, final int which) // Confirm the change because accidentally resizing a working save file could be bad! AlertDialog.Builder builder4 = new AlertDialog.Builder(NooActivity.this); builder4.setTitle("Changing Save Type"); - builder4.setMessage("Are you sure? This may result in data loss!"); + builder4.setMessage(R.string.change_save_type_warning); builder4.setNegativeButton("Cancel", null); builder4.setPositiveButton("OK", new DialogInterface.OnClickListener() { diff --git a/src/android/res/menu/file_menu.xml b/src/android/res/menu/file_menu.xml index 77595be..9ec9f34 100644 --- a/src/android/res/menu/file_menu.xml +++ b/src/android/res/menu/file_menu.xml @@ -4,19 +4,19 @@ diff --git a/src/android/res/menu/noo_menu.xml b/src/android/res/menu/noo_menu.xml index 0c8822b..10e861f 100644 --- a/src/android/res/menu/noo_menu.xml +++ b/src/android/res/menu/noo_menu.xml @@ -3,27 +3,27 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> + android:title="@string/toggle_controls" /> + android:title="@string/restart" /> + android:title="@string/save_state" /> + android:title="@string/load_state" /> + android:title="@string/change_save_type" /> + android:title="@string/input_bindings" /> + android:title="@string/settings" /> + android:title="@string/file_browser" /> diff --git a/src/android/res/menu/settings_menu.xml b/src/android/res/menu/settings_menu.xml index 4c20721..0b5fbb3 100644 --- a/src/android/res/menu/settings_menu.xml +++ b/src/android/res/menu/settings_menu.xml @@ -4,7 +4,7 @@ diff --git a/src/android/res/values/strings.xml b/src/android/res/values/strings.xml new file mode 100644 index 0000000..e89f0a7 --- /dev/null +++ b/src/android/res/values/strings.xml @@ -0,0 +1,93 @@ + + + + + + Information + Change Storage + Settings + + + Toggle Controls + Restart + Save State + Load State + Change Save Type + Input Bindings + File Browser + + + Buttons + A Button + B Button + X Button + Y Button + Start Button + Select Button + Up Button + Down Button + Left Button + Right Button + L Button + R Button + Hotkeys + Fast Forward Hold + Fast Forward Toggle + Screen Swap Toggle + + + General Settings + Direct Boot + FPS Limiter + Threaded 2D + Threaded 3D + High-Resolution 3D + Use Microphone + Show FPS Counter + Screen Layout + Screen Position + Screen Rotation + Screen Arrangement + Screen Sizing + Screen Gap + Screen Filter + Integer Scale + GBA Crop + Simulate Ghosting + On-Screen Controls + Button Scale + Button Spacing + Vibration Strength + + + "Saving and loading states is dangerous and can lead to data " + "loss. States are also not guaranteed to be compatible across emulator " + "versions. Please rely on in-game saving to keep your progress, and back up " + .sav files before using this feature. Do you want to save the current state? + "Do you want to overwrite the saved " + state with the current state? This can\'t be undone! + "Do you want to load the saved state " + and lose the current state? This can\'t be undone! + The state file doesn\'t exist or couldn\'t be opened. + The state file doesn\'t have a valid format. + The state file isn\'t compatible with this version of NooDS. + Are you sure? This may result in data loss! + + + Press a key to bind it to this input. + + + Welcome to NooDS + Error Loading BIOS + "Make sure the path settings point to valid BIOS files and try again. " + "You can modify path settings in " + Error Loading Firmware + "Make sure the path settings point to a bootable firmware file or try another boot method. " + "You can modify path settings in " + Error Loading ROM + Make sure the ROM file is accessible and try again. + Loading GBA ROM + Load the previous NDS ROM alongside this ROM? + + + \ No newline at end of file diff --git a/src/android/res/xml/bindings.xml b/src/android/res/xml/bindings.xml index 5ceb21f..c6f0b91 100644 --- a/src/android/res/xml/bindings.xml +++ b/src/android/res/xml/bindings.xml @@ -2,12 +2,12 @@