[html5] r8349 - [giow] (0) Redefine application-name to handle multiple languages. Fixing https: [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Dec 12 14:33:22 PST 2013


Author: ianh
Date: 2013-12-12 14:33:20 -0800 (Thu, 12 Dec 2013)
New Revision: 8349

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Redefine application-name to handle multiple languages.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=24013
Affected topics: HTML

Modified: complete.html
===================================================================
--- complete.html	2013-12-12 21:41:52 UTC (rev 8348)
+++ complete.html	2013-12-12 22:33:20 UTC (rev 8349)
@@ -12857,15 +12857,58 @@
 
   <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>
 
    <dd><p>The value must be a free-form string giving the name of one of the page's

Modified: index
===================================================================
--- index	2013-12-12 21:41:52 UTC (rev 8348)
+++ index	2013-12-12 22:33:20 UTC (rev 8349)
@@ -12857,15 +12857,58 @@
 
   <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>
 
    <dd><p>The value must be a free-form string giving the name of one of the page's

Modified: source
===================================================================
--- source	2013-12-12 21:41:52 UTC (rev 8348)
+++ source	2013-12-12 22:33:20 UTC (rev 8349)
@@ -13265,16 +13265,69 @@
 
    <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>
 
    <dd><p>The value must be a free-form string giving the name of one of the page's




More information about the Commit-Watchers mailing list