Adding more strings to the template.
[squirrelmail.git] / po / xgetpo
1 #!/bin/sh
2
3 # This script regenerates main POT file
4 #
5 # Philipe Mingo <mingo@rotedic.com>
6 #
7 # $Id$
8
9 # force use of same locale in order to keep same sorting order
10 LC_ALL=en_US.ISO8859-1
11 LANG=en_US.ISO8859-1
12 export LC_ALL LANG
13
14 # set common gettext options
15 XGETTEXT_OPTIONS="--keyword=_ -keyword=N_ --keyword=ngettext:1,2 --default-domain=squirrelmail --no-location --add-comments=i18n"
16
17 # Allows controlling language option
18 # (gettext v.0.10.40 = -C, gettext 0.11+ = -L php).
19 if [ $SM_LANG_PHP ] ; then
20  XGETTEXT_OPTIONS="${XGETTEXT_OPTIONS} -L php";
21 else
22  XGETTEXT_OPTIONS="${XGETTEXT_OPTIONS} -C";
23 fi
24
25 cd ..
26 xgettext ${XGETTEXT_OPTIONS} \
27     src/*.php --output=po/squirrelmail.pot
28 xgettext ${XGETTEXT_OPTIONS} -j \
29     class/*.php --output=po/squirrelmail.pot
30 xgettext ${XGETTEXT_OPTIONS} -j \
31     class/*/*.php --output=po/squirrelmail.pot
32 xgettext ${XGETTEXT_OPTIONS} -j \
33     functions/*.php --output=po/squirrelmail.pot
34 xgettext ${XGETTEXT_OPTIONS} -j \
35     functions/template/*.php --output=po/squirrelmail.pot
36 xgettext ${XGETTEXT_OPTIONS} -j \
37     images/themes/*/*.php --output=po/squirrelmail.pot
38 xgettext ${XGETTEXT_OPTIONS} -j \
39     include/*.php --output=po/squirrelmail.pot
40 xgettext ${XGETTEXT_OPTIONS} -j \
41     include/options/*.php --output=po/squirrelmail.pot
42
43 # Plugins
44
45 xgettext ${XGETTEXT_OPTIONS} -j \
46     plugins/administrator/*.php --output=po/squirrelmail.pot
47 xgettext ${XGETTEXT_OPTIONS} -j \
48     plugins/bug_report/*.php --output=po/squirrelmail.pot
49 xgettext ${XGETTEXT_OPTIONS} -j \
50     plugins/bug_report/templates/default/*.tpl --output=po/squirrelmail.pot
51 xgettext ${XGETTEXT_OPTIONS} -j \
52     plugins/calendar/*.php --output=po/squirrelmail.pot
53 xgettext ${XGETTEXT_OPTIONS} -j \
54     plugins/change_password/*.php --output=po/squirrelmail.pot
55 xgettext ${XGETTEXT_OPTIONS} -j \
56     plugins/change_password/backend/*.php --output=po/squirrelmail.pot
57 xgettext ${XGETTEXT_OPTIONS} -j \
58     plugins/filters/*.php --output=po/squirrelmail.pot
59 xgettext ${XGETTEXT_OPTIONS} -j \
60     plugins/fortune/*.php --output=po/squirrelmail.pot
61 xgettext ${XGETTEXT_OPTIONS} -j \
62     plugins/info/*.php --output=po/squirrelmail.pot
63 xgettext ${XGETTEXT_OPTIONS} -j \
64     plugins/listcommands/*.php --output=po/squirrelmail.pot
65 xgettext ${XGETTEXT_OPTIONS} -j \
66     plugins/listcommands/templates/default/*.tpl --output=po/squirrelmail.pot
67 xgettext ${XGETTEXT_OPTIONS} -j \
68     plugins/mail_fetch/*.php --output=po/squirrelmail.pot
69 xgettext ${XGETTEXT_OPTIONS} -j \
70     plugins/message_details/*.php --output=po/squirrelmail.pot
71 xgettext ${XGETTEXT_OPTIONS} -j \
72     plugins/newmail/*.php --output=po/squirrelmail.pot
73 xgettext ${XGETTEXT_OPTIONS} -j \
74     plugins/preview_pane/*.php --output=po/squirrelmail.pot
75 xgettext ${XGETTEXT_OPTIONS} -j \
76     plugins/sent_subfolders/*.php --output=po/squirrelmail.pot
77 xgettext ${XGETTEXT_OPTIONS} -j \
78     plugins/spamcop/*.php --output=po/squirrelmail.pot
79 xgettext ${XGETTEXT_OPTIONS} -j \
80     plugins/squirrelspell/*.php --output=po/squirrelmail.pot
81 xgettext ${XGETTEXT_OPTIONS} -j \
82     plugins/squirrelspell/class/*.php --output=po/squirrelmail.pot
83 xgettext ${XGETTEXT_OPTIONS} -j \
84     plugins/squirrelspell/modules/*.mod --output=po/squirrelmail.pot
85 xgettext ${XGETTEXT_OPTIONS} -j \
86     plugins/translate/*.php --output=po/squirrelmail.pot
87
88 # Templates
89
90 xgettext ${XGETTEXT_OPTIONS} -j \
91     templates/*.php --output=po/squirrelmail.pot
92 xgettext ${XGETTEXT_OPTIONS} -j \
93     templates/default/*.tpl --output=po/squirrelmail.pot
94 xgettext ${XGETTEXT_OPTIONS} -j \
95     templates/default/plugins/fortune/*.tpl --output=po/squirrelmail.pot
96 xgettext ${XGETTEXT_OPTIONS} -j \
97     templates/default/plugins/listcommands/*.tpl --output=po/squirrelmail.pot
98 xgettext ${XGETTEXT_OPTIONS} -j \
99     templates/default_advanced/*.tpl --output=po/squirrelmail.pot
100
101 # Independent strings
102
103 xgettext ${XGETTEXT_OPTIONS} -j \
104     po/independent_strings.txt --output=po/squirrelmail.pot
105
106 # print stats
107 msgfmt --statistics ${SM_LOCALES_PATH}/po/squirrelmail.pot -o /dev/null
108
109 cd po