From 8fe630294260ada5cd91fad751aa66328fa0e0ee Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Thu, 23 Jul 2020 06:07:54 -0500 Subject: [PATCH] Added instructions to deal with translation catalogs --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 9520fd9..cc72cb9 100644 --- a/README.md +++ b/README.md @@ -23,3 +23,21 @@ I have provided a setup.py file for cx_freeze, so you should be able to do somet > python setup.py build And start building. Check the dist folder for results. + +## Updating translation catalog + +Every time there are new strings in the application a translations catalog update must be performed with the following commands in the src directory: + +> python setup.py extract_messages -o musicdl.pot --msgid-bugs-address "manuel@manuelcortez.net" --copyright-holder "Manuel Cortez" --input-dirs . +> python setup.py update_catalog --input-file musicdl.pot --domain musicdl --output-dir locales --ignore-obsolete true + +And after updating translations they should be compiled with: + +> python setup.py compile_catalog --statistics -d locales --domain musicdl + +## Adding new translations + +The procedure for adding new translations is also easy, thanks to the following command. Just replace xx for the new locale name to add: + +> python setup.py extract_messages -o musicdl.pot --msgid-bugs-address "manuel@manuelcortez.net" --copyright-holder "Copyright (C) 2019, 2020 Manuel Cortez" --input-dirs . +> python setup.py init_catalog --domain musicdl --input-file musicdl.pot -d locales --locale xx \ No newline at end of file