jruchaud / babel-gettext-plugin Goto Github PK
View Code? Open in Web Editor NEWExtract gettext string with babel.
License: MIT License
Extract gettext string with babel.
License: MIT License
Can't get the plugin to work, am I doing something wrong?
$ babel --plugins babel-gettext-plugin src/store.js
TypeError: The plugin "babel-gettext-plugin" didn't export a Plugin instance
at PluginManager.validate (/Users/jacobrask/.nvm/versions/io.js/v2.1.0/lib/node_modules/babel/node_modules/babel-core/lib/transformation/file/plugin-manager.js:164:13)
I get the same issue with Node v4.0.0.
Thanks.
The plugin when running as a plugin in babelrc does not seem to be picking up all instances of _t. It in fact seems completely random on how many it will pick up. Sometimes 20, sometimes 50, 70, etc.
Are there any breaking changes from the 2.x series ?
Is it possible to add a CHANGELOG.md file documenting the changes for an easier upgrade path ?
Thank you, this is so useful for my projects!
I'm using the plugin with a function called t().
If I split a token across multiple string concat calls, the plugin does not seem to pick up the translation: t('a' + 'b') doesn't work but t('ab') does.
I looked at the code but I couldn't figure it out, sorry.
Thanks,
Eddie
Hi,
I was just wondering how to set up msgid_plural in conjunction with msgid. Thanks
Hey, I have a function called t() that I was planning on just passing a string to like "hello world". I've got to the point where t("hello world") extracts into a msgid of "hello world" with an empty msgstr, but is it possible to have the output file have the same msgstr as msgid?
Axe support for Babel 6
Hello, thanks for the plugin
Is there an option to add the file path and corresponding line to the .po file ?
Like so :
#: front/templates/index.hbs:6 <-- this line
msgid "i am a title"
msgstr "je suis un titre"
Thank you
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.