forked from linuxmint/nemo-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makepot
executable file
·67 lines (60 loc) · 2.04 KB
/
makepot
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
#!/usr/bin/env bash
set -Eeuo pipefail
pot="nemo-extensions.pot"
potfiles_to_extract=(
nemo-audio-tab/nemo-extension/nemo-audio-tab.glade
nemo-image-converter/data/nemo-image-resize.ui
nemo-image-converter/data/nemo-image-rotate.ui
nemo-pastebin/data/nemo-pastebin-configurator.ui
nemo-repairer/src/encoding-dialog.ui
nemo-repairer/src/repair-dialog.ui
nemo-seahorse/tool/seahorse-multi-encrypt.xml
nemo-seahorse/tool/seahorse-notify.xml
nemo-seahorse/tool/seahorse-progress.xml
nemo-share/interfaces/share-dialog.ui
)
potfiles_extracted=( )
for file in "${potfiles_to_extract[@]}"; do
intltool-extract --type=gettext/glade "$file"
potfiles_extracted+=( "${file}.h" )
done
potfiles_c=(
nemo-dropbox/src/*.c
nemo-dropbox/src/*.h
nemo-fileroller/src/*.c
nemo-fileroller/src/*.h
nemo-image-converter/data/*.ui.h
nemo-image-converter/src/*.c
nemo-image-converter/src/*.h
nemo-preview/src/*.c
nemo-preview/src/libnemo-preview/*.c
nemo-preview/src/libnemo-preview/*.h
nemo-repairer/src/*.c
nemo-repairer/src/*.h
nemo-repairer/src/*.ui.h
nemo-seahorse/nemo-ext/*.c
nemo-seahorse/nemo-ext/*.h
nemo-seahorse/tool/*.c
nemo-seahorse/tool/*.h
nemo-seahorse/tool/*.xml.h
nemo-share/interfaces/*.ui.h
nemo-share/src/*.c
nemo-share/src/*.h
)
potfiles_python=(
nemo-audio-tab/nemo-extension/*.glade.h
nemo-audio-tab/nemo-extension/*.py
nemo-compare/src/*.py
nemo-emblems/nemo-extension/*.py
nemo-media-columns/*.py
nemo-pastebin/*.py
nemo-pastebin/data/*.ui.h
nemo-terminal/src/*.py
)
potfiles_javascript=(
nemo-preview/src/js/*/*.js
)
xgettext --language=C --keyword=_ --keyword=N_ --keyword=g_dngettext:2,3 --output="$pot" --join-existing "${potfiles_c[@]}"
xgettext --language=JavaScript --keyword=_ --keyword=N_ --output="$pot" --join-existing "${potfiles_javascript[@]}"
xgettext --language=Python --keyword=_ --keyword=N_ --output="$pot" --join-existing "${potfiles_python[@]}"
rm -f "${potfiles_extracted[@]}"