3
####################################################################################
4
# Copyright (C) 2005-2006 Ubuntu Documentation Project (ubuntu-doc@lists.ubuntu.com)
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
# On Debian based systems a copy of the GPL can be found
19
# at /usr/share/common-licenses/GPL
20
####################################################################################
22
# This script is for generating XML documents from po files downloaded from Launchpad
23
# Put your freshly downloaded po files into the po folder under each document, then run:
27
# Optional parameters:
33
y=$(basename ${1} .po)
39
k=$(basename ${j} .xml)
41
xml2po -e -p po/${y}.po C/${j} >${y}/${j}
43
if [ -e C/${document}-C.omf ]; then
44
echo " Generating omf file for ${document}"
45
xml2po -e -p ${1} C/${document}-C.omf >${y}/${document}-${y}.omf
46
sed -i -e s@\"C\"@\"${y}\"@g -e s@C/@${y}/@g ${y}/${document}-${y}.omf
48
../../validate.sh ${y}/${document}.xml
56
translate "po/${2}.po"
66
while getopts "d:l:" Option
69
d) document=${OPTARG};;
71
*) echo "Please specify an argument.";;
75
if [ ${document} ]; then
76
choose_language ${document} ${lang}
78
for doc in serverguide
80
choose_language ${doc} ${lang}