Rename pull_catalog args from version to branch

It was a very bad idea to name the argument to fetch a specific
version from Zanata as 'version'.

At the moment I get this error mesage:
argparse.ArgumentError: argument --version: conflicting option string(s): --version

Change-Id: I662a218a2713fcefd3a624a4cc2a907a7fc1434b
This commit is contained in:
Frank Kloeker 2018-04-05 14:54:28 +02:00
parent 91e659f172
commit 886852f13f
1 changed files with 5 additions and 5 deletions

View File

@ -23,10 +23,10 @@ ZANATA_LOCALES_URL = ("https://translate.openstack.org/rest/project"
DOMAINS = ['django', 'djangojs']
MODULES = ['horizon', 'openstack_dashboard']
PROJECT = 'horizon'
VERSION = 'master',
BRANCH = 'master',
POFILE = "{module}/locale/{locale}/LC_MESSAGES/{domain}.po"
POFILE_URL = ("https://translate.openstack.org/rest/file/translation/{project}"
"/{version}/{language}/po?docId={module}%2Flocale%2F{domain}")
"/{branch}/{language}/po?docId={module}%2Flocale%2F{domain}")
class Command(BaseCommand):
@ -58,8 +58,8 @@ class Command(BaseCommand):
"strings from e.g. 'openstack_dashboard'. "
"The default modules are 'horizon' and "
"'openstack_dashboard'"))
parser.add_argument('-v', '--version', type=str, default=VERSION,
help=("The version of the project to extract "
parser.add_argument('-b', '--branch', type=str, default=BRANCH,
help=("The branch of the project to extract "
"strings from e.g. 'horizon'. The default "
"is 'master'"))
@ -80,7 +80,7 @@ class Command(BaseCommand):
new_po = requests.get((POFILE_URL).format(
language=language,
project=options['project'],
version=options['version'],
branch=options['branch'],
module=module,
domain=domain))