From 6441d416467f49704c8221ebd4b7bb3604a46d4b Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 21 Feb 2025 13:49:04 +0100 Subject: [PATCH] fix(core): change "Swipe up" to "Tap to continue" everywhere --- core/embed/rust/librust_qstr.h | 1 + .../rust/src/translations/generated/translated_string.rs | 3 +++ core/embed/rust/src/ui/layout_delizia/component/frame.rs | 2 +- .../src/ui/layout_delizia/component/number_input_slider.rs | 2 +- core/embed/rust/src/ui/layout_delizia/flow/confirm_action.rs | 2 +- core/embed/rust/src/ui/layout_delizia/flow/confirm_fido.rs | 2 +- .../src/ui/layout_delizia/flow/continue_recovery_homepage.rs | 2 +- .../embed/rust/src/ui/layout_delizia/flow/show_share_words.rs | 2 +- core/embed/rust/src/ui/layout_delizia/flow/util.rs | 4 ++-- core/embed/rust/src/ui/layout_delizia/ui_firmware.rs | 3 +-- core/mocks/trezortranslate_keys.pyi | 1 + core/translations/cs.json | 2 +- core/translations/de.json | 2 +- core/translations/en.json | 1 + core/translations/es.json | 2 +- core/translations/fr.json | 2 +- core/translations/it.json | 2 +- core/translations/order.json | 3 ++- core/translations/pt.json | 2 +- 19 files changed, 23 insertions(+), 17 deletions(-) diff --git a/core/embed/rust/librust_qstr.h b/core/embed/rust/librust_qstr.h index 1f4ecbddf4..ea96952844 100644 --- a/core/embed/rust/librust_qstr.h +++ b/core/embed/rust/librust_qstr.h @@ -296,6 +296,7 @@ static void _librust_qstrs(void) { MP_QSTR_instructions__swipe_horizontally; MP_QSTR_instructions__swipe_up; MP_QSTR_instructions__tap_to_confirm; + MP_QSTR_instructions__tap_to_continue; MP_QSTR_instructions__tap_to_start; MP_QSTR_instructions__view_all_data; MP_QSTR_is_data; diff --git a/core/embed/rust/src/translations/generated/translated_string.rs b/core/embed/rust/src/translations/generated/translated_string.rs index e5fb583003..fd6108abd6 100644 --- a/core/embed/rust/src/translations/generated/translated_string.rs +++ b/core/embed/rust/src/translations/generated/translated_string.rs @@ -1402,6 +1402,7 @@ pub enum TranslatedString { #[cfg(feature = "universal_fw")] solana__stake_on_question = 989, // "Stake SOL on {0}?" sign_message__confirm_without_review = 990, // "Confirm without review" + instructions__tap_to_continue = 991, // "Tap to continue" } impl TranslatedString { @@ -2800,6 +2801,7 @@ impl TranslatedString { #[cfg(feature = "universal_fw")] Self::solana__stake_on_question => "Stake SOL on {0}?", Self::sign_message__confirm_without_review => "Confirm without review", + Self::instructions__tap_to_continue => "Tap to continue", } } @@ -4197,6 +4199,7 @@ impl TranslatedString { #[cfg(feature = "universal_fw")] Qstr::MP_QSTR_solana__stake_on_question => Some(Self::solana__stake_on_question), Qstr::MP_QSTR_sign_message__confirm_without_review => Some(Self::sign_message__confirm_without_review), + Qstr::MP_QSTR_instructions__tap_to_continue => Some(Self::instructions__tap_to_continue), _ => None, } } diff --git a/core/embed/rust/src/ui/layout_delizia/component/frame.rs b/core/embed/rust/src/ui/layout_delizia/component/frame.rs index 1715379652..4bc2539bdf 100644 --- a/core/embed/rust/src/ui/layout_delizia/component/frame.rs +++ b/core/embed/rust/src/ui/layout_delizia/component/frame.rs @@ -202,7 +202,7 @@ where pub fn with_swipeup_footer(self, description: Option>) -> Self { use crate::translations::TR; - self.with_footer(TR::instructions__swipe_up.into(), description) + self.with_footer(TR::instructions__tap_to_continue.into(), description) .with_swipe(Direction::Up, SwipeSettings::default()) } diff --git a/core/embed/rust/src/ui/layout_delizia/component/number_input_slider.rs b/core/embed/rust/src/ui/layout_delizia/component/number_input_slider.rs index 0dae882ab6..ffa6161035 100644 --- a/core/embed/rust/src/ui/layout_delizia/component/number_input_slider.rs +++ b/core/embed/rust/src/ui/layout_delizia/component/number_input_slider.rs @@ -84,7 +84,7 @@ impl Component for NumberInputSliderDialog { ctx.request_paint(); } else { self.footer - .update_instruction(ctx, TR::instructions__swipe_up); + .update_instruction(ctx, TR::instructions__tap_to_continue); self.footer.update_description(ctx, TR::setting__apply); ctx.request_paint(); } diff --git a/core/embed/rust/src/ui/layout_delizia/flow/confirm_action.rs b/core/embed/rust/src/ui/layout_delizia/flow/confirm_action.rs index 937d803c58..eb7aa55bb8 100644 --- a/core/embed/rust/src/ui/layout_delizia/flow/confirm_action.rs +++ b/core/embed/rust/src/ui/layout_delizia/flow/confirm_action.rs @@ -298,7 +298,7 @@ fn new_confirm_action_uni( } content = content - .with_footer_counter(TR::instructions__swipe_up.into()) + .with_footer_counter(TR::instructions__tap_to_continue.into()) .register_footer_update_fn(footer_update_fn::); } diff --git a/core/embed/rust/src/ui/layout_delizia/flow/confirm_fido.rs b/core/embed/rust/src/ui/layout_delizia/flow/confirm_fido.rs index f430deb5ff..49210be715 100644 --- a/core/embed/rust/src/ui/layout_delizia/flow/confirm_fido.rs +++ b/core/embed/rust/src/ui/layout_delizia/flow/confirm_fido.rs @@ -144,7 +144,7 @@ pub fn new_confirm_fido( .with_footer_page_hint( TR::fido__more_credentials.into(), TR::buttons__go_back.into(), - TR::instructions__swipe_up.into(), + TR::instructions__tap_to_continue.into(), TR::instructions__swipe_down.into(), ) .register_footer_update_fn(footer_update_fn) diff --git a/core/embed/rust/src/ui/layout_delizia/flow/continue_recovery_homepage.rs b/core/embed/rust/src/ui/layout_delizia/flow/continue_recovery_homepage.rs index 4296c124b8..d215154558 100644 --- a/core/embed/rust/src/ui/layout_delizia/flow/continue_recovery_homepage.rs +++ b/core/embed/rust/src/ui/layout_delizia/flow/continue_recovery_homepage.rs @@ -270,7 +270,7 @@ pub fn new_continue_recovery_homepage( .map(super::util::map_to_choice); let (footer_instruction, footer_description) = ( - TR::instructions__swipe_up.into(), + TR::instructions__tap_to_continue.into(), TR::recovery__more_shares_needed.into(), ); let n_remaining_shares = pages.as_ref().unwrap().len() / 2; diff --git a/core/embed/rust/src/ui/layout_delizia/flow/show_share_words.rs b/core/embed/rust/src/ui/layout_delizia/flow/show_share_words.rs index 11ef39be3f..9cdd9961bc 100644 --- a/core/embed/rust/src/ui/layout_delizia/flow/show_share_words.rs +++ b/core/embed/rust/src/ui/layout_delizia/flow/show_share_words.rs @@ -110,7 +110,7 @@ pub fn new_show_share_words( .with_vertical_pages() .with_subtitle(subtitle) .register_header_update_fn(header_updating_func) - .with_footer_counter(TR::instructions__swipe_up.into()) + .with_footer_counter(TR::instructions__tap_to_continue.into()) .register_footer_update_fn(footer_updating_func) .map_to_button_msg(); diff --git a/core/embed/rust/src/ui/layout_delizia/flow/util.rs b/core/embed/rust/src/ui/layout_delizia/flow/util.rs index a5a5c9653e..912ccaa941 100644 --- a/core/embed/rust/src/ui/layout_delizia/flow/util.rs +++ b/core/embed/rust/src/ui/layout_delizia/flow/util.rs @@ -175,7 +175,7 @@ impl ConfirmValue { pub const fn with_swipeup_footer(self, description: Option>) -> Self { self.with_footer( - TString::from_translation(TR::instructions__swipe_up), + TString::from_translation(TR::instructions__tap_to_continue), description, ) .with_swipe_up() @@ -385,7 +385,7 @@ impl ShowInfoParams { pub const fn with_swipeup_footer(self, description: Option>) -> Self { self.with_footer( - TString::from_translation(TR::instructions__swipe_up), + TString::from_translation(TR::instructions__tap_to_continue), description, ) .with_swipe_up() diff --git a/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs b/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs index 19b90f26a7..547bbf9c38 100644 --- a/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs +++ b/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs @@ -9,7 +9,6 @@ use crate::{ ui::{ component::{ connect::Connect, - swipe_detect::SwipeSettings, text::{ op::OpTextLayout, paragraphs::{ @@ -20,7 +19,7 @@ use crate::{ }, Border, CachedJpeg, ComponentExt, Empty, FormattedText, Never, Timeout, }, - geometry::{self, Direction, Offset}, + geometry::{self, Offset}, layout::{ obj::{LayoutMaybeTrace, LayoutObj, RootComponent}, util::{PropsList, RecoveryType}, diff --git a/core/mocks/trezortranslate_keys.pyi b/core/mocks/trezortranslate_keys.pyi index c38da3f341..7306c8c1e2 100644 --- a/core/mocks/trezortranslate_keys.pyi +++ b/core/mocks/trezortranslate_keys.pyi @@ -400,6 +400,7 @@ class TR: instructions__swipe_horizontally: str = "Swipe horizontally" instructions__swipe_up: str = "Swipe up" instructions__tap_to_confirm: str = "Tap to confirm" + instructions__tap_to_continue: str = "Tap to continue" instructions__tap_to_start: str = "Tap to start" instructions__view_all_data: str = "View all data in the menu." joint__title: str = "Joint transaction" diff --git a/core/translations/cs.json b/core/translations/cs.json index f36a0ee141..15cb40c98e 100644 --- a/core/translations/cs.json +++ b/core/translations/cs.json @@ -442,7 +442,7 @@ "instructions__shares_start_with_1": "Začněte částí č. 1", "instructions__swipe_down": "Přejeďte prstem dolů", "instructions__swipe_horizontally": "Přejeďte prstem vodorovně", - "instructions__swipe_up": "Přejeďte prstem nahoru", + "instructions__tap_to_continue": "Klepnutím pokračujte", "instructions__tap_to_confirm": "Klepnutím potvrďte", "instructions__tap_to_start": "Začněte klepnutím", "instructions__view_all_data": "Zobrazit všechna data v menu.", diff --git a/core/translations/de.json b/core/translations/de.json index 4b66d04e60..ab21a934bd 100644 --- a/core/translations/de.json +++ b/core/translations/de.json @@ -442,7 +442,7 @@ "instructions__shares_start_with_1": "Mit Share #1 beginnen", "instructions__swipe_down": "Nach unten wischen", "instructions__swipe_horizontally": "Zur Seite wischen", - "instructions__swipe_up": "Nach oben wischen", + "instructions__tap_to_continue": "Zum Fortfahren tippen", "instructions__tap_to_confirm": "Zum Bestätigen tippen", "instructions__tap_to_start": "Zum Beginnen tippen", "instructions__view_all_data": "Alle Daten im Menü sehen.", diff --git a/core/translations/en.json b/core/translations/en.json index bbe419c645..5a11716c38 100644 --- a/core/translations/en.json +++ b/core/translations/en.json @@ -402,6 +402,7 @@ "instructions__swipe_horizontally": "Swipe horizontally", "instructions__swipe_up": "Swipe up", "instructions__tap_to_confirm": "Tap to confirm", + "instructions__tap_to_continue": "Tap to continue", "instructions__tap_to_start": "Tap to start", "instructions__view_all_data": "View all data in the menu.", "joint__title": "Joint transaction", diff --git a/core/translations/es.json b/core/translations/es.json index a0f064c641..e8e2694fc8 100644 --- a/core/translations/es.json +++ b/core/translations/es.json @@ -442,7 +442,7 @@ "instructions__shares_start_with_1": "Empezar con el rec. n.º 1", "instructions__swipe_down": "Deslizar hacia abajo", "instructions__swipe_horizontally": "Deslizar en horizontal", - "instructions__swipe_up": "Desliza hacia arriba", + "instructions__tap_to_continue": "Toca para continuar", "instructions__tap_to_confirm": "Toca para confirmar", "instructions__tap_to_start": "Toca para empezar", "instructions__view_all_data": "Ver todos los datos en el menú.", diff --git a/core/translations/fr.json b/core/translations/fr.json index 8f5d853d69..f123ff5fc3 100644 --- a/core/translations/fr.json +++ b/core/translations/fr.json @@ -442,7 +442,7 @@ "instructions__shares_start_with_1": "Commencez avec le fragment #1", "instructions__swipe_down": "Glisser vers le bas", "instructions__swipe_horizontally": "Glisser horizontalement", - "instructions__swipe_up": "Faites glisser vers le haut", + "instructions__tap_to_continue": "Appuyez pour continuer", "instructions__tap_to_confirm": "Appuyez pour confirmer", "instructions__tap_to_start": "Appuyez pour démarrer", "instructions__view_all_data": "Voir toutes les données dans le menu.", diff --git a/core/translations/it.json b/core/translations/it.json index 21a2bf765e..ee4a11df7c 100644 --- a/core/translations/it.json +++ b/core/translations/it.json @@ -442,7 +442,7 @@ "instructions__shares_start_with_1": "Inizia con azione n. 1", "instructions__swipe_down": "Scorri in basso", "instructions__swipe_horizontally": "Scorri in orizzontale", - "instructions__swipe_up": "Scorri in alto", + "instructions__tap_to_continue": "Tocca e continua", "instructions__tap_to_confirm": "Tocca e conferma", "instructions__tap_to_start": "Tocca e inizia", "instructions__view_all_data": "Visualizza tutti i dati nel menu.", diff --git a/core/translations/order.json b/core/translations/order.json index 37142aed1e..0277b416a4 100644 --- a/core/translations/order.json +++ b/core/translations/order.json @@ -989,5 +989,6 @@ "987": "solana__unstake_question", "988": "solana__vote_account", "989": "solana__stake_on_question", - "990": "sign_message__confirm_without_review" + "990": "sign_message__confirm_without_review", + "991": "instructions__tap_to_continue" } diff --git a/core/translations/pt.json b/core/translations/pt.json index 268a4e2c2d..e86ac14877 100644 --- a/core/translations/pt.json +++ b/core/translations/pt.json @@ -442,7 +442,7 @@ "instructions__shares_start_with_1": "Começar com cota nº1", "instructions__swipe_down": "Deslizar para baixo", "instructions__swipe_horizontally": "Deslizar horizontalmente", - "instructions__swipe_up": "Deslizar para cima", + "instructions__tap_to_continue": "Toque para continuar", "instructions__tap_to_confirm": "Toque para confirmar", "instructions__tap_to_start": "Toque para iniciar", "joint__title": "Transação conjunta",