/[d-i]/trunk/manual/build/po_functions
ViewVC logotype

Contents of /trunk/manual/build/po_functions

Parent Directory Parent Directory | Revision Log Revision Log


Revision 66981 - (show annotations) (download)
Wed Oct 12 16:25:17 2011 UTC (19 months, 1 week ago) by joeyh
File size: 1203 byte(s)
avoid relying on deep .svn directories

Going away in svn 1.7. Instead, use svn info to test if a directory is
checked into svn.
1 # Routines used to build manual translations from po-files
2
3 update_templates () {
4 echo "Generating integrated XML files and POT files"
5 bash -c "cd .. ; ./scripts/merge_xml en"
6 RET=$?; [ $RET -ne 0 ] && exit 1 || true
7 bash -c "cd .. ; ./scripts/update_pot"
8 RET=$?; [ $RET -ne 0 ] && exit 1 || true
9 }
10
11 # Check whether language uses PO files for translation
12 uses_po () {
13 if [ -d "../po/$lang" ] ; then
14 if [ -d "../$lang/" ] && svn info "../$lang" >/dev/null 2>&1 ; then
15 echo "Warning: both PO files and XML files are present; ignoring PO files"
16 else
17 return 0
18 fi
19 fi
20 return 1
21 }
22
23 generate_xml () {
24 sh -c "cd ..; ./scripts/update_po $lang"
25 RET=$?; [ $RET -ne 0 ] && return $RET || true
26
27 sh -c "cd ..; ./scripts/create_xml $lang 2>&1 | grep -v 'found empty tag para'"
28 RET=$?; [ $RET -ne 0 ] && return $RET || true
29
30 echo "Info: generation of XML files complete"
31 return 0
32 }
33
34 clear_xml () {
35 for lang in $languages; do
36 if [ -d ../po/$lang ] && [ ! -d ../$lang/ ] && ! svn info ../$lang/ >/dev/null 2>&1 ; then
37 rm -rf ../$lang
38 fi
39 done
40 }
41
42 clear_po () {
43 rm -rf ./build.po
44 }

  ViewVC Help
Powered by ViewVC 1.1.5