[i18n-activity] application-name language negotiation should use lookup (#688)

aphillips has just created a new issue for https://github.com/w3c/i18n-activity:

== application-name language negotiation should use lookup ==
Section_etc_title
https://html.spec.whatwg.org/multipage/semantics.html#meta-description

In the following quoted section about <meta name="application-name">, there is a long description of a language matching algorithm. Several comments:

1. Instead of using language tags it uses phrases such as "British English", "American English", etc. It isn't clear that these are BCP47 language tags and it should be.
1. The algorithm basically requires an exact match for a language tag in order to find the most appropriate string. It should use one of the BCP47 (RFC4647) algorithms or ECMA-402's algorithm. I'd recommend BCP47 Lookup, since that results in selection of exactly one string.
1. The algorithm can result in "no application-name" even if one is provided in the language of the document itself. This seems like a bug.

Quoted text:

> application-name
> #meta-application-name
> Referenced in:
> 
>     4.2.5.1 Standard metadata names (2) (3) (4)
> 
>     The value must be a short free-form string giving the name of the Web application that the page represents. If the page is not a Web application, the application-name metadata name must not be used. Translations of the Web application's name may be given, using the lang attribute to specify the language of each name.
> 
>     There must not be more than one meta element with a given language and where the name attribute value is an ASCII case-insensitive match for application-name per document.
> 
>     User agents may use the application name in UI in preference to the page's title, since the title might include status messages and the like relevant to the status of the page at a particular moment in time instead of just being the name of the application.
> 
>     To find the application name to use given an ordered list of languages (e.g. British English, American English, and English), user agents must run the following steps:
> 
>         Let languages be the list of languages.
> 
>         Let default language be the language of the Document's document element, if any, and if that language is not unknown.
> 
>         If there is a default language, and if it is not the same language as any of the languages in languages, append it to languages.
> 
>         Let winning language be the first language in languages for which there is a meta element in the Document where the name attribute value is an ASCII case-insensitive match for application-name and whose language is the language in question.
> 
>         If none of the languages have such a meta element, then return; there's no given application name.
> 
>         Return the value of the content attribute of the first meta element in the Document in tree order where the name attribute value is an ASCII case-insensitive match for application-name and whose language is winning language.


---
**WHEN CREATING A NEW ISSUE DO SO ABOVE THIS PARAGRAPH, REPLACING THE PROMPTS, BUT LEAVE THIS PARAGRAPH INTACT AS WELL AS THE TEXT BELOW IT** When this issue is raised in the github/bugzilla/mail of the WG that owns the spec, use the text above this para as the basis for that comment. Then edit this issue to remove this paragraph and ALL THE TEXT ABOVE IT. Replace the text 'link_to_issue_raised' below with a link to the place you raised the issue, but leave the remaining text below this para unaltered.

**This is a tracker issue.** Only discuss things here if they are i18n WG internal meta-discussions about the issue. **Contribute to the actual discussion at the following link:**


ยง link_to_issue_raised



Please view or discuss this issue at https://github.com/w3c/i18n-activity/issues/688 using your GitHub account

Received on Wednesday, 8 May 2019 15:11:51 UTC