File: updateTranslations.sh

package info (click to toggle)
gimagereader 3.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,172 kB
  • sloc: cpp: 29,313; xml: 376; sh: 282; python: 70; makefile: 42
file content (26 lines) | stat: -rwxr-xr-x 882 bytes parent folder | download | duplicates (5)
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
#!/bin/sh

cd "$(dirname "$(readlink -f "$0")")"

# Generate POTFILES.in
echo "Updating POTFILES.in..."
echo "# List of source files containing translatable strings." > po/POTFILES.in
echo "" >> po/POTFILES.in
echo "data/gimagereader.desktop.in" >> po/POTFILES.in
find gtk/data/ -type f -name *.ui -printf '[type: gettext/glade]%p\n' | sort >> po/POTFILES.in
find gtk/src/ -type f \( -name *.hh -or -name *.cc \) -print | sort >> po/POTFILES.in
find qt/data/ -type f -name *.ui -printf '[type: gettext/qtdesigner]%p\n' | sort >> po/POTFILES.in
find qt/src/ -type f \( -name *.hh -or -name *.cc \) -print | sort >> po/POTFILES.in

# Update POT and PO files
( 
cd po
echo "Updating gimagereader.pot..."
intltool-update --gettext-package=gimagereader --pot

while read lang; do
    echo "Updating $lang.po..."
    intltool-update --gettext-package=gimagereader $lang
done < LINGUAS

)