22 Commits

Author SHA1 Message Date
Jenkins
463a2458ef Merge "Translations: Merge pull_from_zanata" 2015-09-25 18:49:05 +00:00
Clark Boylan
624832c5fa Make translation pushes to gerrit branch aware
To support multiple translation versions in Zanata we need to make the
reverse push into Gerrit branch aware as well. Do this by setting up the
existing propose translation jobs to accept a branch parameter which
tells them which version to pull from Zanata and where to push into
Gerrit.

This will add a new periodic jenkins job for each release/branch.

Change-Id: Ia206bfaa7dd6eaad6aa1f6e5ddbbbf9cdadf8db0
2015-09-23 10:35:01 -07:00
Andreas Jaeger
f40bcd2213 Translations: Merge pull_from_zanata
Merge the two pull_from_zanata functions. We do not need the special
50 % rule for manuals anymore.

Change-Id: I80ed31b5d59020ece3abcfc4bd9e6f8145dd566a
2015-09-23 08:40:02 +02:00
Andreas Jaeger
56ccfa16cf Translations: Refaktor
Create extract_messages function that can be used by both python and
django_openstack_auth repositories.

This enables the extra keywords for django_openstack_auth as well.

Change-Id: Ica998700215db5a0eae6aa88f4462ae416af2bdd
2015-09-22 20:08:36 +02:00
Andreas Jaeger
4dc0ca560e Merge translation proposal scripts
Merge
jenkins/scripts/propose_translation_update_django_openstack_auth.sh,
jenkins/scripts/propose_translation_update_horizon.sh, and
jenkins/scripts/propose_translation_update_manuals.sh into
jenkins/scripts/propose_translation_update.sh.

Update Jenkins and Zuul files, we can use now the same job
in all cases.

Change-Id: Idb9e8534dfc0454d75fe186e1a4a454832c8fdae
2015-09-22 20:07:52 +02:00
Andreas Jaeger
0f78e7bf19 Remove usage of transifex client
Remove all invocations of transifex client "tx".

This removes also the script populate-zanata-project.sh that is not
needed anymore, since we have switch to Zanata and started translating
there. The script is broken with the removal of "tx" support in other
places and not needed anymore.

Change-Id: I74350c92da425a6bf32ea1debd217a531dc2f400
2015-09-18 21:29:59 +02:00
Steve Kowalik
28eb4ce6f5 Remove support for pulling from Transifex
Switch the translation scripts to only pull from Zanata, no matter
what extra arguments they are passed on the command line. This does
not completly remove support for Transifex, which will be cleaned up
in a future commit.

Change-Id: I21bd54d4205693315da1152a310ff4faf22531a5
2015-09-16 15:53:14 +10:00
Steve Kowalik
f54eb1ed69 Redo function that pulls translations from Zanata
The existing function pull_from_zanata would only work for the simple
Python project case of pulling translations from Zanata -- with only
locales directory and trivial rules to apply, with no real hope of
working for Horizon or OpenStack Manuals, given the current
functionality of the Zanata CLI utility.

Rewrite it to download every translation from Zanata and perform some
checks by hand if we keep the file or remove it. This also required
refactoring a large portion of cleanup_po_files so both functions could
leverage the same code.  OpenStack Manuals treats downloaded
translations sufficiently different that a similar function was required.

This also adds full support for Horizon and OpenStack Manuals projects,
including jobs, as well as new job templates to make it easier to
transition projects to pulling from Zanata. Adding -zanata jobs for the
Python projects and django_openstack_auth is not required, they are
already present.

Change-Id: I5b9f2eca7f099c56057fc5d09b4bbfe5ea5c596d
2015-09-08 17:10:45 +00:00
Steve Kowalik
3ca25f7204 Add support for pulling translations from Zanata
To help move to Zanata, we should pull down translations from
the server. Add a function that should behave the same way as
the existing Transifex function, as well as changing two existing
scripts to call it based on a command-line parameter. Add two new
jobs with a -zanata suffix so we can switch projects one at a time.

This change deals with all of the Python projects and
django_openstack_auth. Horizon and OpenStack manuals will be dealt with
in a future patch.

Change-Id: I8003ac37aeb89d59ceeba2e75eed2f8100b82367
2015-08-06 18:12:50 +10:00
Steve Kowalik
85f99e2d18 Refactor pulling translations into a common func
In preperation for switching projects one at a time to pulling
translations from Zanata, refactor the two calls to tx pull into
a common function.

