feat(core): show language name in change confirm
What changed, and why it matters
This commit is a user-interface improvement, not a security fix. It changes the language-change confirmation prompt on Trezor devices so that it shows a human-readable language name (for example, 'French') instead of a raw code like 'fr-FR'. It also adds the corresponding translated names for all supported languages. There is no security-relevant change.
No security action needed. Treat as a normal feature/UI commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change adds a helper _language_name(lang_code) in core/src/apps/management/change_language.py that maps the primary language subtag to a translatable string ID, falling back to the raw code for unknown languages. It registers new translation keys (language__czech, language__english, etc.) in the Rust qstr table, generated translation enum, mock stubs, English translation file, and ordering/signature metadata. The confirmation prompt now formats the translated name rather than the raw BCP-47-like code. No cryptographic, authorization, parsing, or memory-safety logic is modified.
Changed components
core/src/apps/management/change_language.pycore/embed/rust/librust_qstr.hcore/embed/rust/src/translations/generated/translated_string.rscore/mocks/trezortranslate_keys.pyicore/translations/en.jsoncore/translations/order.jsoncore/translations/signatures.jsonInspect captured patch +295 / −6
### core/embed/rust/librust_qstr.h
@@ -487,7 +487,14 @@ static void _librust_qstrs(void) {
MP_QSTR_language;
MP_QSTR_language__change_to_template;
MP_QSTR_language__changed;
+ MP_QSTR_language__czech;
+ MP_QSTR_language__english;
+ MP_QSTR_language__french;
+ MP_QSTR_language__german;
+ MP_QSTR_language__indonesian;
+ MP_QSTR_language__portuguese;
MP_QSTR_language__progress;
+ MP_QSTR_language__spanish;
MP_QSTR_language__title;
MP_QSTR_last_attempt;
MP_QSTR_last_write;
### core/embed/rust/src/translations/generated/translated_string.rs
@@ -1503,6 +1503,13 @@ pub enum TranslatedString {
solana__view_details_in_menu = 1316, // "View details in the menu."
address__xpub_export_warning = 1317, // "A quantum computer could use this public key to reveal all keys derived from it."
menu__turn_off = 1318, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Turn off"}
+ language__czech = 1319, // "Czech"
+ language__english = 1320, // "English"
+ language__french = 1321, // "French"
+ language__german = 1322, // "German"
+ language__indonesian = 1323, // "Indonesian"
+ language__portuguese = 1324, // "Portuguese"
+ language__spanish = 1325, // "Spanish"
}
impl TranslatedString {
@@ -2829,6 +2836,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(feature = "debug", feature = "universal_fw"))]
@@ -4153,6 +4167,13 @@ impl TranslatedString {
17919,
17999,
17999,
+ 18004,
+ 18011,
+ 18017,
+ 18023,
+ 18033,
+ 18043,
+ 18050,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -5476,6 +5497,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -6800,6 +6828,13 @@ impl TranslatedString {
17919,
17999,
17999,
+ 18004,
+ 18011,
+ 18017,
+ 18023,
+ 18033,
+ 18043,
+ 18050,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -8123,6 +8158,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -9447,6 +9489,13 @@ impl TranslatedString {
17919,
17999,
17999,
+ 18004,
+ 18011,
+ 18017,
+ 18023,
+ 18033,
+ 18043,
+ 18050,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -10770,6 +10819,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -12094,6 +12150,13 @@ impl TranslatedString {
17919,
17999,
17999,
+ 18004,
+ 18011,
+ 18017,
+ 18023,
+ 18033,
+ 18043,
+ 18050,
];
} else if #[cfg(feature = "layout_caesar")] {
@@ -13418,6 +13481,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(feature = "debug", feature = "universal_fw"))]
@@ -14742,6 +14812,13 @@ impl TranslatedString {
17180,
17260,
17260,
+ 17265,
+ 17272,
+ 17278,
+ 17284,
+ 17294,
+ 17304,
+ 17311,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -16065,6 +16142,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -17389,6 +17473,13 @@ impl TranslatedString {
17180,
17260,
17260,
+ 17265,
+ 17272,
+ 17278,
+ 17284,
+ 17294,
+ 17304,
+ 17311,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -18712,6 +18803,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -20036,6 +20134,13 @@ impl TranslatedString {
17180,
17260,
17260,
+ 17265,
+ 17272,
+ 17278,
+ 17284,
+ 17294,
+ 17304,
+ 17311,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -21359,6 +21464,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -22683,6 +22795,13 @@ impl TranslatedString {
17180,
17260,
17260,
+ 17265,
+ 17272,
+ 17278,
+ 17284,
+ 17294,
+ 17304,
+ 17311,
];
} else if #[cfg(feature = "layout_delizia")] {
@@ -24007,6 +24126,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(feature = "debug", feature = "universal_fw"))]
@@ -25331,6 +25457,13 @@ impl TranslatedString {
19330,
19410,
19410,
+ 19415,
+ 19422,
+ 19428,
+ 19434,
+ 19444,
+ 19454,
+ 19461,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -26654,6 +26787,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -27978,6 +28118,13 @@ impl TranslatedString {
19330,
19410,
19410,
+ 19415,
+ 19422,
+ 19428,
+ 19434,
+ 19444,
+ 19454,
+ 19461,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -29301,6 +29448,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -30625,6 +30779,13 @@ impl TranslatedString {
19330,
19410,
19410,
+ 19415,
+ 19422,
+ 19428,
+ 19434,
+ 19444,
+ 19454,
+ 19461,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -31948,6 +32109,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -33272,6 +33440,13 @@ impl TranslatedString {
19330,
19410,
19410,
+ 19415,
+ 19422,
+ 19428,
+ 19434,
+ 19444,
+ 19454,
+ 19461,
];
} else if #[cfg(feature = "layout_eckhart")] {
@@ -34596,6 +34771,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"Turn off",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(feature = "debug", feature = "universal_fw"))]
@@ -35920,6 +36102,13 @@ impl TranslatedString {
20333,
20413,
20421,
+ 20426,
+ 20433,
+ 20439,
+ 20445,
+ 20455,
+ 20465,
+ 20472,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -37243,6 +37432,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"Turn off",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -38567,6 +38763,13 @@ impl TranslatedString {
20333,
20413,
20421,
+ 20426,
+ 20433,
+ 20439,
+ 20445,
+ 20455,
+ 20465,
+ 20472,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -39890,6 +40093,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"Turn off",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -41214,6 +41424,13 @@ impl TranslatedString {
20333,
20413,
20421,
+ 20426,
+ 20433,
+ 20439,
+ 20445,
+ 20455,
+ 20465,
+ 20472,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -42537,6 +42754,13 @@ impl TranslatedString {
"View details in the menu.",
"A quantum computer could use this public key to reveal all keys derived from it.",
"Turn off",
+ "Czech",
+ "English",
+ "French",
+ "German",
+ "Indonesian",
+ "Portuguese",
+ "Spanish",
);
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -43861,6 +44085,13 @@ impl TranslatedString {
20333,
20413,
20421,
+ 20426,
+ 20433,
+ 20439,
+ 20445,
+ 20455,
+ 20465,
+ 20472,
];
}
@@ -44575,7 +44806,14 @@ impl TranslatedString {
(Qstr::MP_QSTR_k1n1__writing, Self::k1n1__writing),
(Qstr::MP_QSTR_language__change_to_template, Self::language__change_to_template),
(Qstr::MP_QSTR_language__changed, Self::language__changed),
+ (Qstr::MP_QSTR_language__czech, Self::language__czech),
+ (Qstr::MP_QSTR_language__english, Self::language__english),
+ (Qstr::MP_QSTR_language__french, Self::language__french),
+ (Qstr::MP_QSTR_language__german, Self::language__german),
+ (Qstr::MP_QSTR_language__indonesian, Self::language__indonesian),
+ (Qstr::MP_QSTR_language__portuguese, Self::language__portuguese),
(Qstr::MP_QSTR_language__progress, Self::language__progress),
+ (Qstr::MP_QSTR_language__spanish, Self::language__spanish),
(Qstr::MP_QSTR_language__title, Self::language__title),
(Qstr::MP_QSTR_led__disable, Self::led__disable),
(Qstr::MP_QSTR_led__enable, Self::led__enable),
### core/mocks/trezortranslate_keys.pyi
@@ -474,7 +474,14 @@ class TR:
k1n1__writing: str = "Writing to tag..."
language__change_to_template: str = "Change language to {0}?"
language__changed: str = "Language changed successfully."
+ language__czech: str = "Czech"
+ language__english: str = "English"
+ language__french: str = "French"
+ language__german: str = "German"
+ language__indonesian: str = "Indonesian"
+ language__portuguese: str = "Portuguese"
language__progress: str = "Changing language..."
+ language__spanish: str = "Spanish"
language__title: str = "Language settings"
led__disable: str = "Disable LED?"
led__enable: str = "Enable LED?"
### core/src/apps/management/change_language.py
@@ -133,6 +133,29 @@ async def do_change_language(
await _show_success(silent_install, show_display)
+def _language_name(lang_code: str) -> str:
+ # Match on the primary subtag only ("cs-CZ" -> "cs"), so that a regional
+ # variant still gets a readable name.
+ # Intentionally an if-chain, not a dict, to minimize heap usage.
+ primary = lang_code.split("-", 1)[0].lower()
+ if primary == "cs":
+ return TR.language__czech
+ if primary == "de":
+ return TR.language__german
+ if primary == "en":
+ return TR.language__english
+ if primary == "es":
+ return TR.language__spanish
+ if primary == "fr":
+ return TR.language__french
+ if primary == "id":
+ return TR.language__indonesian
+ if primary == "pt":
+ return TR.language__portuguese
+ # Language unknown to this firmware: fall back to the raw code.
+ return lang_code
+
+
async def _require_confirm_change_language(
header: translations.TranslationsHeader | None,
silent_install: bool,
@@ -141,7 +164,7 @@ async def _require_confirm_change_language(
from trezor.enums import ButtonRequestType
from trezor.ui.layouts import confirm_action
- lang = "en-US" if header is None else header.language
+ lang_code = "en-US" if header is None else header.language
if not silent_install and show_display is False:
# host requested silent change but we cannot do it
@@ -156,7 +179,7 @@ async def _require_confirm_change_language(
await confirm_action(
"set_language",
TR.language__title,
- description=TR.language__change_to_template.format(lang),
+ description=TR.language__change_to_template.format(_language_name(lang_code)),
verb="OK", # going for an international word, so it does not need translations
br_code=ButtonRequestType.ProtectCall,
prompt_screen=True,
### core/translations/en.json
@@ -1101,7 +1101,14 @@
},
"language__change_to_template": "Change language to {0}?",
"language__changed": "Language changed successfully.",
+ "language__czech": "Czech",
+ "language__english": "English",
+ "language__french": "French",
+ "language__german": "German",
+ "language__indonesian": "Indonesian",
+ "language__portuguese": "Portuguese",
"language__progress": "Changing language...",
+ "language__spanish": "Spanish",
"language__title": "Language settings",
"led__disable": {
"Bolt": "",
### core/translations/order.json
@@ -1317,5 +1317,12 @@
"1315": "solana__title_blind_signing",
"1316": "solana__view_details_in_menu",
"1317": "address__xpub_export_warning",
- "1318": "menu__turn_off"
+ "1318": "menu__turn_off",
+ "1319": "language__czech",
+ "1320": "language__english",
+ "1321": "language__french",
+ "1322": "language__german",
+ "1323": "language__indonesian",
+ "1324": "language__portuguese",
+ "1325": "language__spanish"
}
### core/translations/signatures.json
@@ -1,8 +1,8 @@
{
"current": {
- "merkle_root": "53d6a522a0aea7acecf5b8469a844da6d513305575fc041b826aee0a665fc2a5",
- "datetime": "2026-11-18T09:07:15.980383+00:00",
- "commit": "c07e372aa22bce4e27711c01e7866f5eedfa7ed9"
+ "merkle_root": "e65e9fbbe426f527714a488fda9fa4ea436400f9bbedf9812ad7fd9fe35d083a",
+ "datetime": "2026-11-18T12:56:38.044875+00:00",
+ "commit": "037db60a49492878afc92845ff1295f12dd084c1"
},
"history": [
{Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.