chore(core): don't use empty strings in `trezortranslate_keys.pyi`
What changed, and why it matters
This commit updates translation stub files used during development and type-checking. It replaces placeholder empty strings with actual English text and changes the template so it picks the first non-empty translation when generating stubs. There is no runtime firmware change and no security relevance.
No security action needed. This is a routine development/translation stub maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies core/mocks/trezortranslate_keys.pyi (a Python stub file) and its Mako template generator. Previously several translation keys had empty string values; now they contain real English prompts. The template logic changed from selecting the first model’s value to selecting the first non-empty model’s value. These are mock/stub files used for IDE/type-checker support, not compiled firmware code.
Changed components
core/mocks/trezortranslate_keys.pyicore/mocks/trezortranslate_keys.pyi.makoInspect captured patch +9 / −9
diff --git a/core/mocks/trezortranslate_keys.pyi b/core/mocks/trezortranslate_keys.pyi
index a74643abd..9cd601948 100644
--- a/core/mocks/trezortranslate_keys.pyi
+++ b/core/mocks/trezortranslate_keys.pyi
@@ -424,7 +424,7 @@ class TR:
inputs__return: str = "RETURN"
inputs__show: str = "SHOW"
inputs__space: str = "SPACE"
- instructions__continue_holding: str = ""
+ instructions__continue_holding: str = "Continue\nholding"
instructions__continue_in_app: str = "Continue in the app"
instructions__enter_next_share: str = "Enter next share"
instructions__hold_to_confirm: str = "Hold to confirm"
@@ -945,12 +945,12 @@ class TR:
tezos__submit_ballot: str = "Submit ballot"
tezos__submit_proposal: str = "Submit proposal"
tezos__submit_proposals: str = "Submit proposals"
- thp__autoconnect: str = ""
- thp__autoconnect_app: str = ""
- thp__connect: str = ""
- thp__connect_app: str = ""
- thp__pair: str = ""
- thp__pair_app: str = ""
+ thp__autoconnect: str = "Allow {0} to connect automatically to this Trezor?"
+ thp__autoconnect_app: str = "Allow {0} on {1} to connect automatically to this Trezor?"
+ thp__connect: str = "Allow {0} to connect with this Trezor?"
+ thp__connect_app: str = "Allow {0} on {1} to connect with this Trezor?"
+ thp__pair: str = "Allow {0} to pair with this Trezor?"
+ thp__pair_app: str = "Allow {0} on {1} to pair with this Trezor?"
tutorial__continue: str = "Continue tutorial"
tutorial__did_you_know: str = "Did you know?"
tutorial__exit: str = "Exit tutorial"
diff --git a/core/mocks/trezortranslate_keys.pyi.mako b/core/mocks/trezortranslate_keys.pyi.mako
index 8f0085c76..ef3c55422 100644
--- a/core/mocks/trezortranslate_keys.pyi.mako
+++ b/core/mocks/trezortranslate_keys.pyi.mako
@@ -12,8 +12,8 @@ class TR:
% for name, value in sorted(en_data.items()):
<%
if isinstance(value, dict):
- # For simplicity, use the first model's text for the stubs.
- value, *_ = value.values()
+ # For simplicity, use the first non-empty model's text for the stubs.
+ value = next(v for v in value.values() if v)
%>\
${name}: str = ${json.dumps(value)}
% endfor
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.