Change-Id: I21051fbdcf7bd210606333ba46e5abb0c64e7540
2015-07-09 16:45:42 +10:00
Steve Kowalik
e3060b094c Switch to using $() for subshells, part 2
Cleanup every use of `` for subshells in the jenkins/scripts
directory, replacing them with $(), and finally making the
scripts consistent.

Change-Id: Id3e45fb873c1ebeae6ab63a0caa4c427a7ccbb62
2015-06-04 15:33:48 +10:00
Jenkins
c563b2d6f4 Merge "Minor translation cleanups" 2015-05-05 06:44:29 +00:00
Andreas Jaeger
fe09040a32 Minor translation cleanups
Remove .tx file at the end to have a clean repository.

Run setup.py with parameter --quiet, the long list of "extracting
messages from file XXX" are not needed.

Change-Id: I735f02a968aed8b362803781498ccc8085fa0e03
2015-05-03 09:55:00 +02:00
Andreas Jaeger
19e84b070b Fix translation steps
Today's nova import had some file changes where only the
POT-Creation-Date was changed which we don't need to import.

With the new compression step, we need to filter out commits *after* the
compression, otherwise counting is wrong.

Change-Id: Ib8fe6ca5f77c805147b73fe94905c72ccf3369d4
2015-05-03 09:42:42 +02:00
Andreas Jaeger
e569eb9045 Handle empty translation files
We have some strange files in the tree that contain no or little
translation after merging - and these are downloaded from transifex.
So, these files are not known to git and git rm fails.
To not special case every git rm and git reset for both old and new
files, re-add a "git add" at the beginning so that we can operate on
files known to git.

Note: This happens when we have a file like glance-log-critical.po that has no
strings - but we had to create it with initial content in transifex,
since empty files are not allowed there.

Change-Id: Ie9bb3e59560d50829e56928b2ed79e3999dd39cb
2015-05-02 09:10:01 +02:00
Andreas Jaeger
5c5989f1e5 Decrease PO files for python projects
Remove untranslated strings and location information from PO files. The
location information is still in the POT files as reference for easy
regeneration using "msgmerge POTFILE POFILE -o COMPLETEPOFILE".

This moves the git add command to the end since compress_po_files
changes the files.

Change-Id: I8d9f80276085ffe4dd614960457637330ca28370
2015-04-29 16:07:31 +02:00
Andreas Jaeger
a3f7d0caa7 Translation download: Update all existing translations
Download translations for all languages that are in the repo.

this avoids the situation that a file gets downloaded with 75 %
translations and then not updated as contents changed and translations
do not catch up.

Change-Id: Ic3bc5fa2642aeaabee5d4c1e0c3764baed811a5d
2014-10-15 13:38:47 +02:00
Andreas Jaeger
9bc1a0f0e2 Document jenkins/scripts/propose_translation_update.sh
Add comments to the file.

Change-Id: Ic1220ef0cd29132f9d874ebb597b0818f5444b38
2014-10-07 20:51:07 +02:00
Jenkins
c61c597c68 Merge "Cleanup translation files" 2014-10-02 15:03:04 +00:00
K Jonathan Harker
2f03cf35e5 Clean up bashate failures
Also create tools/run-bashate.sh to wrap a find command to search for
files to run bashate on, and use it in tox.

Change-Id: I5ab07425f566a556f158a4b76b00aa35f9fb4385
2014-09-30 12:39:48 -07:00
Andreas Jaeger
ccbb011210 Cleanup translation files
Translations might become stale and obsolete over time, let's cleanup
slowly:
* Remove empty translations files (those were added by accident in the
  past or content gets removed over time)
* Remove files that have less than 20 per cent translated content.

Change-Id: I0c3f6de436d342d032fa38ce2df8a90dd878ea08
2014-09-29 21:30:20 +02:00
Anita Kuno
1d21cd635f Reorganizes project-config
This repo was created from filter branching the openstack-infra/
config repo. This process brought a lot of cruft with it in the
form of directories that we no longer need. This patch removes
that cruft so we begin with a tidier repo.

Change-Id: Ibffad1b11c0c5f84eedfb0365369f60c4961a0f3
2014-09-25 11:41:04 -04:00