# National language support function
nls()
{
- typeset msg_echo old_nls_domain text message
+ typeset msg_echo nls_domain text message
msg_echo='\n'
- old_nls_domain="$NLS_DOMAIN"
- # parse command line
- # don't use -o instead || here - this will break ksh --misiek
+ nls_domain="$NLS_DOMAIN"
while [ "$1" != "${1##-}" ] || [ "$1" != "${1##+}" ]; do
case "$1" in
--nls-domain)
shift
- NLS_DOMAIN="$1"
+ nls_domain="$1"
shift
;;
-n)
done
message="$1"
shift
+
# empty message, so we return --misiek
if [ -z "$message" ]; then
- NLS_DOMAIN="$old_nls_domain"
echo -en "$msg_echo"
return
fi
if is_yes "$FASTRC"; then
printf "$message" "$@"
elif is_yes "$GETTEXT"; then
- text=$(TEXTDOMAINDIR="/etc/sysconfig/locale" gettext -e --domain="${NLS_DOMAIN:-rc-scripts}" "$message")
+ text=$(TEXTDOMAINDIR="/etc/sysconfig/locale" gettext -e --domain="${nls_domain:-rc-scripts}" "$message")
printf "$text" "$@"
else
printf "$message" "$@"
fi
echo -en "$msg_echo"
- NLS_DOMAIN="$old_nls_domain"
}
rc_splash()