7 Commits

Author SHA1 Message Date
Steve Kowalik
f1468431bf Refactor verification for ZanataRestService
Rather than pass verify to each function that requires it, refactor
it down the stack into __init__. Now that we have moved to using
translate.o.o which has a trusted certificate, switch the default
to True.

Add a command-line argument --no-verify to create-zanata-xml to ease
testing against translate-dev.

Change-Id: I0f2314a8e82c3b7f1c96f28408c36ea1dd786e2f
2015-09-10 16:06:04 +10:00
Steve Kowalik
770b73d35e Switch locale marker to locale_with_underscore
Zanata 3.7.1 has moved much of the locale logic to the server, which
means we can no longer make use of client side transforms, such as
map-from, so set the locale to locale_with_underscore so dashes are
replaced with underscores.

Change-Id: I0bde5b84388f2be39c85600870ec530e8b5c07a5
2015-08-20 13:39:11 +10:00
Steve Kowalik
68b38e9576 Switch default pattern in create-zanata-xml.py
It turns out the Zanata client applies patterns relative to the
project root, and not the src-dir that is configured in zanata.xml.
Change the default pattern to be **/*.pot.

Change-Id: Ifbe76588b85a4226253617ff8b723410d05de36c
2015-07-21 17:02:55 +10:00
Steve Kowalik
990b4d7737 Add excludes support for create-zanata-xml
For projects such as Manuals and Horizon, the source directory in
zanata.xml is set to '.', which may have the unintended side-effect
of the Zanata client finding .po or .pot files under dot directories.
Add a new option to create-zanata-xml, and use it for those two
projects.

Change-Id: I5fc26069c288eca130a45c6e9c5e3dd00ad2c784
2015-07-13 15:24:05 +10:00
Steve Kowalik
554b607f7d Do not call sys.exit inside ZanataUtils
ZanataUtils is a Python module, calling sys.exit() inside it is pretty
bad form, so stop doing it, and move the exit to create-zanata-xml.py.

Change-Id: I0662a5155ff31d37fd7a29e4d024d7279b17ff84
2015-07-03 15:08:03 +10:00
Steve Kowalik
544eb51c73 Sprinkle in Horizon translations for Zanata
Building on work landed in II3bfb188c8b0c0e65f22d7edc30721b163f084fff,
add support for pushing source documents of Horizon into Zanata.
This has also necessitated adding support for parsing and adding
rules for create-zanata-xml.py.

As a drive-by correct some incorrect docstrings in ZanataUtils, split
some ludicrously long lines calling create-zanata-xml.py, and correct
usage of an undefined variable in setup_django_openstack_auth.

Change-Id: Id7a2c82e979d1f878022b4982f51ef4ef06ecf4b
2015-06-24 18:47:06 +10:00
Steve Kowalik
9ec48c03fe Support pushing translations to Zanata
In order to migrate to Zanata for translations, we need to modify
the proposal scripts to also upload translations to the Zanata
server. This commit supports most projects (those that make use of
upstream_translation_update.sh), as well as django_openstack_auth.

This does not impact the existing push and pull of
translations to Transifex, and also untouched are the translations
for Horizon or the manuals, which are all handled in separate scripts.

Co-Authored-By: stephane <stephane@alum.mit.edu>
Change-Id: I3bfb188c8b0c0e65f22d7edc30721b163f084fff
2015-06-19 00:19:51 +10:00