|
|
47a39e |
#!/bin/bash
|
|
|
47a39e |
#
|
|
|
47a39e |
# locale_combineLicenseMessages.sh -- This function combines template
|
|
|
47a39e |
# messages with license messages.
|
|
|
47a39e |
#
|
|
|
e6bbbf |
# Copyright (C) 2009-2013 The CentOS Project
|
|
|
47a39e |
#
|
|
|
47a39e |
# This program is free software; you can redistribute it and/or modify
|
|
|
47a39e |
# it under the terms of the GNU General Public License as published by
|
|
|
47a39e |
# the Free Software Foundation; either version 2 of the License, or (at
|
|
|
47a39e |
# your option) any later version.
|
|
|
47a39e |
#
|
|
|
47a39e |
# This program is distributed in the hope that it will be useful, but
|
|
|
47a39e |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
47a39e |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
47a39e |
# General Public License for more details.
|
|
|
47a39e |
#
|
|
|
47a39e |
# You should have received a copy of the GNU General Public License
|
|
|
47a39e |
# along with this program; if not, write to the Free Software
|
|
|
47a39e |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
47a39e |
#
|
|
|
47a39e |
# ----------------------------------------------------------------------
|
|
|
47a39e |
# $Id$
|
|
|
47a39e |
# ----------------------------------------------------------------------
|
|
|
47a39e |
|
|
|
47a39e |
function locale_combineLicenseMessages {
|
|
|
47a39e |
|
|
|
47a39e |
if [[ $# -lt 1 ]];then
|
|
|
47a39e |
cli_printMessage "`gettext "One argument is required."`" --as-error-message
|
|
|
47a39e |
fi
|
|
|
47a39e |
|
|
|
27ae8e |
local TRANSLATION_INSTANCE=$1
|
|
|
27ae8e |
local TRANSLATION_TEMPLATE=$2
|
|
|
27ae8e |
|
|
|
27ae8e |
local DOCBOOK_LOCALES=$(echo $DOCBOOK_MODELS \
|
|
|
9d65db |
| sed -r "s!${TCAR_WORKDIR}/!${TCAR_WORKDIR}/Locales/!")
|
|
|
27ae8e |
|
|
|
47a39e |
# Define list of all files you want to combine.
|
|
|
9d65db |
local FILES="${DOCBOOK_LOCALES}/${CLI_LANG_LC}/messages.po \
|
|
|
9d65db |
${DOCBOOK_LOCALES}/${CLI_LANG_LC}/messages.po \
|
|
|
47a39e |
${TRANSLATION_TEMPLATE}"
|
|
|
47a39e |
|
|
|
47a39e |
# Be sure the files we want to combine do exist.
|
|
|
27ae8e |
cli_checkFiles -e ${FILES}
|
|
|
47a39e |
|
|
|
47a39e |
# Combine files.
|
|
|
47a39e |
msgcat --output=${TRANSLATION_INSTANCE} \
|
|
|
47a39e |
--width=70 --no-location --use-first ${FILES}
|
|
|
47a39e |
|
|
|
47a39e |
}
|