[ksh93-integration-discuss] Re: Re: Re: [ast-users] ksh93 shellscript localisation
Glenn Fowler
gsf at research.att.com
Mon Nov 13 06:01:40 PST 2006
I started a reply to the l10n mail
here's how far I got
I didn't see in the ksh src where the catalog is set to the script name
---
all of the ast hooks to the underlying message catalogs are through
the ast optget() and error() functions
these mechanisms are consistent between ast standalone utilities
and ksh93 scripts
e.g., for any ast utility that uses optget() (all ast utilities)
or ksh script that uses getopts (a recommened script practice)
this generates the getopts(1)/optget(3) usage string that may
be used interchangeably between getopts(1)/optget(3):
foo '--??usage 2>&1' | fmt -o
(the ast fmt with the -o option for format option usage strings)
the current message catalog is named by
char* error_info.catalog
and is initialized in the getopts(1)/optget(3) usage string
[--catalog?THE_NAME_OF_THE_CATALOG]
ksh handles pushing/popping script/builtin error_info contexts
the locale and message catalog are global utility/script properties
this follows the current standard locale api which is also process global
when handle-based locale apis become standardized and widespread
this global property can be revisited
More information about the ksh93-integration-discuss
mailing list