[pacman-dev] [PATCH] makepkg : localize the Y/n part of the question.

Xavier shiningxc at gmail.com
Fri Jul 18 02:38:43 EDT 2008


Xavier Chantry wrote:
> pacman already localizes the yesno stuff, so doing the same in makepkg is
> more consistent.
> 
> Signed-off-by: Xavier Chantry <shiningxc at gmail.com>
> ---
>  scripts/makepkg.sh.in |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index b810d60..4192af8 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -1211,10 +1211,11 @@ if [ "$CLEANCACHE" = "1" ]; then
>  	#fix flyspray feature request #5223
>  	if [ -n "$SRCDEST" -a "$SRCDEST" != "$startdir" ]; then
>  		msg "$(gettext "Cleaning up ALL files from %s.")" "$SRCDEST"
> -		echo -n "$(gettext "    Are you sure you wish to do this? [Y/n] ")"
> +		echo -n "$(gettext "    Are you sure you wish to do this? ")"
> +		echo -n "$(gettext "[Y/n]")"
>  		read answer
> -		answer=$(echo $answer | tr '[:upper:]' '[:lower:]')
> -		if [ "$answer" = "yes" -o "$answer" = "y" ]; then
> +		answer=$(echo $answer | tr '[:lower:]' '[:upper:]')
> +		if [ "$answer" = $(gettext "YES") -o "$answer" = $(gettext "Y") ]; then
>  			rm "$SRCDEST"/*
>  			if [ $? -ne 0 ]; then
>  				error "$(gettext "Problem removing files; you may not have correct permissions in %s")" "$SRCDEST"

This patch is untested and can only be applied after 3.2 anyway since it 
  breaks a gettext string.




More information about the pacman-dev mailing list