Skip to content

Commit

Permalink
fix(core): get rid of colon in TS5 descriptions
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
ibz committed Jan 14, 2025
1 parent d9680d7 commit cfb4a79
Show file tree
Hide file tree
Showing 17 changed files with 237 additions and 221 deletions.
80 changes: 40 additions & 40 deletions core/embed/rust/src/translations/generated/translated_string.rs

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions core/mocks/trezortranslate_keys.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ class TR:
binance__sell: str = "Sell"
binance__sender_address: str = "Sender address:"
binance__side: str = "Side:"
bitcoin__commitment_data: str = "Commitment data:"
bitcoin__commitment_data: str = "Commitment data"
bitcoin__confirm_locktime: str = "Confirm locktime"
bitcoin__create_proof_of_ownership: str = "Do you want to create a proof of ownership?"
bitcoin__high_mining_fee_template: str = "The mining fee of\n{0}\nis unexpectedly high."
bitcoin__locktime_no_effect: str = "Locktime is set but will have no effect."
bitcoin__locktime_set_to: str = "Locktime set to:"
bitcoin__locktime_set_to_blockheight: str = "Locktime set to blockheight:"
bitcoin__locktime_set_to: str = "Locktime set to"
bitcoin__locktime_set_to_blockheight: str = "Locktime set to blockheight"
bitcoin__lot_of_change_outputs: str = "A lot of change-outputs."
bitcoin__multiple_accounts: str = "Multiple accounts"
bitcoin__new_fee_rate: str = "New fee rate:"
bitcoin__simple_send_of: str = "Simple send of"
bitcoin__ticket_amount: str = "Ticket amount:"
bitcoin__ticket_amount: str = "Ticket amount"
bitcoin__title_confirm_details: str = "Confirm details"
bitcoin__title_finalize_transaction: str = "Finalize transaction"
bitcoin__title_high_mining_fee: str = "High mining fee"
Expand All @@ -79,7 +79,7 @@ class TR:
bitcoin__unusually_high_fee: str = "Unusually high fee."
bitcoin__unverified_external_inputs: str = "The transaction contains unverified external inputs."
bitcoin__valid_signature: str = "The signature is valid."
bitcoin__voting_rights: str = "Voting rights to:"
bitcoin__voting_rights: str = "Voting rights to"
brightness__change_title: str = "Change display brightness"
brightness__changed_title: str = "Display brightness changed"
brightness__title: str = "Display brightness"
Expand Down Expand Up @@ -180,7 +180,7 @@ class TR:
cardano__path: str = "path"
cardano__pledge: str = "Pledge"
cardano__pointer: str = "pointer"
cardano__policy_id: str = "Policy ID:"
cardano__policy_id: str = "Policy ID"
cardano__pool_metadata_hash: str = "Pool metadata hash:"
cardano__pool_metadata_url: str = "Pool metadata url:"
cardano__pool_owner: str = "Pool owner:"
Expand All @@ -205,7 +205,7 @@ class TR:
cardano__script_reward: str = "script reward"
cardano__sending: str = "Sending"
cardano__show_simple: str = "Show Simple"
cardano__sign_tx_path_template: str = "Sign transaction with {0}:"
cardano__sign_tx_path_template: str = "Sign transaction with {0}"
cardano__stake_delegation: str = "Stake delegation"
cardano__stake_deregistration: str = "Stake key deregistration"
cardano__stake_pool_registration: str = "Stakepool registration"
Expand Down Expand Up @@ -468,7 +468,7 @@ class TR:
nem__decrease: str = "Decrease"
nem__description: str = "Description:"
nem__divisibility_and_levy_cannot_be_shown: str = "Divisibility and levy cannot be shown for unknown mosaics"
nem__encrypted: str = "Encrypted:"
nem__encrypted: str = "Encrypted"
nem__final_confirm: str = "Final confirm"
nem__immutable: str = "immutable"
nem__increase: str = "Increase"
Expand All @@ -495,7 +495,7 @@ class TR:
nem__supply_units_template: str = "{0} supply by {1} whole units?"
nem__transferable: str = "Transferable?"
nem__under_namespace: str = "under namespace"
nem__unencrypted: str = "Unencrypted:"
nem__unencrypted: str = "Unencrypted"
nem__unknown_mosaic: str = "Unknown mosaic!"
passphrase__access_wallet: str = "Access passphrase wallet?"
passphrase__always_on_device: str = "Always enter your passphrase on Trezor?"
Expand Down Expand Up @@ -756,7 +756,7 @@ class TR:
send__title_sending_to: str = "Sending to"
send__to_the_total_amount: str = "To the total amount:"
send__total_amount: str = "Total amount"
send__transaction_id: str = "Transaction ID:"
send__transaction_id: str = "Transaction ID"
send__transaction_signed: str = "Transaction signed"
send__you_are_contributing: str = "You are contributing:"
setting__adjust: str = "Adjust"
Expand Down Expand Up @@ -785,7 +785,7 @@ class TR:
stellar__account_thresholds: str = "Account Thresholds"
stellar__add_signer: str = "Add Signer"
stellar__add_trust: str = "Add trust"
stellar__all_will_be_sent_to: str = "All XLM will be sent to:"
stellar__all_will_be_sent_to: str = "All XLM will be sent to"
stellar__allow_trust: str = "Allow trust"
stellar__asset: str = "Asset"
stellar__balance_id: str = "Balance ID"
Expand All @@ -808,15 +808,15 @@ class TR:
stellar__destination: str = "Destination:"
stellar__exchanges_require_memo: str = "Important: Many exchanges require a memo when depositing"
stellar__final_confirm: str = "Final confirm"
stellar__hash: str = "Hash:"
stellar__hash: str = "Hash"
stellar__high: str = "High:"
stellar__home_domain: str = "Home Domain"
stellar__inflation: str = "Inflation"
stellar__initial_balance: str = "Initial Balance"
stellar__initialize_signing_with: str = "Initialize signing with"
stellar__issuer_template: str = "{0} issuer:"
stellar__issuer_template: str = "{0} issuer"
stellar__key: str = "Key:"
stellar__limit: str = "Limit:"
stellar__limit: str = "Limit"
stellar__low: str = "Low:"
stellar__master_weight: str = "Master Weight:"
stellar__medium: str = "Medium:"
Expand All @@ -827,9 +827,9 @@ class TR:
stellar__on_network_template: str = "Transaction is on {0}"
stellar__path_pay: str = "Path Pay"
stellar__path_pay_at_least: str = "Path Pay at least"
stellar__pay: str = "Pay:"
stellar__pay_at_most: str = "Pay at most:"
stellar__preauth_transaction: str = "Pre-auth transaction:"
stellar__pay: str = "Pay"
stellar__pay_at_most: str = "Pay at most"
stellar__preauth_transaction: str = "Pre-auth transaction"
stellar__price_per_template: str = "Price per {0}:"
stellar__private_network: str = "private network"
stellar__remove_signer: str = "Remove Signer"
Expand All @@ -840,7 +840,7 @@ class TR:
stellar__set_sequence_to_template: str = "Set sequence to {0}?"
stellar__sign_tx_count_template: str = "Sign this transaction made up of {0}"
stellar__sign_tx_fee_template: str = "and pay {0}\nfor fee?"
stellar__source_account: str = "Source account:"
stellar__source_account: str = "Source account"
stellar__testnet_network: str = "testnet network"
stellar__trusted_account: str = "Trusted Account"
stellar__update: str = "Update"
Expand All @@ -853,12 +853,12 @@ class TR:
storage_msg__starting: str = "Starting up"
storage_msg__verifying_pin: str = "Verifying PIN"
storage_msg__wrong_pin: str = "Wrong PIN"
tezos__baker_address: str = "Baker address:"
tezos__baker_address: str = "Baker address"
tezos__balance: str = "Balance:"
tezos__ballot: str = "Ballot:"
tezos__confirm_delegation: str = "Confirm delegation"
tezos__confirm_origination: str = "Confirm origination"
tezos__delegator: str = "Delegator:"
tezos__delegator: str = "Delegator"
tezos__proposal: str = "Proposal"
tezos__register_delegate: str = "Register delegate"
tezos__remove_delegation: str = "Remove delegation"
Expand Down
2 changes: 1 addition & 1 deletion core/src/apps/ethereum/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def require_confirm_other_data(data: bytes, data_total: int) -> Awaitable[None]:
"confirm_data",
TR.ethereum__title_input_data,
data,
TR.ethereum__data_size_template.format(data_total),
description=TR.ethereum__data_size_template.format(data_total),
verb=TR.buttons__confirm,
verb_cancel=TR.send__cancel_sign,
br_code=ButtonRequestType.SignTx,
Expand Down
2 changes: 1 addition & 1 deletion core/src/apps/stellar/operations/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ async def confirm_set_options_op(op: StellarSetOptionsOp) -> None:
title = TR.stellar__remove_signer
data: str | bytes = ""
if signer_type == StellarSignerType.ACCOUNT:
description = f"{TR.words__account}:"
description = TR.words__account
data = helpers.address_from_public_key(signer_key)
elif signer_type == StellarSignerType.PRE_AUTH:
description = TR.stellar__preauth_transaction
Expand Down
2 changes: 1 addition & 1 deletion core/src/apps/tezos/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async def require_confirm_origination(address: str) -> None:
await confirm_address(
TR.tezos__confirm_origination,
address,
description=f"{TR.words__address}:",
description=TR.words__address,
br_name="confirm_origination",
br_code=BR_SIGN_TX,
)
Expand Down
9 changes: 8 additions & 1 deletion core/src/trezor/ui/layouts/bolt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,13 @@ def confirm_blob(
chunkify: bool = False,
prompt_screen: bool = True,
) -> Awaitable[None]:
if description and ":" not in description:
description += ":"

