Page MenuHomePhabricator

[Cashtab] Prevent translation of address prefix
ClosedPublic

Authored by bytesofman on Oct 5 2021, 21:39.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCba8d74368072: [Cashtab] Prevent translation of address prefix
Summary

T1894

Similar to D9785. Because Cashtab does not have localization, some users are using browser translation features to translate the entire app. This is particularly bad for the mnemonic field (already protected with this approach). However it also impacts the address itself.

This diff prevents the address prefix ecash: or etoken: from being translated by the browser.

This problem will not be properly solved until Cashtab has full localization, which will discourage users from using default browser translation features.

Test Plan

npm start

Navigate to localhost:3000 in Google Chrome
Right click page and select Translate to... ... select Indonesian as this is where we get most of these bug reports
Verify that the address displayed still retains ecash: prefix and etoken: prefix when tokens are selected

Diff Detail

Repository
rABC Bitcoin ABC
Branch
prevent-addr-prefix-translation
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16892
Build 33622: Build Diffcashtab-tests
Build 33621: arc lint + arc unit