Hi,

David Bertoni <[EMAIL PROTECTED]> wrote on 02/01/2008 12:37:36 PM:
> In newer versions of the ICU, the _entire_ path becomes the name of the
> resource.  You can see that if you take a look at the messages shared
> library using a hex editor.
>
> I think we need to modify the build process so we no longer use the full
> relative path in XalanMessages_1_10_en_US.lst, although I'm not sure of
> that.  At any rate, it needs some investigation, but I just don't have
time
> to do it right now.
>
> If you really need to get this fixed, I suggest you read the ICU user
guide
> to see if there's more information about naming resources.

I took your advice and I have it working on all my platforms now, although
there were some stumbling blocks along the way.  The first thing I tried
was to just generate all the resources in my local directory (
c/src/xalanc/Utils instead of c/nls/icu), but when I did that, it
complained that xalanMsg_en_US.res depends on the missing resource
xalanMsg_en.res.

If you look at this documentation (
http://icu-project.org/userguide/ResourceManagement.html), it says that ICU
tries to find the most specific available locale, like en_US, and then
proceeds to try more general locales if it fails.  In this case, if it
can't find American English, it would try general English (en) and
eventually the "root" locale.  Given that, it seems completely sensible to
me that the build system would complain that we don't provide it with the
general English or root .res files.  I wasn't able to figure out why it
complained when I tried to build in  c/src/xalanc/Utils (which I think is
proper behavior), but mysteriously succeeded when I built in c/nls/icu.  If
anyone can understand why this might be path-sensitive, please let me know.

To fix these problems, I altered MsgCreator.cpp so that, in addition to
accepting locales of the form <language>_<country> and <language>, it now
also accepts the locale "root".  Then, I changed
c/src/xalanc/Utils/Makefile.in so that it would build root.res from
XalanMsg_en_US.xlf (I thought US English would be an adequate default,
considering it's the only message catalog I had, and considering that we
didn't have any default before).

I also removed the leading "xalanMsg_", since
http://source.icu-project.org/repos/icu/icu/tags/release-3-6/readme.html#News
 seems to forbid it.  Again, I'm not sure how my builds managed to succeed
without that change.

If these changes sound reasonable, I can put a patch with my changes on
JIRA for review.

Ashley Zinyk
XSLT Development

Reply via email to