verb = verb or TR.buttons__confirm # def_arg
layout = trezorui_api.confirm_value(
title=title,
subtitle=subtitle,
description=description,
data=data,
hold=hold,
Expand Down Expand Up @@ -674,6 +678,9 @@ def confirm_value(
) -> Awaitable[None]:
"""General confirmation dialog, used by many other confirm_* functions."""

if description and value:
description += ":"

if not verb and not hold:
raise ValueError("Either verb or hold=True must be set")

Expand Down Expand Up @@ -1080,7 +1087,7 @@ def confirm_sign_identity(
"sign_identity",
f"{TR.words__sign} {proto}",
identity,
challenge_visual + "\n" if challenge_visual else "",
subtitle=challenge_visual,
br_code=BR_CODE_OTHER,
)

Expand Down
2 changes: 1 addition & 1 deletion core/src/trezor/ui/layouts/quicksilver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ def confirm_sign_identity(
"sign_identity",
f"{TR.words__sign} {proto}",
identity,
challenge_visual + "\n" if challenge_visual else "",
challenge_visual,
br_code=BR_CODE_OTHER,
)

Expand Down
9 changes: 9 additions & 0 deletions core/src/trezor/ui/layouts/samson/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,9 @@ def confirm_blob(
chunkify: bool = False,
prompt_screen: bool = True,
) -> Awaitable[None]:
if description and ":" not in description:
description += ":"

verb = verb or TR.buttons__confirm # def_arg
layout = trezorui_api.confirm_value(
title=title,
Expand Down Expand Up @@ -670,6 +673,9 @@ def confirm_text(
description: str | None = None,
br_code: ButtonRequestType = BR_CODE_OTHER,
) -> Awaitable[None]:
if description and data:
description += ":"

return _placeholder_confirm(
br_name,
title,
Expand Down Expand Up @@ -741,6 +747,9 @@ async def confirm_value(
) -> None:
"""General confirmation dialog, used by many other confirm_* functions."""

if description and value:
description += ":"

if not verb and not hold:
raise ValueError("Either verb or hold=True must be set")

Expand Down
38 changes: 19 additions & 19 deletions core/translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,18 @@
"binance__sell": "Prodat",
"binance__sender_address": "Adresa odesílatele:",
"binance__side": "Strana:",
"bitcoin__commitment_data": "Data závazku:",
"bitcoin__commitment_data": "Data závazku",
"bitcoin__confirm_locktime": "Potvrdit Locktime",
"bitcoin__create_proof_of_ownership": "Chcete vytvořit prokázání vlastnictví?",
"bitcoin__high_mining_fee_template": "Poplatek za těžbu\n{0}\nje nečekaně vysoký.",
"bitcoin__locktime_no_effect": "Locktime je nastaven, ale nebude mít efekt.",
"bitcoin__locktime_set_to": "Locktime nastaven na:",
"bitcoin__locktime_set_to_blockheight": "Locktime je nastaven na výšku bloku:",
"bitcoin__locktime_set_to": "Locktime nastaven na",
"bitcoin__locktime_set_to_blockheight": "Locktime je nastaven na výšku bloku",
"bitcoin__lot_of_change_outputs": "Hodně výstupů zpět na peněženku.",
"bitcoin__multiple_accounts": "Více účtů",
"bitcoin__new_fee_rate": "Nová výše poplatku:",
"bitcoin__simple_send_of": "Jednoduché odeslání",
"bitcoin__ticket_amount": "Částka za lístek:",
"bitcoin__ticket_amount": "Částka za lístek",
"bitcoin__title_confirm_details": "Potvrdit údaje",
"bitcoin__title_finalize_transaction": "Dokončit transakci",
"bitcoin__title_high_mining_fee": "Vys. poplatek těžby",
Expand All @@ -123,7 +123,7 @@
"bitcoin__unusually_high_fee": "Nezvykle vysoký poplatek.",
"bitcoin__unverified_external_inputs": "Transakce obsahuje neověřené externí vstupy.",
"bitcoin__valid_signature": "Podpis je platný.",
"bitcoin__voting_rights": "Hlasovací práva:",
"bitcoin__voting_rights": "Hlasovací práva",
"brightness__change_title": "Změnit jas displeje",
"brightness__changed_title": "Jas displeje byl změněn",
"brightness__title": "Nastavení jasu",
Expand Down Expand Up @@ -224,7 +224,7 @@
"cardano__path": "cesta",
"cardano__pledge": "Závazek",
"cardano__pointer": "ukazatel",
"cardano__policy_id": "ID zásady:",
"cardano__policy_id": "ID zásady",
"cardano__pool_metadata_hash": "Hash metadat poolu:",
"cardano__pool_metadata_url": "Adresa URL metadat poolu:",
"cardano__pool_owner": "Vlastník poolu:",
Expand All @@ -249,7 +249,7 @@
"cardano__script_reward": "odměna za skript",
"cardano__sending": "Odesílání",
"cardano__show_simple": "Zjednodušeně",
"cardano__sign_tx_path_template": "Podepsat transakci pomocí {0}:",
"cardano__sign_tx_path_template": "Podepsat transakci pomocí {0}",
"cardano__stake_delegation": "Delegace staku",
"cardano__stake_deregistration": "Zrušení registrace stake klíče",
"cardano__stake_pool_registration": "Registrace stakepoolu",
Expand Down Expand Up @@ -512,7 +512,7 @@
"nem__decrease": "Snížit",
"nem__description": "Popis:",
"nem__divisibility_and_levy_cannot_be_shown": "Dělitelnost a daň nelze zobrazit pro neznámé mozaiky",
"nem__encrypted": "Zašifrováno:",
"nem__encrypted": "Zašifrováno",
"nem__final_confirm": "Konečné potvrzení",
"nem__immutable": "neměnné",
"nem__increase": "Zvýšit",
Expand All @@ -539,7 +539,7 @@
"nem__supply_units_template": "{0} zdroj o {1} celých jednotek?",
"nem__transferable": "Přenosné?",
"nem__under_namespace": "v rámci oboru názvů",
"nem__unencrypted": "Nezašifrováno:",
"nem__unencrypted": "Nezašifrováno",
"nem__unknown_mosaic": "Neznámá mozaika!",
"passphrase__access_wallet": "Otev. passphrase pen.?",
"passphrase__always_on_device": "Vždy zadávat passphrase na Trezoru?",
Expand Down Expand Up @@ -800,7 +800,7 @@
"send__title_sending_to": "Odesílání",
"send__to_the_total_amount": "Do celkové částky:",
"send__total_amount": "Celková částka",
"send__transaction_id": "ID transakce:",
"send__transaction_id": "ID transakce",
"send__transaction_signed": "Transakce podepsána",
"send__you_are_contributing": "Přispíváte:",
"setting__adjust": "Upravit",
Expand Down Expand Up @@ -852,15 +852,15 @@
"stellar__destination": "Cíl:",
"stellar__exchanges_require_memo": "Důležité: Mnoho směnáren vyžaduje při vkladu poznámku",
"stellar__final_confirm": "Konečné potvrzení",
"stellar__hash": "Hash:",
"stellar__hash": "Hash",
"stellar__high": "Vysoký:",
"stellar__home_domain": "Domácí doména",
"stellar__inflation": "Inflace",
"stellar__initial_balance": "Počáteční zůstatek",
"stellar__initialize_signing_with": "Zahájit podepisování s",
"stellar__issuer_template": "Vydavatel {0}:",
"stellar__issuer_template": "Vydavatel {0}",
"stellar__key": "Klíč:",
"stellar__limit": "Limit:",
"stellar__limit": "Limit",
"stellar__low": "Nízký:",
"stellar__master_weight": "Váha hlavního klíče:",
"stellar__medium": "Střední:",
Expand All @@ -871,9 +871,9 @@
"stellar__on_network_template": "Transakce je na {0}",
"stellar__path_pay": "Směnná cesta",
"stellar__path_pay_at_least": "Směnná cest alespoň",
"stellar__pay": "Platba:",
"stellar__pay_at_most": "Maximální platba:",
"stellar__preauth_transaction": "Transakce před ověřením:",
"stellar__pay": "Platba",
"stellar__pay_at_most": "Maximální platba",
"stellar__preauth_transaction": "Transakce před ověřením",
"stellar__price_per_template": "Cena za {0}:",
"stellar__private_network": "soukromá síť",
"stellar__remove_signer": "Odstranit podepisující osobu",
Expand All @@ -884,7 +884,7 @@
"stellar__set_sequence_to_template": "Nastavit sekvenci na {0}?",
"stellar__sign_tx_count_template": "Podepsat tuto transakci tvořenou {0}",
"stellar__sign_tx_fee_template": "a zaplatit {0}\njako poplatek?",
"stellar__source_account": "Zdrojový účet:",
"stellar__source_account": "Zdrojový účet",
"stellar__testnet_network": "síť Testnet",
"stellar__trusted_account": "Důvěryhodný účet",
"stellar__update": "Aktualizovat",
Expand All @@ -897,12 +897,12 @@
"storage_msg__starting": "Spouštění",
"storage_msg__verifying_pin": "Ověřování PINu",
"storage_msg__wrong_pin": "Špatný PIN",
"tezos__baker_address": "Adresa bakera:",
"tezos__baker_address": "Adresa bakera",
"tezos__balance": "Zůstatek:",
"tezos__ballot": "Hlasování:",
"tezos__confirm_delegation": "Potvrdit delegaci",
"tezos__confirm_origination": "Potvrdit původ",
"tezos__delegator": "Delegující osoba:",
"tezos__delegator": "Delegující osoba",
"tezos__proposal": "Návrh",
"tezos__register_delegate": "Zaregistrovat delegáta",
"tezos__remove_delegation": "Odstranit delegaci",
Expand Down
Loading

0 comments on commit cfb4a79

Please sign in to comment.