joachim99@86: # Copyright (C) 2008 by Joachim Eibl joachim99@86: # Licence: GPL V2 joachim99@86: # GNU GENERAL PUBLIC LICENSE, Version 2, June 1991 joachim99@86: # This program is free software; you can redistribute it and/or modify joachim99@86: # it under the terms of the GNU General Public License as published by joachim99@86: # the Free Software Foundation; either version 2 of the License, or joachim99@86: # (at your option) any later version. joachim99@86: # joachim99@86: # This program is distributed in the hope that it will be useful, joachim99@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of joachim99@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the joachim99@86: # GNU General Public License for more details. joachim99@86: # joachim99@86: # You should have received a copy of the GNU General Public License joachim99@86: # along with this program; if not, write to the Free Software joachim99@86: # Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307 USA joachim99@86: # joachim99@86: # For details see file "COPYING". joachim99@86: joachim99@86: # update_doc_dir: joachim99@86: # automatically fetch the most recent translations from the websvn.kde.org server joachim99@86: # and update all files for translations joachim99@86: # Requirements: wget joachim99@86: joachim99@86: #http://websvn.kde.org/trunk/l10n-kde4/templates/docmessages/extragear-utils/kdiff3.pot joachim99@86: joachim99@86: # extract extra strings joachim99@86: sed -i /add_subdirectory/d CMakeLists.txt joachim99@86: echo add_subdirectory\(en\) >>CMakeLists.txt joachim99@86: wget -nv -nc http://websvn.kde.org/*checkout*/trunk/l10n-kde4/subdirs joachim99@86: #for i in `cat subdirs` ; do joachim99@86: for i in da de en es et fr it nl pt; do joachim99@86: if [ $i != "en" ]; then joachim99@86: # Many languages don't have translations so don't worry about errors too much. joachim99@86: if [ ! -a $i.docbook ]; then joachim99@86: wget -nv -nc http://websvn.kde.org/*checkout*/trunk/l10n-kde4/$i/docs/extragear-utils/kdiff3/index.docbook -O $i.docbook joachim99@86: fi joachim99@86: if [ ! -s $i.docbook ]; then joachim99@86: wget -nv http://websvn.kde.org/*checkout*/trunk/l10n-kde3/$i/docs/extragear-utils/kdiff3/index.docbook -O $i.docbook joachim99@86: fi joachim99@86: # if file exists and has size greater than zero, joachim99@86: # but don't fetch the english version, because this is the original version. joachim99@86: if [ -s $i.docbook ]; then joachim99@86: echo $i joachim99@86: # if directory exists delete it recursively and recreate it joachim99@86: if [ -d $i ]; then joachim99@86: rm -R $i joachim99@86: fi joachim99@86: mkdir $i joachim99@86: cp $i.docbook $i/index.docbook joachim99@86: echo kde4_create_handbook\(index.docbook INSTALL_DESTINATION \${HTML_INSTALL_DIR}/$i SUBDIR kdiff3\) >$i/CMakeLists.txt joachim99@86: # Note: png files are found automatically in en/kdiff3 directory. No need to link or copy. joachim99@86: echo add_subdirectory\($i\) >>CMakeLists.txt joachim99@86: fi joachim99@86: #rm $i.docbook joachim99@86: fi joachim99@86: done joachim99@86: joachim99@86: # Print some info joachim99@86: #echo Translated items per language: joachim99@86: #for i in `cat subdirs` ; do joachim99@86: # if [ -s $i/kdiff3.po ]; then joachim99@86: # echo $i `grep msgstr $i/kdiff3.po | grep -v \"\" | wc -l` joachim99@86: # fi joachim99@86: #done joachim99@86: joachim99@86: #rm subdirs