Skip to content

Commit

Permalink
chore(core) Translate hard-coded 'Enable labeling' string
Browse files Browse the repository at this point in the history
  • Loading branch information
bieleluk committed Aug 27, 2024
1 parent 0a0c100 commit c27c5a0
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions core/.changelog.d/3813.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix translation of the 'Enable labeling' screen.
1 change: 1 addition & 0 deletions core/embed/rust/librust_qstr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions core/mocks/trezortranslate_keys.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand Down
9 changes: 4 additions & 5 deletions core/src/apps/misc/cipher_key_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
1 change: 1 addition & 0 deletions core/translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:",
Expand Down
1 change: 1 addition & 0 deletions core/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:",
Expand Down
1 change: 1 addition & 0 deletions core/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:",
Expand Down
1 change: 1 addition & 0 deletions core/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:",
Expand Down
1 change: 1 addition & 0 deletions core/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 :",
Expand Down
3 changes: 2 additions & 1 deletion core/translations/order.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
6 changes: 3 additions & 3 deletions core/translations/signatures.json
Original file line number Diff line number Diff line change
@@ -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": [
{
Expand Down

0 comments on commit c27c5a0

Please sign in to comment.