From c27c5a04a378086137503f2bfb9d0cbe58497446 Mon Sep 17 00:00:00 2001 From: Lukas Bielesch Date: Mon, 26 Aug 2024 14:50:19 +0200 Subject: [PATCH] chore(core) Translate hard-coded 'Enable labeling' string --- core/.changelog.d/3813.fixed | 1 + core/embed/rust/librust_qstr.h | 1 + .../rust/src/translations/generated/translated_string.rs | 3 +++ core/mocks/trezortranslate_keys.pyi | 1 + core/src/apps/misc/cipher_key_value.py | 9 ++++----- core/translations/cs.json | 1 + core/translations/de.json | 1 + core/translations/en.json | 1 + core/translations/es.json | 1 + core/translations/fr.json | 1 + core/translations/order.json | 3 ++- core/translations/signatures.json | 6 +++--- 12 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 core/.changelog.d/3813.fixed diff --git a/core/.changelog.d/3813.fixed b/core/.changelog.d/3813.fixed new file mode 100644 index 00000000000..0bbdab68d5b --- /dev/null +++ b/core/.changelog.d/3813.fixed @@ -0,0 +1 @@ +Fix translation of the 'Enable labeling' screen. diff --git a/core/embed/rust/librust_qstr.h b/core/embed/rust/librust_qstr.h index 9a5ac8936d9..f301d65eea9 100644 --- a/core/embed/rust/librust_qstr.h +++ b/core/embed/rust/librust_qstr.h @@ -327,6 +327,7 @@ static void _librust_qstrs(void) { MP_QSTR_max_rounds; MP_QSTR_min_count; MP_QSTR_misc__decrypt_value; + MP_QSTR_misc__enable_labeling; MP_QSTR_misc__encrypt_value; MP_QSTR_misc__title_suite_labeling; MP_QSTR_modify_amount__decrease_amount; diff --git a/core/embed/rust/src/translations/generated/translated_string.rs b/core/embed/rust/src/translations/generated/translated_string.rs index 96eb44aee5b..9b085cb52cd 100644 --- a/core/embed/rust/src/translations/generated/translated_string.rs +++ b/core/embed/rust/src/translations/generated/translated_string.rs @@ -1358,6 +1358,7 @@ pub enum TranslatedString { reset__slip39_checklist_more_info_threshold = 957, // "The threshold sets the minumum number of shares needed to recover your wallet." reset__slip39_checklist_more_info_threshold_example_template = 958, // "If you set {0} out of {1} shares, you'll need {2} backup shares to recover your wallet." passphrase__continue_with_empty_passphrase = 959, // "Continue with empty passphrase?" + misc__enable_labeling = 960, // "Enable labeling?" } impl TranslatedString { @@ -2710,6 +2711,7 @@ impl TranslatedString { Self::reset__slip39_checklist_more_info_threshold => "The threshold sets the minumum number of shares needed to recover your wallet.", Self::reset__slip39_checklist_more_info_threshold_example_template => "If you set {0} out of {1} shares, you'll need {2} backup shares to recover your wallet.", Self::passphrase__continue_with_empty_passphrase => "Continue with empty passphrase?", + Self::misc__enable_labeling => "Enable labeling?", } } @@ -4063,6 +4065,7 @@ impl TranslatedString { Qstr::MP_QSTR_reset__slip39_checklist_more_info_threshold => Some(Self::reset__slip39_checklist_more_info_threshold), Qstr::MP_QSTR_reset__slip39_checklist_more_info_threshold_example_template => Some(Self::reset__slip39_checklist_more_info_threshold_example_template), Qstr::MP_QSTR_passphrase__continue_with_empty_passphrase => Some(Self::passphrase__continue_with_empty_passphrase), + Qstr::MP_QSTR_misc__enable_labeling => Some(Self::misc__enable_labeling), _ => None, } } diff --git a/core/mocks/trezortranslate_keys.pyi b/core/mocks/trezortranslate_keys.pyi index 22c7efd30fb..dad7d86bd23 100644 --- a/core/mocks/trezortranslate_keys.pyi +++ b/core/mocks/trezortranslate_keys.pyi @@ -403,6 +403,7 @@ class TR: lockscreen__title_locked: str = "Locked" lockscreen__title_not_connected: str = "Not connected" misc__decrypt_value: str = "Decrypt value" + misc__enable_labeling: str = "Enable labeling?" misc__encrypt_value: str = "Encrypt value" misc__title_suite_labeling: str = "Suite labeling" modify_amount__decrease_amount: str = "Decrease amount by:" diff --git a/core/src/apps/misc/cipher_key_value.py b/core/src/apps/misc/cipher_key_value.py index c4f130ee60e..dbd66f1dc30 100644 --- a/core/src/apps/misc/cipher_key_value.py +++ b/core/src/apps/misc/cipher_key_value.py @@ -28,18 +28,17 @@ async def cipher_key_value(msg: CipherKeyValue) -> CipheredKeyValue: # Special case for Trezor Suite, which asks for setting up labels if msg.key == "Enable labeling?": title = TR.misc__title_suite_labeling + description = TR.misc__enable_labeling verb = TR.buttons__enable else: - if encrypt: - title = TR.misc__encrypt_value - else: - title = TR.misc__decrypt_value + title = TR.misc__encrypt_value if encrypt else TR.misc__decrypt_value + description = msg.key verb = TR.buttons__confirm await confirm_action( "cipher_key_value", title, - description=msg.key, + description=description, verb=verb, prompt_screen=True, ) diff --git a/core/translations/cs.json b/core/translations/cs.json index 55e8f8c7dae..424873b08f7 100644 --- a/core/translations/cs.json +++ b/core/translations/cs.json @@ -436,6 +436,7 @@ "misc__decrypt_value": "Dešifrovat hodnotu", "misc__encrypt_value": "Zašifrovat hodnotu", "misc__title_suite_labeling": "Popisky ze suite", + "misc__enable_labeling": "Povolit popisky?", "modify_amount__decrease_amount": "Snížit částku o:", "modify_amount__increase_amount": "Zvýšit částku o:", "modify_amount__new_amount": "Nová částka:", diff --git a/core/translations/de.json b/core/translations/de.json index f986e1f5ab4..9e147381c57 100644 --- a/core/translations/de.json +++ b/core/translations/de.json @@ -436,6 +436,7 @@ "misc__decrypt_value": "Wert entschlüsseln", "misc__encrypt_value": "Wert verschlüsseln", "misc__title_suite_labeling": "Suite-labeling", + "misc__enable_labeling": "Kennzeichnung aktivieren?", "modify_amount__decrease_amount": "Betrag reduzieren um:", "modify_amount__increase_amount": "Betrag erhöhen um:", "modify_amount__new_amount": "Neuer Betrag:", diff --git a/core/translations/en.json b/core/translations/en.json index 7c56be40b99..491e646a26e 100644 --- a/core/translations/en.json +++ b/core/translations/en.json @@ -407,6 +407,7 @@ "misc__decrypt_value": "Decrypt value", "misc__encrypt_value": "Encrypt value", "misc__title_suite_labeling": "Suite labeling", + "misc__enable_labeling": "Enable labeling?", "modify_amount__decrease_amount": "Decrease amount by:", "modify_amount__increase_amount": "Increase amount by:", "modify_amount__new_amount": "New amount:", diff --git a/core/translations/es.json b/core/translations/es.json index 66d0ac5a1e8..699833f18b0 100644 --- a/core/translations/es.json +++ b/core/translations/es.json @@ -436,6 +436,7 @@ "misc__decrypt_value": "Descifrar valor", "misc__encrypt_value": "Cifrar valor", "misc__title_suite_labeling": "Etiquetado suite", + "misc__enable_labeling": "¿Habilitar el etiquetado?", "modify_amount__decrease_amount": "Reducir importe en:", "modify_amount__increase_amount": "Aumentar importe en:", "modify_amount__new_amount": "Nuevo importe:", diff --git a/core/translations/fr.json b/core/translations/fr.json index 72e9a493baf..7e4b1f510ee 100644 --- a/core/translations/fr.json +++ b/core/translations/fr.json @@ -436,6 +436,7 @@ "misc__decrypt_value": "Déchiffrer la valeur", "misc__encrypt_value": "Chiffrer la valeur", "misc__title_suite_labeling": "Étiquetage de suite", + "misc__enable_labeling": "Activer l'étiquetage ?", "modify_amount__decrease_amount": "Diminuer de :", "modify_amount__increase_amount": "Augmenter de :", "modify_amount__new_amount": "Nouveau montant :", diff --git a/core/translations/order.json b/core/translations/order.json index cf4b8424adb..d20b03ffa2e 100644 --- a/core/translations/order.json +++ b/core/translations/order.json @@ -958,5 +958,6 @@ "956": "words__title_done", "957": "reset__slip39_checklist_more_info_threshold", "958": "reset__slip39_checklist_more_info_threshold_example_template", - "959": "passphrase__continue_with_empty_passphrase" + "959": "passphrase__continue_with_empty_passphrase", + "960": "misc__enable_labeling" } diff --git a/core/translations/signatures.json b/core/translations/signatures.json index 24e3ace6bbc..3f876eb8c07 100644 --- a/core/translations/signatures.json +++ b/core/translations/signatures.json @@ -1,8 +1,8 @@ { "current": { - "merkle_root": "96fd6399d7631ec16b02f8794aa75ddc5e42152ffcf5acf528206298e9998bb3", - "datetime": "2024-08-26T11:18:49.662110", - "commit": "26436ef6aa930f019e85acf0d0b48e22838b91b3" + "merkle_root": "fa03665ef79516c4fe6014fd244901fa49ac8465d35171146f5357757863a4c9", + "datetime": "2024-08-27T14:01:04.778454", + "commit": "0a0c1004c8dfd6e68181543acc75f457ea854747" }, "history": [ {