Skip to content

Commit

Permalink
Use “default language tag” and “default direction”
Browse files Browse the repository at this point in the history
  • Loading branch information
christianliebel committed Aug 25, 2024
1 parent b9cee41 commit f8431f0
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1378,8 +1378,8 @@ <h3>
<p>
To <dfn>process a `*_localized` text member</dfn>, given [=ordered
map=] |json:ordered map|, [=ordered map=] |map:ordered map|,
[=string=] |member:string|, and [=text-direction=] |manifest
direction:string|:
[=string=] |member:string|, and [=text-direction=]
|defaultDirection:string|:
</p>
<ol class="algorithm">
<li>If |member| does not [=map/exist=] in |json|, return.
Expand All @@ -1396,15 +1396,15 @@ <h3>
<li>[=Set/For each=] |languageTag:string| of |languageTags|, run
[=process a localized text resource=], passing
|languageMap|[|languageTag|] as the [=localized value=],
|languageTag|, |map|, |member|, and |manifest direction|.
|languageTag|, |map|, |member|, and |defaultDirection|.
</li>
</ol>
<p>
To <dfn>process a localized text resource</dfn>, given [=string=]
or [=ordered map=] |localizedValue|, [=string=]
|languageTag:string|, [=ordered map=] |map:ordered map|, [=string=]
|member:string|, and [=text-direction=] |manifest
direction:string|:
|defaultLanguageTag:string|, [=ordered map=] |map:ordered map|,
[=string=] |member:string|, and [=text-direction=]
|defaultDirection:string|:
</p>
<ol class="algorithm">
<li>Let |normalizedValue:ordered map| be an [=ordered map=].
Expand All @@ -1430,20 +1430,20 @@ <h3>
</li>
<li>If "lang" does not [=map/exist=] in |normalizedValue|, or
|normalizedValue|["lang"] is not a [=string=], [=map/set=]
|normalizedValue|["lang"] to |languageTag|.
|normalizedValue|["lang"] to |defaultLanguageTag|.
</li>
<li>If "dir" does not [=map/exist=] in |normalizedValue|, or
[=text-direction list=] does not [=list/contain=]
|normalizedValue|["dir"], [=map/set=] |normalizedValue|["dir"] to
|manifest direction|.
|defaultDirection|.
</li>
<li>If calling <a data-cite=
"ECMA-402#sec-isstructurallyvalidlanguagetag">IsStructurallyValidLanguageTag</a>
with |normalizedValue|["lang"] or calling <a data-cite=
"ECMA-402#sec-isstructurallyvalidlanguagetag">IsStructurallyValidLanguageTag</a>
with |languageTag| returns `false`, return.
with |defaultLanguageTag| returns `false`, return.
</li>
<li>[=Map/Set=] |map|[|member|][|languageTag|] to
<li>[=Map/Set=] |map|[|member|][|defaultLanguageTag|] to
|normalizedValue|.
</li>
</ol>
Expand Down Expand Up @@ -2370,7 +2370,7 @@ <h2>
<p>
To <dfn>process a shortcut</dfn>, given [=ordered map=] |item:ordered
map|, [=URL=] |manifest URL:URL|, [=URL=] |scope:URL|, and
[=text-direction=] |manifest direction:string|:
[=text-direction=] |defaultDirection:string|:
</p>
<ol class="algorithm">
<li>Return failure if it's the case that:
Expand Down Expand Up @@ -2399,21 +2399,21 @@ <h2>
"name" → |item|["name"] ]».
</li>
<li>[=Process a `*_localized` text member=] passing |item|,
|shortcut|, "name_localized", and |manifest direction|.
|shortcut|, "name_localized", and |defaultDirection|.
</li>
<li>If "short_name" [=map/exists=] in |item|, and
|item|["short_name"] is a [=string=], [=map/set=]
|shortcut|["short_name"] to |item|["short_name"].
</li>
<li>[=Process a `*_localized` text member=] passing |item|,
|shortcut|, "short_name_localized", and |manifest direction|.
|shortcut|, "short_name_localized", and |defaultDirection|.
</li>
<li>If "description" [=map/exists=] in |item|, and
|item|["description"] is a [=string=], [=map/set=]
|shortcut|["description"] to |item|["description"].
</li>
<li>[=Process a `*_localized` text member=] passing |item|,
|shortcut|, "description_localized", and |manifest direction|.
|shortcut|, "description_localized", and |defaultDirection|.
</li>
<li>[=Process image resources=] passing |item|["icons"], |shortcut|,
|manifest URL|, and "icons".
Expand Down

0 comments on commit f8431f0

Please sign in to comment.