Skip to content

Commit

Permalink
Add translations jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
gforcada committed Mar 14, 2018
1 parent 805fc31 commit 31f13c1
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
40 changes: 40 additions & 0 deletions jobs/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@
jobs:
- 'plone-4.3-python-{python-version}'

- project:
name: Translations
plone-version:
- 4.3
- 5.0
- 5.1
- 5.2
jobs:
- 'plone-{plone-version}-i18n'

- project:
name: PLIPs
Expand Down Expand Up @@ -310,6 +319,37 @@
<<: *plone-xvfb


- job-template:
name: plone-{plone-version}-i18n
display-name: 'Plone {plone-version} - Translations'

scm:
- buildout-coredev:
branch: '{plone-version}'

triggers:
- timed: 'H H * * *'

builders:
- shining-panda:
build-environment: virtualenv
python-version: System-CPython-2.7
clear: true
nature: shell
command:
!include-raw: scripts/translations.sh

wrappers:
- custom-workspace-cleanup
- custom-timeout

publishers:
- custom-archive:
glob: 'src/plone.app.locales/plone/app/locales/locales/reports/*.txt'

<<: *plone-basic


- job-template: &plone-core-job
# Plone 5.x core tests job definition.
name: plone-{plone-version}-python-2.7
Expand Down
28 changes: 28 additions & 0 deletions jobs/scripts/translations.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
if [ "{plone-version}" = "4.3" ]; then
sed -i 's/ buildout.dumppickedversions/ buildout.dumppickedversions\ngit-clone-depth = 100/' core.cfg
python bootstrap.py
bin/buildout -c experimental/i18n.cfg install i18ndude
else
sed -i 's/ mr.developer/ mr.developer\ngit-clone-depth = 100/' core.cfg
pip install -r requirements.txt
buildout -c experimental/i18n.cfg install i18ndude
fi

cd src/plone.app.locales/plone/app/locales/locales
mkdir reports

../../../../../../bin/i18ndude list -p plone > reports/plone.txt
../../../../../../bin/i18ndude list -p atcontenttypes > reports/atcontenttypes.txt
../../../../../../bin/i18ndude list -p atreferencebrowserwidget > reports/atreferencebrowserwidget.txt
../../../../../../bin/i18ndude list -p cmfeditions > reports/cmfeditions.txt
../../../../../../bin/i18ndude list -p cmfplacefulworkflow > reports/cmfplacefulworkflow.txt
../../../../../../bin/i18ndude list -p plonefrontpage > reports/plonefrontpage.txt
../../../../../../bin/i18ndude list -p plonelocales > reports/plonelocales.txt

if [ "{plone-version}" = "4.3" ]; then
../../../../../../bin/i18ndude list -p linguaplone > reports/linguaplone.txt
../../../../../../bin/i18ndude list -p passwordresettool > reports/passwordresettool.txt
else
../../../../../../bin/i18ndude list -p widgets > reports/widgets.txt
fi

0 comments on commit 31f13c1

Please sign in to comment.