wesnoth-l10n-tools/compile

33 lines
1.2 KiB
Plaintext
Raw Normal View History

2008-09-18 13:36:37 +01:00
#!/bin/bash
# Compile translations
# Copyright (C) 2007-2008 Andrius Štikonas <stikonas@gmail.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, see <http://www.gnu.org/licenses/>.
2009-05-18 11:49:35 +01:00
source "`dirname $0`/variables"
2008-09-18 13:36:37 +01:00
2013-03-28 11:23:11 +00:00
for BRANCH in $BRANCHES; do
2008-11-11 09:57:24 +00:00
echo -e "Repository: $BLUE$BRANCH"$ENDCOLOR
2008-09-18 13:36:37 +01:00
if [ ! -e "$MDIR/$BRANCH" ]; then
mkdir -p "$MDIR/$BRANCH"
fi
2013-03-28 11:23:11 +00:00
for file in `ls $BRANCH`; do
2008-09-18 13:36:37 +01:00
echo "Compiling $file";
2013-03-28 11:23:11 +00:00
$MSGFMT "$BRANCH/$file" -o "$MDIR/$BRANCH/`echo wesnoth-$file | sed "s/."$LCODE".po/.mo/" | sed "s/wesnoth-wesnoth/wesnoth/"`"
2008-09-18 13:36:37 +01:00
done
rm "$MDIR/$BRANCH/wesnoth-manpages.mo" "$MDIR/$BRANCH/wesnoth-manual.mo"
2008-09-18 13:36:37 +01:00
done
2008-11-11 09:57:24 +00:00
echo -e $GREEN"Finished."$ENDCOLOR