Commit cd0358fb authored by Alexandre Savard's avatar Alexandre Savard

#11210: add script to update translation, remove po files that are no longer used

parent 50c85ffd
#!/bin/bash
#
# Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
#
# Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
#
# 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 3 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Additional permission under GNU GPL version 3 section 7:
#
# If you modify this program, or any covered work, by linking or
# combining it with the OpenSSL project's OpenSSL library (or a
# modified version of that library), containing parts covered by the
# terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
# grants you additional permission to convey the resulting work.
# Corresponding Source for a non-source form of such a combination
# shall include the source code for the parts of OpenSSL used as well
# as that of the covered work.
#
# Script to update sflphone translation
LAUNCHPAD_PO_ARCHIVE=launchpad-export.tar.gz
LAUNCHPAD_DIR=launchpad-import/sflphone
LAUNCHPAD_PATH=$PWD/$LAUNCHPAD_DIR
SFL_PO_DIR=.
SFL_PO_PATH=$PWD/$SFL_PO_DIR
if [ ! -e ${LAUNCHPAD_PO_ARCHIVE} ]; then
echo "Error, "$LAUNCHPAD_PO_ARCHIVE" is required in current directory"
exit
fi
tar -zxvf $LAUNCHPAD_PO_ARCHIVE
if [ ! -d ${LAUNCHPAD_PATH} ]; then
echo "Error, directory "$LAUNCHPAD_PATH" does not exist"
exit
fi
pushd $LAUNCHPAD_PATH
for filename in $(ls)
do
splitname=$(echo $filename | cut -d- -f2)
if [ -e $SFL_PO_PATH/$splitname ]; then
msgmerge --update $filename $SFL_PO_PATH/$splitname
else
cp $filename $SFL_PO_PATH/$splitname
fi
done
popd
# Cleanup once translation are updated
rm -rf launchpad-import
rm -rf sflphone
rm -rf sflphone-manual
rm -rf sflphone_usermanual
#!/bin/bash
#
# Script used by Hudson continious integration server to build SFLphone
# Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
#
# Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
#
# 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 3 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
# Additional permission under GNU GPL version 3 section 7:
#
# If you modify this program, or any covered work, by linking or
# combining it with the OpenSSL project's OpenSSL library (or a
# modified version of that library), containing parts covered by the
# terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
# grants you additional permission to convey the resulting work.
# Corresponding Source for a non-source form of such a combination
# shall include the source code for the parts of OpenSSL used as well
# as that of the covered work.
#
# Script used by Hudson continious integration server to build SFLphone
XML_RESULTS="cppunitresults.xml"
TEST=0
......
If you need to update the translations files :
First, compile the KDE client in order to update generated c++ files (from ui files, etc).
For more details about how to compile KDE client, see the README file in sflphone-client-kde folder.
Then just execute:
./update.sh
in the current directory.
Now that the global po files are updated, you can copy them in both Gnome and KDE clients using :
./copy-in-gnome.sh
and
./copy-in-kde.sh
This will replace the po files in clients with those in lang folder.
ALL CHANGES MADE DIRECTLY IN PO FILES IN THE CLIENTS FOLDERS WILL BE LOST!
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
for i in *.po
do
locale=`echo $i | cut -d. -f1`
cp -v $i ../kde/po/$locale/sflphone-client-kde.po
done
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
# Parse the GNOME client only to build the langage template
xgettext --from-code=utf-8 --language=C -k_ -kN_ -kc_:1c,2 -kn_:1,2 -ktr2i18n -ktr2i18n:2c,1 -kki18nc:1c,2 -kki18n -ki18n -ki18nc:1c,2 -o sflphone.pot `find ../gnome/src -name \*.c`
# Merge template into the existing po files
for file in *.po
do
msgmerge --update $file sflphone.pot
done
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment