I tried it myself with Finnbarr's script:
The original script will print:
===== cut =====
./plain/msg.sh
Simple demonstration of  ksh93 message translation
Message locale is: en_US.UTF-8
Hello
Goodbye
Welcome David
This string is not translated because it is not in the message catalog
#####
===== cut =====

The compiled script will print:
===== cut =====
./compiled/msg.sh
#####
===== cut =====

This is very bad in 2 ways:
1. Localised $"..." string literals in compiled scripts should work
like in normal, uncompiled scripts. Otherwise the whole point of
localisation is void.
2. There is no output currently at all for compiled scripts, which is IMO a bug.

Olga

2010/7/28 ольга крыжановская <[email protected]>:
> Are $"..." strings replaced with the locale specific string at the
> time *shcomp* compiles them? Or do you want to say that the shell does
> an internal compile phase in which the strings are evaluated?
>
> Olga
>
> On Wed, Jul 28, 2010 at 10:20 PM, David Korn <[email protected]> wrote:
>> cc:  [email protected]  [email protected]          
>> [email protected]  [email protected]
>> Subject: Re: Re: Re: [ast-developers] Re: [ast-users] Write up on how to 
>> localize   shell scripts - Second Try
>> --------
>>
>>> Are $"..." strings handled the same as normal "..." literals when the
>>> script is compiled or is there a difference?
>>>
>>>
>>
>> They are replaced by the locale specific string and treated just
>> as if the were "..." strings after substitution.
>>
>>
>> If you want to have an error function, that can be called while
>> different locales are in effect, then
>>        function error_exit
>>        {
>>                eval printf '$"..."'  "$@"
>>        }
>> will delay the evaluation until the function is called.  However,
>> ksh -D will not add this string to the dictionary.
>>
>> David Korn
>> [email protected]
>>
>
>
>
> --
>      ,   _                                    _   ,
>     { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
> .----'-/`-/     [email protected]   \-`\-'----.
>  `'-..-| /       http://twitter.com/fleyta     \ |-..-'`
>      /\/\     Solaris/BSD//C/C++ programmer   /\/\
>      `--`                                      `--`
>



-- 
      ,   _                                    _   ,
     { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
.----'-/`-/     [email protected]   \-`\-'----.
 `'-..-| /       http://twitter.com/fleyta     \ |-..-'`
      /\/\     Solaris/BSD//C/C++ programmer   /\/\
      `--`                                      `--`

_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to