OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

xliff message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Fwd: Java Property Resource Bundles

Hi All,

The following thread addresses Java Property Resource Bundles in XLIFF.
It discusses list resource bundles only obliquely. Anny comments?



J o h n  R e i d

Localization Tools
Novell, Inc.


801/861-3855        ( Voice)
801/861-2754        ( Fax )

>>> John Reid 3/11/04 7:22:42 PM >>>
Hi Tony & Justin,

I haven't had a chance to really address the issues involved with Java
ResourceBundles. My initial impression is that the handling of
PropertyResourceBundles can be rather simple since the properties file
is a key-value table much like the StringTable of the Win32 Resource
format. Following that work:

-Each properties file is a separate <file>
-The datatype of <file> is "javapropertyresourcebundle". 
-The <body> contains the <trans-unit>
-A <trans-unit> is created for each key-value pair.
-The <trans-unit> id attribute value is serially assigned according the
retreival order to maintain consistency and uniqueness of the trans-unit
id attribute value. 
-The key of the property becomes the resname attribute value of the
-The translate attribute value of null strings is 'no' in the
-The value string becomes the content of the child source element. 

In addition, I propose the following:

-MessageFormat replaceables are masked with inline element <ph> with
consecutive ids.

Using MessageBundle_en_US.properties from Sun as the example, the
properties file contains the following key-value pairs:

template = At {2,time,short} on {2,date,long}, we detected \
	      {1,number,integer} spaceships on the planet {0}.
planet = Mars

The resulting MessageBundle_en_US.properties.xlf would be as follows.

<?xml version="1.0"?>
<xliff version='1.1'
 <file source-language="en_US" datatype="javapropertyresourcebundle"
   <trans-unit id="1" restype="string" resname="template" >
    <source>At <ph id="1">{2,time,short}</ph> on <ph
id="2">{2,date,long}</ph>, we detected <ph
id="3">{1,number,integer}</ph> spaceships on the planet <ph
   <trans-unit id="1" restype="string" resname="planet" >

Unfortunately, unless we know that the contents of the curly braces
(e.g. {1,number,integer})  is a message format, we can only present it
as part of the string using Sun's notation. We could assume that any
text contained within curly braces within a value is a replaceable value
but then valid uses of the curly braces in text would be mismarked. (To
know the purpose of the curly-brace-enclosed message format, we would
need to read through the ResourceBundle code. This somewhat negates the
advantages gained by the properties file. This is further exacerbated by
their proposal for handling plurals, which definitely requires reading
both files.) By only masking the the message format string, that string
is still available for translation. If the ResourceBundle file is read
and the string is a MessageFormat, a translate="no" attribute can be
added to the <ph> element. We may even want to make that default
behavior, which would force that attribute to be unset when the string
is mismarked.

What do you think?


J o h n  R e i d

Localization Tools
Novell, Inc.


801/861-3855        ( Voice)
801/861-2754        ( Fax )

>>> Tony Jewtushenko <Tony.Jewtushenko@oracle.com> 3/9/04 8:23:59 AM
Hi John:

I wonder if you could help with Justin's query.  I am presently working

on the ResourceBundle profile,  but haven't addressed this matter yet. 

Can you please copy me on reply,  so I can add it to the profile.   If

you haven't dealt with this yet,   I'll foward to the XLIFF TC and see

if anyone has any good suggestions.


Justin Erik Tilton wrote:

>In our prior correspondence you mentioned an XLIFF guidelines doc for
>java resource bundles. I was wondering if I could take a look at it?
>particular, I am looking for a recommendation for handling
>generated compound messages. Sun describes how this is done in java

>I'm looking for a best practice for translatable units that are
>"compound messages" in our XSLT skeleton files - using XLIFF as an
>external translation memory.
>When we first spoke months ago, we were developing a build time
>using a skeleton XSLT to generate XLIFF files for each locale then
>the XLIFF and XSLT skeleton to generate localized XSLT files (all due
>performance concerns). Now we have a caching solution that will allow
>to do run-time generation - so I am leaning toward John Reid's
>using variables in the XSLT with cooresponding IDs in the XLIFF. I
>wondering if you thought John would be the best resource to ask about
>compound message technique or if you might have another contact that
>could help me with this?
>I had a hard drive crash a couple of months ago, and lost my contact
>list, so if you would pass my email address along to John or anyone
>for assistance it would be most appreciated...
>Thank you,
>On Fri, 2004-02-13 at 10:08, Tony Jewtushenko wrote:
>>Hi Justin: 
>>I'm glad my email response was of use to you.  And thanks for the
>>explanation - it's good to know you're not rejecting XLIFF due to
>>technical problems.  Hopefully we can help you implement an XLIFF
>>solution during the short window of opportunity.
>>Regarding the resource guides - they are in "draft" form only at
>>point,  but you're welcome to review the work in progress and
>>comments or questions.  The two guides that you might find useful
>>Windows 32:
>>HTML: :
>>I have some very very informal information on representing java
>>resource bundles - let me know if this is of interest to you now, 
>>however  a draft will be published in the next couple of weeks if
>>can hold on 'til then.
>>You can send queries and comments on these guides to the TC comment
>>mailing list - xliff-comment@lists.oasis-open.org 
>>Justin Erik Tilton wrote:
>>>Thank you very much for the detailed information. I am very pleased
>>>hear the progress and get caught up on the latest information.
>>>Let me explain my earlier statement. I developed an i18n proof of
>>>concept for the uPortal project last year using XLIFF, but due to
>>>another pressing project and delays in the framework code, did not
>>>time to push it into the project. In the meantime, developers were
>>>working on the framework, fixing some unicode issues and building
>>>methods to prioritize and select localizations etc. To test their
>>>they began using java resource bundles and have I short window of
>>>opportunity to reiterate/demonstrate the power of XLIFF as a
>>>replacement. I am doing this now. 
>>>Are any of your resource guides available at this time? I would be
>>>interested to see what is emerging as "best practice".
>>>Take care,
>>>On Fri, 2004-02-13 at 05:28, Tony Jewtushenko wrote:
>>>>Hi Justin:
>>>>We released XLIFF 1.1 back in May 2003,  and successfully completed
>>>>peer review in October 2003.  Our present focus for the near term
>>>>months) is to author non-normative "representation guides" for how
>>>>transform standard resources types (HTML,  Windows,  etc) to XLIFF.
>>>>We'll be submitting XLIFF 1.1 to formal OASIS standards review only

>>>>after we've completed that work.
>>>>According to the rules of OASIS,   once a technical committee has 
>>>>completed its stated deliverables as per its charter,  it must
>>>>"refine" its charter,  or shut itself down - possibly resuming at a

>>>>future date.  So the "placing the TC in holding pattern" agenda
item on 
>>>>our annual Dec 2003 Face to Face meeting was an option between
these two 
>>>>polar extremes.  The "holding pattern" meant that we would not
>>>>the TC or extend the charter,  but rather agree to a rota for
>>>>the mailing lists,  and schedule regular meetings only on a
>>>>basis,  and meet more frequently if necessary.  We presently meet 
>>>>monthly.  Ultimately we decided that we have plenty of work to keep
>>>>busy for the next 6 months,  so no changes will be made for at
>>>>that amount of time.  We also agreed not to start working on an
>>>>2.0 (or 1.2) until 1.1 has had a reasonable period of time to be 
>>>>understood and implemented throughout the industry.  Bugs will of
>>>>be addressed immediately.
>>>>As to adoption of  XLIFF,  there have been announcements from 2
>>>>tools vendors (Alchemy Software's Catalyst,  and PASS Engineering's

>>>>Passolo) that they now provide support visual XLIFF editing.  
>>>>World Server has announced support in their next version.  The
>>>>leading tool developer (can't divulge the name yet) is in
>>>>with our TC on implementation of XLIFF,  as well as joining the TC.
>>>>TC membership has been stable and in fact is growing (XML INTL, 
>>>>PASS Engineering have joined).  Industry-wide,  XLIFF is clearly
>>>>from early adopter to the mainstream adoption phase.
>>>>I'm somewhat concerned by your statement that uPortal is
"revisiting our 
>>>>use of XLIFF for i18n purposes" - does this mean you're not
>>>>with some aspect of XLIFF,  or is this just part of your normal
>>>>process?  If you've got problems with XLIFF,   I'm sure members of
>>>>TC would be happy to provide direct support to your efforts.  
Could you 
>>>>please expand on your statement?
>>>>Justin Erik Tilton wrote:
>>>>>Justin Tilton here - from the uPortal project. We are revisiting
our use
>>>>>of XLIFF for i18n purposes, and I was wondering if you could give
me a
>>>>>brief update on the status. I noticed from your December agenda
that one
>>>>>of the items was "Place TC in holding pattern"... What should I
make of
>>>>>this :)
>>>>>Take care,
>>Tony Jewtushenko		mailto:tony.jewtushenko@oracle.com 
>>Principal Product Manager	direct tel: +353.1.8039080
>>Oracle Corporation, Ireland

Tony Jewtushenko		mailto:tony.jewtushenko@oracle.com 
Principal Product Manager	direct tel: +353.1.8039080
Oracle Corporation, Ireland

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]