Wendy, Finbarr, the *prototype* patch below should fix the basic
problem. Can you confirm that this creates the right output? If it
matches what you need I make a better patch which moves the creation
of the message path - i.e. "<script name>:libshell" into the shell
init phase.
===== cut =====
Index: common/sh/lex.c
===================================================================
--- common/sh/lex.c (revision 2000)
+++ common/sh/lex.c (working copy)
@@ -2034,6 +2034,8 @@
return(sp);
}
+#include "path.h"
+
/*
* Assumes that current word is unfrozen on top of the stak
* If <mode> is zero, gets rid of quoting and consider argument as string
@@ -2135,7 +2137,9 @@
}
*--dp = 0;
#if ERROR_VERSION >= 20000317L
- msg =
ERROR_translate(0,error_info.id,0,ep);
+ char lbuff[PATH_MAX];
+ sprintf(lbuff, "%s:%s",
path_basename(shp->st.dolv[0]), error_info.id);
+ msg = ERROR_translate(0,lbuff,0,ep);
#else
# if ERROR_VERSION >= 20000101L
msg = ERROR_translate(error_info.id,ep);
===== cut =====
Olga
2010/5/3 ольга крыжановская <[email protected]>:
> David, the problem is the name of the catalog. Instead of using the
> script name it always uses 'libshell' as the catalog name.
> I try to make a patch soon.
>
> Olga
>
> On Wed, Aug 12, 2009 at 4:44 PM, David Korn <[email protected]> wrote:
>> cc: [email protected]
>> Subject: Re: Re: [ast-developers] Seeking help with $"string", ksh -D,
>> gencat and NLSPATH
>> --------
>>
>>> On 06/07/2009, Wendy Lin <[email protected]> wrote:
>>> > On 22/05/2009, Finnbarr Murphy <[email protected]> wrote:
>>> > > In short, as far as I can see, ksh93 does not appear to support
>>> > localized
>>> > > message strings at present.
>>> >
>>> >
>>> > Can this be fixed for the next release, please?
>>
>>> After reading your blog at
>>> http://blog.fpmurphy.com/2009/05/ksh93-message-localization.html I
>>> feel very disappointed about ksh.
>>> If bash 4.0 would support fp math we would immediately migrate to it
>>> because it has the message localisation working.
>>>
>>
>>
>> ksh93 does support localized messages strings in scripts.
>>
>> Any string within a script that needs to be localized has to be
>> written as
>> $"string"
>> In the C or POSIX locale this will be treated as "string".
>>
>> If you run
>> ksh -D script
>> it will generate the list of strings that need localization.
>>
>> These can be put into a catalog for the C local.
>>
>> The catalogs for each locale can be created.
>>
>> David Korn
>> [email protected]
>> _______________________________________________
>> ast-developers mailing list
>> [email protected]
>> https://mailman.research.att.com/mailman/listinfo/ast-developers
>>
>
>
>
> --
> , _ _ ,
> { \/`o;====- Olga Kryzhanovska -====;o`\/ }
> .----'-/`-/ [email protected] \-`\-'----.
> `'-..-| / Solaris/BSD//C/C++ programmer \ |-..-'`
> /\/\ /\/\
> `--` `--`
>
--
, _ _ ,
{ \/`o;====- Olga Kryzhanovska -====;o`\/ }
.----'-/`-/ [email protected] \-`\-'----.
`'-..-| / Solaris/BSD//C/C++ programmer \ |-..-'`
/\/\ /\/\
`--` `--`
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users