From 043de54bdfea4bd00515413ff6f9f3d83ae76ebb Mon Sep 17 00:00:00 2001 From: obrusvit Date: Tue, 11 Mar 2025 16:04:15 +0100 Subject: [PATCH] fix(tests): handle layout-specific translations --- python/src/trezorlib/debuglink.py | 2 -- tests/translations.py | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python/src/trezorlib/debuglink.py b/python/src/trezorlib/debuglink.py index deeeaeefca..2d088be5f3 100644 --- a/python/src/trezorlib/debuglink.py +++ b/python/src/trezorlib/debuglink.py @@ -95,8 +95,6 @@ class LayoutType(Enum): return cls.Eckhart if model in (models.T1B1,): return cls.T1 - if model in (models.T3W1,): - return cls.Eckhart raise ValueError(f"Unknown model: {model}") def __str__(self) -> str: diff --git a/tests/translations.py b/tests/translations.py index 8bf4a8f2ac..917788dc30 100644 --- a/tests/translations.py +++ b/tests/translations.py @@ -75,6 +75,11 @@ def set_language(client: Client, lang: str, *, force: bool = False): device.change_language(client, language_data) # type: ignore _CURRENT_TRANSLATION.LAYOUT = client.layout_type _CURRENT_TRANSLATION.TR = TRANSLATIONS[lang] + _CURRENT_TRANSLATION.LAYOUT = client.layout_type + + +def set_layout(client: Client): + _CURRENT_TRANSLATION.LAYOUT = client.layout_type def get_lang_json(lang: str) -> translations.JsonDef: