-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathMessages.sh
More file actions
executable file
·50 lines (44 loc) · 1007 Bytes
/
Messages.sh
File metadata and controls
executable file
·50 lines (44 loc) · 1007 Bytes
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
#!/bin/bash
xgettext \
--language=C++ \
--from-code=UTF-8 \
--keyword=_ \
--keyword=N_ \
-o /tmp/lotus-cpp.pot \
$(find . \( -name "*.cpp" -o -name "*.h" \))
xgettext \
--language=appdata \
--from-code=UTF-8 \
-o /tmp/lotus-xml.pot \
org.fcitx.Fcitx5.Addon.Lotus.metainfo.xml.in.in
xgettext \
--language=Python \
--from-code=UTF-8 \
--keyword=_ \
-o /tmp/lotus-python.pot \
$(find . -name "*.py")
xgettext \
--language=Desktop \
--from-code=UTF-8 \
--keyword=Name \
--keyword=Comment \
-o /tmp/lotus-desktop.pot \
settings-gui/org.fcitx.Fcitx5.Addon.Lotus.Settings.desktop.in
{
echo 'msgid ""'
echo 'msgstr ""'
echo '"Content-Type: text/plain; charset=UTF-8\n"'
echo ""
grep -hE "^Name=" \
src/lotus.conf.in \
src/lotus-addon.conf.in.in \
| sed 's/^Name=\(.*\)/msgid "\1"\nmsgstr ""\n/'
} > /tmp/lotus-conf.pot
msgcat \
--use-first \
/tmp/lotus-cpp.pot \
/tmp/lotus-xml.pot \
/tmp/lotus-conf.pot \
/tmp/lotus-python.pot \
/tmp/lotus-desktop.pot \
-o po/fcitx5-lotus.pot