Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update test buildout.cfg
  • Loading branch information
rockfruit committed Nov 24, 2014
1 parent 2c78784 commit fa7190a
Showing 1 changed file with 12 additions and 48 deletions.
60 changes: 12 additions & 48 deletions buildout.cfg
@@ -1,63 +1,28 @@
# This buildout can be used to obtain a complete test system from scratch:
#
# virtualevnv --no-site-packages .
# source bin/activate
# python bootstrap.py
# bin/buildout
# bin/instance start
#

[buildout]
extends = http://dist.plone.org/release/4.3.3/versions.cfg
extends = http://dist.plone.org/release/4.3.4/versions.cfg
versions = versions
develop = .

parts =
lxml
omelette
# Fix the versions.cfg to make these work
# test
# robot
test
robot

eggs =
bika.lims
i18ndude
lxml

[update_translations]
recipe = collective.recipe.template
output = ${buildout:directory}/bin/update_translations
input = inline:
#!/bin/bash
I18NDUDE=${buildout:directory}/bin/i18ndude
BASE_PATH=${buildout:directory}/src/bika.lims
LOCALES=$BASE_PATH/bika/lims/locales
cd $LOCALES

### Transifex - pull everything
#tx pull -a -f

DOMAIN="bika"
### Flush the english (transifex source language) po files
### If we don't do this, new $DOMAIN-manual.pot translations won't be synced.
> en/LC_MESSAGES/$DOMAIN.po
### Re-scan source for new strings
$I18NDUDE rebuild-pot --pot $DOMAIN-tmp.pot --exclude "build" --create $DOMAIN $BASE_PATH
$I18NDUDE trmerge $DOMAIN-tmp.pot $DOMAIN-manual.pot > $DOMAIN.pot
rm $DOMAIN-tmp.pot
$I18NDUDE sync --pot $DOMAIN.pot */LC_MESSAGES/$DOMAIN.po

DOMAIN="plone"
PLONE_POT=${buildout:directory}/parts/omelette/plone/app/locales/locales/plone.pot
> en/LC_MESSAGES/$DOMAIN.po
### Re-scan source for new strings
$I18NDUDE rebuild-pot --pot $DOMAIN-tmp.pot --create $DOMAIN $BASE_PATH/bika/lims/profiles
$I18NDUDE filter $DOMAIN-tmp.pot $PLONE_POT > $DOMAIN.pot
rm $DOMAIN-tmp.pot
$I18NDUDE trmerge $DOMAIN.pot $DOMAIN-manual.pot > $DOMAIN-tmp.pot
mv $DOMAIN-tmp.pot $DOMAIN.pot
$I18NDUDE sync --pot $DOMAIN.pot */LC_MESSAGES/$DOMAIN.po

find . -name "*.mo" -delete
for po in `find . -name "*.po"`; do
msgfmt -o `dirname $po`/`basename $po .po`.mo $po;
done

### Transifex
#tx push -s -t
mode = 755

[i18ndude]
unzip = true
recipe = zc.recipe.egg
Expand All @@ -84,4 +49,3 @@ eggs =
[omelette]
recipe = collective.recipe.omelette
eggs = ${buildout:eggs}

0 comments on commit fa7190a

Please sign in to comment.