mirror of
https://github.com/trezor/trezor-firmware.git
synced 2026-02-20 00:33:30 +01:00
chore(l10n): add new rules
[no changelog]
This commit is contained in:
committed by
Vít Obrusník
parent
5b97dd3bbf
commit
7089a9e119
@@ -30,7 +30,7 @@ def save_json(path: Path, data: Dict[str, Any]) -> None:
|
||||
def infer_layout(file_path: Path) -> str:
|
||||
# Expect pattern <lang>_<Layout>.json
|
||||
stem = file_path.stem # en_Bolt
|
||||
parts = stem.split("_", 1)
|
||||
parts = stem.rsplit("_", 1)
|
||||
if len(parts) != 2:
|
||||
raise ValueError(f"Cannot infer layout from filename: {file_path.name}")
|
||||
return parts[1]
|
||||
@@ -227,7 +227,7 @@ def run_cleanup(
|
||||
"config_path",
|
||||
type=click.Path(exists=True, dir_okay=False, path_type=Path),
|
||||
required=True,
|
||||
help="Path to layout_rules.json",
|
||||
help="Path to rules JSON file",
|
||||
)
|
||||
@click.option(
|
||||
"--locales-dir",
|
||||
|
||||
@@ -1,80 +1,64 @@
|
||||
[
|
||||
{
|
||||
"prefix": "ble__",
|
||||
"allowedLayouts": ["Eckhart"],
|
||||
"allowedLayouts": [ "Eckhart" ],
|
||||
"description": "BLE related strings only in Eckhart"
|
||||
},
|
||||
{
|
||||
"prefix": "thp__",
|
||||
"allowedLayouts": ["Eckhart"],
|
||||
"allowedLayouts": [ "Eckhart" ],
|
||||
"description": "THP related strings only in Eckhart"
|
||||
},
|
||||
{
|
||||
"prefix": "sd_card__",
|
||||
"allowedLayouts": ["Bolt", "Delizia"],
|
||||
"allowedLayouts": [ "Bolt", "Delizia" ],
|
||||
"description": "Only Bolt and Delizia have SD card support"
|
||||
},
|
||||
{
|
||||
"exact": ["auto_lock__on_battery", "auto_lock__on_usb"],
|
||||
"allowedLayouts": ["Eckhart"],
|
||||
"exact": [ "auto_lock__on_battery", "auto_lock__on_usb" ],
|
||||
"allowedLayouts": [ "Eckhart" ],
|
||||
"description": "Auto-lock distinction only in battery-powered devices."
|
||||
},
|
||||
{
|
||||
"exact": ["sn__title", "sn__action"],
|
||||
"allowedLayouts": ["Eckhart"],
|
||||
"exact": [ "sn__title", "sn__action" ],
|
||||
"allowedLayouts": [ "Eckhart" ],
|
||||
"description": "Extracting serial number only in Eckhart"
|
||||
},
|
||||
{
|
||||
"prefix": "led__",
|
||||
"allowedLayouts": ["Eckhart"],
|
||||
"allowedLayouts": [ "Eckhart" ],
|
||||
"description": "Only Eckhart has LED"
|
||||
},
|
||||
{
|
||||
"prefix": "haptic_feedback__",
|
||||
"allowedLayouts": ["Delizia", "Eckhart"],
|
||||
"allowedLayouts": [ "Delizia", "Eckhart" ],
|
||||
"description": "Only Delizia and Eckhart have haptic feedback"
|
||||
},
|
||||
{
|
||||
"prefix": "eos__",
|
||||
"allowedLayouts": ["Bolt"],
|
||||
"allowedLayouts": [ "Bolt" ],
|
||||
"description": "Only Bolt has EOS support"
|
||||
},
|
||||
{
|
||||
"prefix": "nem__",
|
||||
"allowedLayouts": ["Bolt"],
|
||||
"allowedLayouts": [ "Bolt" ],
|
||||
"description": "Only Bolt has NEM support"
|
||||
},
|
||||
{
|
||||
"prefix": "inputs__",
|
||||
"allowedLayouts": ["Caesar"],
|
||||
"description": "Theese are used only in Caesar input keyboard methods"
|
||||
"allowedLayouts": [ "Caesar" ],
|
||||
"description": "These are used only in Caesar input keyboard methods"
|
||||
},
|
||||
{
|
||||
"exact": "tutorial__swipe_up_and_down",
|
||||
"allowedLayouts": ["Delizia"],
|
||||
"allowedLayouts": [ "Delizia" ],
|
||||
"description": "Only Delizia has swipe up and down navigation"
|
||||
},
|
||||
{
|
||||
"exact": ["tutorial__tropic_info", "tutorial__what_is_tropic"],
|
||||
"allowedLayouts": ["Eckhart"],
|
||||
"exact": [ "tutorial__tropic_info", "tutorial__what_is_tropic" ],
|
||||
"allowedLayouts": [ "Eckhart" ],
|
||||
"description": "Only Eckhart has tropic"
|
||||
},
|
||||
{
|
||||
"exact": "tutorial__welcome_safe5",
|
||||
"allowedLayouts": ["Delizia"]
|
||||
},
|
||||
{
|
||||
"exact": "backup__title_backup_wallet",
|
||||
"allowedLayouts": ["Caesar"]
|
||||
},
|
||||
{
|
||||
"exact": [
|
||||
"tutorial__welcome_safe7",
|
||||
"tutorial__navigation_ts7",
|
||||
"tutorial__power"
|
||||
],
|
||||
"allowedLayouts": ["Eckhart"]
|
||||
},
|
||||
{
|
||||
"exact": [
|
||||
"reset__all_x_of_y_template",
|
||||
@@ -85,12 +69,119 @@
|
||||
"reset__needed_to_recover_your_wallet",
|
||||
"reset__num_of_shares_basic_info_template",
|
||||
"reset__one_share",
|
||||
"reset__only_one_share_will_be_created",
|
||||
"reset__set_it_to_count_template",
|
||||
"reset__the_threshold_sets_the_number_of_shares",
|
||||
"reset__to_form_group_template",
|
||||
"reset__use_your_backup",
|
||||
"reset__you_need_one_share"
|
||||
],
|
||||
"allowedLayouts": ["Bolt"],
|
||||
"allowedLayouts": [ "Bolt" ],
|
||||
"description": "These are specific to Bolt layout"
|
||||
},
|
||||
{
|
||||
"exact": [
|
||||
"backup__title_backup_wallet",
|
||||
"reset__number_of_shares_info",
|
||||
"reset__threshold_info",
|
||||
"reset__title_group_threshold",
|
||||
"reset__title_number_of_shares",
|
||||
"share_words__words_in_order",
|
||||
"share_words__wrote_down_all",
|
||||
"words__keep_it_safe",
|
||||
"words__title_group",
|
||||
"words__title_remember",
|
||||
"words__title_share",
|
||||
"words__title_shares",
|
||||
"words__title_threshold"
|
||||
],
|
||||
"allowedLayouts": [ "Caesar" ],
|
||||
"description": "These are specific to Caesar layout"
|
||||
},
|
||||
{
|
||||
"exact": [
|
||||
"instructions__shares_continue_with_x_template",
|
||||
"pin__cancel_description",
|
||||
"tutorial__welcome_safe5"
|
||||
],
|
||||
"allowedLayouts": [ "Delizia" ],
|
||||
"description": "These are specific to Delizia layout"
|
||||
},
|
||||
{
|
||||
"exact": [
|
||||
"instructions__shares_start_with_x_template",
|
||||
"pin__setup_completed",
|
||||
"recovery__share_from_group_entered_template",
|
||||
"reset__select_word_from_share_template",
|
||||
"reset__select_word_template",
|
||||
"tutorial__navigation_ts7",
|
||||
"tutorial__power",
|
||||
"tutorial__welcome_safe7"
|
||||
],
|
||||
"allowedLayouts": [ "Eckhart" ],
|
||||
"description": "These are specific to Eckhart layout"
|
||||
},
|
||||
{
|
||||
"exact": [
|
||||
"reset__continue_with_share_template",
|
||||
"reset__share_checked_successfully_template",
|
||||
"reset__slip39_checklist_write_down"
|
||||
],
|
||||
"allowedLayouts": [ "Bolt", "Caesar" ],
|
||||
"description": "These are specific to Bolt and Caesar layouts"
|
||||
},
|
||||
{
|
||||
"exact": [
|
||||
"reset__check_share_title_template",
|
||||
"reset__title_set_threshold"
|
||||
],
|
||||
"allowedLayouts": [ "Bolt", "Delizia" ],
|
||||
"description": "These are specific to Bolt and Delizia layouts"
|
||||
},
|
||||
{
|
||||
"exact": [
|
||||
"pin__enabled",
|
||||
"recovery__group_num_template",
|
||||
"recovery__you_have_entered",
|
||||
"words__from"
|
||||
],
|
||||
"allowedLayouts": [ "Bolt", "Caesar", "Delizia" ],
|
||||
"description": "These are specific to Bolt, Caesar, and Delizia layouts"
|
||||
},
|
||||
{
|
||||
"exact": [
|
||||
"modify_fee__new_transaction_fee",
|
||||
"recovery__x_more_items_starting_template_plural",
|
||||
"reset__slip39_checklist_set_num_shares",
|
||||
"reset__advanced_group_threshold_info",
|
||||
"reset__slip39_checklist_set_num_groups",
|
||||
"reset__title_set_number_of_shares",
|
||||
"reset__check_group_share_title_template",
|
||||
"reset__group_description",
|
||||
"reset__group_info",
|
||||
"reset__num_of_shares_advanced_info_template",
|
||||
"reset__title_set_group_threshold",
|
||||
"reset__title_set_number_of_groups",
|
||||
"reset__total_number_of_shares_in_group_template"
|
||||
],
|
||||
"allowedLayouts": [ "Bolt", "Delizia", "Eckhart" ],
|
||||
"description": "These are specific to Bolt, Delizia, and Eckhart layouts"
|
||||
},
|
||||
{
|
||||
"exact": [
|
||||
"backup__title_backup_completed",
|
||||
"instructions__shares_start_with_1",
|
||||
"pin__cancel_info",
|
||||
"pin__cancel_setup",
|
||||
"reset__num_of_shares_long_info_template",
|
||||
"reset__share_completed_template",
|
||||
"reset__slip39_checklist_more_info_threshold_example_template",
|
||||
"reset__slip39_checklist_more_info_threshold",
|
||||
"reset__slip39_checklist_num_shares_x_template",
|
||||
"reset__slip39_checklist_threshold_x_template",
|
||||
"reset__slip39_checklist_write_down_recovery"
|
||||
],
|
||||
"allowedLayouts": [ "Delizia", "Eckhart" ],
|
||||
"description": "These are specific to Delizia and Eckhart layouts"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user