From 7efb81803e54a63fe81932121f7646a7be39e475 Mon Sep 17 00:00:00 2001 From: Anthony Johnson Date: Wed, 6 May 2020 10:49:29 -0600 Subject: [PATCH] Update transifex usage This uses force mode to download po files, always. Normal operation is to use the file modification date for comparison, which doesn't work because of Git. This also sets `onlyreviewed` mode, which will omit strings which are not translated yet. This will result in the underlying source translation being used in place, until the string is reviewed in transifex. --- .tx/config | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.tx/config b/.tx/config index 4d44c80..5163860 100644 --- a/.tx/config +++ b/.tx/config @@ -2,6 +2,7 @@ file_filter = sphinx_rtd_theme/locale//LC_MESSAGES/sphinx.po source_file = sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po source_lang = en +minimum_perc = 90 [main] host = https://www.transifex.com diff --git a/setup.py b/setup.py index c87bb1d..3971cf3 100644 --- a/setup.py +++ b/setup.py @@ -80,7 +80,7 @@ class TransifexCommand(distutils.cmd.Command): def run(self): subprocess.run(['tx', 'push', '--source'], check=True) - subprocess.run(['tx', 'pull'], check=True) + subprocess.run(['tx', 'pull', '--mode', 'onlyreviewed', '-f'], check=True) setup(