comparison kdiff3/doc/update_doc_dir @ 86:fd0f8012919f

(none)
author joachim99
date Tue, 06 Jan 2009 18:21:00 +0000
parents
children
comparison
equal deleted inserted replaced
85:5d4c32485a04 86:fd0f8012919f
1 # Copyright (C) 2008 by Joachim Eibl
2 # Licence: GPL V2
3 # GNU GENERAL PUBLIC LICENSE, Version 2, June 1991
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307 USA
17 #
18 # For details see file "COPYING".
19
20 # update_doc_dir:
21 # automatically fetch the most recent translations from the websvn.kde.org server
22 # and update all files for translations
23 # Requirements: wget
24
25 #http://websvn.kde.org/trunk/l10n-kde4/templates/docmessages/extragear-utils/kdiff3.pot
26
27 # extract extra strings
28 sed -i /add_subdirectory/d CMakeLists.txt
29 echo add_subdirectory\(en\) >>CMakeLists.txt
30 wget -nv -nc http://websvn.kde.org/*checkout*/trunk/l10n-kde4/subdirs
31 #for i in `cat subdirs` ; do
32 for i in da de en es et fr it nl pt; do
33 if [ $i != "en" ]; then
34 # Many languages don't have translations so don't worry about errors too much.
35 if [ ! -a $i.docbook ]; then
36 wget -nv -nc http://websvn.kde.org/*checkout*/trunk/l10n-kde4/$i/docs/extragear-utils/kdiff3/index.docbook -O $i.docbook
37 fi
38 if [ ! -s $i.docbook ]; then
39 wget -nv http://websvn.kde.org/*checkout*/trunk/l10n-kde3/$i/docs/extragear-utils/kdiff3/index.docbook -O $i.docbook
40 fi
41 # if file exists and has size greater than zero,
42 # but don't fetch the english version, because this is the original version.
43 if [ -s $i.docbook ]; then
44 echo $i
45 # if directory exists delete it recursively and recreate it
46 if [ -d $i ]; then
47 rm -R $i
48 fi
49 mkdir $i
50 cp $i.docbook $i/index.docbook
51 echo kde4_create_handbook\(index.docbook INSTALL_DESTINATION \${HTML_INSTALL_DIR}/$i SUBDIR kdiff3\) >$i/CMakeLists.txt
52 # Note: png files are found automatically in en/kdiff3 directory. No need to link or copy.
53 echo add_subdirectory\($i\) >>CMakeLists.txt
54 fi
55 #rm $i.docbook
56 fi
57 done
58
59 # Print some info
60 #echo Translated items per language:
61 #for i in `cat subdirs` ; do
62 # if [ -s $i/kdiff3.po ]; then
63 # echo $i `grep msgstr $i/kdiff3.po | grep -v \"\" | wc -l`
64 # fi
65 #done
66
67 #rm subdirs