-
-
Notifications
You must be signed in to change notification settings - Fork 153
/
Copy pathlocales-update
executable file
·79 lines (72 loc) · 2.4 KB
/
locales-update
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/sh
# vim: expandtab sw=4 ts=4 sts=4:
LOCS=`ls locale/*/gammu.po | sed 's@.*/\(.*\)/[^/]*@\1@'`
ver=`sed -n 's/set (VERSION "\([^"]*\)".*)/\1/p' CMakeLists.txt`
xgettext \
-d gammu \
--msgid-bugs-address=michal@cihar.com \
-o locale/gammu.pot \
--language=C \
--keyword=_ \
--keyword=N_ \
--add-comments=l10n \
--add-location \
--copyright-holder "Michal Čihař <michal@cihar.com>" \
--package-name gammu \
--package-version $ver \
`find gammu helper -name '*.c' -o -name '*.h' | sort`
xgettext \
-d libgammu \
--msgid-bugs-address=michal@cihar.com \
-o locale/libgammu.pot \
--language=C \
--keyword=_ \
--keyword=N_ \
--add-comments=l10n \
--add-location \
--copyright-holder "Michal Čihař <michal@cihar.com>" \
--package-name libgammu \
--package-version $ver \
`find common -name '*.c' -o -name '*.h' | sort`
for loc in $LOCS ; do
cd locale/$loc
msgmerge -U -C gammu.po -C libgammu.po docs.po ../docs.pot
msgmerge -U -C ../../../wammu/locale/$loc/wammu.po docs.po ../docs.pot
cd ../..
done
./admin/po4a
sed -i '
s/SOME DESCRIPTIVE TITLE/Gammu translation/;
s/PACKAGE/Gammu/;
s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
s/VERSION/'$ver'/;
' locale/gammu.pot
sed -i '
s/SOME DESCRIPTIVE TITLE/libGammu translation/;
s/PACKAGE/libGammu/;
s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
s/VERSION/'$ver'/;
' locale/libgammu.pot
for loc in $LOCS ; do
sed -i '
s/SOME DESCRIPTIVE TITLE/Gammu translation/;
s/PACKAGE/Gammu/;
s/VERSION/'$ver'/;
s/Project-Id-Version: Gammu [0-9.]*/Project-Id-Version: Gammu '$ver'/;
' locale/$loc/gammu.po
msgmerge -C ../wammu/locale/$loc/wammu.po -U locale/$loc/gammu.po locale/gammu.pot
sed -i '
s/SOME DESCRIPTIVE TITLE/libGammu translation/;
s/PACKAGE/libGammu/;
s/VERSION/'$ver'/;
s/Project-Id-Version: libGammu [0-9.]*/Project-Id-Version: libGammu '$ver'/;
' locale/$loc/libgammu.po
msgmerge -C ../wammu/locale/$loc/wammu.po -U locale/$loc/libgammu.po locale/libgammu.pot
sed -i '
s/SOME DESCRIPTIVE TITLE/Gammu documentation translation/;
s/PACKAGE/Gammu-docs/;
s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
s/VERSION/'$ver'/;
s/Project-Id-Version: Gammu-docs [0-9.]*/Project-Id-Version: Gammu-docs '$ver'/;
' locale/$loc/docs.po
done