cherry-projects / react-translate-maker Goto Github PK
View Code? Open in Web Editor NEWUniversal internationalization (i18n) open source library for React
License: Apache License 2.0
Universal internationalization (i18n) open source library for React
License: Apache License 2.0
Yea.. I like the irony in the title of this issue...
Line 4: TrnaslateProvider
In package.json, should translate-maker be a depencency instead of devDepenency? This way it is installed as part of a normal package install, and not required to be in the parent package during a production deployment.
After installing webpack complains Error: Cannot resolve module 'react-addons-test-utils'
.
Should react-addons-test-utils
be moved into dependancies?
Hi,
I was wondering how you would go about passing a translated string to a placeholder attribute on an input.
I could use translate-maker to get the translated string and pass it as a prop. Is it possible to do this without requiring translate-maker in my project?
Thanks
I'm trying to use the LocaleSwitch component.
It renders correctly and updates the new language at this.context.translate
, but the component renders with the first select option selected, no matter which option is chosen.
The strings do not update until navigating back to the page or a refresh is forced. I can make this happen by using an onChange
handler and calling this.forceUpdate()
Is this the recommended way to handle a locale change?
I believe updating componentWillReceiveProps to react on namespace should help
This was a great feature, and my application depended on it's feature.
Will this return?
So, I have narrowed my problem down to LocaleProvider
On initialization, If the namespace changes, then only the last successfully loaded namespace locale will be saved.
Same issue if the locale changes once, and namespace changes multiple times.
componentWillReceiveProps calls translate.setLocale when namespace changes, but locale hasn't.
This happens because there is a load of the "global" namespace and a component namespace immediately after.
Serializing the load of these items would solve this issue. (although slow down the rendering of the page)
Hey,
I'm looking for a way to insert React components into the translated string.
Use-case:
In your example https://github.com/CherryProjects/react-translate-maker#en_usjs I want to have user names clickable.
The dirty workaround would be inserting <a>
into the text and use TranslateHTML
. But it doesn't work if I want links to be handled by react-router
's <Link>
component.
I've tried passing the components to properties as it is in react-intl (Rich Text Formatting), but it just results in [object Object]
Am I missing something or this feature is not supported?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.