Skip to content

Commit e3d52f7

Browse files
Add members for localization
1 parent 115a6bd commit e3d52f7

File tree

1 file changed

+97
-5
lines changed

1 file changed

+97
-5
lines changed

index.html

Lines changed: 97 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,20 @@ <h3>
578578
algorithm is used to process the [=manifest/name=] member.
579579
</p>
580580
</section>
581+
<section>
582+
<h3>
583+
`names` member
584+
</h3>
585+
<p>
586+
The [=manifest's=] <code><dfn data-export="" data-dfn-for=
587+
"manifest">names</dfn></code> member is a translation object that
588+
contains localized versions of the [=manifest/name=] member.
589+
</p>
590+
<p>
591+
When present, it can override the name of the [=installed web
592+
application=] based on the user's localization settings.
593+
</p>
594+
</section>
581595
<section>
582596
<h3>
583597
`short_name` member
@@ -594,6 +608,21 @@ <h3>
594608
algorithm is used to process the [=manifest/short_name=] member.
595609
</p>
596610
</section>
611+
<section>
612+
<h3>
613+
`short_names` member
614+
</h3>
615+
<p>
616+
The [=manifest's=] <code><dfn data-export="" data-dfn-for=
617+
"manifest">short_names</dfn></code> member is a translation object
618+
that contains localized versions of the [=manifest/short_name=]
619+
member.
620+
</p>
621+
<p>
622+
When present, it can override the short name of the [=installed web
623+
application=] based on the user's localization settings.
624+
</p>
625+
</section>
597626
<section>
598627
<h3>
599628
`scope` member
@@ -1274,11 +1303,11 @@ <h3>
12741303
</li>
12751304
<li>[=Process the `lang` member=] passing |json| and |manifest|.
12761305
</li>
1277-
<li>[=Process a text member=] passing |json|, |manifest|, and
1278-
"name".
1306+
<li>[=Process a localizable text member=] passing |json|,
1307+
|manifest|, "name", and "names".
12791308
</li>
1280-
<li>[=Process a text member=] passing |json|, |manifest|, and
1281-
"short_name".
1309+
<li>[=Process a localizable text member=] passing |json|,
1310+
|manifest|, and "short_name", and "short_names".
12821311
</li>
12831312
<li>[=Process the `start_url` member=] passing |json|, |manifest|,
12841313
|manifest URL|, and |document URL|.
@@ -1375,6 +1404,24 @@ <h2>
13751404
</li>
13761405
</ol>
13771406
</section>
1407+
<section>
1408+
<h2>
1409+
Processing localizable text members
1410+
</h2>
1411+
<p>
1412+
To <dfn>process a localizable text member</dfn>, given [=ordered
1413+
map=] |json:ordered map|, [=ordered map=] |map:ordered map|,
1414+
[=string=] |member:string|, and [=string=]
1415+
|localizedMember:string|:
1416+
</p>
1417+
<ul>
1418+
<li>If |json|[|member|] doesn't [=map/exists=] or |json|[|member|]
1419+
is not a [=string=], return.
1420+
</li>
1421+
<li>Set |map|[member] to the value of |json|[|member|].
1422+
</li>
1423+
</ul>
1424+
</section>
13781425
<section>
13791426
<h3>
13801427
Processing the manifest without a document
@@ -1979,6 +2026,21 @@ <h3>
19792026
user in a context menu.
19802027
</p>
19812028
</section>
2029+
<section>
2030+
<h3>
2031+
`names` member
2032+
</h3>
2033+
<p>
2034+
The [=shortcut item's=] <code><dfn data-export="" data-dfn-for=
2035+
"shortcut item">names</dfn></code> member is a translation object
2036+
that contains localized versions of the [=shortcut item/name=]
2037+
member.
2038+
</p>
2039+
<p>
2040+
When present, it can override the name of the [=shortcut item=] based
2041+
on the user's localization settings.
2042+
</p>
2043+
</section>
19822044
<section>
19832045
<h3>
19842046
`short_name` member
@@ -1991,6 +2053,21 @@ <h3>
19912053
full name of the shortcut.
19922054
</p>
19932055
</section>
2056+
<section>
2057+
<h3>
2058+
`short_names` member
2059+
</h3>
2060+
<p>
2061+
The [=shortcut item's=] <code><dfn data-export="" data-dfn-for=
2062+
"shortcut item">short_names</dfn></code> member is a translation
2063+
object that contains localized versions of the [=shortcut
2064+
item/short_name=] member.
2065+
</p>
2066+
<p>
2067+
When present, it can override the short name of the [=shortcut item=]
2068+
based on the user's localization settings.
2069+
</p>
2070+
</section>
19942071
<section>
19952072
<h3>
19962073
`description` member
@@ -2002,6 +2079,21 @@ <h3>
20022079
User agents MAY expose this information to assistive technology.
20032080
</p>
20042081
</section>
2082+
<section>
2083+
<h3>
2084+
`descriptions` member
2085+
</h3>
2086+
<p>
2087+
The [=shortcut item's=] <code><dfn data-export="" data-dfn-for=
2088+
"shortcut item">descriptions</dfn></code> member is a translation
2089+
object that contains localized versions of the [=shortcut
2090+
item/description=] member.
2091+
</p>
2092+
<p>
2093+
When present, it can override the description of the [=shortcut
2094+
item=] based on the user's localization settings.
2095+
</p>
2096+
</section>
20052097
<section>
20062098
<h3>
20072099
`url` member
@@ -2066,7 +2158,7 @@ <h2>
20662158
</li>
20672159
<li>Let |shortcut:ordered map| be |ordered map| «[ "url" → |url|,
20682160
"name" → |item|["name"] ]».
2069-
</li>
2161+
</li><!-- TODO: short_name and localization -->
20702162
<li>[=Process image resources=] passing |item|["icons"], |shortcut|,
20712163
|manifest URL|, and "icons".
20722164
</li>

0 commit comments

Comments
 (0)