Extract translatable strings from Templates.glade.
[rox-filer.git] / ROX-Filer / src / po / update-po
blob033950ef220befa2d5d8bf1edbd3232268b020e7
1 #!/bin/sh
3 echo Extracting messages from source files...
4 echo
6 (cd ..; python po/tips.py;
7 xgettext --keyword=_ --keyword=N_ --output=messages.pot *.c tips ../Templates.glade)
9 echo
11 if [ "x$1" = "x" ]; then
12 echo Updating all .po files...
13 echo
15 for FILE in *.po; do
16 echo -n "Updating '$FILE' translation"
17 mv "$FILE" "$FILE.old"
18 msgmerge "$FILE.old" ../messages.pot > "$FILE";
19 rm "$FILE.old"
20 done
21 else
22 FILE="$1"
23 if [ ! -f "$FILE" ]; then
24 echo $FILE does not exist!
25 exit 1
27 echo Updating all $1...
28 echo
30 echo -n "Updating '$FILE' translation"
31 mv "$FILE" "$FILE.old"
32 msgmerge "$FILE.old" ../messages.pot > "$FILE";
33 rm "$FILE.old"