File: sync_strings.sh

package info (click to toggle)
rabbitvcs 0.19-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,016 kB
  • sloc: python: 22,825; xml: 11,999; objc: 414; sh: 66; makefile: 3
file content (29 lines) | stat: -rwxr-xr-x 755 bytes parent folder | download | duplicates (6)
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
#!/bin/sh

# Sync our translation template file with the actual strings
# 1. Extracts strings from gtkbuilder xml files into .h files
# 2. Extracts gettext strings from py files
# 3. Deletes the glade .h files

cd ..

for i in `find . | grep '\.xml' | grep -v '\.svn' | grep -v '\.xml\.h'`;
do
	intltool-extract --type=gettext/glade $i
done

cd rabbitvcs

echo "util/helper.py" > POTFILES.in
find . -type f | egrep '(ui|.xml)' | grep -v \.svn | grep -v \.h | grep -v \.pyc >> POTFILES.in 
sed -i 's|\.xml|.xml.h|g' POTFILES.in
sed -i 's|\.\/||g' POTFILES.in

mv POTFILES.in ../po/POTFILES.in

xgettext -L Python --keyword=_ --keyword=N_ -o ../po/RabbitVCS.pot -f ../po/POTFILES.in

for i in `find . | grep '\.xml\.h' | grep -v '\.svn'`;
do
	rm -f $i
done