#!/bin/sh

# ispCP ω (OMEGA) a Virtual Hosting Control Panel
# Copyright (C) 2006-2010 by isp Control Panel - http://ispcp.net
#
# Version: $Id: updateToPOT 2774 2010-03-31 21:19:21Z nuxwin $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is "ispCP ω (OMEGA) a Virtual Hosting Control Panel".
#
# The Initial Developer of the Original Code is ispCP Team.
# Portions created by Initial Developer are Copyright (C) 2006-2010 by
# isp Control Panel. All Rights Reserved.
#
# The ispCP ω Home Page is:
#
#    http://isp-control.net
#

# description:
#
# updates/merges all language specific .po files with strings of the
# main file ispcp.pot
#

set -e

if [ ! -d language-files ]; then
	if [ ! -d ../../language-files ]; then
		echo 'Neither language-files nor ../../language-files are valid directories!'
		exit 1
	else
		cd ../../language-files/po
	fi
else
	cd language-files/po
fi


for i in *.po; do
	echo $i
	msgmerge -U $i ispCP.pot
done

exit 0
