Move strings to strings.xml

Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
This commit is contained in:
ZetaTom 2023-06-29 15:33:48 +02:00
parent a8f2ed2659
commit bc16cebfa1
No known key found for this signature in database
GPG key ID: C705C33DC3B9BA5B
2 changed files with 5 additions and 3 deletions

View file

@ -97,12 +97,12 @@ class EditImageActivity :
override fun onCropImageComplete(view: CropImageView, result: CropImageView.CropResult) {
if (!result.isSuccessful) {
DisplayUtils.showSnackMessage(this, "Unable to edit image.")
DisplayUtils.showSnackMessage(this, getString(R.string.image_editor_unable_to_edit_image))
return
}
val resultUri = result.getUriFilePath(this, false)
val newFileName = file.fileName.substring(0, file.fileName.lastIndexOf('.')) +
" edited" +
" " + getString(R.string.image_editor_file_edited_suffix) +
resultUri?.substring(resultUri.lastIndexOf('.'))
FilesUploadHelper().uploadNewFiles(
@ -120,7 +120,7 @@ class EditImageActivity :
override fun onSetImageUriComplete(view: CropImageView, uri: Uri, error: Exception?) {
if (error != null) {
DisplayUtils.showSnackMessage(this, "Unable to edit image.")
DisplayUtils.showSnackMessage(this, getString(R.string.image_editor_unable_to_edit_image))
return
}
view.visibility = View.VISIBLE

View file

@ -1086,4 +1086,6 @@
<string name="image_editor_rotate_ccw">Rotate anti-clockwise</string>
<string name="image_editor_flip_horizontal">Flip horizontally</string>
<string name="image_editor_flip_vertical">Flip vertically</string>
<string name="image_editor_unable_to_edit_image">Unable to edit image.</string>
<string name="image_editor_file_edited_suffix">edited</string>
</resources>