Blame Automation/Modules/Locale/locale_updateMessages.sh

Alain Reguera Delgado 8f60cb
#!/bin/bash
Alain Reguera Delgado 8f60cb
#
Alain Reguera Delgado 52ee2e
#   locale_updateMessages.sh -- This function extracts translatable
Alain Reguera Delgado 52ee2e
#   strings from both XML-based files (using xml2po) and shell scripts
Alain Reguera Delgado 52ee2e
#   (using xgettext). Translatable strings are initially stored in
Alain Reguera Delgado 52ee2e
#   portable objects templates (.pot) which are later merged into
Alain Reguera Delgado 52ee2e
#   portable objects (.po) in order to be optionally converted as
Alain Reguera Delgado 52ee2e
#   machine objects (.mo).
Alain Reguera Delgado 52ee2e
#
Alain Reguera Delgado 52ee2e
#   Written by:
Alain Reguera Delgado 52ee2e
#   * Alain Reguera Delgado <al@centos.org.cu>
Alain Reguera Delgado 8f60cb
#
Alain Reguera Delgado 8f60cb
# Copyright (C) 2009-2013 The CentOS Project
Alain Reguera Delgado 8f60cb
#
Alain Reguera Delgado 8f60cb
# This program is free software; you can redistribute it and/or modify
Alain Reguera Delgado 8f60cb
# it under the terms of the GNU General Public License as published by
Alain Reguera Delgado 52ee2e
# the Free Software Foundation; either version 2 of the License, or
Alain Reguera Delgado 52ee2e
# (at your option) any later version.
Alain Reguera Delgado 8f60cb
#
Alain Reguera Delgado 8f60cb
# This program is distributed in the hope that it will be useful, but
Alain Reguera Delgado 8f60cb
# WITHOUT ANY WARRANTY; without even the implied warranty of
Alain Reguera Delgado 8f60cb
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Alain Reguera Delgado 8f60cb
# General Public License for more details.
Alain Reguera Delgado 8f60cb
#
Alain Reguera Delgado 8f60cb
# You should have received a copy of the GNU General Public License
Alain Reguera Delgado 8f60cb
# along with this program; if not, write to the Free Software
Alain Reguera Delgado 8f60cb
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Alain Reguera Delgado 8f60cb
#
Alain Reguera Delgado 52ee2e
######################################################################
Alain Reguera Delgado 8f60cb
Alain Reguera Delgado 8f60cb
function locale_updateMessages {
Alain Reguera Delgado 8f60cb
Alain Reguera Delgado 52ee2e
    case ${RENDER_TYPE} in
Alain Reguera Delgado 8f60cb
Alain Reguera Delgado 52ee2e
        'svg' )
Alain Reguera Delgado 52ee2e
            locale_convertSvgToPo
Alain Reguera Delgado 52ee2e
            ;;
Alain Reguera Delgado 8f60cb
Alain Reguera Delgado 52ee2e
        'asciidoc' )
Alain Reguera Delgado 52ee2e
            locale_convertAsciidocToPo
Alain Reguera Delgado 52ee2e
            ;;
Alain Reguera Delgado 8f60cb
Alain Reguera Delgado 52ee2e
        'sh' )
Alain Reguera Delgado 52ee2e
            locale_convertShellToPo
Alain Reguera Delgado 52ee2e
            ;;
Alain Reguera Delgado 8f60cb
Alain Reguera Delgado 52ee2e
        * )
Alain Reguera Delgado 52ee2e
            cli_printMessage "`gettext "Couldn't find a valid render-type."`" --as-error-line
Alain Reguera Delgado 52ee2e
            ;;
Alain Reguera Delgado 8f60cb
Alain Reguera Delgado 52ee2e
    esac
Alain Reguera Delgado 8f60cb
Alain Reguera Delgado 8f60cb
}