-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
setCatalog - allow your app to write updated translations back to file #221
Conversation
simple and nice - but needs test coverage |
Is that something I need to do? How would it be achieved? |
it would help a lot if you provide a test to get that merged quick. If not, I will add tests to describe that use case directly after merge, but with patience ;) |
Whats the quickest way to get this merged in? I've added this module as a dependency for our js CMS - Iris. https://github.com/CityWebConsultants/Iris I just don't know what you're expecting in the way of tests. This change is so simple and minor that I can't see anyway of it causing problems. It should be a non-breaking addition. |
I won't discuss the need for tests here :) each feature should be describe by a test (https://github.com/mashpie/i18n-node/tree/master/test) to ensure it's proper functionality even after future changes. Anyway, I will add tests for you as far as I can imagine your implementation goals. Next Release will be after vacation in about 2 or 3 weeks. |
one things keeps me wondering: i18n configured with Your implementation of setCatalog does nothing than writing to filesystem, even without updating in memory locales. In addition it doesn't check for existence of parameters, so you might loose all of your translations when invoked with |
I assume this describes you use case, right?
but how about some edge cases?
|
one last thing: the signature of that method should fit it's "getter" https://github.com/mashpie/i18n-node#i18ngetcatalog |
I'm trying to add new translations on the fly via node-i18n for the languages my app needs,
However, I see you have removed the setCatalog method @mashpie - what's the reason for this, if you don't mind me asking? Is there another way to do this, hence the removal? |
This simple addition allows your app to write an updated catalog back to file. Meaning all translation management can be handled directly in your map and doesn't require someone to manually edit each translation file