Skip to content
Browse files
Added script to create a .ts file for a new language
git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jan 8, 2008
1 parent 7c002cc commit 9535777ea1fecc36a54ae82cc3684bd5a300aa6a
Showing with 34 additions and 0 deletions.
  1. +34 −0 scripts/
@@ -0,0 +1,34 @@

if [ -z "$1" ] ; then
echo "Usage : $(basename $0) [Locale]"
echo "Examples :"
echo "$(basename $0) en_GB"
exit 0

# Create a new .ts file for a new translation in qgis
# 1. create a clean Qt .pro file for the project
# 2. run lupdate using the .pro file from step 1
# 3. remove the .pro
#,v 1.3 2004/07/14 18:16:24 gsherman Exp

#first tar the qt_xx.ts files in i18n folder such that lupdate does not
#merge the qgis strings to them
echo Creating qt_ts.tar
tar -cvf i18n/qt_ts.tar i18n/qt_*.ts
rm i18n/qt_*.ts
echo Creating qmake project file
$QTDIR/bin/qmake-4.3 -project -o
#add our new translation to the pro file
echo "Creating new translation entry for $1 in the pro file"
echo "TRANSLATIONS += i18n/qgis_${1}.ts" >>
echo Updating translation files
$QTDIR/bin/lupdate-4.3 -verbose
echo Removing qmake project file
echo Unpacking qt_ts.tar
tar -xvf i18n/qt_ts.tar

0 comments on commit 9535777

Please sign in to comment.