From a816647b0978df04e76eef80d0931505643a3241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ioan=20Biz=C4=83u?= Date: Fri, 15 Nov 2024 11:46:25 +0100 Subject: [PATCH] chore(core/ui): use different copy on TS3 and TT [no changelog] --- core/embed/rust/librust_qstr.h | 1 + .../rust/src/translations/generated/translated_string.rs | 6 ++++++ core/mocks/trezortranslate_keys.pyi | 1 + core/src/trezor/ui/layouts/tr/__init__.py | 4 +++- core/src/trezor/ui/layouts/tt/__init__.py | 4 ++-- core/translations/cs.json | 1 + core/translations/de.json | 1 + core/translations/en.json | 1 + core/translations/es.json | 1 + core/translations/fr.json | 1 + core/translations/it.json | 1 + core/translations/order.json | 3 ++- core/translations/pt.json | 1 + core/translations/signatures.json | 6 +++--- 14 files changed, 25 insertions(+), 7 deletions(-) diff --git a/core/embed/rust/librust_qstr.h b/core/embed/rust/librust_qstr.h index e0d70554c9..45ee748411 100644 --- a/core/embed/rust/librust_qstr.h +++ b/core/embed/rust/librust_qstr.h @@ -1022,6 +1022,7 @@ static void _librust_qstrs(void) { MP_QSTR_ethereum__token_contract; MP_QSTR_ethereum__units_template; MP_QSTR_ethereum__unknown_contract_address; + MP_QSTR_ethereum__unknown_contract_address_short; MP_QSTR_ethereum__unknown_token; MP_QSTR_ethereum__valid_signature; MP_QSTR_fido__already_registered; diff --git a/core/embed/rust/src/translations/generated/translated_string.rs b/core/embed/rust/src/translations/generated/translated_string.rs index 63b822c3c3..d5309a6cdb 100644 --- a/core/embed/rust/src/translations/generated/translated_string.rs +++ b/core/embed/rust/src/translations/generated/translated_string.rs @@ -1380,6 +1380,8 @@ pub enum TranslatedString { #[cfg(feature = "universal_fw")] ethereum__interaction_contract = 972, // "Interaction contract" misc__enable_labeling = 973, // "Enable labeling?" + #[cfg(feature = "universal_fw")] + ethereum__unknown_contract_address_short = 974, // "Unknown contract address." } impl TranslatedString { @@ -2754,6 +2756,8 @@ impl TranslatedString { #[cfg(feature = "universal_fw")] Self::ethereum__interaction_contract => "Interaction contract", Self::misc__enable_labeling => "Enable labeling?", + #[cfg(feature = "universal_fw")] + Self::ethereum__unknown_contract_address_short => "Unknown contract address.", } } @@ -4129,6 +4133,8 @@ impl TranslatedString { #[cfg(feature = "universal_fw")] Qstr::MP_QSTR_ethereum__interaction_contract => Some(Self::ethereum__interaction_contract), Qstr::MP_QSTR_misc__enable_labeling => Some(Self::misc__enable_labeling), + #[cfg(feature = "universal_fw")] + Qstr::MP_QSTR_ethereum__unknown_contract_address_short => Some(Self::ethereum__unknown_contract_address_short), _ => None, } } diff --git a/core/mocks/trezortranslate_keys.pyi b/core/mocks/trezortranslate_keys.pyi index 18697f6400..5c197a985d 100644 --- a/core/mocks/trezortranslate_keys.pyi +++ b/core/mocks/trezortranslate_keys.pyi @@ -327,6 +327,7 @@ class TR: ethereum__token_contract: str = "Token contract" ethereum__units_template: str = "{0} units" ethereum__unknown_contract_address: str = "Unknown contract address. Continue only if you know what you are doing." + ethereum__unknown_contract_address_short: str = "Unknown contract address." ethereum__unknown_token: str = "Unknown token" ethereum__valid_signature: str = "The signature is valid." experimental_mode__enable: str = "Enable experimental features?" diff --git a/core/src/trezor/ui/layouts/tr/__init__.py b/core/src/trezor/ui/layouts/tr/__init__.py index 9c497d94e0..db164814ec 100644 --- a/core/src/trezor/ui/layouts/tr/__init__.py +++ b/core/src/trezor/ui/layouts/tr/__init__.py @@ -186,7 +186,9 @@ if not utils.BITCOIN_ONLY: def confirm_unknown_contract_warning() -> Awaitable[ui.UiResult]: return show_warning( "unknown_contract_warning", - TR.ethereum__unknown_contract_address, + TR.words__warning, + TR.ethereum__unknown_contract_address_short, + TR.words__continue_anyway, ) diff --git a/core/src/trezor/ui/layouts/tt/__init__.py b/core/src/trezor/ui/layouts/tt/__init__.py index 850059babf..8a34a19bb2 100644 --- a/core/src/trezor/ui/layouts/tt/__init__.py +++ b/core/src/trezor/ui/layouts/tt/__init__.py @@ -167,8 +167,8 @@ if not utils.BITCOIN_ONLY: def confirm_unknown_contract_warning() -> Awaitable[None]: return show_warning( "unknown_contract_warning", - TR.ethereum__unknown_contract_address, - TR.words__warning, + TR.ethereum__unknown_contract_address_short, + TR.words__continue_anyway_question, ) diff --git a/core/translations/cs.json b/core/translations/cs.json index 0c06e84ecc..d5507d67f6 100644 --- a/core/translations/cs.json +++ b/core/translations/cs.json @@ -371,6 +371,7 @@ "ethereum__token_contract": "Kontrakt tokenu", "ethereum__units_template": "Jednotky: {0}", "ethereum__unknown_contract_address": "Neznámá adresa kontraktu. Pokračujte pouze, pokud víte, co děláte.", + "ethereum__unknown_contract_address_short": "Neznámá adresa kontraktu.", "ethereum__unknown_token": "Neznámý token", "ethereum__valid_signature": "Podpis je platný.", "experimental_mode__enable": "Povolit experimentální funkce?", diff --git a/core/translations/de.json b/core/translations/de.json index d3454e84b5..a4e3ced74a 100644 --- a/core/translations/de.json +++ b/core/translations/de.json @@ -371,6 +371,7 @@ "ethereum__token_contract": "Tokenvertrag", "ethereum__units_template": "{0} Einheiten", "ethereum__unknown_contract_address": "Unbekannte Vertragsadresse. Weiter, nur wenn Sie wissen, was Sie tun.", + "ethereum__unknown_contract_address_short": "Unbekannte Vertragsadresse.", "ethereum__unknown_token": "Ungültiger Token", "ethereum__valid_signature": "Die Signatur ist gültig.", "experimental_mode__enable": "Experimentelle Funktionen aktivieren?", diff --git a/core/translations/en.json b/core/translations/en.json index 3fd2fddb5a..1b8acfa667 100644 --- a/core/translations/en.json +++ b/core/translations/en.json @@ -329,6 +329,7 @@ "ethereum__token_contract": "Token contract", "ethereum__units_template": "{0} units", "ethereum__unknown_contract_address": "Unknown contract address. Continue only if you know what you are doing.", + "ethereum__unknown_contract_address_short": "Unknown contract address.", "ethereum__unknown_token": "Unknown token", "ethereum__valid_signature": "The signature is valid.", "experimental_mode__enable": "Enable experimental features?", diff --git a/core/translations/es.json b/core/translations/es.json index bb470abec5..d2e0f6da74 100644 --- a/core/translations/es.json +++ b/core/translations/es.json @@ -371,6 +371,7 @@ "ethereum__token_contract": "Contrato de token", "ethereum__units_template": "{0} unidades", "ethereum__unknown_contract_address": "Dirección de contrato desconocida. Continúa solo si sabes lo que estás haciendo.", + "ethereum__unknown_contract_address_short": "Dirección de contrato desconocida.", "ethereum__unknown_token": "Token desconocido", "ethereum__valid_signature": "La firma es válida.", "experimental_mode__enable": "¿Activar funciones experimentales?", diff --git a/core/translations/fr.json b/core/translations/fr.json index 6348e4095b..24f9038818 100644 --- a/core/translations/fr.json +++ b/core/translations/fr.json @@ -371,6 +371,7 @@ "ethereum__token_contract": "Contrat de jeton", "ethereum__units_template": "{0} unités", "ethereum__unknown_contract_address": "Adresse de contrat inconnue. Continuez seulement si vous savez ce que vous faites.", + "ethereum__unknown_contract_address_short": "Adresse de contrat inconnue.", "ethereum__unknown_token": "Jeton inconnu", "ethereum__valid_signature": "Signature valide.", "experimental_mode__enable": "Activer les fonct. expérimentales ?", diff --git a/core/translations/it.json b/core/translations/it.json index 704b5b40fd..b5f38474ef 100644 --- a/core/translations/it.json +++ b/core/translations/it.json @@ -371,6 +371,7 @@ "ethereum__token_contract": "Contratto token", "ethereum__units_template": "{0} unità", "ethereum__unknown_contract_address": "Indirizzo del contratto sconosciuto. Continua solo se sai cosa stai facendo.", + "ethereum__unknown_contract_address_short": "Indirizzo del contratto sconosciuto.", "ethereum__unknown_token": "Token sconosciuto", "ethereum__valid_signature": "La firma è valida.", "experimental_mode__enable": "Abilitare funzion. sperimentali?", diff --git a/core/translations/order.json b/core/translations/order.json index d5505f4f9b..6fee8d6de7 100644 --- a/core/translations/order.json +++ b/core/translations/order.json @@ -972,5 +972,6 @@ "970": "buttons__view_all_data", "971": "instructions__view_all_data", "972": "ethereum__interaction_contract", - "973": "misc__enable_labeling" + "973": "misc__enable_labeling", + "974": "ethereum__unknown_contract_address_short" } diff --git a/core/translations/pt.json b/core/translations/pt.json index ddbd2a762d..0cd1de5d66 100644 --- a/core/translations/pt.json +++ b/core/translations/pt.json @@ -371,6 +371,7 @@ "ethereum__token_contract": "Contrato Token", "ethereum__units_template": "{0} unidades", "ethereum__unknown_contract_address": "Endereço de contrato desconhecido. Continue somente se você sabe o que está fazendo.", + "ethereum__unknown_contract_address_short": "Endereço de contrato desconhecido.", "ethereum__unknown_token": "Token desconhecido", "ethereum__valid_signature": "A assinatura é válida.", "experimental_mode__enable": "Ativar recursos experimentais?", diff --git a/core/translations/signatures.json b/core/translations/signatures.json index 56a74c2aef..e68c2c77c7 100644 --- a/core/translations/signatures.json +++ b/core/translations/signatures.json @@ -1,8 +1,8 @@ { "current": { - "merkle_root": "d863418788a5cbc42706f33ff2c46c4d264611b0ef3a91b09d49968291f89d4d", - "datetime": "2024-11-06T16:17:17.038435", - "commit": "18d2372c106f5d7f7082183b07f9e61c0d02063c" + "merkle_root": "b998ddff78d4fee55f200f10cbbf3fee608c5d11d09268e5640ec7b3844065aa", + "datetime": "2024-11-15T10:26:30.070641", + "commit": "29da869e72a675e438f2a99f7c499ba67e19b517" }, "history": [ {