3
# Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
5
# Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
7
# This program is free software; you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with this program; if not, write to the Free Software
19
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
# Additional permission under GNU GPL version 3 section 7:
23
# If you modify this program, or any covered work, by linking or
24
# combining it with the OpenSSL project's OpenSSL library (or a
25
# modified version of that library), containing parts covered by the
26
# terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
27
# grants you additional permission to convey the resulting work.
28
# Corresponding Source for a non-source form of such a combination
29
# shall include the source code for the parts of OpenSSL used as well
30
# as that of the covered work.
33
# Script to update sflphone translation
35
LAUNCHPAD_PO_ARCHIVE=launchpad-export.tar.gz
37
LAUNCHPAD_DIR=launchpad-import/sflphone
38
LAUNCHPAD_PATH=$PWD/$LAUNCHPAD_DIR
41
SFL_PO_PATH=$PWD/$SFL_PO_DIR
43
if [ ! -e ${LAUNCHPAD_PO_ARCHIVE} ]; then
44
echo "Error, "$LAUNCHPAD_PO_ARCHIVE" is required in current directory"
48
mkdir -p launchpad-import
50
tar -zxvf $LAUNCHPAD_PO_ARCHIVE -C launchpad-import
52
if [ ! -d ${LAUNCHPAD_PATH} ]; then
53
echo "Error, directory "$LAUNCHPAD_PATH" does not exist"
61
splitname=$(echo $filename | cut -d- -f2)
63
if [ -e $SFL_PO_PATH/$splitname ]; then
64
msgmerge --update $filename $SFL_PO_PATH/$splitname
66
cp $filename $SFL_PO_PATH/$splitname
72
# Cleanup once translation are updated
73
rm -rf launchpad-import
75
rm -rf sflphone-manual
76
rm -rf sflphone_usermanual