On Wed, Jul 28, 2010 at 4:03 PM, Glenn Fowler <[email protected]> wrote:
>
> On Wed, 28 Jul 2010 15:16:48 +0200 I. Szczesniak wrote:
>> IMO both LC_MESSAGES and NLSPATH are required to be dynamic, if we
>> still assume that the localisation of a shell function and shell built
>> in commands like cut, paste should be able to behave like an external
>> command. As example:
>> ----------------------------------------
>> unset LC_ALL LANG LC_MESSAGES
>
>> function printhello
>> {
>> print $"hello"
>> }
>
>> LC_MESSAGES=fr_FR.utf-8 printhello
>> LC_MESSAGES=C printhello
>> LC_MESSAGES=ja_JP.utf-8 printhello
>> ----------------------------------------
>
> and this is the case in ksh+ast
> with the exception that NLSPATH changes will not affect
> message catalogs already located by the current process
> e.g., for
>
> NLSPATH=foo
> LC_MESSAGES=fr_FR.utf-8 printhello
> LC_MESSAGES=C printhello
> NLSPATH=bar
> LC_MESSAGES=fr_FR.utf-8 printhello
> LC_MESSAGES=ja_JP.utf-8 printhello
>
> the second printhello will use the same message catalog as the first
> even if the NLSPATH change would have located a different catalog
> but the last printhello will check NLSPATH=bar for its catalog
I'm not sure how to handle scripts because $"string" is not part of
POSIX, but for ksh builtin commands it is IMO *required* that they
behave like external commands and recognize if NLSPATH is changed
like:
builtin cat
NLSPATH=/path/path2/wc1.cat:$NLSPATH cat thisfileisnothere
NLSPATH=/path/path2/wc2.cat:$NLSPATH cat thisfileisnothere
cat called in the 2nd line should use /path/path2/wc1.cat as message
catalog and cat in the 3rd line should use /path/path2/wc2.cat as
message catalog, assuming the ksh builtins should conform to POSIX.
Chris
--
^---^
(@)v(@) Chris Pickett
| / IT consultant
===m==m=== [email protected]
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers