Skip to content

Commit

Permalink
Add members for localization
Browse files Browse the repository at this point in the history
  • Loading branch information
christianliebel committed Oct 9, 2023
1 parent 115a6bd commit e3d52f7
Showing 1 changed file with 97 additions and 5 deletions.
102 changes: 97 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,20 @@ <h3>
algorithm is used to process the [=manifest/name=] member.
</p>
</section>
<section>
<h3>
`names` member
</h3>
<p>
The [=manifest's=] <code><dfn data-export="" data-dfn-for=
"manifest">names</dfn></code> member is a translation object that
contains localized versions of the [=manifest/name=] member.
</p>
<p>
When present, it can override the name of the [=installed web
application=] based on the user's localization settings.
</p>
</section>
<section>
<h3>
`short_name` member
Expand All @@ -594,6 +608,21 @@ <h3>
algorithm is used to process the [=manifest/short_name=] member.
</p>
</section>
<section>
<h3>
`short_names` member
</h3>
<p>
The [=manifest's=] <code><dfn data-export="" data-dfn-for=
"manifest">short_names</dfn></code> member is a translation object
that contains localized versions of the [=manifest/short_name=]
member.
</p>
<p>
When present, it can override the short name of the [=installed web
application=] based on the user's localization settings.
</p>
</section>
<section>
<h3>
`scope` member
Expand Down Expand Up @@ -1274,11 +1303,11 @@ <h3>
</li>
<li>[=Process the `lang` member=] passing |json| and |manifest|.
</li>
<li>[=Process a text member=] passing |json|, |manifest|, and
"name".
<li>[=Process a localizable text member=] passing |json|,
|manifest|, "name", and "names".
</li>
<li>[=Process a text member=] passing |json|, |manifest|, and
"short_name".
<li>[=Process a localizable text member=] passing |json|,
|manifest|, and "short_name", and "short_names".
</li>
<li>[=Process the `start_url` member=] passing |json|, |manifest|,
|manifest URL|, and |document URL|.
Expand Down Expand Up @@ -1375,6 +1404,24 @@ <h2>
</li>
</ol>
</section>
<section>
<h2>
Processing localizable text members
</h2>
<p>
To <dfn>process a localizable text member</dfn>, given [=ordered
map=] |json:ordered map|, [=ordered map=] |map:ordered map|,
[=string=] |member:string|, and [=string=]
|localizedMember:string|:
</p>
<ul>
<li>If |json|[|member|] doesn't [=map/exists=] or |json|[|member|]
is not a [=string=], return.
</li>
<li>Set |map|[member] to the value of |json|[|member|].
</li>
</ul>
</section>
<section>
<h3>
Processing the manifest without a document
Expand Down Expand Up @@ -1979,6 +2026,21 @@ <h3>
user in a context menu.
</p>
</section>
<section>
<h3>
`names` member
</h3>
<p>
The [=shortcut item's=] <code><dfn data-export="" data-dfn-for=
"shortcut item">names</dfn></code> member is a translation object
that contains localized versions of the [=shortcut item/name=]
member.
</p>
<p>
When present, it can override the name of the [=shortcut item=] based
on the user's localization settings.
</p>
</section>
<section>
<h3>
`short_name` member
Expand All @@ -1991,6 +2053,21 @@ <h3>
full name of the shortcut.
</p>
</section>
<section>
<h3>
`short_names` member
</h3>
<p>
The [=shortcut item's=] <code><dfn data-export="" data-dfn-for=
"shortcut item">short_names</dfn></code> member is a translation
object that contains localized versions of the [=shortcut
item/short_name=] member.
</p>
<p>
When present, it can override the short name of the [=shortcut item=]
based on the user's localization settings.
</p>
</section>
<section>
<h3>
`description` member
Expand All @@ -2002,6 +2079,21 @@ <h3>
User agents MAY expose this information to assistive technology.
</p>
</section>
<section>
<h3>
`descriptions` member
</h3>
<p>
The [=shortcut item's=] <code><dfn data-export="" data-dfn-for=
"shortcut item">descriptions</dfn></code> member is a translation
object that contains localized versions of the [=shortcut
item/description=] member.
</p>
<p>
When present, it can override the description of the [=shortcut
item=] based on the user's localization settings.
</p>
</section>
<section>
<h3>
`url` member
Expand Down Expand Up @@ -2066,7 +2158,7 @@ <h2>
</li>
<li>Let |shortcut:ordered map| be |ordered map| «[ "url" → |url|,
"name" → |item|["name"] ]».
</li>
</li><!-- TODO: short_name and localization -->
<li>[=Process image resources=] passing |item|["icons"], |shortcut|,
|manifest URL|, and "icons".
</li>
Expand Down

0 comments on commit e3d52f7

Please sign in to comment.