fix(templates): use double quotes for backwards compatibility in python
What changed, and why it matters
This is a tiny build-tool fix in a code-generation template. It swaps single quotes for double quotes inside a Python f-string so the template works with older Python versions that don't allow single quotes inside f-string braces. There is no runtime security effect on the Trezor firmware itself.
No security action needed. Treat as a normal build-compatibility fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit changes one line in a Mako template (translated_string.rs.mako) that generates Rust #[cfg(...)] attributes. The original Python f-string f'#[cfg(all({', '.join(configs)}))]' used single quotes both for the outer f-string and inside the expression, which is a syntax error in Python versions before 3.12. The patch changes the inner quotes to double quotes: f'#[cfg(all({", ".join(configs)}))]'. This only affects code generation/build compatibility and does not alter generated logic or runtime behavior.
Changed components
core/embed/rust/src/translations/generated/translated_string.rs.makoInspect captured patch +1 / −1
diff --git a/core/embed/rust/src/translations/generated/translated_string.rs.mako b/core/embed/rust/src/translations/generated/translated_string.rs.mako
index b8591a54f..0a1f59d69 100644
--- a/core/embed/rust/src/translations/generated/translated_string.rs.mako
+++ b/core/embed/rust/src/translations/generated/translated_string.rs.mako
@@ -100,7 +100,7 @@ def filter_by_features(values: list[str], keep_debug: bool, keep_altcoin: bool)
feature if is_enabled else f'not({feature})'
for is_enabled, feature in zip(enabled_features, features)
]
- cfg_line = f'#[cfg(all({', '.join(configs)}))]'
+ cfg_line = f'#[cfg(all({", ".join(configs)}))]'
# Currently all English words fit into a single chunk
[encoded] = TranslatedStringsChunk.from_items(filter_by_features(layout_data, *enabled_features))
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.