- From: Daniel Murphy <notifications@github.com>
- Date: Tue, 09 Jul 2024 12:51:59 -0700
- To: w3c/manifest <manifest@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/manifest/pull/1101/review/2167265448@github.com>
@dmurph commented on this pull request.
This generally LGTM, a few minor nits.
> + "name": "Color Picker",
+ "name_localized": {
+ "de": "Farbwähler",
+ "en": {"value": "Color Picker"},
+ "en-GB": {"value": "Colour Picker", "dir": "ltr"},
+ "fr": {"value": "Sélecteur de Couleur", "lang": "fr-CA", "dir": "ltr"},
+ "ar": {"value": "منتقي الألوان", "dir": "rtl"}
+ }
+ }
+ </pre>
+ </aside>
+ <p>
+ [=manifest/*_localized=] members contain a [=language map=] that
+ defines [=localized values=] for the given [=localizable member=] in
+ the application. The user agent SHOULD use the user's localization
+ settings to select the [=localized value=] whose language tag best
```suggestion
settings to select the [=localized value=] whose [=language tag=] key best
```
> + require specific direction settings if the manifest's default
+ direction is left-to-right, and vice versa.
+ </p>
+ <p>
+ To support multilingual content and ensure proper display and
+ accessibility, it is possible to specify a different [=language
+ tag=] for a [=localized value=]. This is needed for situations
+ where a term or text must be presented in a language different
+ from the user's set language. For example, this helps ensure that
+ an application name is correctly pronounced by assistive
+ technology, even if it is in a foreign language.
+ </p>
+ </aside>
+ <p>
+ To <dfn>process a `*_localized` text member</dfn>, given [=ordered
+ map=] |json:ordered map|, [=ordered map=] |map:ordered map|,
optional:
```suggestion
map=] |json:ordered map|, [=ordered map=] |outputMap:ordered map|,
```
(and change references below)
This helps readability for me, knowing this argument is populated as the output of this algo
> + </li>
+ <li>Let |languageTags:ordered set| be the [=map/keys=] of
+ |languageMap:ordered map|.
+ </li>
+ <li>Set |map|[|member|] to a new [=ordered map=].
+ </li>
+ <li>[=Set/For each=] |languageTag:string| of |languageTags|, run
+ [=process a localized text value=], passing
+ |languageMap|[|languageTag|] as the [=localized value=],
+ |languageTag|, |map|, |member|, and |manifest direction|.
+ </li>
+ </ol>
+ <p>
+ To <dfn>process a localized text value</dfn>, given [=string=] or
+ [=ordered map=] |localizedValue|, [=string=] |languageTag:string|,
+ [=ordered map=] |map:ordered map|, [=string=] |member:string|, and
optional:
```suggestion
[=ordered map=] |outputMap:ordered map|, [=string=] |member:string|, and
```
(and change references below)
This helps readability for me, knowing this argument is populated as the output of this algo
> + <li>If |languageMap| is not an [=ordered map=], return.
+ </li>
+ <li>Let |languageTags:ordered set| be the [=map/keys=] of
+ |languageMap:ordered map|.
+ </li>
+ <li>Set |map|[|member|] to a new [=ordered map=].
+ </li>
+ <li>[=Set/For each=] |languageTag:string| of |languageTags|, run
+ [=process a localized text value=], passing
+ |languageMap|[|languageTag|] as the [=localized value=],
+ |languageTag|, |map|, |member|, and |manifest direction|.
+ </li>
+ </ol>
+ <p>
+ To <dfn>process a localized text value</dfn>, given [=string=] or
+ [=ordered map=] |localizedValue|, [=string=] |languageTag:string|,
optional, here and below:
```suggestion
[=ordered map=] |localizedValue|, [=string=] |defaultLanguageTag:string|,
```
> + <li>Let |languageTags:ordered set| be the [=map/keys=] of
+ |languageMap:ordered map|.
+ </li>
+ <li>Set |map|[|member|] to a new [=ordered map=].
+ </li>
+ <li>[=Set/For each=] |languageTag:string| of |languageTags|, run
+ [=process a localized text value=], passing
+ |languageMap|[|languageTag|] as the [=localized value=],
+ |languageTag|, |map|, |member|, and |manifest direction|.
+ </li>
+ </ol>
+ <p>
+ To <dfn>process a localized text value</dfn>, given [=string=] or
+ [=ordered map=] |localizedValue|, [=string=] |languageTag:string|,
+ [=ordered map=] |map:ordered map|, [=string=] |member:string|, and
+ [=text-direction=] |manifest direction:string|:
optional, here and below:
```suggestion
[=text-direction=] |defaultDirection:string|:
```
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/pull/1101#pullrequestreview-2167265448
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/manifest/pull/1101/review/2167265448@github.com>
Received on Tuesday, 9 July 2024 19:52:08 UTC