diff --git a/.kdev4/kwave.kdev4 b/.kdev4/kwave.kdev4 index e00fb3a4..9975145b 100644 --- a/.kdev4/kwave.kdev4 +++ b/.kdev4/kwave.kdev4 @@ -1,117 +1,118 @@ [Buildset] BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\n\x00k\x00w\x00a\x00v\x00e) Number of Builditems=1 [Buildset][Builditem0] Itemname=kwave Itempath=./ Projectname=kwave [CMake] Build Directory Count=1 CMakeDir=/usr/share/cmake/Modules Current Build Directory Index=0 +Current Build Directory Index-Host-System=0 ProjectRootRelative=./ [CMake][CMake Build Directory 0] Build Directory Path=file:///var/tmp/kwave-build Build Type=Debug CMake Binary=/usr/bin/cmake CMake Executable=/usr/bin/cmake Environment Profile= Extra Arguments= Install Directory=/var/tmp/kwave-install/usr Runtime=Host System [CustomDefinesAndIncludes][ProjectPath0] Path=. parseAmbiguousAsCPP=true parserArguments=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11 parserArgumentsC=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c99 parserArgumentsCuda=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11 parserArgumentsOpenCL=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -cl-std=CL1.1 [CustomDefinesAndIncludes][ProjectPath0][Compiler] Name=Clang [CustomDefinesAndIncludes][ProjectPath0][Defines] __FUNCTION__=__FUNCTION__ __LINE__=__LINE__ [CustomDefinesAndIncludes][ProjectPath0][Includes] 1=/usr/include/qt5/ 10=/usr/include/qt5/QtNetwork 11=/usr/include/qt5/QtOpenGL 12=/usr/include/qt5/QtOpenGLExtensions 13=/usr/include/qt5/QtPlatformHeaders 14=/usr/include/qt5/QtPlatformSupport 15=/usr/include/qt5/QtPrintSupport 16=/usr/include/qt5/QtQml 17=/usr/include/qt5/QtQuick 18=/usr/include/qt5/QtQuickParticles 19=/usr/include/qt5/QtQuickTest 2=/usr/include/qt5/Gentoo 20=/usr/include/qt5/QtQuickWidgets 21=/usr/include/qt5/QtScript 22=/usr/include/qt5/QtSql 23=/usr/include/qt5/QtSvg 24=/usr/include/qt5/QtTest 25=/usr/include/qt5/QtUiTools 26=/usr/include/qt5/QtWebKit 27=/usr/include/qt5/QtWebKitWidgets 28=/usr/include/qt5/QtWidgets 29=/usr/include/qt5/QtX11Extras 3=/usr/include/qt5/QtConcurrent 30=/usr/include/qt5/QtXml 31=/usr/include/qt5/QtXmlPatterns 32=/usr/include/KF5/KI18n/ 33=/usr/include/KF5/KWidgetsAddons/ 34=/usr/include/qt5/QtMultimedia/ 35=/usr/include/qt5/QtMultimediaWidgets/ 36=/usr/include/KF5/KService 4=/usr/include/qt5/QtCore 5=/usr/include/qt5/QtDBus 6=/usr/include/qt5/QtDeclarative 7=/usr/include/qt5/QtDesigner 8=/usr/include/qt5/QtDesignerComponents 9=/usr/include/qt5/QtGui [Defines And Includes][Compiler] Name=GCC Path=gcc Type=GCC [Launch] Launch Configurations=Launch Configuration 0 [Launch][Launch Configuration 0] Configured Launch Modes=execute Configured Launchers=nativeAppLauncher Name=Kwave_Debug Type=Native Application [Launch][Launch Configuration 0][Data] Arguments= Debugger Shell= Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\n\x00k\x00w\x00a\x00v\x00e) Dependency Action=Nothing Display Demangle Names=true Display Static Members=true EnvironmentGroup=default Executable=file:///var/tmp/kwave-install/usr/bin/kwave External Terminal=konsole --noclose --workdir %workdir -e %exe GDB Path=file:///usr/bin/gdb Project Target=kwave,kwave,kwave_core Remote GDB Config Script= Remote GDB Run Script= Remote GDB Shell Script= Start With=ApplicationOutput Use External Terminal=false Working Directory= isExecutable=true [MakeBuilder] Number Of Jobs=5 [Project] VersionControlSupport=kdevsubversion diff --git a/bin/msgstats.pl b/bin/msgstats.pl index 39ba7ec1..d6353ee4 100755 --- a/bin/msgstats.pl +++ b/bin/msgstats.pl @@ -1,95 +1,95 @@ #!/usr/bin/perl ############################################################################ # msgstats.pl - script to show the current progress of the translations # ------------------- # begin : Tue Oct 27 2015 # copyright : (C) 2015 by Thomas Eschenbacher # email : Thomas.Eschenbacher@gmx.de ############################################################################ # ############################################################################ # # # This program is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation; either version 2 of the License, or # # (at your option) any later version. # # # ############################################################################ # # parameters: # $1 = project root directory # my $top_dir = $ARGV[0] . "/l10n-kf5"; my $category = "kdemultimedia"; my $app = "kwave"; sub check_po { local $name = shift; local $lang = shift; local $scope = shift; local $file = $top_dir . "/" . shift; local $translated = 0; local $fuzzy = 0; local $untranslated = 0; if ( -e $file) { local $state = `LC_ALL=C msgfmt --statistics $file 2>&1`; if ($state =~ m/(\d+)\ translated/) { $translated = $1; } if ($state =~ m/(\d+)\ fuzzy/) { $fuzzy = $1; } if ($state =~ m/(\d+)\ untranslated/) { $untranslated = $1; } } if (($translated + $fuzzy + $untranslated) != 0) { printf( "| %-22s | %-11s | %s | %9s | %9s | %9s |", $name, $lang, $scope, $translated, $fuzzy, $untranslated ); print " <= " if (($fuzzy + $untranslated) == 0); print "\n"; } } open (IN, $top_dir . "/teamnames") or die("open input file failed"); print "+------------------------+-------------+-------+--------------+--------------+--------------+\n"; print "| language name | lang | scope | translated | fuzzy | untranslated |\n"; print "+------------------------+-------------+-------+--------------+--------------+--------------+\n"; while () { my $line = $_; if ($line =~ /(.*)=(.*)/) { local $catalog=$1; local $lang_name=$2; # print $lang_name . " [" . $catalog . "]\n"; local $po_doc=$catalog . "/docmessages/" . $category . "/" . $app . ".po"; local $po_gui=$catalog . "/messages/" . $category . "/" . $app . ".po"; - local $po_dsk=$catalog . "/messages/" . $category . "/desktop_" . $category . "_" . $app . ".po"; + local $po_dsk=$catalog . "/messages/" . $category . "/" . $app . "._desktop_.po"; check_po($lang_name, $catalog, "DOC", $po_doc); check_po($lang_name, $catalog, "GUI", $po_gui); check_po($lang_name, $catalog, "DSK", $po_dsk); if ((-e $top_dir . "/" . $po_doc) || (-e $top_dir . "/" . $po_gui) || (-e $top_dir . "/" . $po_dsk)) { print "+------------------------+-------------+-------+--------------+--------------+--------------+\n"; } } } close IN; # # end of file # diff --git a/bin/svn-update-l10n.sh b/bin/svn-update-l10n.sh index be6adb33..8df4f0a3 100755 --- a/bin/svn-update-l10n.sh +++ b/bin/svn-update-l10n.sh @@ -1,220 +1,220 @@ #!/bin/bash ############################################################################# ## svn-update-l10n.sh - update/fetch translations from anonsvn.kde.org ## ------------------- ## begin : Sun Feb 08 2015 ## copyright : (C) 2015 by Thomas Eschenbacher ## email : Thomas.Eschenbacher@gmx.de ############################################################################# # ############################################################################# ## # ## This program is free software; you can redistribute it and/or modify # ## it under the terms of the GNU General Public License as published by # ## the Free Software Foundation; either version 2 of the License, or # ## (at your option) any later version. # ## # ############################################################################# set -e # set -x CWD=`dirname $0` CMAKE_SOURCE_DIR=$1 # REMOTE="svn+ssh://svn@svn.kde.org/home/kde/trunk/l10n-kf5/" REMOTE="svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/" REPOSITORY="${CMAKE_SOURCE_DIR}/l10n-kf5" PO_DIR="${CMAKE_SOURCE_DIR}/po" DOC_DIR="${CMAKE_SOURCE_DIR}/doc" CATEGORY="kdemultimedia" PO_FILE="kwave.po" -DESKTOP_PO_FILE="desktop_${CATEGORY}_kwave.po" +DESKTOP_PO_FILE="kwave._desktop_.po" LANG_NAMES_FILE="${DOC_DIR}/teamnames" function checkout() { local before=$1 local part=$2 shift 2 local rest="$@" result=1 test ! -z ${before} && before="${before}/" part=${before}${part} if test ! -e "${part}"; then svn update --quiet --depth empty "${part}@" || true 2>/dev/null if test ! -e "${part}"; then result=0 return; fi fi if test ! -z "${rest}"; then checkout "${part}" $@ fi } # make sure the repository exists and check it out if not if test ! -e "${REPOSITORY}/.svn"; then svn checkout --quiet --depth empty ${REMOTE} ${REPOSITORY} fi # change into the local svn repository cd "${REPOSITORY}" # clean up leftovers in case we were aborted last time svn cleanup # get the list of all relevant sub directories and language names svn update --quiet subdirs teamnames scripts # create a new/empty "po" dir if necessary mkdir -p "${PO_DIR}" # check out all missing directories and files (recursively) if test -z "${LINGUAS}" ; then LINGUAS=`cat subdirs | grep -v x-test` fi FOUND_LINGUAS="" FOUND_POFILES="" FOUND_HANDBOOKS="" rm -f ${LANG_NAMES_FILE} touch ${LANG_NAMES_FILE} for lang in ${LINGUAS}; do if test ! -e ${lang} ; then checkout "" "${lang}" fi # skip languages which have no files (like "en") if test ! -e ${lang} ; then continue fi lang_team=`cat teamnames | grep ^${lang}=` || true if test -z "${lang_team}" ; then lang_team="${lang}" fi echo -n "processing ${lang} - `echo ${lang_team} | cut -d = -f 2`... " # get handbook and screenshots if test -e "${lang}/docmessages/${CATEGORY}/kwave.po" ; then FOUND_HANDBOOKS="${FOUND_HANDBOOKS} ${lang}" echo ${lang_team} >> ${LANG_NAMES_FILE} if test -e "${lang}/docmessages/language" ; then checkout "" "${lang}" "docmessages" "language" fi else if test ! -e "${lang}/docs/${CATEGORY}" ; then checkout "" "${lang}" "docs" "${CATEGORY}" fi if test -e "${lang}/docs/${CATEGORY}" ; then svn update --quiet "${lang}/docs/${CATEGORY}/kwave" fi checkout "" "${lang}" "docmessages" "${CATEGORY}" "${PO_FILE}" if [ ${result} == 1 ] ; then FOUND_HANDBOOKS="${FOUND_HANDBOOKS} ${lang}" echo ${lang_team} >> ${LANG_NAMES_FILE} if test -e "${lang}/docmessages/language" ; then checkout "" "${lang}" "docmessages" "language" fi fi fi # get translation of desktop files if test ! -e "${lang}/messages/${CATEGORY}/${DESKTOP_PO_FILE}" ; then checkout "" "${lang}" "messages" "${CATEGORY}" "${DESKTOP_PO_FILE}" fi # GUI translation is mandantory if test ! -e "${lang}/messages/${CATEGORY}/${PO_FILE}" ; then checkout "" "${lang}" "messages" "${CATEGORY}" "${PO_FILE}" fi if test -e "${lang}/messages/${CATEGORY}/${PO_FILE}" ; then FOUND_LINGUAS="${FOUND_LINGUAS} ${lang}" cp "${lang}/messages/${CATEGORY}/${PO_FILE}" "${PO_DIR}/${lang}.po" FOUND_POFILES="${FOUND_POFILES} ${lang}.po" fi echo "done" done if test ! -e "templates/messages/${CATEGORY}/desktop_${CATEGORY}_kwave.pot" ; then checkout "" "templates" "messages" "${CATEGORY}" "desktop_${CATEGORY}_kwave.pot" fi if test ! -e "templates/messages/${CATEGORY}/kwave.appdata.pot" ; then checkout "" "templates" "messages" "${CATEGORY}" "kwave.appdata.pot" fi if test ! -e "templates/messages/${CATEGORY}/kwave.pot" ; then checkout "" "templates" "messages" "${CATEGORY}" "kwave.pot" fi # update all existing files in the repository svn update # remove po files that vanished from kde servers cd ${PO_DIR} for file in *.po ; do if ! [[ ${FOUND_POFILES} =~ ${file} ]] ; then rm -fv ${PO_DIR}/${file} fi done # generate all missing index.docbook files # or update the existing ones if necessary cd "${REPOSITORY}" for lang in ${FOUND_HANDBOOKS}; do if test -e "${lang}/docs/${CATEGORY}/kwave/*" ; then svn update "${lang}/docs/${CATEGORY}/kwave" else mkdir -p "${lang}/docs/${CATEGORY}/kwave" fi if ! test -e "${lang}/docs/${CATEGORY}/kwave/index.docbook" ; then echo -n "${lang}: creating missing index.docbook... " scripts/update_xml ${lang} ${CATEGORY} kwave > /dev/null echo "done" else if test "${lang}/docs/${CATEGORY}/kwave/index.docbook" -ot \ "${lang}/docmessages/${CATEGORY}/kwave.po" ; then echo -n "${lang}: index.docbook is out of date - updating... " checkout "" "${lang}/docmessages/language" scripts/update_xml ${lang} ${CATEGORY} kwave > /dev/null echo "done" fi fi done # install the files needed for the handbook for lang in ${FOUND_HANDBOOKS}; do rm -Rf "${DOC_DIR}/${lang}" if test -e "${lang}/docs/${CATEGORY}/kwave/index.docbook" ; then mkdir -p "${DOC_DIR}/${lang}" cp "${lang}/docs/${CATEGORY}/kwave/index.docbook" "${DOC_DIR}/${lang}/" cp "${DOC_DIR}/en/CMakeLists.txt" \ "${DOC_DIR}/${lang}/CMakeLists.txt" checkout "" "${lang}" "docs" "${CATEGORY}" "kwave" if [ ${result} == 1 ]; then svn update --quiet --set-depth infinity ${lang}/docs/${CATEGORY}/kwave mkdir -p "${DOC_DIR}/${lang}" cp -u "${lang}/docs/${CATEGORY}/kwave"/* "${DOC_DIR}/${lang}"/ fi fi done set +e svn status # show translation statistics ${CWD}/msgstats.pl ${CMAKE_SOURCE_DIR} ### EOF ###