From e2c2c3a6e8c5034aeee9c1675d13df800e1964ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 17 Sep 2006 15:18:21 +0000 Subject: [PATCH] Cleanup nls() function. svn-id: @7767 --- rc.d/init.d/functions | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index ca23c907..c97bf5c0 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -236,7 +236,7 @@ nls() typeset msg_echo nls_domain text message msg_echo='\n' nls_domain="$NLS_DOMAIN" - while [ "$1" != "${1##-}" ] || [ "$1" != "${1##+}" ]; do + while [ "$1" != "${1##-}" ]; do case "$1" in --nls-domain) shift @@ -258,15 +258,11 @@ nls() 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") - printf "$text" "$@" - else - printf "$message" "$@" + if is_yes "$GETTEXT"; then + message=$(TEXTDOMAINDIR="/etc/sysconfig/locale" gettext -e --domain="${nls_domain:-rc-scripts}" "$message") fi + printf "$message" "$@" echo -en "$msg_echo" } -- 2.44.0