diff --git a/po/README.md b/po/README.md index ebfdde062..cffccb0e1 100644 --- a/po/README.md +++ b/po/README.md @@ -48,4 +48,9 @@ Use the following command: $ python setup.py get_po_files ``` -It will fetch all po files from Transifex with at least 5% translations done (this is defined by `TXPULL_CMD` in `setup.py`). +It will fetch all po files from Transifex, but the most incomplete ones. + +This default minimum percentage can be seen using: +```bash +$ python setup.py get_po_files --help +``` diff --git a/setup.py b/setup.py index 1ced56f38..a2f1f91f1 100755 --- a/setup.py +++ b/setup.py @@ -313,20 +313,24 @@ class picard_clean_ui(Command): class picard_get_po_files(Command): description = "Retrieve po files from transifex" - user_options = [] + minimum_perc_default = 5 + user_options = [ + ('minimum-perc=', 'm', + "Specify the minimum acceptable percentage of a translation (default: %d)" % minimum_perc_default) + ] def initialize_options(self): - pass + self.minimum_perc = self.minimum_perc_default def finalize_options(self): - pass + self.minimum_perc = int(self.minimum_perc) def run(self): txpull_cmd = " ".join([ TXPULL_CMD, '--force', '--all', - '--minimum-perc=5', + '--minimum-perc=%d' % self.minimum_perc ]) log.info("Running %s" % txpull_cmd) retcode = subprocess.call(txpull_cmd, shell=True)