From d38a5efb3ddcc7fd4a1f5977d0bdf6aee4d609e2 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sun, 13 Feb 2022 18:25:42 +0100 Subject: [PATCH] New Transifex command-line client compatibility --- .../transifex_check_for_new_languages.bat | 3 + .devtools/transifex_download.bat | 7 +- .tx/config | 76 +++++++++---------- 3 files changed, 46 insertions(+), 40 deletions(-) create mode 100644 .devtools/transifex_check_for_new_languages.bat diff --git a/.devtools/transifex_check_for_new_languages.bat b/.devtools/transifex_check_for_new_languages.bat new file mode 100644 index 00000000..4cee067d --- /dev/null +++ b/.devtools/transifex_check_for_new_languages.bat @@ -0,0 +1,3 @@ +pushd .. +tx pull --all --resources grocy.strings --minimum-perc=70 +popd diff --git a/.devtools/transifex_download.bat b/.devtools/transifex_download.bat index 729f748e..1edcee60 100644 --- a/.devtools/transifex_download.bat +++ b/.devtools/transifex_download.bat @@ -1,6 +1,9 @@ pushd .. -tx pull --all --minimum-perc=70 --force -tx pull --language en_GB --force +for /d %%d in (localization\*) do ( + if %%~nxd neq en ( + tx pull --languages %%~nxd --force + ) +) copy /Y localization\en\userfield_types.po localization\en_GB\userfield_types.po copy /Y localization\en\stock_transaction_types.po localization\en_GB\stock_transaction_types.po copy /Y localization\en\component_translations.po localization\en_GB\component_translations.po diff --git a/.tx/config b/.tx/config index ec2f9c1d..b586d717 100644 --- a/.tx/config +++ b/.tx/config @@ -1,56 +1,56 @@ [main] host = https://www.transifex.com -[grocy.chore_period_types] -file_filter = localization//chore_period_types.po -source_file = localization/chore_period_types.pot -source_lang = en -type = PO - -[grocy.chore_assignment_types] +[o:grocy:p:grocy:r:chore_assignment_types] file_filter = localization//chore_assignment_types.po source_file = localization/chore_assignment_types.pot source_lang = en -type = PO +type = PO -[grocy.component_translations] +[o:grocy:p:grocy:r:chore_period_types] +file_filter = localization//chore_period_types.po +source_file = localization/chore_period_types.pot +source_lang = en +type = PO + +[o:grocy:p:grocy:r:component_translations] file_filter = localization//component_translations.po source_file = localization/component_translations.pot source_lang = en -type = PO +type = PO -[grocy.demo_data] +[o:grocy:p:grocy:r:demo_data] file_filter = localization//demo_data.po source_file = localization/demo_data.pot source_lang = en -type = PO +type = PO -[grocy.stock_transaction_types] -file_filter = localization//stock_transaction_types.po -source_file = localization/stock_transaction_types.pot -source_lang = en -type = PO - -[grocy.strings] -file_filter = localization//strings.po -source_file = localization/strings.pot -source_lang = en -type = PO - -[grocy.userfield_types] -file_filter = localization//userfield_types.po -source_file = localization/userfield_types.pot -source_lang = en -type = PO - -[grocy.permissions] -file_filter = localization//permissions.po -source_file = localization/permissions.pot -source_lang = en -type = PO - -[grocy.locales] +[o:grocy:p:grocy:r:locales] file_filter = localization//locales.po source_file = localization/locales.pot source_lang = en -type = PO +type = PO + +[o:grocy:p:grocy:r:permissions] +file_filter = localization//permissions.po +source_file = localization/permissions.pot +source_lang = en +type = PO + +[o:grocy:p:grocy:r:stock_transaction_types] +file_filter = localization//stock_transaction_types.po +source_file = localization/stock_transaction_types.pot +source_lang = en +type = PO + +[o:grocy:p:grocy:r:strings] +file_filter = localization//strings.po +source_file = localization/strings.pot +source_lang = en +type = PO + +[o:grocy:p:grocy:r:userfield_types] +file_filter = localization//userfield_types.po +source_file = localization/userfield_types.pot +source_lang = en +type = PO