Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

Does the plugin overrides already changed json files? #39

Closed
pke opened this issue Mar 16, 2016 · 5 comments
Closed

Does the plugin overrides already changed json files? #39

pke opened this issue Mar 16, 2016 · 5 comments
Labels

Comments

@pke
Copy link

pke commented Mar 16, 2016

How does the plugin behave if there is already an translation file? Will it merge the existing json entries with new ones and not override already translated texts?

@ericf
Copy link
Collaborator

ericf commented Mar 16, 2016

It would overwrite them, the idea is that you wouldn't checkin JSON files to source control, but instead treat them like built files and clear them out before running Babel on your source code.

@ericf ericf closed this as completed Mar 16, 2016
@ericf ericf added the question label Mar 16, 2016
@pke
Copy link
Author

pke commented Mar 16, 2016

Uhm, where would u then make the actual translations? Confused 😖

@ericf
Copy link
Collaborator

ericf commented Mar 16, 2016

You'd likely want to aggregate and process the JSON files into say an en.json, that you checkin. Then have your translation system work on those default strings, and then commit their results back to your project. If you don't aggregate them, old strings will still be included.

But to answer your direct question: the plugin uses overrides a file if it exists.

@GertjanReynaert
Copy link

@pke
Copy link
Author

pke commented Mar 16, 2016

@GertjanReynaert yes it does. Will check it out, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants