~ubuntu-branches/ubuntu/vivid/installation-guide/vivid-proposed

« back to all changes in this revision

Viewing changes to build/po_functions

  • Committer: Bazaar Package Importer
  • Author(s): Frans Pop
  • Date: 2005-10-25 17:37:25 UTC
  • Revision ID: james.westby@ubuntu.com-20051025173725-aq0bm11be7bfd7rw
Tags: 20051025
* Mention in copyright that full GPL is included in the manual.
  Closes: #334925
* Register installed documents with doc-base.
* Minor updates in English text and translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
check_po () {
 
13
    USES_PO=""
 
14
    if [ -d "../po/$lang" ] ; then
 
15
        if [ -d "../$lang/.svn" ] ; then
 
16
            echo "Warning: both PO files and XML files are present; ignoring PO files"
 
17
        else
 
18
            USES_PO="1"
 
19
            if [ -d "../$lang/" ] ; then
 
20
                echo "Info: cleaning old XML files"
 
21
                rm -r ../$lang/
 
22
            fi
 
23
        fi
 
24
    fi
 
25
}
 
26
 
 
27
generate_xml () {
 
28
    sh -c "cd ..; ./scripts/update_po $lang"
 
29
    RET=$?; [ $RET -ne 0 ] && return $RET || true
 
30
 
 
31
    sh -c "cd ..; ./scripts/create_xml $lang"
 
32
    RET=$?; [ $RET -ne 0 ] && return $RET || true
 
33
 
 
34
    echo "Info: generation of XML files complete"
 
35
    return 0
 
36
}
 
37
 
 
38
clear_po () {
 
39
    rm -rf ./build.po
 
40
}