Thanks Adrian. Have provided a patch for this as
https://issues.apache.org/jira/browse/OFBIZ-4723

While working on this, I noticed
org.ofbiz.webtools.labelmanager.LabelManagerFactory.java
and org.ofbiz.webtools.labelmanager.LabelReferences.java have hard-coded
references to the shark component. This doesn't seem appropriate,
especially for an optional component.

Cheers,
Anne.

On 29 February 2012 19:54, Adrian Crum
<[email protected]>wrote:

> I would recommend that we support both versions of the xml:lang attribute.
> The UtilProperties class and the Label Manager application can be updated
> to read either version and write the correct version.
>
> That way we will have an upgrade path without breaking backward
> compatibility.
>
> -Adrian
>
>
> On 2/29/2012 4:17 AM, Anne wrote:
>
>> The schema at framework/base/dtd/ofbiz-**properties.xsd is intended for
>> the labels xml files. Currently those files do not to refer to a
>> schema. So I tried to change that.
>>
>> However the ofbiz-properties.xsd itself wouldn't validate, so I fixed
>> that, and then added it as the schema to a sample labels.xml file for
>> testing.
>>
>> Now I have a different problem relating to the xml:lang attribute. I
>> need a solution or there is no point me submitting a patch.
>>
>> The existing code in UtilProperties compares the string generated by
>> Locale's toString() with the value of the xml:lang attribute. An
>> example string generated by Locale's toString() is "pt_BR". Therefore
>> that is the format of the string currently used with xml:lang in the
>> labels.xml files.
>>
>> The xml:lang attribute definition (according to both the xml standard
>> and the relevant xsd) states the value must be of the form "pt-BR".
>> That is, a - and not a _. This is incompatible with current usage in
>> OFBiz.
>>
>> If I apply a schema to an existing labels.xml file, the xml will not
>> validate. If I fix the xml so it validates, it of course won't work in
>> OFBiz unless I also change UtilProperties.
>>
>> One solution would be to change UtilProperties: stop using Locale's
>> toString(), and instead create a string with a '-' using Locale's
>> getCountry() and getLanguage() methods (is the Locale variant used
>> anywhere?). Then all the labels.xml files would need to have their
>> value of xml:lang updated to use '-' instead of '_'.
>>
>> What is the community's preferred solution?
>>
>> Cheers,
>> Anne.
>>
>>
>>
>>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Phone: (03) 9585 6788
Fax: (03) 9585 1086
Web: http://www.cohsoft.com.au/
Email: [email protected]

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/

Reply via email to