Comments (6)
Why use the Trans component and are there any risks? I prefer I18n to return strings instead of components
from oasis-wallet-ext.
I think Trans component is safe, but strings are even better
In that case, these need to be updated:
oasis-wallet-ext/src/i18n/en.json
Line 124 in f912f13
oasis-wallet-ext/src/i18n/zh_CN.json
Line 124 in f912f13
from oasis-wallet-ext.
should dontclose
be change ? is this have question ? because there have style with text in a line ?
from oasis-wallet-ext.
yes
from oasis-wallet-ext.
ok, If I split with a special string and then set the style, is it safe? like "And [[ do not close ]] this window." ,I will split by [[ and ]] , then set bold style
from oasis-wallet-ext.
You might be able to do that safely, but it seems too complex. E.g. simple "dontclose": "And [[do not close]] this window.",
+ <p className="wallet-tip-description" key={tip} dangerouslySetInnerHTML={{ __html: getLanguage(tip).replace('[[', '<b>').replace(']]', '</b>') }} />
is not safe.
Splitting translations "dontclose1": "And", "dontclose2": "do not close", "dontclose3": "this window."
seems too annoying.
I would say either:
- use string and remove style
"dontclose": "And do not close this window.",
+<p className="wallet-tip-description" key={tip}>{ getLanguage(tip) }</p>
- use Trans
"dontclose": "And <strong>do not close</strong> this window.",
+<p className="wallet-tip-description" key={tip}><Trans i18nKey={tip}></Trans></p>
from oasis-wallet-ext.
Related Issues (20)
- 兼容钱包地址导致的转账错误 HOT 1
- Deposit issue HOT 2
- allow submitting a transaction even if local balance check fails HOT 1
- switch to entering gas price instead of total fee HOT 1
- inputs: add labels HOT 1
- Reword ParaTime warnings
- Lock out obviously unwise/unintended operations behind a configuration option HOT 1
- ParaTimes fail to load on MacOS HOT 3
- Address book for Consensus <-> ParaTime transactions HOT 1
- dapp can't request signing reclaim escrow through ext-utils
- Show debonding time when unstaking
- Fallback to RPC if get account fails
- Staking Delegations HOT 1
- Default gas fee for paratime withdrawal insufficient for Emerald HOT 1
- Enable Emerald to Consensus Transfers
- Histopia - Content Security Policy directive: "frame-ancestors 'self' white-list HOT 2
- Add Sapphire to testnet paratimes HOT 1
- Cipher Paratime to Consensus HOT 1
- Unable to withdraw to arbitrary consensus account HOT 2
- Building fails with "error:0308010C:digital envelope routines::unsupported" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oasis-wallet-ext.