#!/bin/bash # Author: Miguel Gea Milvaques # Description: Install gettext data. # # # 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 2 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # library [ "$LLXCFG_DEV_LIB" ] || LLXCFG_DEV_LIB="/usr/share/lliurex/llxcfg-dev/llxcfg-dev.sh" [ -f "${LLXCFG_DEV_LIB}" ] || exit 1 . ${LLXCFG_DEV_LIB} [ "$LLXCFG_DEV_PO_LIB" ] || LLXCFG_DEV_PO_LIB="/usr/share/lliurex/llxcfg-dev/llxcfg-dev-gettext.sh" [ -f "${LLXCFG_DEV_PO_LIB}" ] || exit 1 . ${LLXCFG_DEV_PO_LIB} DOMAIN="$1" SRC="$2" [ -z "$SRC" ] && SRC="./" [ -z "$DOMAIN" ] && dl_exit_error "You must set the correct po domain" [ -e "debian/lliurex-po" ] && GETTEXT_DIR="$(cat debian/lliurex-po)" [ -n "$GETTEXT_DIR" ] || GETTEXT_DIR="lliurex-po/$DOMAIN" dl_getpot "$DOMAIN" "$SRC" "$GETTEXT_DIR" dl_potMD5SUM "${GETTEXT_DIR}/${DOMAIN}.pot" > "$GETTEXT_MD5_DIR/lliurex-po.gettextinfo" rm -f "debian/PLEASE.UPDATE.POT" echo "****************************************************************************" echo "* *" echo "* PLEASE, REMEMBER TO INFORM TO TRANSATIONS COORDINATOR *" echo "* *" echo "****************************************************************************"