[GRASS5] i18n for tcltkgrass

Alex Shevlakov alex at asrv.fcpf.ru
Sat May 18 05:56:36 EDT 2002


Hi all,

a simple stub that does not require new configure options is:

if [catch {package require msgcat}] {
puts stderr "Packgage msgcat is not present - message translation disabled"
        proc G_msg {message} {
                return $message
        }
} else {
::msgcat::mcload [file join [file dirname [info script]] msgs]
        proc G_msg {message} {
                return [::msgcat::mc $message]
        }
}

I do not expect any potential problems here. The proposed changes (again):

gui.tcl: 
 the above header (without stderr comment) would be present and create_entry modified as:
label $path.label$n -anchor w -padx 2 -text [G_msg $description]

menu.tcl as:
set monitors_menu {
    [G_msg "Start"] "" { (...etc)

Thanks,

--alex


On Fri, May 17, 2002 at 02:09:16PM +0100, Glynn Clements wrote:
> 
> Alex Shevlakov wrote:
> 
> > I'd like to attempt making permanent changes to tcltk scripts
> > (especially, tcltkgrass) code in order to internationalize them. As
> > much as I know, there is a Tcl built-in 'msgcat' command allowing to
> > internationalize messages.
> 
> AFAICT, the msgcat package was added in Tcl 8.1; versions prior to
> that won't have it.
> 
> Personally, I don't think that it's reasonable to require 8.1+ in
> order to use tcltkgrass. Instead, any changes should be made in such a
> way that tcltkgrass continues to work with older versions of Tcl
> (albeit without I18N).
> 
> -- 
> Glynn Clements <glynn.clements at virgin.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20020518/aca48f41/attachment.bin


More information about the grass-dev mailing list