forked from GEWIS/gewisdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtranslate-helper
executable file
·41 lines (35 loc) · 1.09 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/sh
dir="$PWD"
cd `dirname $0`
# parse php files
find ./module -iname "*.phtml" -print0 | sort -z | xargs -r0 xgettext \
--language=PHP \
--keyword=translate \
--keyword=translatePlural:1,2 \
--output=./module/Application/language/gewisdb.pot \
--force-po \
--no-location \
--sort-output \
--package-name=GEWISdb \
--package-version=`git describe --dirty --always` \
--copyright-holder=GEWIS \
find ./module -iname "*.php" -print0 | sort -z | xargs -r0 xgettext \
--language=PHP \
--keyword=translate \
--keyword=translatePlural:1,2 \
--output=./module/Application/language/gewisdb.pot \
--force-po \
--no-location \
--sort-output \
--package-name=GEWISdb \
--package-version=`git describe --dirty --always` \
--copyright-holder=GEWIS \
--join-existing \
cd ./module/Application/language/
# merge translation files
msgmerge --sort-output -U nl.po gewisdb.pot
msgmerge --sort-output -U en.po gewisdb.pot
# remove obsolete translations
msgattrib --no-obsolete -o en.po en.po
msgattrib --no-obsolete -o nl.po nl.po
cd $dir