File: updatePot.sh

package info (click to toggle)
brisk-menu 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 984 kB
  • sloc: ansic: 5,796; xml: 93; sh: 71; makefile: 14
file content (36 lines) | stat: -rwxr-xr-x 885 bytes parent folder | download
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
#!/bin/bash

function do_gettext()
{
    xgettext --package-name=brisk-menu --package-version=0.6.2 $* --default-domain=brisk-menu --join-existing --from-code=UTF-8 --no-wrap --keyword=_
}

function do_intltool()
{
    intltool-extract --type=$1 $2
}

rm brisk-menu.po -f
touch brisk-menu.po

for file in `find src -name "*.c"`; do
    do_gettext $file --add-comments --language=C
done

for file in `find src -name "*.ui"`; do
    if [[ `grep -F "translatable=\"yes\"" $file` ]]; then
        do_intltool gettext/glade $file
        do_gettext ${file}.h --add-comments --keyword=N_:1
        rm $file.h
    fi
done

for file in `find src -name "*.in"`; do
    if [[ `grep -E "^_*" $file` ]]; then
        do_intltool gettext/keys $file
        do_gettext ${file}.h --add-comments --keyword=N_:1
        rm $file.h
    fi
done

mv brisk-menu.po ../brisk-menu-translations/brisk-menu.pot