From 217226efe1f63f3b9383e22a6c2616a118d1e6de Mon Sep 17 00:00:00 2001 From: Pablo Saratxaga Date: Wed, 14 Feb 2001 17:22:34 +0000 Subject: i18n improvements --- urpmf | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'urpmf') diff --git a/urpmf b/urpmf index a2814311..12fa9f89 100755 --- a/urpmf +++ b/urpmf @@ -1,7 +1,15 @@ #!/bin/sh +# NOTE TO MANTAINERS: when you add a string that is displayed to +# the user use $ECHO not echo (that will use gettext if available) + +# i18n support +ECHO=`which gettext 2> /dev/null` +[ -z "$ECHO" ] && ECHO="echo" || ECHO="$ECHO -s" +TEXTDOMAIN="urpmi" + if [ "$#" -gt 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then - echo "usage: rpmf []" + $ECHO "usage: rpmf []" exit 1 fi @@ -11,7 +19,7 @@ dir="/var/lib/urpmi" if /bin/ls $dir/hdlist.* >/dev/null 2>/dev/null; then packdrake -c $dir/hdlist.* | parsehdlist --files --quiet - | grep -E "$1" else - echo "urpmi is not installed" + $ECHO "urpmi is not installed" exit 1 fi -- cgit v1.2.1