|
|
a4a055 |
#!/bin/bash
|
|
|
a4a055 |
#
|
|
|
a4a055 |
# prepare_updateLocales.sh -- This function creates/updates the
|
|
|
a4a055 |
# machine object (.mo) file gettext uses to output translated messages
|
|
|
a4a055 |
# when centos-art.sh script is running. Certainly, what this function
|
|
|
a4a055 |
# really does is a call to the locale functionality of centos-art.sh
|
|
|
a4a055 |
# script to realize and update action against itself.
|
|
|
a4a055 |
#
|
|
|
a4a055 |
# Copyright (C) 2009, 2010, 2011, 2012 The CentOS Project
|
|
|
a4a055 |
#
|
|
|
a4a055 |
# This program is free software; you can redistribute it and/or modify
|
|
|
a4a055 |
# it under the terms of the GNU General Public License as published by
|
|
|
a4a055 |
# the Free Software Foundation; either version 2 of the License, or (at
|
|
|
a4a055 |
# your option) any later version.
|
|
|
a4a055 |
#
|
|
|
a4a055 |
# This program is distributed in the hope that it will be useful, but
|
|
|
a4a055 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a4a055 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a4a055 |
# General Public License for more details.
|
|
|
a4a055 |
#
|
|
|
a4a055 |
# You should have received a copy of the GNU General Public License
|
|
|
a4a055 |
# along with this program; if not, write to the Free Software
|
|
|
a4a055 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
a4a055 |
#
|
|
|
a4a055 |
# ----------------------------------------------------------------------
|
|
|
3f86d0 |
# $Id$
|
|
|
a4a055 |
# ----------------------------------------------------------------------
|
|
|
a4a055 |
|
|
|
a4a055 |
function prepare_updateLocales {
|
|
|
a4a055 |
|
|
|
e4b01d |
# Realize localization tasks only when the current locale
|
|
|
e4b01d |
# information is different to English language. Otherwise
|
|
|
e4b01d |
# centos-art.sh would complain with an `English language cannot be
|
|
|
e4b01d |
# localized to itself' message. Avoid this noise in the
|
|
|
e4b01d |
# preparation stuff.
|
|
|
e4b01d |
if [[ ! ${CLI_LANG_LL} =~ '^en' ]];then
|
|
|
e4b01d |
${CLI_BASEDIR}/${CLI_NAME}.sh locale trunk/Scripts/Bash --update
|
|
|
e4b01d |
fi
|
|
|
a4a055 |
|
|
|
a4a055 |
}
|