From e05f223075af87546d2368d8e5c1de0caab9e00d Mon Sep 17 00:00:00 2001 From: leca Date: Sun, 20 Oct 2024 12:48:57 +0300 Subject: [PATCH] translated some text --- .../activities/AddAbstractProductActivity.kt | 8 ++++---- app/src/main/res/values-ru/strings.xml | 6 ++++++ app/src/main/res/values/strings.xml | 6 ++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/foxarmy/barcodescannerforemployees/activities/AddAbstractProductActivity.kt b/app/src/main/java/org/foxarmy/barcodescannerforemployees/activities/AddAbstractProductActivity.kt index d3914ac..b06022c 100644 --- a/app/src/main/java/org/foxarmy/barcodescannerforemployees/activities/AddAbstractProductActivity.kt +++ b/app/src/main/java/org/foxarmy/barcodescannerforemployees/activities/AddAbstractProductActivity.kt @@ -170,11 +170,11 @@ class AddAbstractProductActivity : AppCompatActivity() { ) != null ) { AlertDialog.Builder(this) - .setMessage("You've got an abstract product with such barcode in your database") - .setPositiveButton("Quit") { _: DialogInterface, _: Int -> + .setMessage(getString(R.string.abstract_product_already_exists)) + .setPositiveButton(getString(R.string.quit)) { _: DialogInterface, _: Int -> finish() } - .setNegativeButton("Edit existing") { _: DialogInterface, _: Int -> + .setNegativeButton(getString(R.string.edit_existing)) { _: DialogInterface, _: Int -> val addProductIntent = Intent(this, AddAbstractProductActivity::class.java) val extras = Bundle() val existingAbstractProduct = DBStorageController(this).findAbstractProductByBarcode( @@ -194,7 +194,7 @@ class AddAbstractProductActivity : AppCompatActivity() { } if (requester.response == "Not found 404") { runOnUiThread { - Toast.makeText(this, "Product not found. Please, try again or type manually", Toast.LENGTH_LONG) + Toast.makeText(this, getString(R.string.no_product_in_online_database), Toast.LENGTH_LONG) .show() } return@thread diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index ec351e9..5376dec 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -80,4 +80,10 @@ Абстрактный продукт с таким штрихкодом не существует. Хотите его добавить?. Убрать фильтры Требуется название категории + Такой абстрактный продукт в ваше базе данных уже есть + Выйти + Редактировать существующий + Продукт не найден в онлайн базе данных. Попробуйте снова, если это + ошибка сканирования или введите данные вручную + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0d9b443..50f7440 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -78,4 +78,10 @@ Abstract product with such barcode does not exist. Do you want to add one? Drop filters Category name required + You've got an abstract product with such barcode in your database. + Quit + Edit existing + Product not found. Please, try again if you beleive barcode scanned + wrongly or type manually + \ No newline at end of file