1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-15 18:00:59 +00:00
trezor-firmware/core/mocks/trezortranslate_keys.pyi.mako
Roman Zeyde 6927b8e4a8 feat(core): support per-layout text strings
Tested by modifying a single untranslated text entry.
2025-01-13 14:02:18 +02:00

21 lines
481 B
Mako

# generated from ${THIS_FILE.name}
# (by running `make templates` in `core`)
# do not edit manually!
<%
import json
en_file = ROOT / "core" / "translations" / "en.json"
en_data = json.loads(en_file.read_text())["translations"]
%>\
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()
%>\
${name}: str = ${json.dumps(value)}
% endfor