Use kde architecture for po file

svn path=/trunk/playground/sysadmin/partitionmanager/; revision=864587
This commit is contained in:
Laurent Montel 2008-09-25 06:49:27 +00:00
parent f79970c4c5
commit 5f687f8b98
5 changed files with 0 additions and 5534 deletions

View File

@ -46,14 +46,12 @@ INCLUDE(MacroLibrary)
INCLUDE_DIRECTORIES(${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} src/)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(po)
MESSAGE(STATUS "KDE Partition Manager ${VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}")
ADD_CUSTOM_TARGET(src_tarball
COMMAND mkdir -p partitionmanager-${VERSION}
COMMAND cp -r cmake partitionmanager-${VERSION}
COMMAND cp -r po partitionmanager-${VERSION}
COMMAND cp -r src partitionmanager-${VERSION}
COMMAND cp CMakeLists.txt COPYING INSTALL README BUGS CHANGES partitionmanager-${VERSION}
COMMAND tar -hcj --exclude .svn -f partitionmanager-${VERSION}.tar.bz2 partitionmanager-${VERSION}

View File

@ -1,20 +0,0 @@
# Copyright (C) 2008 by Volker Lanz <vl@fidra.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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
FILE(GLOB PO_FILES *.po)
ADD_TRANSLATIONS(partitionmanager ${PO_FILES})

2966
po/de.po

File diff suppressed because it is too large Load Diff

View File

@ -1,49 +0,0 @@
#!/bin/sh
BASEDIR="../src/" # root of translatable sources
PROJECT="partitionmanager" # project name
BUGADDR="http://sourceforge.net/tracker/?group_id=50231&atid=459007" # MSGID-Bugs
WDIR=`pwd` # working dir
EXTRACTRC="/usr/lib/kde4/bin/extractrc" # path to KDE4 extractrc (the KDE3 version silently fails)
echo "Preparing rc files"
cd ${BASEDIR}
# we use simple sorting to make sure the lines do not jump around too much from system to system
find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > ${WDIR}/rcfiles.list
xargs --arg-file=${WDIR}/rcfiles.list ${EXTRACTRC} > ${WDIR}/rc.cpp
# additional string for KAboutData
echo 'i18nc("NAME OF TRANSLATORS","Your names");' >> ${WDIR}/rc.cpp
echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> ${WDIR}/rc.cpp
cd ${WDIR}
echo "Done preparing rc files"
echo "Extracting messages"
cd ${BASEDIR}
# see above on sorting
find . -name '*.cpp' -o -name '*.h' -o -name '*.c' | sort > ${WDIR}/infiles.list
echo "rc.cpp" >> ${WDIR}/infiles.list
cd ${WDIR}
xgettext --from-code=UTF-8 -C -kde -ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 \
-kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \
--msgid-bugs-address="${BUGADDR}" \
--files-from=infiles.list -D ${BASEDIR} -D ${WDIR} -o ${PROJECT}.pot || { echo "error while calling xgettext. aborting."; exit 1; }
echo "Done extracting messages"
echo "Merging translations"
catalogs=`find . -name '*.po'`
for cat in $catalogs; do
echo $cat
msgmerge -o $cat.new $cat ${PROJECT}.pot
mv $cat.new $cat
done
echo "Done merging translations"
echo "Cleaning up"
cd ${WDIR}
rm rcfiles.list
rm infiles.list
rm rc.cpp
echo "Done"

File diff suppressed because it is too large Load Diff