summaryrefslogtreecommitdiffstats
path: root/po
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 19:32:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 19:32:49 +0000
commit2e77c0b4ce1781d87a532022d8ebaccff0fb2b17 (patch)
tree26280a750b189b6bc989565eed26a256bb8fd9bb /po
downloadkstreamripper-2e77c0b4ce1781d87a532022d8ebaccff0fb2b17.tar.gz
kstreamripper-2e77c0b4ce1781d87a532022d8ebaccff0fb2b17.zip
Added kstreamripper
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kstreamripper@1239912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'po')
-rw-r--r--po/SConscript24
-rwxr-xr-xpo/messages.sh60
2 files changed, 84 insertions, 0 deletions
diff --git a/po/SConscript b/po/SConscript
new file mode 100644
index 0000000..0362e0a
--- /dev/null
+++ b/po/SConscript
@@ -0,0 +1,24 @@
+## This script demonstrates to build and install
+## a simple kde program having KconfigXT settings
+## with scons
+##
+## Thomas Nagy, 2004, 2005
+
+## This file can be reused freely for any project (see COPYING)
+
+
+## First load the environment set in the top-level SConstruct file
+#Import( "env KDElang" )
+Import('env')
+myenv=env.Copy()
+
+## Make translations for the program "test1" in french (requires fr.po)
+myenv['APPNAME'] = "kstreamripper"
+#KDElang( ['fr'], myenv )
+
+## NOTE1 :
+# KDElang( ['fr','de','nl','pl'], myenv )
+
+## NOTE2 :
+## updating the translation files must be done manually
+## for the moment, using the messages.sh script
diff --git a/po/messages.sh b/po/messages.sh
new file mode 100755
index 0000000..a36f5c9
--- /dev/null
+++ b/po/messages.sh
@@ -0,0 +1,60 @@
+#!/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)
+
+# If you have a better way to do this, do not keep that info
+# for yourself and help me to improve this script, thanks
+# (tnagyemail-mail tat yahoo d0tt fr)
+
+SRCDIR=../test1-kconfigxt # srcdir is the directory containing the source code
+TIPSDIR=$SRCDIR # tipsdir is the directory containing the tips
+
+KDEDIR=`kde-config --prefix`
+EXTRACTRC=extractrc
+KDEPOT=`kde-config --prefix`/include/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 is something wrong with your installation!"
+ XGETTEXT="xgettext -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale "
+fi
+
+> rc.cpp
+
+## extract the strings
+echo "extracting the strings"
+
+# process the .ui and .rc files
+$EXTRACTRC `find $SRCDIR -iname *.rc` >> rc.cpp
+$EXTRACTRC `find $SRCDIR -iname *.ui` >> rc.cpp
+echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > $SRCDIR/_translatorinfo.cpp
+
+# process the tips - $SRCDIR is supposed to be where the tips are living
+pushd $TIPSDIR; preparetips >tips.cpp; popd
+
+$XGETTEXT `find $SRCDIR -name "*.cpp"` -o kdissert.pot
+
+# remove the intermediate files
+rm -f $TIPSDIR/tips.cpp
+rm -f rc.cpp
+rm -f $SRCDIR/_translatorinfo.cpp
+
+## now merge the .po files ..
+echo "merging the .po files"
+
+for i in `ls *.po`; do
+ msgmerge $i kdissert.pot -o $i || exit 1
+done
+
+## finished
+echo "Done"
+