FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 07-18-2008, 06:47 AM
Allan McRae
 
Default makepkg : localize the Y/n part of the question.

Xavier wrote:
> Xavier Chantry wrote:
>
>> pacman already localizes the yesno stuff, so doing the same in makepkg is
>> more consistent.
>>
>> Signed-off-by: Xavier Chantry <shiningxc@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
>>

Doesn't the $(gettext "blah") need to be in quotes?


>> 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.
>
> _______________________________________________
> pacman-dev mailing list
> pacman-dev@archlinux.org
> http://archlinux.org/mailman/listinfo/pacman-dev
>
>
>




_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 07-18-2008, 06:53 AM
Xavier
 
Default makepkg : localize the Y/n part of the question.

Allan McRae wrote:
> Xavier wrote:
>> Xavier Chantry wrote:
>>
>>> pacman already localizes the yesno stuff, so doing the same in makepkg is
>>> more consistent.
>>>
>>> Signed-off-by: Xavier Chantry <shiningxc@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
>>>
>
> Doesn't the $(gettext "blah") need to be in quotes?
>
>


I have to admit I didn't even pay attention to that.
But in this case, it shouldn't be needed, at least for every languages
which translate yes and y in one word.
But just for safety and consistency, I should have put quotes there.

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 07:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org