Hi,

Thanks for your suggestion.
It works without any problems.

Ghee Teo wrote:
> Hi Fujiwara,
> 
> I just learnt that gksu do dispaly sensible message, if I chnage the
> script to
> 
> gksu -g -t "Print Manager" /usr/sbin/printmgr
> 
> It displays the message
> To run the program /usr/bin/printmgr you need to enter the root password.
> 
> which is more verbose than I had.
> 
> So I suggest you to change the scripts to:
> 
> #!/bin/bash
> 
> TEXTDOMAIN=control-center-2.0
> TEXTDOMAINDIR=/usr/share/locale
> 
> # SUN_BRANDING
> gksu -g -t $"Print Manager" /usr/sbin/printmgr
> 
> 
> will that work for you?
> 
> -Ghee
> 
> Takao Fujiwara - Tokyo S/W Center wrote:
> 
>>OK, now I'm looking at this because of another problems.
>>
>>  
>>
>>>msgid "<b>Please enter %s's password</b>"
>>>    
>>
>>It seems this message is disabled by a Sun patch.
>>
>>  
>>
>>>>>>>+gksu -g -t "Print Manager" -m "Enter root password:" /usr/sbin/printmgr
>>>>>>>            
>>>>>>
>>I noticed we can reuse the translation of "Print Manager" from 
>>/usr/share/applications/gnome-print-manager.desktop.
>>#!/bin/bash
>>
>>TEXTDOMAIN=control-center-2.0
>>TEXTDOMAINDIR=/usr/share/locale
>>
>># SUN_BRANDING
>>MESSAGE=`printf $"Please enter %s's password" root`
>>
>># SUN_BRANDING
>>gksu -g -t $"Print Manager" -m "$MESSAGE" /usr/sbin/printmgr
>>
>>But "Enter root password:" is a new string.
>>
>>The better way is to use the strings directly from pam?
>>At the moment, I'ld like to apply the following change.
>>
>>#!/bin/bash
>>
>>TEXTDOMAIN=control-center-2.0
>>TEXTDOMAINDIR=/usr/share/locale
>>
>># SUN_BRANDING
>>MESSAGE=`printf $"Please enter %s's password" root`
>>
>># SUN_BRANDING
>>gksu -g -t $"Print Manager" -m "$MESSAGE" /usr/sbin/printmgr
>>
>>Thanks,
>>fujiwara
>>
>>Takao Fujiwara - Tokyo S/W Center wrote:
>>  
>>
>>>Yes, it's one way to use a script. However gksu has the translation:
>>>
>>>#: ../gksu/gksu.c:906
>>>#, c-format
>>>msgid "<b>Please enter %s's password</b>"
>>>msgstr ""
>>>
>>>I hope we don't have the additional translations.
>>>For the title part, I think if we can hack gksu invokes printmgr.desktop 
>>>file instead of the command line likes a gnome-panel command tool.
>>>
>>>Thanks,
>>>fujiwara
>>>
>>>Laszlo (Laca) Peter wrote:
>>>
>>>    
>>>
>>>>On Thu, 2006-12-21 at 16:19 +0000, Ghee Teo wrote:
>>>>
>>>>
>>>>      
>>>>
>>>>>Laszlo (Laca) Peter wrote:
>>>>>
>>>>>
>>>>>        
>>>>>
>>>>>>Shouldn't this be localised?
>>>>>>
>>>>>>          
>>>>>
>>>>> Yes. Except that I don't know how what is the G11N framework is for 
>>>>>script like this.
>>>>>Damien has kindly pointed me to your install scripts
>>>>>http://reserv.ireland/viewvc/viewvc.cgi/install/
>>>>>
>>>>>install-jds and install-jds.po
>>>>>
>>>>>  But I still not sure what is the tool and framework there is to do 
>>>>>G11N for script,
>>>>>anyone from the G11N has recommentation or defined tools as such?
>>>>>        
>>>>
>>>>As Alan said, you can use /usr/bin/gettext.  It's pretty simple,
>>>>here's the "magic" part of the install-jds script:
>>>>
>>>>TEXTDOMAIN=install-jds
>>>>l10n_print () {
>>>>   l10n_msg=`TEXTDOMAINDIR="$MYDIR"/.install gettext -d "$TEXTDOMAIN" "$1"`
>>>>   shift
>>>>   printf "$l10n_msg\n" "$...@}"
>>>>}
>>>>
>>>>Your TEXTDOMAINDIR will be different, that's the directory you insatll
>>>>the .mo file to.  You will probably need set it to "$DATADIR/locale".
>>>>
>>>>Then you simply localize any messages by calling l10n_print, e.g.:
>>>>
>>>>title=`l10n_print "Print Manager"`
>>>>message=`l10n_print "Enter root password"`
>>>>
>>>>gksu -g -t "$title" -m "$message" /usr/sbin/printmgr
>>>>
>>>>The .po file is a template that lists all messages and empty 
>>>>translations.  You will then need to contact the l10n team
>>>>and ask them to provide translations.
>>>>
>>>>The .po file looks something like this:
>>>>
>>>># Message catalog for Ghee's printmgr wrapper script
>>>>#: wrapper-script:15
>>>>msgid "Print Manager"
>>>>msgstr ""
>>>>
>>>>#: wrapper-script:16
>>>>msgid "Enter root password"
>>>>msgstr ""
>>>>
>>>>
>>>>
>>>>      
>>>>
>>>>>Alternatively, the lazy man approach to do, change the line to
>>>>>gksu -g /usr/sbin/printmgr
>>>>>        
>>>>
>>>>Well, it's up to you.  But if you do the custom message thing, then
>>>>you need to make sure it's i18n'd otherwise you'll have to do it when
>>>>they start filing bugs.
>>>>
>>>>
>>>>
>>>>      
>>>>
>>>>>or create a C program that simply encapsulate the I18N works into it 
>>>>>which is
>>>>>really overkill.
>>>>>        
>>>>
>>>>It most certainly is (:
>>>>
>>>>Laca
>>>>
>>>>
>>>>
>>>>      
>>>>
>>>>>-Ghee
>>>>>
>>>>>
>>>>>        
>>>>>
>>>>>>Laca
>>>>>>
>>>>>>On Tue, 2006-12-19 at 14:09 +0000, Ghee Teo wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>          
>>>>>>
>>>>>>>+
>>>>>>>+gksu -g -t "Print Manager" -m "Enter root password:" /usr/sbin/printmgr 
>>>>>>>  
>>>>>>>            
>>>>>>
>>>>>>          
>>>>>
>>>    
>>
>>
>>  
> 
> 
> 



Reply via email to