POT/PO -> JSON i18n process #889
MattiJarvinen
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Since Transloco insists on creating POT (portable object template) per language (this is actually very redundant one template is enough) or these should be named as PO. I have changed to producing only one named C.pot
We use POEdit to create the translation files ( .po ) for this allows i18n memory etc. goodies. Translators get the POT & PO files. They can use the POEdit to update their own language's .po file from the C.pot as described in https://maniacx.github.io/Airpod-Battery-Monitor/poedit-guide getting the new keys.
We then convert the PO-files gathered from the translator to the JSON format in build step and prestart / manually if needed. The script places the JSON file in the similar folder structure into the target folder as is found in the souce PO folders.
I decided to use
gettext-parserfor the job since it's readily available and it's somewhat easy to understand.Beta Was this translation helpful? Give feedback.
All reactions