Modularize the selection of the partner to invoice when invoicing from the picking.
[odoo/odoo.git] / gen_translations.sh
1 #!/bin/sh
2
3 usage() {
4 cat << EOF
5 usage: $0 -a
6 usage: $0 DIR OUTPUT_FILE
7
8 OPTIONS:
9    -a    recreate the .pot file for all addons
10    -h    print this message
11 EOF
12 exit 0
13 }
14
15 do_all=
16
17 while getopts "a" opt
18 do
19     case "$opt" in
20     a) 
21         do_all=true;;
22     h)
23         usage;;
24     \?)
25         usage;;  
26   esac
27 done
28
29 shift $((OPTIND-1))
30
31 if [ -n "$do_all" ]
32 then
33     echo "Extracting all the translations"
34     executable=$0
35     extract_module() {
36        $executable addons/$1 addons/$1/po/$1.pot 
37     }
38     extract_module web
39     extract_module web_calendar
40     extract_module web_dashboard
41     extract_module web_diagram
42     extract_module web_gantt
43     extract_module web_graph
44     extract_module web_hello
45     extract_module web_chat
46     extract_module web_mobile
47     extract_module web_rpc
48 elif [ -n "$2" ]
49 then
50     ./npybabel.py extract -F babel.cfg -o $2 -k _t -k _lt --no-default-keywords $1
51 else
52     usage
53 fi