1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/app
Mark Stacey 4855d1b423
Allow localized messages to not use substitutions (#8895)
The `getMessage` function in `i18n-helper` was assuming that any
substitutions passed into the transaction function were used by the
corresponding localized message. However, some messages are
intentionally ignoring substitutions passed in. This was done to
simplify the UI logic, so the same substitutions could be passed in for
many different messages, even if some don't use them.

For example, `transactionCancelSuccess` is passed two substitutions but
only uses the second one. `transactionErrored` is passed in two, but
uses neither.

`getMessage` has been updated to no longer make that assumption. It
will now only throw an error if the localized message expects a
substitution that was not given. A given substitution that is unused
results in no error.
2020-07-02 19:18:22 -03:00
..
components Prevent showing connected accounts without origin (#8891) 2020-07-02 18:26:30 -03:00
contexts Implement asset page (#8696) 2020-06-01 14:54:32 -03:00
css Align copy tooltip text and icon (#8861) 2020-06-24 15:34:18 -07:00
ducks Add envar for ETH Gas Station API key (#8870) 2020-06-29 14:56:21 -02:30
helpers Allow localized messages to not use substitutions (#8895) 2020-07-02 19:18:22 -03:00
hooks fix language code format mismatch (#8889) 2020-07-02 15:13:23 -05:00
pages Show origin in connect flow rather than site name (#8885) 2020-07-02 14:08:43 -03:00
selectors Fix account order on unconnected account alert (#8863) 2020-06-25 21:05:42 -03:00
store Prevent showing connected accounts without origin (#8891) 2020-07-02 18:26:30 -03:00