mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-30 01:01:00 +00:00
fixup! feat(core): support per-layout text strings
Support `universal_fw` in combination with this feature.
This commit is contained in:
parent
193cdb76eb
commit
273ecef265
@ -528,7 +528,7 @@ pub enum TranslatedString {
|
|||||||
#[cfg(feature = "universal_fw")]
|
#[cfg(feature = "universal_fw")]
|
||||||
fido__title_u2f_auth = 314, // "U2F authenticate"
|
fido__title_u2f_auth = 314, // "U2F authenticate"
|
||||||
#[cfg(feature = "universal_fw")]
|
#[cfg(feature = "universal_fw")]
|
||||||
fido__title_u2f_register = 315, // "U2F register"
|
fido__title_u2f_register = 315, // {"Bolt": "U2F register", "Samson": "U2F register", "Quicksilver": "U2F register"}
|
||||||
#[cfg(feature = "universal_fw")]
|
#[cfg(feature = "universal_fw")]
|
||||||
fido__title_verify_user = 316, // "FIDO2 verify user"
|
fido__title_verify_user = 316, // "FIDO2 verify user"
|
||||||
#[cfg(feature = "universal_fw")]
|
#[cfg(feature = "universal_fw")]
|
||||||
@ -1906,6 +1906,13 @@ impl TranslatedString {
|
|||||||
#[cfg(feature = "universal_fw")]
|
#[cfg(feature = "universal_fw")]
|
||||||
Self::fido__title_u2f_auth => "U2F authenticate",
|
Self::fido__title_u2f_auth => "U2F authenticate",
|
||||||
#[cfg(feature = "universal_fw")]
|
#[cfg(feature = "universal_fw")]
|
||||||
|
#[cfg(feature = "layout_bolt")]
|
||||||
|
Self::fido__title_u2f_register => "U2F register",
|
||||||
|
#[cfg(feature = "universal_fw")]
|
||||||
|
#[cfg(feature = "layout_samson")]
|
||||||
|
Self::fido__title_u2f_register => "U2F register",
|
||||||
|
#[cfg(feature = "universal_fw")]
|
||||||
|
#[cfg(feature = "layout_quicksilver")]
|
||||||
Self::fido__title_u2f_register => "U2F register",
|
Self::fido__title_u2f_register => "U2F register",
|
||||||
#[cfg(feature = "universal_fw")]
|
#[cfg(feature = "universal_fw")]
|
||||||
Self::fido__title_verify_user => "FIDO2 verify user",
|
Self::fido__title_verify_user => "FIDO2 verify user",
|
||||||
|
@ -61,18 +61,22 @@ impl TranslatedString {
|
|||||||
<%
|
<%
|
||||||
value = en_data.get(name, '""')
|
value = en_data.get(name, '""')
|
||||||
layouts_dict = value if isinstance(value, dict) else None
|
layouts_dict = value if isinstance(value, dict) else None
|
||||||
|
universal_fw = any(name.startswith(prefix + "__") for prefix in ALTCOIN_PREFIXES)
|
||||||
%>\
|
%>\
|
||||||
%if any(name.startswith(prefix + "__") for prefix in ALTCOIN_PREFIXES):
|
%if layouts_dict is not None:
|
||||||
|
% for layout_name, layout_value in layouts_dict.items():
|
||||||
|
%if universal_fw:
|
||||||
#[cfg(feature = "universal_fw")]
|
#[cfg(feature = "universal_fw")]
|
||||||
%endif
|
%endif
|
||||||
%if layouts_dict is not None:
|
|
||||||
% for layout_name, layout_value in layouts_dict.items():
|
|
||||||
#[cfg(feature = "${f"layout_{layout_name.lower()}"}")]
|
#[cfg(feature = "${f"layout_{layout_name.lower()}"}")]
|
||||||
Self::${name} => ${encode_str(layout_value)},
|
Self::${name} => ${encode_str(layout_value)},
|
||||||
% endfor
|
% endfor
|
||||||
%else:
|
%else:
|
||||||
|
%if universal_fw:
|
||||||
|
#[cfg(feature = "universal_fw")]
|
||||||
|
%endif
|
||||||
Self::${name} => ${encode_str(value)},
|
Self::${name} => ${encode_str(value)},
|
||||||
%endif
|
%endif
|
||||||
% endfor
|
% endfor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -357,7 +357,7 @@
|
|||||||
"fido__title_reset": "FIDO2 reset",
|
"fido__title_reset": "FIDO2 reset",
|
||||||
"fido__title_select_credential": "Select credential",
|
"fido__title_select_credential": "Select credential",
|
||||||
"fido__title_u2f_auth": "U2F authenticate",
|
"fido__title_u2f_auth": "U2F authenticate",
|
||||||
"fido__title_u2f_register": "U2F register",
|
"fido__title_u2f_register": {"Bolt": "U2F register", "Samson": "U2F register", "Quicksilver": "U2F register"},
|
||||||
"fido__title_verify_user": "FIDO2 verify user",
|
"fido__title_verify_user": "FIDO2 verify user",
|
||||||
"fido__unable_to_verify_user": "Unable to verify user.",
|
"fido__unable_to_verify_user": "Unable to verify user.",
|
||||||
"fido__wanna_erase_credentials": "Do you really want to erase all credentials?",
|
"fido__wanna_erase_credentials": "Do you really want to erase all credentials?",
|
||||||
|
Loading…
Reference in New Issue
Block a user