Fixed messages building and translations.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 6 years ago
parent 85278cadec
commit 64ebe0c13b
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -68,7 +68,7 @@ set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
add_subdirectory( src )
tde_conditional_add_subdirectory( BUILD_DOC doc )
#tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
##### write configure files #####################

@ -1,48 +1,17 @@
add_subdirectory( ar )
add_subdirectory( bg )
add_subdirectory( br )
add_subdirectory( bs )
add_subdirectory( ca )
add_subdirectory( ca@valencia )
add_subdirectory( cs )
add_subdirectory( cy )
add_subdirectory( da )
add_subdirectory( de )
add_subdirectory( el )
add_subdirectory( en_GB )
add_subdirectory( eo )
add_subdirectory( es )
add_subdirectory( et )
add_subdirectory( fi )
add_subdirectory( fr )
add_subdirectory( ga )
add_subdirectory( gl )
add_subdirectory( hr )
add_subdirectory( hu )
add_subdirectory( is )
add_subdirectory( it )
add_subdirectory( ja )
add_subdirectory( ka )
add_subdirectory( km )
add_subdirectory( lt )
add_subdirectory( lv )
add_subdirectory( ms )
add_subdirectory( nb )
add_subdirectory( nds )
add_subdirectory( nl )
add_subdirectory( nn )
add_subdirectory( pa )
add_subdirectory( pl )
add_subdirectory( pt )
add_subdirectory( pt_BR )
add_subdirectory( ro )
add_subdirectory( ru )
add_subdirectory( rw )
add_subdirectory( sk )
add_subdirectory( sv )
add_subdirectory( ta )
add_subdirectory( tr )
add_subdirectory( ug )
add_subdirectory( uk )
add_subdirectory( zh_CN )
add_subdirectory( zh_TW )
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} tdeio-gopher.po )
foreach( _po ${po_files} )
get_filename_component( _lang ${_po} PATH )
tde_create_translation( FILES ${_po} LANG ${_lang} )
endforeach( )

@ -1,2 +0,0 @@
#! /usr/bin/env bash
$XGETTEXT *.cpp -o $podir/tdeio_gopher.pot

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( ar ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( bg ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( br ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( bs ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( ca ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( ca@valencia ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( cs ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( cy ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( da ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( de ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( el ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( en_GB ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( eo ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( es ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( et ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( fi ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( fr ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( ga ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( gl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( hr ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( hu ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( is ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( it ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( ja ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( ka ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( km ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( lt ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( lv ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -0,0 +1,63 @@
#!/bin/sh
# Inspired by Makefile.common from coolo
# this script is used to update the .po files
# To update the translations, you will need a specific gettext
# patched for kde and a lot of patience, tenacity, luck, time ..
# I guess one should only update the .po files when all .cpp files
# are generated (after a make or scons)
#
SRCDIR=../src
TIPSDIR=$SRCDIR/appdata
TDEDIR=`tde-config --prefix`
EXTRACTRC=extractrc
KDEPOT=`tde-config --prefix`/include/tde/kde.pot
XGETTEXT="xgettext -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale -x $KDEPOT "
## check that kde.pot is available
if ! test -e $KDEPOT; then
echo "$KDEPOT does not exist, there may be something wrong with your installation!"
XGETTEXT="xgettext -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale "
fi
## extract the strings
echo "extracting the strings"
echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > $SRCDIR/_translatorinfo.cpp
## bad hack to get strings from *.ui files
# Armin Straub <linux@arminstraub.de>
UIC="uic -tr i18n"
TMPHACK="$SRCDIR/tmphack"
mkdir $TMPHACK || exit 1
for F in "$SRCDIR/"*.ui; do
echo ".. preparing $F"
FN=$TMPHACK/$(basename "$F")
$UIC "$F" > "$FN.h" && $UIC -impl "$FN.h" "$F" > "$FN.cpp"
done
tdeconfig_compiler -d $TMPHACK $SRCDIR/*.kcfg $SRCDIR/*.kcfgc
## bad hack to get strings from *.ui files
$XGETTEXT `find $SRCDIR -name "*.cpp"` -o tdeio_gopher.pot
## bad hack to get strings from *.ui files
rm -rf "$TMPHACK"
## bad hack to get strings from *.ui files
# remove the intermediate files
rm -f $SRCDIR/_translatorinfo.cpp
## now merge the .po files ..
echo "merging the .po files"
for i in `ls *.po`; do
msgmerge $i tdeio_gopher.pot -o $i || exit 1
done
## finished
echo "Done"

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( ms ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( nb ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( nds ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( nl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( nn ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( pa ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( pl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( pt ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( pt_BR ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( ro ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( ru ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( rw ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( sk ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( sv ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( ta ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( tr ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( ug ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( uk ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( zh_CN ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )

@ -1,2 +0,0 @@
file(GLOB _po_files *.po)
GETTEXT_PROCESS_PO_FILES( zh_TW ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )
Loading…
Cancel
Save