Extract strings

This commit is contained in:
PabloG02 2023-04-07 23:47:39 +02:00 committed by Billy Laws
parent dc36f3d76a
commit 9bcbb3af47
2 changed files with 10 additions and 5 deletions

View File

@ -78,7 +78,7 @@ class AppDialog : BottomSheetDialogFragment() {
}
}
} else {
Snackbar.make(binding.root, "Zip file must have as name the TitleID of the game", Snackbar.LENGTH_LONG).show()
Snackbar.make(binding.root, getString(R.string.zip_with_save_must_have_name_equal_titleid), Snackbar.LENGTH_LONG).show()
}
}
}
@ -143,14 +143,14 @@ class AppDialog : BottomSheetDialogFragment() {
binding.deleteSave.isEnabled = saveExists
binding.deleteSave.setOnClickListener {
AlertDialog.Builder(requireContext())
.setTitle("Are you sure you want to delete this save?")
.setMessage("This action is irreversible.")
.setPositiveButton("Yes") { dialogInterface, _ ->
.setTitle(getString(R.string.delete_save_confirmation_message))
.setMessage(getString(R.string.action_irreversible))
.setPositiveButton(getString(R.string.yes)) { dialogInterface, _ ->
File(saveFolderPath).deleteRecursively()
binding.deleteSave.isEnabled = false
binding.exportSave.isEnabled = false
dialogInterface.dismiss()
}.setNegativeButton("No") { dialogInterface, _ ->
}.setNegativeButton(getString(R.string.no)) { dialogInterface, _ ->
dialogInterface.cancel()
}.show()
}

View File

@ -279,4 +279,9 @@
<string name="expand_button_title" tools:override="true">Expand</string>
<string name="undo">Undo</string>
<string name="per_game_settings_active_message">Per-game settings are active</string>
<string name="delete_save_confirmation_message">Are you sure you want to delete this save?</string>
<string name="action_irreversible">This action is irreversible</string>
<string name="yes">Yes</string>
<string name="no">No</string>
<string name="zip_with_save_must_have_name_equal_titleid">Zip file must have as name the TitleID of the game</string>
</resources>