-
-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic writing of files for all locales #11
Comments
yes, both... I think it would be a nice and easy to add feature to add new strings to all files. So I leave this issue as a note to myself :) |
Is there a method for getting ALL the i18n translations within your files? I have some functions which rarely get called, and all over the place. i18n only updates the file when the code is called. How can I go through all the files (with the exception of |
currently not in api. but should be pretty easy to implement. any more specs? You need a dump of all phrases, right? |
Thank you, yes. I suppose an interface which dumps all the phrases would be very helpful. I imagine I would store in my project's var i18n = require("i18n");
i18n.extract('path/'); // Traverse path for all .js files.
i18n.extract('path/to/file.js'); // Process single file. This way I can run |
I like very much, that i18n writes the locale file automatically when a new translation string is used. What I am missing is a possibility to update the other locale files as well.
An example:
I have to locales, german (de) and english (en). I develop in german and use a new string. This string is added to the de.js file. The string is not added in the en.js file. Therefore I cannot create a translation of it. When I deploy the application now and an english user receives the translation he will get the german text as a translation was not done yet.
Are there any simple ways to deal with this?
Would it make sense to modify i18n, so that when a locale file is written, all locale files are updated?
The text was updated successfully, but these errors were encountered: