From 1e3c2024bb63e0adbc8953b5d09f96b3f19ffe0f Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Sat, 21 Jan 2023 16:47:26 +0000 Subject: [PATCH] android: add localization of "offered/cancelled" feature items, closes #1766 (#1815) --- .../app/src/main/java/chat/simplex/app/model/ChatModel.kt | 6 +++--- apps/android/app/src/main/res/values-de/strings.xml | 3 +++ apps/android/app/src/main/res/values-fr/strings.xml | 3 +++ apps/android/app/src/main/res/values-it/strings.xml | 3 +++ apps/android/app/src/main/res/values-ru/strings.xml | 3 +++ apps/android/app/src/main/res/values/strings.xml | 3 +++ 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/apps/android/app/src/main/java/chat/simplex/app/model/ChatModel.kt b/apps/android/app/src/main/java/chat/simplex/app/model/ChatModel.kt index f261c1832d..438e5ddd50 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/model/ChatModel.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/model/ChatModel.kt @@ -1535,11 +1535,11 @@ sealed class CIContent: ItemContent { fun preferenceText(feature: Feature, allowed: FeatureAllowed, param: Int?): String = when { allowed != FeatureAllowed.NO && feature.hasParam && param != null -> - "offered ${feature.text}: ${TimedMessagesPreference.ttlText(param)}" + String.format(generalGetString(R.string.feature_offered_item_with_param), feature.text, TimedMessagesPreference.ttlText(param)) allowed != FeatureAllowed.NO -> - "offered ${feature.text}" + String.format(generalGetString(R.string.feature_offered_item), feature.text, TimedMessagesPreference.ttlText(param)) else -> - "cancelled ${feature.text}" + String.format(generalGetString(R.string.feature_cancelled_item), feature.text, TimedMessagesPreference.ttlText(param)) } } } diff --git a/apps/android/app/src/main/res/values-de/strings.xml b/apps/android/app/src/main/res/values-de/strings.xml index 68f8f3a7bf..cdbdc0f0fa 100644 --- a/apps/android/app/src/main/res/values-de/strings.xml +++ b/apps/android/app/src/main/res/values-de/strings.xml @@ -990,4 +990,7 @@ Mit optionaler Begrüßungsmeldung. Ihre Kontakte können die unwiederbringliche Löschung von Nachrichten erlauben. Livenachricht abbrechen + beginne %s + beginne %s: %2s + beende %s \ No newline at end of file diff --git a/apps/android/app/src/main/res/values-fr/strings.xml b/apps/android/app/src/main/res/values-fr/strings.xml index 3d7207ea4b..09ecced8d1 100644 --- a/apps/android/app/src/main/res/values-fr/strings.xml +++ b/apps/android/app/src/main/res/values-fr/strings.xml @@ -919,4 +919,7 @@ données invalides chat invalide Annuler le message dynamique + offert %s + offert %s: %2s + annulé %s \ No newline at end of file diff --git a/apps/android/app/src/main/res/values-it/strings.xml b/apps/android/app/src/main/res/values-it/strings.xml index d070c88947..af0308a2c5 100644 --- a/apps/android/app/src/main/res/values-it/strings.xml +++ b/apps/android/app/src/main/res/values-it/strings.xml @@ -919,4 +919,7 @@ Devi usare la versione più recente del tuo database della chat SOLO su un dispositivo, altrimenti potresti non ricevere più i messaggi da alcuni contatti. Il database della chat non è crittografato: imposta la password per proteggerlo. Annulla messaggio in diretta + offerto %s + offerto %s: %2s + annullato %s \ No newline at end of file diff --git a/apps/android/app/src/main/res/values-ru/strings.xml b/apps/android/app/src/main/res/values-ru/strings.xml index 2b053a5179..85e3ca7afb 100644 --- a/apps/android/app/src/main/res/values-ru/strings.xml +++ b/apps/android/app/src/main/res/values-ru/strings.xml @@ -990,4 +990,7 @@ Админы могут создать ссылки для вступления в группу. Автоматически принимать запросы контактов С опциональным авто-ответом. + предложил(a) %s + предложил(a) %s: %2s + отменил(a) %s \ No newline at end of file diff --git a/apps/android/app/src/main/res/values/strings.xml b/apps/android/app/src/main/res/values/strings.xml index cc79c17e71..f6f3a605f8 100644 --- a/apps/android/app/src/main/res/values/strings.xml +++ b/apps/android/app/src/main/res/values/strings.xml @@ -1061,6 +1061,9 @@ %d week %d weeks %dw + offered %s + offered %s: %2s + cancelled %s What\'s new