Fix use of setSpendingCap
locale string to properly use our i18n interpolation system
#16234
Labels
area-transactions
area-translation
Issues relating to translating the app into various languages.
team-confirmations-secure-ux
DEPRECATED: please use "team-confirmations" label instead
type-bug
Milestone
Currently, in
token-allowance.js
we have this code:setSpendingCap
is defined in the locale file as follows:This is a problem because this won't be able to be translated to a language that would place the contract token values somewhere other than the end of the string.
That is why we have a system of replacable symbols in the translation files. Take, for example,
spendLimitRequestBy
:Which gets used as follows (in edit-approval-permission.component.js):
The second parameter passed to the translation function can be a whole react component.
We should refactor the definition of
setSpendingCap
and its use in token-allowance.js to follow this pattern.Also, another case of this is introduced here: https://github.com/MetaMask/metamask-extension/pull/16157/files#diff-7509d7529ea1cbc57ef79713676f7d124d9d5a446053f94836876c4cd3f3ccd6R2941, that should be fixed as well
The text was updated successfully, but these errors were encountered: