Skip to content

Commit

Permalink
[giow] (0) Redefine application-name to handle multiple languages.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=24013
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@8349 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 12, 2013
1 parent b28d225 commit 9abb0eb
Show file tree
Hide file tree
Showing 3 changed files with 164 additions and 25 deletions.
59 changes: 51 additions & 8 deletions complete.html
Expand Up @@ -12857,14 +12857,57 @@ <h5 id=standard-metadata-names><span class=secno>4.2.5.1 </span>Standard metadat

<dl><dt><dfn id=meta-application-name title=meta-application-name><code>application-name</code></dfn></dt>

<dd><p>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 <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> metadata name must not be used. There must
not be more than one <code><a href=#the-meta-element>meta</a></code> element with its <code title=attr-meta-name><a href=#attr-meta-name>name</a></code>
attribute set to the value <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> per
document. <span class=impl>User agents may use the application name in UI in preference to the
page's <code><a href=#the-title-element>title</a></code>, 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.</span></dd>
<dd>

<p>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 <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> metadata name must not be used.
Translations of the Web application's name may be given, using the <code title=attr-lang><a href=#attr-lang></a></code> attribute to specify the language of each name.</p>

<p>There must not be more than one <code><a href=#the-meta-element>meta</a></code> element with a given <a href=#language>language</a>
and with its <code title=attr-meta-name><a href=#attr-meta-name>name</a></code> attribute set to the value <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> per document.</p>

<div class=impl>

<p>User agents may use the application name in UI in preference to the page's
<code><a href=#the-title-element>title</a></code>, 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.</p>

<p>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:</p>

<ol><li><p>Let <var title="">languages</var> be the list of languages.</li>

<li><p>Let <var title="">default language</var> be the <a href=#language>language</a> of the
<code><a href=#document>Document</a></code>'s <a href=#root-element-of-a-document-object title="root element of a Document object">root element</a>,
if any, and if that language is not unknown.</p>

<li><p>If there is a <var title="">default language</var>, and if it is not the same language
as any of the languages is <var title="">languages</var>, append it to <var title="">languages</var>.</li>

<li>

<p>Let <var title="">winning language</var> be the first language in <var title="">languages</var> for which there is a <code><a href=#the-meta-element>meta</a></code> element in the
<code><a href=#document>Document</a></code> that has its <code title=attr-meta-name><a href=#attr-meta-name>name</a></code> attribute set to
the value <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> and whose
<a href=#language>language</a> is the language in question.</p>

<p>If none of the languages have such a <code><a href=#the-meta-element>meta</a></code> element, then abort these steps;
there's no given application name.</p>

</li>

<li>

<p>Return the value of the <code title=attr-meta-content><a href=#attr-meta-content>content</a></code> attribute of the
first <code><a href=#the-meta-element>meta</a></code> element in the <code><a href=#document>Document</a></code> in <a href=#tree-order>tree order</a> that
has its <code title=attr-meta-name><a href=#attr-meta-name>name</a></code> attribute set to the value <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> and whose <a href=#language>language</a> is <var title="">winning language</var>.</p>

</li>

</ol></div>

</dd>

<dt><dfn id=meta-author title=meta-author><code>author</code></dfn></dt>

Expand Down
59 changes: 51 additions & 8 deletions index
Expand Up @@ -12857,14 +12857,57 @@ gave me some of the songs they wrote. I love sharing my music.&lt;/p&gt;

<dl><dt><dfn id=meta-application-name title=meta-application-name><code>application-name</code></dfn></dt>

<dd><p>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 <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> metadata name must not be used. There must
not be more than one <code><a href=#the-meta-element>meta</a></code> element with its <code title=attr-meta-name><a href=#attr-meta-name>name</a></code>
attribute set to the value <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> per
document. <span class=impl>User agents may use the application name in UI in preference to the
page's <code><a href=#the-title-element>title</a></code>, 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.</span></dd>
<dd>

<p>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 <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> metadata name must not be used.
Translations of the Web application's name may be given, using the <code title=attr-lang><a href=#attr-lang></a></code> attribute to specify the language of each name.</p>

<p>There must not be more than one <code><a href=#the-meta-element>meta</a></code> element with a given <a href=#language>language</a>
and with its <code title=attr-meta-name><a href=#attr-meta-name>name</a></code> attribute set to the value <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> per document.</p>

<div class=impl>

