From 8c5c5636e916c7483c24b42eb6d71884effaeb3b Mon Sep 17 00:00:00 2001 From: Oleksandr Sobol Date: Tue, 4 Feb 2020 19:47:35 +0200 Subject: [PATCH] CWA-168 | added translation for "Version", used arrow function in the callback, used collection.last for setting items --- lib/generated/i18n.dart | 21 +++++++++++++++++++++ lib/src/screens/settings/settings.dart | 2 +- lib/src/stores/settings/settings_store.dart | 6 ++---- res/values/strings_de.arb | 4 +++- res/values/strings_en.arb | 4 +++- res/values/strings_es.arb | 4 +++- res/values/strings_hi.arb | 4 +++- res/values/strings_ja.arb | 4 +++- res/values/strings_ko.arb | 4 +++- res/values/strings_nl.arb | 4 +++- res/values/strings_pl.arb | 4 +++- res/values/strings_pt.arb | 4 +++- res/values/strings_ru.arb | 4 +++- res/values/strings_zh.arb | 4 +++- 14 files changed, 57 insertions(+), 16 deletions(-) diff --git a/lib/generated/i18n.dart b/lib/generated/i18n.dart index 9e8e43bd9..c47b8cb4e 100644 --- a/lib/generated/i18n.dart +++ b/lib/generated/i18n.dart @@ -286,6 +286,7 @@ class S implements WidgetsLocalizations { String trade_id_not_found(String tradeId, String title) => "Trade ${tradeId} of ${title} not found."; String trade_is_powered_by(String provider) => "This trade is powered by ${provider}"; String transaction_details_copied(String title) => "${title} copied to Clipboard"; + String version(String currentVersion) => "Version ${currentVersion}"; String wallet_list_failed_to_load(String wallet_name, String error) => "Failed to load ${wallet_name} wallet. ${error}"; String wallet_list_failed_to_remove(String wallet_name, String error) => "Failed to remove ${wallet_name} wallet. ${error}"; String wallet_list_loading_wallet(String wallet_name) => "Loading ${wallet_name} wallet"; @@ -797,6 +798,8 @@ class $de extends S { @override String wallet_list_loading_wallet(String wallet_name) => "Wird geladen ${wallet_name} Wallet"; @override + String version(String currentVersion) => "Ausführung ${currentVersion}"; + @override String router_no_route(String name) => "Keine Route definiert für ${name}"; @override String trade_id_not_found(String tradeId, String title) => "Handel ${tradeId} von ${title} nicht gefunden."; @@ -1343,6 +1346,8 @@ class $hi extends S { @override String wallet_list_loading_wallet(String wallet_name) => "लोड हो रहा है ${wallet_name} बटुआ"; @override + String version(String currentVersion) => "संस्करण ${currentVersion}"; + @override String router_no_route(String name) => "के लिए कोई मार्ग निर्धारित नहीं है ${name}"; @override String trade_id_not_found(String tradeId, String title) => "व्यापार ${tradeId} of ${title} नहीं मिला."; @@ -1889,6 +1894,8 @@ class $ru extends S { @override String wallet_list_loading_wallet(String wallet_name) => "Загрузка ${wallet_name} кошелька"; @override + String version(String currentVersion) => "Версия ${currentVersion}"; + @override String router_no_route(String name) => "Экран не найден ${name}"; @override String trade_id_not_found(String tradeId, String title) => "Сделка ${tradeId} ${title} не найдена."; @@ -2435,6 +2442,8 @@ class $ko extends S { @override String wallet_list_loading_wallet(String wallet_name) => "로딩 ${wallet_name} 지갑"; @override + String version(String currentVersion) => "버전 ${currentVersion}"; + @override String router_no_route(String name) => "에 정의 된 경로가 없습니다 ${name}"; @override String trade_id_not_found(String tradeId, String title) => "무역 ${tradeId} 의 ${title} 찾을 수 없습니다."; @@ -2981,6 +2990,8 @@ class $pt extends S { @override String wallet_list_loading_wallet(String wallet_name) => "Abrindo a carteira ${wallet_name}"; @override + String version(String currentVersion) => "Versão ${currentVersion}"; + @override String router_no_route(String name) => "Nenhuma rota definida para ${name}"; @override String trade_id_not_found(String tradeId, String title) => "A troca ${tradeId} de ${title} não foi encontrada."; @@ -3527,6 +3538,8 @@ class $ja extends S { @override String wallet_list_loading_wallet(String wallet_name) => "読み込み中 ${wallet_name} 財布"; @override + String version(String currentVersion) => "バージョン ${currentVersion}"; + @override String router_no_route(String name) => "ルートが定義されていません ${name}"; @override String trade_id_not_found(String tradeId, String title) => "トレード ${tradeId} of ${title} 見つかりません"; @@ -4077,6 +4090,8 @@ class $pl extends S { @override String wallet_list_loading_wallet(String wallet_name) => "Ładuję ${wallet_name} portfel"; @override + String version(String currentVersion) => "Wersja ${currentVersion}"; + @override String router_no_route(String name) => "Brak zdefiniowanej trasy dla ${name}"; @override String trade_id_not_found(String tradeId, String title) => "Handel ${tradeId} of ${title} nie znaleziono."; @@ -4623,6 +4638,8 @@ class $es extends S { @override String wallet_list_loading_wallet(String wallet_name) => "Billetera ${wallet_name} de carga"; @override + String version(String currentVersion) => "Versión ${currentVersion}"; + @override String router_no_route(String name) => "No hay ruta definida para ${name}"; @override String trade_id_not_found(String tradeId, String title) => "Comercio ${tradeId} de ${title} no encontrado."; @@ -5169,6 +5186,8 @@ class $nl extends S { @override String wallet_list_loading_wallet(String wallet_name) => "Bezig met laden ${wallet_name} portemonnee"; @override + String version(String currentVersion) => "Versie ${currentVersion}"; + @override String router_no_route(String name) => "Geen route gedefinieerd voor ${name}"; @override String trade_id_not_found(String tradeId, String title) => "Handel ${tradeId} van ${title} niet gevonden."; @@ -5715,6 +5734,8 @@ class $zh extends S { @override String wallet_list_loading_wallet(String wallet_name) => "载入中 ${wallet_name} 钱包"; @override + String version(String currentVersion) => "版 ${currentVersion}"; + @override String router_no_route(String name) => "未定义路线 ${name}"; @override String trade_id_not_found(String tradeId, String title) => "贸易方式 ${tradeId} 的 ${title} 未找到."; diff --git a/lib/src/screens/settings/settings.dart b/lib/src/screens/settings/settings.dart index 39ad3d1d4..0a6eb5d99 100644 --- a/lib/src/screens/settings/settings.dart +++ b/lib/src/screens/settings/settings.dart @@ -343,7 +343,7 @@ class SettingsFormState extends State { final item = _items[index]; bool _isDrawDivider = true; - if (item.attribute == Attributes.header || index == _items.length - 1) { + if (item.attribute == Attributes.header || item == _items.last) { _isDrawDivider = false; } else { if (_items[index + 1].attribute == Attributes.header) { diff --git a/lib/src/stores/settings/settings_store.dart b/lib/src/stores/settings/settings_store.dart index 57136d06f..786d4083e 100644 --- a/lib/src/stores/settings/settings_store.dart +++ b/lib/src/stores/settings/settings_store.dart @@ -48,9 +48,7 @@ abstract class SettingsStoreBase with Store { serializeActionlistDisplayModes(actionlistDisplayMode)), fireImmediately: false); - PackageInfo.fromPlatform().then((PackageInfo packageInfo) { - currentVersion = packageInfo.version; - }); + PackageInfo.fromPlatform().then((PackageInfo packageInfo) => currentVersion = packageInfo.version); } @@ -272,7 +270,7 @@ abstract class SettingsStoreBase with Store { ItemHeaders.support: S.current.settings_support, ItemHeaders.termsAndConditions: S.current.settings_terms_and_conditions, ItemHeaders.faq: S.current.faq, - ItemHeaders.version: 'Version $currentVersion' + ItemHeaders.version: S.current.version(currentVersion) }); } diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index eeb48b405..8dd44f7b6 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -336,5 +336,7 @@ "paste" : "Einfügen", "restore_from_seed_placeholder" : "Bitte geben Sie hier Ihren Code ein", "add_new_word" : "Neues Wort hinzufügen", - "incorrect_seed" : "Der eingegebene Text ist ungültig." + "incorrect_seed" : "Der eingegebene Text ist ungültig.", + + "version" : "Ausführung ${currentVersion}" } \ No newline at end of file diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index e107a4a9e..3e878bbc3 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -336,5 +336,7 @@ "paste" : "Paste", "restore_from_seed_placeholder" : "Please enter or paste your seed here", "add_new_word" : "Add new word", - "incorrect_seed" : "The text entered is not valid." + "incorrect_seed" : "The text entered is not valid.", + + "version" : "Version ${currentVersion}" } \ No newline at end of file diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index fa46ee111..3d8e9472d 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -336,5 +336,7 @@ "paste" : "Pegar", "restore_from_seed_placeholder" : "Ingrese o pegue su frase de código aquí", "add_new_word" : "Agregar palabra nueva", - "incorrect_seed" : "El texto ingresado no es válido." + "incorrect_seed" : "El texto ingresado no es válido.", + + "version" : "Versión ${currentVersion}" } \ No newline at end of file diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index b6343da7d..712bc9082 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -336,5 +336,7 @@ "paste" : "पेस्ट करें", "restore_from_seed_placeholder" : "कृपया अपना कोड वाक्यांश यहां दर्ज करें या पेस्ट करें", "add_new_word" : "नया शब्द जोड़ें", - "incorrect_seed" : "दर्ज किया गया पाठ मान्य नहीं है।" + "incorrect_seed" : "दर्ज किया गया पाठ मान्य नहीं है।", + + "version" : "संस्करण ${currentVersion}" } \ No newline at end of file diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index e40aaa2b1..0dd826a09 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -336,5 +336,7 @@ "paste" : "ペースト", "restore_from_seed_placeholder" : "ここにコードフレーズを入力または貼り付けてください", "add_new_word" : "新しい単語を追加", - "incorrect_seed" : "入力されたテキストは無効です。" + "incorrect_seed" : "入力されたテキストは無効です。", + + "version" : "バージョン ${currentVersion}" } \ No newline at end of file diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 6c594ea13..1be04579d 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -336,5 +336,7 @@ "paste" : "풀", "restore_from_seed_placeholder" : "여기에 코드 문구를 입력하거나 붙여 넣으십시오.", "add_new_word" : "새로운 단어 추가", - "incorrect_seed" : "입력하신 텍스트가 유효하지 않습니다." + "incorrect_seed" : "입력하신 텍스트가 유효하지 않습니다.", + + "version" : "버전 ${currentVersion}" } \ No newline at end of file diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 986ebfa8e..7690fd275 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -336,5 +336,7 @@ "paste" : "Plakken", "restore_from_seed_placeholder" : "Voer hier uw codefrase in of plak deze", "add_new_word" : "Nieuw woord toevoegen", - "incorrect_seed" : "De ingevoerde tekst is niet geldig." + "incorrect_seed" : "De ingevoerde tekst is niet geldig.", + + "version" : "Versie ${currentVersion}" } \ No newline at end of file diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index bcfcffe1b..fdbd6df3f 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -336,5 +336,7 @@ "paste" : "Pasta", "restore_from_seed_placeholder" : "Wpisz lub wklej tutaj swoją frazę kodową", "add_new_word" : "Dodaj nowe słowo", - "incorrect_seed" : "Wprowadzony tekst jest nieprawidłowy." + "incorrect_seed" : "Wprowadzony tekst jest nieprawidłowy.", + + "version" : "Wersja ${currentVersion}" } \ No newline at end of file diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 8a6d6d4c8..366ec1e81 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -336,5 +336,7 @@ "paste" : "Colar", "restore_from_seed_placeholder" : "Digite ou cole sua frase de código aqui", "add_new_word" : "Adicionar nova palavra", - "incorrect_seed" : "O texto digitado não é válido." + "incorrect_seed" : "O texto digitado não é válido.", + + "version" : "Versão ${currentVersion}" } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 5ca7c9bcb..3e5ededb0 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -336,5 +336,7 @@ "paste" : "Вставить", "restore_from_seed_placeholder" : "Введите или вставте код фразу вашего кошелька", "add_new_word" : "Добавить новое слово", - "incorrect_seed" : "Введенный текст некорректный." + "incorrect_seed" : "Введенный текст некорректный.", + + "version" : "Версия ${currentVersion}" } \ No newline at end of file diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 69c5e886f..451168f6b 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -336,5 +336,7 @@ "paste" : "糊", "restore_from_seed_placeholder" : "请在此处输入或粘贴您的代码短语", "add_new_word" : "添加新词", - "incorrect_seed" : "输入的文字无效。" + "incorrect_seed" : "输入的文字无效。", + + "version" : "版 ${currentVersion}" } \ No newline at end of file