W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2010

Re: [widgets PC] i18n comment 21: i18n string

From: Marcos Caceres <marcosc@opera.com>
Date: Tue, 29 Jun 2010 18:41:19 +0200
Message-ID: <4C2A222F.6010807@opera.com>
To: "Phillips, Addison" <addison@lab126.com>
CC: Richard Ishida <ishida@w3.org>, "public-i18n-core@w3.org" <public-i18n-core@w3.org>, "public-webapps@w3.org" <public-webapps@w3.org>

On 6/29/10 5:36 PM, Phillips, Addison wrote:
> (personal response)
> Having case-sensitive file/folder matching is going to lead to frustrated authors being unable to figure out why their localizations don't work.

I know, but implementers complained that it's just too slow to do it any 
other way :(

>If there is no way to do case-less matching in the widget engine itself, I think your solution is workable.

It is possible (this was Opera's implementation's default behavior); 
it's just hard for implementers apparently.

> While it would be nice to recommend using the BCP 47 case conventions, if you don't, you need to really highlight the casing requirements in packaging.

I've changed the spec to clarify this:

"This specification defines the concept of folder-based localization, 
which is the process whereby an author places files inside folders that 
are named in a manner that conforms to a language-range ABNF rule of 
this specification. That is, by naming folders in lower-case using 
values derived from the IANA Language Subtag Registry such as "en-us", 
"en-gb", and so on, but avoiding subtags marked as deprecated, 
grandfathered, or redundant in the IANA Language Subtag Registry. These 
locale folders are then placed inside the container for localized content."

The language-range rule is:

language-range = (1*8low-alpha / "*") *("-" (1*8alphanum / "*"))
alphanum       = low-alpha  / DIGIT
low-alpha      = %x61-71

> The original point of this editorial comment is that your XML examples should show the expected case folding of language tags. While perfectly legal to show them as all lowercase, it is just as legal to scream them in uppercase or use alternating case or otherwise make them look "odd". By adding a recommendation to your document to use the case conventions in BCP 47 (which I see as unnecessary), but not using that recommendation in your examples, and then having a separate case convention buried elsewhere in your document you risk confusion.

Argh, right :(

> I think your text for the "folder based localization" section is good. I would put it directly following the first paragraph and I would reword it as follows:
> --
> Although BCP 47 recommends a particular case-folding convention, the use of upper or lowercase letters has no meaning in a language tag. Because folders inside a widget package are treated by the user-agent in a case-sensitive manner, the names of the folders inside a 'locale' folder MUST be all lowercase. All language tags are mapped to lowercase for matching purposes (although they can appear in any form in the configuration file or elsewhere).
> --

Yes, much better. Thank you.

> And I would replace your text in "The xml:lang Attribute" section with a pointer to the warning above. Perhaps:
> --
> Although BCP 47 recommends that language tags be casefolded in a particular way for presentation, case has no meaning in a language tag. Because user-agents map all language tags to lowercase because they treat file names in a case-sensitive manner, all examples in this document use lowercase as a reminder to authors. See [[folder-based localizations]].
> --

Adapted it a little bit (the "Because...because..." caused me some 
confusion.). Hope this is ok:

"Although [BCP47] recommends that language tags be casefolded in a 
particular way for presentation, case has no meaning in a language tag. 
As a reminder to authors that user-agents map all language tags to 
lowercase, all examples in this document use lowercase. See also 
[folder-based localization], which also requires authors to use 
language tags in lowercase form as the names of folders."

Thanks again, Addison, for all your time and help!

Marcos Caceres
Opera Software
Received on Tuesday, 29 June 2010 16:42:01 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:25 UTC