Comments (4)
Sorry, solved with this comment formatjs/formatjs#162 (comment)
from babel-plugin-react-intl.
@bardt does this distinction between <FormattedPlural>
and <FormattedMessage>
make sense to you? The addition of <FormattedPlural>
was to expand React Intl to be useful for single-language apps too.
An interesting aspect of you brining this up is that if someone is using this Babel plugin, then they shouldn't be using <FormattedPlural>
because it means they likely have hard-coded strings in they're app that won't be extracted for translation. So the plugin could be updated to warn when it encounters a <FormattedPlural>
declaration… what do you think?
from babel-plugin-react-intl.
@ericf right now I see an inconvenience, probably caused by changes in react-intl v2, between official docs, v2 tread instructions and this plugin. It took some hours of experimenting to finally get it working like I supposed it to. I'd definitely vote for better developer experience we are used to in React itself (meaningful warnings, suggestion of using react devtools extension etc.).
Right now I'm close to a big deadline on a project I'm trying to use react-intl on, so have no spare time. After that, I could help with some changes to this plugin, according to my own dev experience.
from babel-plugin-react-intl.
@bardt no worries, I'm happy to add in this warning. Feel free to ping me if you run into any other issues as you work towards your deadline!
from babel-plugin-react-intl.
Related Issues (20)
- react-native HOT 1
- Not working with babel-loader 8.x HOT 4
- Generate Message ID HOT 1
- The "path" argument must be of type string (v2.4.0) HOT 3
- Allow other component names than the build-in ones HOT 4
- plugin does not seem to do anything HOT 1
- Only defineMessages works. FormattedMessage is ignored. HOT 9
- file.log.warn causes TypeError: Cannot read property 'warn' of undefined HOT 3
- Am I supposed to use this plugin to obtain translation files? HOT 3
- Babel 7 support HOT 3
- Error: Cannot find module 'upath' HOT 3
- Cannot find module babel-plugin-react-intl when extracting messages HOT 1
- id containing multiple period would not work.
- [Babel 7] TypeError: Path must be a string. Received undefined HOT 7
- Any option to remove `defaultMessage` field in production? HOT 1
- cache is not working properly HOT 3
- Extracting message by formatMessage directly but defineMessages HOT 1
- Support spread syntax (or expression) for defineMessages
- Plugin does nothing, how to debug? (using with Gatsby) HOT 2
- [React Intl] `undefined()` must be called with an object expression with values that are React Intl Message Descriptors, also defined as object expressions. HOT 2
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 babel-plugin-react-intl.