From cd8f154e85244bc1d7c40bc15bf208809dccff31 Mon Sep 17 00:00:00 2001 From: Frank Tang Date: Wed, 18 Dec 2024 12:51:36 -0800 Subject: [PATCH 1/4] EDITORIAL Write CharacterDirectionOfLocale in more details fix --- index.html | 4 ++-- locale.html | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 9f64055..917d546 100644 --- a/index.html +++ b/index.html @@ -3345,9 +3345,9 @@

1.1.6 TimeZonesOfLocale ( loc )

1.1.7 CharacterDirectionOfLocale ( loc )

The abstract operation CharacterDirectionOfLocale takes argument loc (an Intl.Locale) and returns "ltr" or "rtl". The following algorithm refers to Locale data specified in UTS 35's Layouts Elements. It performs the following steps when called:

-
  1. Let locale be loc.[[Locale]].
  2. If the default general ordering of characters (characterOrder) within a line in locale is right-to-left, return "rtl".
  3. Return "ltr".
+
  1. Let locale be loc.[[Locale]].
  2. Let script be GetLocaleScript(locale).
  3. If script is undefined, then
    1. Let maximal be the result of the Add Likely Subtags algorithm applied to locale. If an error is signaled, return "ltr".
    2. Set script to GetLocaleScript(maximal).
    3. If script is undefined, return "ltr".
  4. If the default general ordering of characters within a line in script is right-to-left, return "rtl".
  5. Return "ltr".
Note
- When the direction of default general ordering of characters (characterOrder) within a line in the locale cannot be determined, or is not right-to-left, "ltr" will be retruned. + When the direction of default general ordering of characters within a line in the script cannot be determined, or is not right-to-left, "ltr" will be retruned.
diff --git a/locale.html b/locale.html index cd2db96..2dd38c7 100644 --- a/locale.html +++ b/locale.html @@ -113,11 +113,16 @@

1. Let _locale_ be _loc_.[[Locale]]. - 1. If the default general ordering of characters (characterOrder) within a line in _locale_ is right-to-left, return *"rtl"*. + 1. Let _script_ be GetLocaleScript(_locale_). + 1. If _script_ is *undefined*, then + 1. Let _maximal_ be the result of the Add Likely Subtags algorithm applied to _locale_. If an error is signaled, return *"ltr"*. + 1. Set _script_ to GetLocaleScript(_maximal_). + 1. If _script_ is *undefined*, return *"ltr"*. + 1. If the default general ordering of characters within a line in _script_ is right-to-left, return *"rtl"*. 1. Return *"ltr"*. - When the direction of default general ordering of characters (characterOrder) within a line in the locale cannot be determined, or is not right-to-left, *"ltr"* will be retruned. + When the direction of default general ordering of characters within a line in the _script_ cannot be determined, or is not right-to-left, *"ltr"* will be retruned. From 428331b1f8cbcaafcba6ae803e32c8f373bf21bc Mon Sep 17 00:00:00 2001 From: Frank Yung-Fong Tang Date: Thu, 19 Dec 2024 10:08:23 -0800 Subject: [PATCH 2/4] Update locale.html Co-authored-by: printfn <1643883+printfn@users.noreply.github.com> --- locale.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale.html b/locale.html index 2dd38c7..e3fb8db 100644 --- a/locale.html +++ b/locale.html @@ -122,7 +122,7 @@

1. Return *"ltr"*. - When the direction of default general ordering of characters within a line in the _script_ cannot be determined, or is not right-to-left, *"ltr"* will be retruned. + When the direction of default general ordering of characters within a line in the _script_ cannot be determined, or is not right-to-left, *"ltr"* will be returned. From ee016268c5924cab0c9a55037d388b3cdb33a7c0 Mon Sep 17 00:00:00 2001 From: Frank Yung-Fong Tang Date: Thu, 19 Dec 2024 10:08:31 -0800 Subject: [PATCH 3/4] Update index.html Co-authored-by: printfn <1643883+printfn@users.noreply.github.com> --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 917d546..a3b702b 100644 --- a/index.html +++ b/index.html @@ -3347,7 +3347,7 @@

1.1.7 CharacterDirectionOfLocale ( locThe abstract operation CharacterDirectionOfLocale takes argument loc (an Intl.Locale) and returns "ltr" or "rtl". The following algorithm refers to Locale data specified in UTS 35's Layouts Elements. It performs the following steps when called:

  1. Let locale be loc.[[Locale]].
  2. Let script be GetLocaleScript(locale).
  3. If script is undefined, then
    1. Let maximal be the result of the Add Likely Subtags algorithm applied to locale. If an error is signaled, return "ltr".
    2. Set script to GetLocaleScript(maximal).
    3. If script is undefined, return "ltr".
  4. If the default general ordering of characters within a line in script is right-to-left, return "rtl".
  5. Return "ltr".
Note
- When the direction of default general ordering of characters within a line in the script cannot be determined, or is not right-to-left, "ltr" will be retruned. + When the direction of default general ordering of characters within a line in the script cannot be determined, or is not right-to-left, "ltr" will be returned.
From 8902f642ea4884b0cca1ecb99f030b4c76065f85 Mon Sep 17 00:00:00 2001 From: FrankYFTang Date: Thu, 19 Dec 2024 18:08:53 +0000 Subject: [PATCH 4/4] fixup: [spec] `npm run build` --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index a3b702b..2e2a9d7 100644 --- a/index.html +++ b/index.html @@ -3290,7 +3290,7 @@

Stage 3 Draft / December 18, 2024

Intl Locale Info Proposal

+

Stage 3 Draft / December 19, 2024

Intl Locale Info Proposal

Introduction