<p>User agents may use the application name in UI in preference to the page's
<code><a href=#the-title-element>title</a></code>, 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.</p>

<p>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:</p>

<ol><li><p>Let <var title="">languages</var> be the list of languages.</li>

<li><p>Let <var title="">default language</var> be the <a href=#language>language</a> of the
<code><a href=#document>Document</a></code>'s <a href=#root-element-of-a-document-object title="root element of a Document object">root element</a>,
if any, and if that language is not unknown.</p>

<li><p>If there is a <var title="">default language</var>, and if it is not the same language
as any of the languages is <var title="">languages</var>, append it to <var title="">languages</var>.</li>

<li>

<p>Let <var title="">winning language</var> be the first language in <var title="">languages</var> for which there is a <code><a href=#the-meta-element>meta</a></code> element in the
<code><a href=#document>Document</a></code> that has its <code title=attr-meta-name><a href=#attr-meta-name>name</a></code> attribute set to
the value <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> and whose
<a href=#language>language</a> is the language in question.</p>

<p>If none of the languages have such a <code><a href=#the-meta-element>meta</a></code> element, then abort these steps;
there's no given application name.</p>

</li>

<li>

<p>Return the value of the <code title=attr-meta-content><a href=#attr-meta-content>content</a></code> attribute of the
first <code><a href=#the-meta-element>meta</a></code> element in the <code><a href=#document>Document</a></code> in <a href=#tree-order>tree order</a> that
has its <code title=attr-meta-name><a href=#attr-meta-name>name</a></code> attribute set to the value <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> and whose <a href=#language>language</a> is <var title="">winning language</var>.</p>

</li>

</ol></div>

</dd>

<dt><dfn id=meta-author title=meta-author><code>author</code></dfn></dt>

Expand Down
71 changes: 62 additions & 9 deletions source
Expand Up @@ -13265,15 +13265,68 @@ gave me some of the songs they wrote. I love sharing my music.&lt;/p>

<dt><dfn data-x="meta-application-name"><code>application-name</code></dfn></dt>

<dd><p>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 <code
data-x="meta-application-name">application-name</code> metadata name must not be used. There must
not be more than one <code>meta</code> element with its <code data-x="attr-meta-name">name</code>
attribute set to the value <code data-x="meta-application-name">application-name</code> per
document. <span class="impl">User agents may use the application name in UI in preference to the
page's <code>title</code>, 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.</span></p></dd>
<dd>

<p>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 <code
data-x="meta-application-name">application-name</code> metadata name must not be used.
Translations of the Web application's name may be given, using the <code
data-x="attr-lang"></code> attribute to specify the language of each name.</p>

<p>There must not be more than one <code>meta</code> element with a given <span>language</span>
and with its <code data-x="attr-meta-name">name</code> attribute set to the value <code
data-x="meta-application-name">application-name</code> per document.</p>

<div class="impl">

<p>User agents may use the application name in UI in preference to the page's
<code>title</code>, 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.</p>

<p>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:</p>

<ol>

<li><p>Let <var data-x="">languages</var> be the list of languages.</p></li>

<li><p>Let <var data-x="">default language</var> be the <span>language</span> of the
<code>Document</code>'s <span data-x="root element of a Document object">root element</span>,
if any, and if that language is not unknown.</p>

<li><p>If there is a <var data-x="">default language</var>, and if it is not the same language
as any of the languages is <var data-x="">languages</var>, append it to <var
data-x="">languages</var>.</p></li>

<li>

<p>Let <var data-x="">winning language</var> be the first language in <var
data-x="">languages</var> for which there is a <code>meta</code> element in the
<code>Document</code> that has its <code data-x="attr-meta-name">name</code> attribute set to
the value <code data-x="meta-application-name">application-name</code> and whose
<span>language</span> is the language in question.</p>

<p>If none of the languages have such a <code>meta</code> element, then abort these steps;
there's no given application name.</p>

</li>

<li>

<p>Return the value of the <code data-x="attr-meta-content">content</code> attribute of the
first <code>meta</code> element in the <code>Document</code> in <span>tree order</span> that
has its <code data-x="attr-meta-name">name</code> attribute set to the value <code
data-x="meta-application-name">application-name</code> and whose <span>language</span> is <var
data-x="">winning language</var>.</p>

</li>

</ol>

</div>

</dd>

<dt><dfn data-x="meta-author"><code>author</code></dfn></dt>

Expand Down

0 comments on commit 9abb0eb

Please sign in to comment.