Refactor hardcoded error messages to be translatable
This commit is contained in:
parent
3d0c214f44
commit
310c0b9137
|
@ -242,7 +242,7 @@ class ImportExportPrefs @Inject constructor(
|
|||
} catch (e: IllegalArgumentException) {
|
||||
// this exception happens on some early implementations of ActivityResult contracts
|
||||
// when registered and called for the second time
|
||||
ToastUtils.errorToast(activity, "Please go back to main screen and try again.")
|
||||
ToastUtils.errorToast(activity, resourceHelper.gs(R.string.goto_main_try_again))
|
||||
log.error(TAG, "Internal android framework exception", e)
|
||||
}
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ class ImportExportPrefs @Inject constructor(
|
|||
restartAppAfterImport(activity)
|
||||
} else {
|
||||
// for impossible imports it should not be called
|
||||
ToastUtils.errorToast(activity, "Cannot import preferences!")
|
||||
ToastUtils.errorToast(activity, resourceHelper.gs(R.string.preferences_import_impossible))
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -206,6 +206,8 @@
|
|||
<string name="password_preferences_decrypt_prompt">You will be asked for master password, which is needed to decrypt imported preferences.</string>
|
||||
<string name="preferences_export_canceled">Export canceled! Preferences were NOT exported!</string>
|
||||
<string name="preferences_import_canceled">Import canceled! Preferences were NOT imported!</string>
|
||||
<string name="preferences_import_impossible">Cannot import preferences!</string>
|
||||
<string name="goto_main_try_again">Please go back to main screen and try again.</string>
|
||||
|
||||
<string name="preferences_import_list_title">Select file to import</string>
|
||||
|
||||
|
|
Loading…
Reference in a new issue