projects
/
odoo
/
odoo.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[imp] used the user language
[odoo/odoo.git]
/
gen_translations.sh
1
#!/bin/sh
2
3
usage()
4
{
5
cat << EOF
6
usage: $0 -a
7
usage: $0 DIR OUTPUT_FILE
8
9
OPTIONS:
10
-a recreate the .pot file for all addons
11
-h print this message
12
EOF
13
exit 0
14
}
15
16
do_all=
17
18
while getopts "a" opt
19
do
20
case "$opt" in
21
a)
22
do_all=true;;
23
h)
24
usage;;
25
\?)
26
usage;;
27
esac
28
done
29
30
shift $((OPTIND-1))
31
32
if [ -n "$do_all" ]
33
then
34
echo "Extracting all the translations"
35
$0 addons/base/static/src/ addons/base/po/base.pot
36
elif [ -n "$2" ]
37
then
38
pybabel extract -F babel.cfg -o $2 -k _t --no-default-keywords $1
39
else
40
usage
41
fi