forked from bikalims/bika.lims
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildout.cfg
87 lines (73 loc) · 2.18 KB
/
buildout.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
[buildout]
extends = http://dist.plone.org/release/4.3.3/versions.cfg
versions = versions
develop = .
parts =
lxml
omelette
# Fix the versions.cfg to make these work
# 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
eggs = i18ndude
[lxml]
recipe = z3c.recipe.staticlxml
egg = lxml==2.3.6
force = false
static-build = true
[test]
recipe = zc.recipe.testrunner
defaults = ['--auto-color', '--auto-progress']
eggs =
bika.lims [test]
[robot]
recipe = zc.recipe.egg
eggs =
${buildout:eggs}
plone.app.robotframework
[omelette]
recipe = collective.recipe.omelette
eggs = ${buildout:eggs}