annotate kdiff3/doc/update_doc_dir @ 113:7bca1f1340f6 tip

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