Intent to Ship: relaunch Intl Locale Info feature in newly added functions

544 views
Skip to first unread message

Chromestatus

unread,
Aug 22, 2024, 7:11:32 PMAug 22
to blin...@chromium.org, ft...@google.com

Contact emails

ft...@google.com

Explainer

None

Specification

https://tc39.es/proposal-intl-locale-info

Design docs


https://docs.google.com/document/d/1BSpa-LKE69LL1g5CHZ3G06XEfffauwS24atfSUQiIDY/edit?usp=sharing

Summary

Intl Locale Info API is a new Stage ECMAScript TC39 proposal to enhance the Intl.Locale object by exposing Locale information, such as week data (first day in a week, weekend start day, weekend end day, minimun day in the first week), and text direction hour cycle used in the locale. https://github.com/tc39/proposal-intl-locale-info We launch Intl Locale Info API w/ getters but later the proposal changed to rename these getters to functions. We need to deprecate the getter and relaunch the functions . The deprecation of getters is tracked in https://chromestatus.com/feature/5148228059398144



Blink component

Blink>JavaScript>Internationalization

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None



Gecko: Positive (https://bugzilla.mozilla.org/show_bug.cgi?id=1693576)

WebKit: Shipped/Shipping (https://developer.apple.com/documentation/safari-release-notes/safari-17-release-notes) Shipped in Safari version 17

Web developers: Positive (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCalendars) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCalendars https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCollations https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getHourCycles https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getNumberingSystems https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTimeZones https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo

Other signals:

Ergonomics

minor change, similar to all other functions in Intl.Locale object already.



Activation

non- minor change, similar to all other functions in Intl.Locale object already.



Security

none - minor change, similar to all other functions in Intl.Locale object already.



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

minor change, similar to all other functions in Intl.Locale object already.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

https://github.com/tc39/test262/tree/main/test/intl402/Locale/prototype/get*



Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/issues/42203769

Sample links


https://github.com/tc39/proposal-intl-locale-info?tab=readme-ov-file#high-level-design

Estimated milestones

Shipping on desktop 130
DevTrial on desktop 129
Shipping on Android 130
DevTrial on Android 129


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5122839207477248?gate=5125593355255808

Links to previous Intent discussions

Ready for Trial: https://groups.google.com/a/chromium.org/g/blink-dev/c/fIZhzp4AWbk/m/bocUBCXbBwAJ


This intent message was generated by Chrome Platform Status.

Chris Harrelson

unread,
Aug 28, 2024, 4:23:18 PMAug 28
to Chromestatus, blin...@chromium.org, ft...@google.com
Does this feature change the behavior of existing web-exposed APIs for Locale? If so, what is the compat risk of breaking existing sites?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/000000000000f3725c06204dc61d%40google.com.

Frank Tang (譚永鋒)

unread,
Aug 29, 2024, 3:57:43 PMAug 29
to Chris Harrelson, Chromestatus, blin...@chromium.org
On Wed, Aug 28, 2024 at 1:23 PM Chris Harrelson <chri...@chromium.org> wrote:
Does this feature change the behavior of existing web-exposed APIs for Locale? If so, what is the compat risk of breaking existing sites?

With this launch, the pre-existing Intl.Locale object will add 7 additional functions
  • Add Intl.Locale.prototype.getCalendars ( )

  • Add Intl.Locale.prototype.getCollations ( )

  • Add Intl.Locale.prototype.getHourCycles ( )

  • Add Intl.Locale.prototype.getNumberingSystems ( )

  • Add Intl.Locale.prototype.getTimeZones ( )

  • Add Intl.Locale.prototype.getTextInfo ( )

  • Add Intl.Locale.prototype.getWeekInfo ( )


These functions are already available in Safari 17 (Released September 18, 2023 — Version 17 (19616.1.27))
"Updated Intl.Locale to replace info getters with individual get… methods. (105570888)"  (see https://developer.apple.com/documentation/safari-release-notes/safari-17-release-notes?language=_6

so it should have minimum compat risk of breaking existing sites


--
Frank Yung-Fong Tang
譚永鋒 / 🌭🍊 
Sr. Software Engineer 

ftang via Chromestatus

unread,
Aug 30, 2024, 1:36:26 PMAug 30
to blin...@chromium.org

Mike Taylor

unread,
Aug 30, 2024, 2:52:07 PMAug 30
to Frank Tang (譚永鋒), Chris Harrelson, Chromestatus, blin...@chromium.org

On 8/29/24 3:57 PM, 'Frank Tang (譚永鋒)' via blink-dev wrote:



On Wed, Aug 28, 2024 at 1:23 PM Chris Harrelson <chri...@chromium.org> wrote:
Does this feature change the behavior of existing web-exposed APIs for Locale? If so, what is the compat risk of breaking existing sites?

With this launch, the pre-existing Intl.Locale object will add 7 additional functions
  • Add Intl.Locale.prototype.getCalendars ( )

  • Add Intl.Locale.prototype.getCollations ( )

  • Add Intl.Locale.prototype.getHourCycles ( )

  • Add Intl.Locale.prototype.getNumberingSystems ( )

  • Add Intl.Locale.prototype.getTimeZones ( )

  • Add Intl.Locale.prototype.getTextInfo ( )

  • Add Intl.Locale.prototype.getWeekInfo ( )


These functions are already available in Safari 17 (Released September 18, 2023 — Version 17 (19616.1.27))
"Updated Intl.Locale to replace info getters with individual get… methods. (105570888)"  (see https://developer.apple.com/documentation/safari-release-notes/safari-17-release-notes?language=_6

so it should have minimum compat risk of breaking existing sites

To clarify: this intent adds the new getter methods, but we're not deprecating or removing the existing getter properties that shipped in M99, correct? I see that the type for `firstDay` is different when returned by `getWeekInfo()` - are there any other notable changes?

Do you have a plan to deprecate the getter properties?

Frank Tang (譚永鋒)

unread,
Aug 30, 2024, 3:21:13 PMAug 30
to Mike Taylor, Chris Harrelson, Chromestatus, blin...@chromium.org
1. I confirm, this particular launch is just adding new getter methods. 
2. This particular launch is NOT removing the existing getter properties that shipped in M99.
3. The type of firstDay  returned by `getWeekInfo()`  is NOT different than before. It is always an integer 1..7
4. Plan to deprecate getter properties- Launch this one first, after available, launch the deprecation separately in https://chromestatus.com/feature/5148228059398144 (Stage 131, Ship 132)

Chris Harrelson

unread,
Aug 30, 2024, 6:43:07 PMAug 30
to Frank Tang (譚永鋒), Mike Taylor, Chromestatus, blin...@chromium.org
Thanks for these updates. LGTM1

Mike Taylor

unread,
Sep 3, 2024, 11:21:33 AMSep 3
to Chris Harrelson, Frank Tang (譚永鋒), Chromestatus, blin...@chromium.org

Thanks Frank. LGTM2

Domenic Denicola

unread,
Sep 3, 2024, 10:55:20 PMSep 3
to blink-dev, Mike Taylor, Chromestatus, blin...@chromium.org, Chris Harrelson, Frank Tang (譚永鋒)
LGTM3.

Thanks Frank. LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.


--
Frank Yung-Fong Tang
譚永鋒 / 🌭🍊 
Sr. Software Engineer 
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Reply all
Reply to author
Forward
0 new messages