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

Am I supposed to use this plugin to obtain translation files? #143

Closed
arnaudriegert opened this issue Aug 22, 2018 · 3 comments
Closed

Am I supposed to use this plugin to obtain translation files? #143

arnaudriegert opened this issue Aug 22, 2018 · 3 comments

Comments

@arnaudriegert
Copy link

Hi

I posted a comment on a create-react-app issue but I realize I should maybe ask the question here instead.

I used this plugin to extract all translatable strings from my app and it works fine. I have a json file for each js file that contains a translatable string, which all go in my build/messages directory.

However, those are not translation files: I still need to compile all the message IDs from all those files and then create a dictionary for each language, with the message IDs as keys and the translations as values, preferably each in a JSON file. I also need to update those files when I add new messages.

I found this software that does it (and seems to do it quite nicely from what I've tested) but it feels like there should be a command to automate this step.

After some research, the two closest things I found to what I am trying to do are:

I imagined there would be a simple command to achieve this. Am I missing something? How do people manage this usually? Do they need to compile the translations files by hand?

Thanks in advance!

@arnaudriegert
Copy link
Author

In the meantime, I wrote this script that does the equivalent of msgmerge in gettext: we update the JSON for each language to add the missing keys (with "" as the initial value, to be completed by the translator) and remove the obsolete ones. The default langugage's JSON is updated with the default values from the descriptors.

Hope this helps.

@plondon
Copy link

plondon commented Dec 5, 2018

I think most people use https://github.com/GertjanReynaert/react-intl-translations-manager to create the translation files

@longlho
Copy link
Member

longlho commented May 26, 2019

close due to stale

@longlho longlho closed this as completed May 26, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants