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 Oct 22, 2024
1 parent a1ab500 commit bbc6c22
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 @@ -330,6 +330,7 @@ static void _librust_qstrs(void) {
MP_QSTR_message;
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 @@ -408,6 +408,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 @@ -445,6 +445,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 @@ -445,6 +445,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 @@ -412,6 +412,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 @@ -445,6 +445,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 @@ -445,6 +445,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 @@ -966,5 +966,6 @@
"964": "instructions__swipe_down",
"965": "fido__title_credential_details",
"966": "address__public_key_confirmed",
"967": "words__continue_anyway"
"967": "words__continue_anyway",
"968": "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": "6eb9892932a20c647aa7f22063a003e792512daef20790cce84c1ef67aa62ad1",
"datetime": "2024-10-14T17:19:07.194969",
"commit": "7ca835a9a18fda9be9ca044378644bd5212cc33f"
"merkle_root": "7fb3511698b6b0d2d4665e0d29015ab620995276d5702796a4ed3b97a69763d7",
"datetime": "2024-10-22T15:02:08.969234",
"commit": "a1ab50017d55c9986fc4a11ddcaff86158804604"
},
"history": [
{
Expand Down

0 comments on commit bbc6c22

Please sign in to comment.