Skip to content

Commit

Permalink
fix(core/ui): add 2nd version of continue anyway
Browse files Browse the repository at this point in the history
To distinguish between prompt and a question.
  • Loading branch information
obrusvit committed Oct 8, 2024
1 parent 443373c commit f5fe053
Show file tree
Hide file tree
Showing 21 changed files with 42 additions and 27 deletions.
1 change: 1 addition & 0 deletions core/embed/rust/librust_qstr.h
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ static void _librust_qstrs(void) {
MP_QSTR_words__confirm_fee;
MP_QSTR_words__contains;
MP_QSTR_words__continue_anyway;
MP_QSTR_words__continue_anyway_question;
MP_QSTR_words__continue_with;
MP_QSTR_words__error;
MP_QSTR_words__fee;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ fn new_obj(_args: &[Obj], kwargs: &Map) -> Result<Obj, error::Error> {
.with_cancel_button()
.with_footer(
TR::instructions__swipe_up.into(),
Some(TR::words__continue_anyway.into()),
Some(TR::words__continue_anyway_question.into()),
)
.with_swipe(Direction::Up, SwipeSettings::default())
.with_swipe(Direction::Right, SwipeSettings::immediate())
Expand Down
2 changes: 1 addition & 1 deletion core/embed/rust/src/ui/model_mercury/flow/prompt_backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl PromptBackup {
.with_cancel_button()
.with_footer(
TR::instructions__swipe_up.into(),
Some(TR::words__continue_anyway.into()),
Some(TR::words__continue_anyway_question.into()),
)
.with_swipe(Direction::Up, SwipeSettings::default())
.with_swipe(Direction::Right, SwipeSettings::immediate())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl WarningHiPrio {
let description: TString = kwargs.get(Qstr::MP_QSTR_description)?.try_into()?;
let value: TString = kwargs.get_or(Qstr::MP_QSTR_value, "".into())?;
let cancel: TString = TR::words__cancel_and_exit.into();
let confirm: TString = TR::buttons__continue.into();
let confirm: TString = TR::words__continue_anyway.into();
let done_title: TString = TR::words__operation_cancelled.into();

// Message
Expand Down
3 changes: 2 additions & 1 deletion core/mocks/trezortranslate_keys.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,8 @@ class TR:
words__confirm: str = "Confirm"
words__confirm_fee: str = "Confirm fee"
words__contains: str = "Contains"
words__continue_anyway: str = "Continue anyway?"
words__continue_anyway: str = "Continue anyway"
words__continue_anyway_question: str = "Continue anyway?"
words__continue_with: str = "Continue with"
words__error: str = "Error"
words__fee: str = "Fee"
Expand Down
6 changes: 3 additions & 3 deletions core/src/apps/bitcoin/sign_tx/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ async def confirm_unverified_external_input() -> None:
await layouts.show_warning(
"unverified_external_input",
TR.bitcoin__unverified_external_inputs,
TR.words__continue_anyway,
TR.words__continue_anyway_question,
button=TR.buttons__continue,
br_code=ButtonRequestType.SignTx,
)
Expand All @@ -294,7 +294,7 @@ async def confirm_multiple_accounts() -> None:
await layouts.show_warning(
"sending_from_multiple_accounts",
TR.send__from_multiple_accounts,
TR.words__continue_anyway,
TR.words__continue_anyway_question,
button=TR.buttons__continue,
br_code=ButtonRequestType.SignTx,
)
Expand All @@ -307,7 +307,7 @@ async def confirm_nondefault_locktime(lock_time: int, lock_time_disabled: bool)
await layouts.show_warning(
"nondefault_locktime",
TR.bitcoin__locktime_no_effect,
TR.words__continue_anyway,
TR.words__continue_anyway_question,
button=TR.buttons__continue,
br_code=ButtonRequestType.SignTx,
)
Expand Down
2 changes: 1 addition & 1 deletion core/src/trezor/ui/layouts/mercury/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ def show_warning(
trezorui2.show_warning(
title=TR.words__important,
value=content,
button=subheader or TR.words__continue_anyway,
button=subheader or TR.words__continue_anyway_question,
danger=True,
)
),
Expand Down
2 changes: 1 addition & 1 deletion core/src/trezor/ui/layouts/tr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def confirm_multisig_warning() -> Awaitable[None]:
return show_warning(
"warning_multisig",
TR.send__receiving_to_multisig,
TR.words__continue_anyway,
TR.words__continue_anyway_question,
)


Expand Down
4 changes: 2 additions & 2 deletions core/src/trezor/ui/layouts/tt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def confirm_path_warning(path: str, path_type: str | None = None) -> Awaitable[N
trezorui2.show_warning(
title=title,
value=path,
description=TR.words__continue_anyway,
description=TR.words__continue_anyway_question,
button=TR.buttons__continue,
)
),
Expand All @@ -450,7 +450,7 @@ def confirm_multisig_warning() -> Awaitable[None]:
return show_warning(
"warning_multisig",
TR.send__receiving_to_multisig,
TR.words__continue_anyway,
TR.words__continue_anyway_question,
)


Expand Down
1 change: 1 addition & 0 deletions core/tools/translations/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,7 @@
"words__confirm_fee": "text,1",
"words__contains": "text,1",
"words__continue_anyway": "text,1",
"words__continue_anyway_question": "text,1",
"words__continue_with": "text,1",
"words__error": "text,1",
"words__fee": "text,1",
Expand Down
3 changes: 2 additions & 1 deletion core/translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,8 @@
"words__confirm": "Potvrdit",
"words__confirm_fee": "Potvrdit poplatek",
"words__contains": "Obsahuje",
"words__continue_anyway": "Přesto pokračovat?",
"words__continue_anyway": "Přesto pokračovat",
"words__continue_anyway_question": "Přesto pokračovat?",
"words__continue_with": "Pokračovat s",
"words__error": "Chyba",
"words__fee": "Poplatek",
Expand Down
3 changes: 2 additions & 1 deletion core/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,8 @@
"words__confirm": "Bestätigen",
"words__confirm_fee": "Gebühr bestätigen",
"words__contains": "Enthält",
"words__continue_anyway": "trotzdem fortfahren?",
"words__continue_anyway": "trotzdem fortfahren",
"words__continue_anyway_question": "trotzdem fortfahren?",
"words__continue_with": "Weiter mit",
"words__error": "Fehler",
"words__fee": "Gebühr",
Expand Down
3 changes: 2 additions & 1 deletion core/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,8 @@
"words__confirm": "Confirm",
"words__confirm_fee": "Confirm fee",
"words__contains": "Contains",
"words__continue_anyway": "Continue anyway?",
"words__continue_anyway": "Continue anyway",
"words__continue_anyway_question": "Continue anyway?",
"words__continue_with": "Continue with",
"words__error": "Error",
"words__fee": "Fee",
Expand Down
3 changes: 2 additions & 1 deletion core/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,8 @@
"words__confirm": "Confirmar",
"words__confirm_fee": "Confirmar comisión",
"words__contains": "Contiene",
"words__continue_anyway": "¿Continuar?",
"words__continue_anyway": "Continuar",
"words__continue_anyway_question": "¿Continuar?",
"words__continue_with": "Continuar con",
"words__error": "Error",
"words__fee": "Comisión",
Expand Down
3 changes: 2 additions & 1 deletion core/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,8 @@
"words__confirm": "Conf.",
"words__confirm_fee": "Conf. les frais",
"words__contains": "Contient",
"words__continue_anyway": "Continuer qdm ?",
"words__continue_anyway": "Continuer qdm",
"words__continue_anyway_question": "Continuer qdm ?",
"words__continue_with": "Continuer avec",
"words__error": "Erreur",
"words__fee": "Frais",
Expand Down
3 changes: 2 additions & 1 deletion core/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,8 @@
"words__confirm": "Conferma",
"words__confirm_fee": "Conferma commissione",
"words__contains": "Contiene",
"words__continue_anyway": "Continuare comunque?",
"words__continue_anyway": "Continuare comunque",
"words__continue_anyway_question": "Continuare comunque?",
"words__continue_with": "Continua con",
"words__error": "Errore",
"words__fee": "Commissione",
Expand Down
5 changes: 3 additions & 2 deletions core/translations/order.json
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@
"800": "words__confirm",
"801": "words__confirm_fee",
"802": "words__contains",
"803": "words__continue_anyway",
"803": "words__continue_anyway_question",
"804": "words__continue_with",
"805": "words__error",
"806": "words__fee",
Expand Down Expand Up @@ -965,5 +965,6 @@
"963": "fido__title_select_credential",
"964": "instructions__swipe_down",
"965": "fido__title_credential_details",
"966": "address__public_key_confirmed"
"966": "address__public_key_confirmed",
"967": "words__continue_anyway"
}
3 changes: 2 additions & 1 deletion core/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,8 @@
"words__confirm": "Confirmar",
"words__confirm_fee": "Confirmar taxa",
"words__contains": "Contém",
"words__continue_anyway": "Continuar?",
"words__continue_anyway": "Continuar",
"words__continue_anyway_question": "Continuar?",
"words__continue_with": "Continuar com",
"words__error": "Erro",
"words__fee": "Taxa",
Expand Down
6 changes: 3 additions & 3 deletions core/translations/signatures.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"current": {
"merkle_root": "b6f219293d33f026ebcee6b877ec62903a082f2cedb71053de8ecf614c4b7e4f",
"datetime": "2024-10-02T09:30:46.734439",
"commit": "774f9de745ec38d79c06cbe487af46b8e0136950"
"merkle_root": "38380cf2ffd2a7f73010f96c3c24f8bc3c71728a2da22fd8dee30c85750932de",
"datetime": "2024-10-07T13:19:31.741035",
"commit": "443373ce19421beb2323e68b5ec080a000c1d471"
},
"history": [
{
Expand Down
3 changes: 2 additions & 1 deletion core/translations/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,8 @@
"words__confirm": "Onayla",
"words__confirm_fee": "Ücreti onayla",
"words__contains": "Şunu içerir:",
"words__continue_anyway": "Yine de devam mı?",
"words__continue_anyway": "Yine de devam mı",
"words__continue_anyway_question": "Yine de devam mı?",
"words__continue_with": "Şununla devam et:",
"words__error": "Hata",
"words__fee": "Ücret",
Expand Down

0 comments on commit f5fe053

Please sign in to comment.