X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=translations%2FREADME.md;h=5ec4ffae6a8968e37e21604dbf68be65f2331be7;hb=dae55da51b99e8a6defa7af84652db2b3c1632d6;hp=c4df27eaafb8ba27068208a15403a581df42f8a5;hpb=5997dc772e9a15638398f9fe18521c6b64cdac5e;p=motion.git diff --git a/translations/README.md b/translations/README.md index c4df27e..5ec4ffa 100644 --- a/translations/README.md +++ b/translations/README.md @@ -1,5 +1,29 @@ # Translation files for WPIA motion tool +Add the needed translation files here. + The software is translated via Transifex: https://www.transifex.com/wpia/motion/. The current files are also available in the motion-translations repository on our gitlab system https://git.ccs-baumann.de/wpia/motion-translations. + +To extract the translation files use: + +``` +pybabel extract -F ./translations/babel.cfg -k _l -o ./translations/messages.pot --input-dirs=. +``` + +To create a language file use e.g. de + +``` +pybabel init -i ./translations/messages.pot -d translations -l de +``` + +The translation files are maintained in a repo and translated on Transifex [https://www.transifex.com/wpia/landingpage-1/dashboard/](https://www.transifex.com/wpia/landingpage-1/dashboard/). + +The translation file are stored in this files structure translations/XX/LC_MESSAGES/messages.po with XX as language code. + +To compile the translated text from *.po to *.mo use: + +``` +pybabel compile -f -d translations +```