forked from GEWIS/gewisweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
translate-helper
executable file
·41 lines (35 loc) · 1.01 KB
/
translate-helper
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
#!/bin/bash
dir="$PWD"
cd `dirname $0`
# parse php files
find ./module -iname "*.phtml" | xargs xgettext \
--language=PHP \
--keyword=translate \
--output=./module/Application/language/gewisweb.pot \
--force-po \
--package-name=GEWISweb \
--package-version=0.1.0-dev \
--copyright-holder=GEWIS \
find ./module -iname "*.php" | xargs xgettext \
--language=PHP \
--keyword=translate \
--output=./module/Application/language/gewisweb.pot \
--force-po \
--package-name=GEWISweb \
--package-version=0.1.0-dev \
--copyright-holder=GEWIS \
--join-existing \
xgettext module/Application/language/additional-strings \
--output=./module/Application/language/gewisweb.pot \
--force-po \
--package-name=GEWISweb \
--package-version=0.1.0-dev \
--copyright-holder=GEWIS \
--join-existing \
--language=C \
--extract-all \
cd ./module/Application/language/
# merge translation files
msgmerge -U nl.po gewisweb.pot
msgmerge -U en.po gewisweb.pot
cd $dir