Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revoke transaction history entires label is hard-coded in English (untranslatable) #3765

Closed
firebomb1 opened this issue Feb 7, 2023 · 0 comments · Fixed by #3768
Closed

Comments

@firebomb1
Copy link
Contributor

Overview

In the Transaction History page (and components showing history of transactions), the transactions identified as "Revoke" have a hard-coded part in English. We want to make it translatable and also allow the translations to not be tied to the English syntax (for the order of words).

Example in French:
image

References and additional details

The Transaction History entries are composed here:

const titlePrefix = translate(
txMetadata.parser
? `transactionRow.parser.${txMetadata.parser}.${txMetadata.method}`
: 'transactionRow.unknown',
)
const title = useMemo(() => {
const symbol = asset?.symbol
switch (txMetadata.method) {
case 'approve':
return `${titlePrefix} ${symbol}`
case 'revoke':
return `${titlePrefix} ${symbol} approval`
default:
return titlePrefix
}
}, [asset?.symbol, titlePrefix, txMetadata.method])

Apparently handle multiple parsers, and also will default to the generic case if the transaction could not definitely be identified. The hard-coded part is on line 56.

I suggest that for the two specific branches that mention the method and symbol (including the one that has the hard-coded "approval") we start using strings with token variables if possible. This way translators could also use a syntax that is correct in their language.

Acceptance Criteria

At very least make the label for Revoke transaction is translatable. If possible allow a different language syntaxes through string variables for the symbol/method for both Approve and Revoke labels.

Translations in the currently supported languages will be handled by the Globalization Workstream.

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant