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: RE: [xliff] Plural forms and XLIFF


Andrew,
 
That, again, is a problem for the filter designer.
 
In XLIFF we provide a format for exchanging localization material. We don't need to define how text has to be extracted from every conceivable format and we also don't need to specify how to put the translations in the XLIFF file back in the original format.
 
Regards,
Rodolfo
--
Rodolfo M. Raya <RMRAYA@MAXPROGRAMS.COM>
Maxprograms http://www.maxprograms.com
 
 
-------- Original Message --------
Subject: Re: [xliff] Plural forms and XLIFF
From: Andrew Pimlott <andrew@spartanconsultinginc.com>
Date: Tue, January 10, 2012 5:49 pm
To: "Rodolfo M. Raya" <rmraya@maxprograms.com>
Cc: xliff@lists.oasis-open.org

On Tue, Jan 10, 2012 at 11:22 AM, Rodolfo M. Raya <rmraya@maxprograms.com> wrote:

Folder {0} contains no files.

Folder {0} contains one file.
Folder {0} contains {2,number,integer} files.
 
David, Rodolfo,

I don't think this approach actually works.  After these three segments are translated, you need to produce a single java properties resource that correctly encodes the three possibilities.  How would you do this?

source .properties file:

key2=Folder {0} contains {1,choice,0#no files|1#one file|1<{2,number,integer} files}.

-> source XLIFF -> translated XLIFF -> target .properties file:

key2=???

Andrew

On Tue, Jan 10, 2012 at 11:22 AM, Rodolfo M. Raya <rmraya@maxprograms.com> wrote:
Hi David,
 
Getting:
 
Folder {0} contains no files.
Folder {0} contains one file.
Folder {0} contains {2,number,integer} files.
 
from :
 
key2=Folder {0} contains {1,choice,0#no files|1#one file|1<{2,number,integer} files}.

is something that belongs to extraction tools domain, not to XLIFF 2.0 standard. A perfect filter for Java .properties files should be able to parse the _expression_ and generate three segments from  the given key.
 
The elements we have defined so far for XLIFF 2.0 can handle very well the representation of those 3 segments inside a <unit> element.
 
The specification for XLIFF 2.0 doesn’t need to cover handling plurals in Java .properties files. This is something that could be covered in a best practices document after XLIFF 2.0 is published.
 
Regards,
Rodolfo
--

Rodolfo M. Raya       rmraya@maxprograms.com
Maxprograms      
http://www.maxprograms.com
 
From: xliff@lists.oasis-open.org [mailto:xliff@lists.oasis-open.org] On Behalf Of David Walters
Sent: Tuesday, January 10, 2012 4:54 PM
To: Rodolfo M. Raya
Cc: xliff@lists.oasis-open.org

Subject: RE: [xliff] Plural forms and XLIFF
 
The "XLIFF 1.2 Representation Guide for Java Resource Bundles" (http://docs.oasis-open.org/xliff/v1.2/xliff-profile-java/xliff-profile-java-v1.2-cd02.html) has this PropertyResourceBundle example:

PRB:
key2=Folder {0} contains {1,choice,0#no files|1#one file|1<{2,number,integer} files}.

XLIFF (2 options):
<source>Folder <ph id="1">{0}</ph> contains <ph id="2">{1,choice,0#<sub>no files</sub>|
    1#<sub>one file</sub>|1&lt;<sub>{2,number,integer} files</sub>}</ph>.
</source>

<source>Folder <ph id="1">{0}</ph> contains
   <ph id="2">{1,choice,<sub>0#no files|1#one file|1&lt;{2,number,integer} files</sub>}</ph>.
</source>

I would expect that the proper way to translate this would be as 3 separate segments:
Folder {0} contains no files.
Folder {0} contains one file.
Folder {0} contains {2,number,integer} files.

Some languages would need a different number of segments to translate based on their CLDR "Language Plural Rules" (http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html).


In the 1st XLIFF example, the translator would basically be translating these words as separate segments, especially if the subflow text were defined as separate <trans-unit> elements.
Folder {0} contains
no files
one file
{2,number,integer} files
.

In the 2nd XLIFF example, I doubt that a translator would be technical enough to handle this subflow text since it is a mixture of code and text:   <sub>0#no files|1#one file|1&lt;{2,number,integer} files</sub>


Handling plural situations was important enough that Android XML created unique support (see http://developer.android.com/guide/topics/resources/string-resource.html#Plurals).  So XLIFF 2.0 should probably consider how plurals could be handled in the future.


David

Corporate Globalization Tool Development
EMail:  waltersd@us.ibm.com          
Phone: (507) 253-7278,   T/L:553-7278,   Fax: (507) 253-1721

CHKPII:                    http://w3-03.ibm.com/globalization/page/2011
TM file formats:     http://w3-03.ibm.com/globalization/page/2083
TM markups:         http://w3-03.ibm.com/globalization/page/2071


Inactive hide details for "Rodolfo M. Raya" ---01/10/2012 11:56:02 AM---Hi again, Plurals in Java .properties files can be ha"Rodolfo M. Raya" ---01/10/2012 11:56:02 AM---Hi again,   Plurals in Java .properties files can be handled via subflows. The proposed mechanism th

From: "Rodolfo M. Raya" <rmraya@maxprograms.com>
To: xliff@lists.oasis-open.org
Date: 01/10/2012 11:56 AM
Subject: RE: [xliff] Plural forms and XLIFF
Sent by: <xliff@lists.oasis-open.org>




Hi again,
 
Plurals in Java .properties files can be handled via subflows. The proposed mechanism that you included in the specification draft is fine for me.
Plurals in PO files are rare; files that use plural forms are a very small minority in a Linux distribution. They can be handled properly in XLIFF 1.2 and support for this feature has been implemented in XLIFF 1.2 based tools.
 
Linux developers have not opted for using XLIFF in their localization workflow. They still rely on PO and the myriad of free tools that handle PO, including plurals. I don't expect Linux localization workflow to be based on PO -> XLIFF 2.0 -> PO transformations.
 
IMHO, I would not include support for plural forms in XLIFF 2.0. Those that need it can keep using XLIFF 1.2.

Regards,

Rodolfo
--
Rodolfo M. Raya
Maxprograms
http://www.maxprograms.com
 
 
-------- Original Message --------
Subject: RE: [xliff] Plural forms and XLIFF
From: Yves Savourel <
ysavourel@enlaso.com>
Date: Tue, January 10, 2012 3:26 pm
To: <
xliff@lists.oasis-open.org>

Hi Rodolfo,

> The example you gave is not good for
> considering plural forms.

Yes, PO plural forms are different, but ChoiceFormat is about plural forms too (
http://docs.oracle.com/javase/tutorial/i18n/format/choiceFormat.html).
And, I agree, it is also about sub-flows.

The question the SC has is: How would one represent this and does the inline codes need more than the simple subflows attribute to handle it? (or should one even uses sub-flows in this case? Maybe that makes thing just more complicated than they need to be).

Cheers,
-ys


---------------------------------------------------------------------
To unsubscribe, e-mail:
xliff-unsubscribe@lists.oasis-open.org
For additional commands, e-mail:
xliff-help@lists.oasis-open.org
--------------------------------------------------------------------- To unsubscribe, e-mail: xliff-unsubscribe@lists.oasis-open.org For additional commands, e-mail: xliff-help@lists.oasis-open.org



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