]> WPIA git - motion.git/blobdiff - translations/README.md
upd: add language switch to navigation
[motion.git] / translations / README.md
index c4df27eaafb8ba27068208a15403a581df42f8a5..5ec4ffae6a8968e37e21604dbf68be65f2331be7 100644 (file)
@@ -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
+```