On Wed, Feb 20, 2019 at 11:42 AM Adam Klein <[email protected]> wrote:
> LGTM to ship, one note inline > > On Tue, Feb 19, 2019 at 9:59 PM Frank Tang (譚永鋒) <[email protected]> wrote: > >> Spec >> >> https://tc39.github.io/proposal-intl-locale/ >> >> Summary >> >> A Stage 3 proposal that introduces a new standard built-in property of >> the Intl object, which allows the following: >> >> - >> >> Parsing and manipulating the language, region and script of a locale >> - >> >> Reading or writing the Unicode extension tags in a locale >> - >> >> A serializable, standard format to store user locale preferences for >> use in Intl APIs rather than a combination of language and options bag. >> - >> >> For future proposals, a Locale class can be used for an interface to >> get at various kinds of locale data, including likely subtags, first day >> of >> the week, various display names, etc. >> - >> >> Allow Intl objects to take Intl.Locale object as item in the locales >> parameter in addition to the pre-existing string form. >> >> Example >> >> let loc = new Intl.Locale("pl-u-hc-h12", { >> >> calendar: 'gregory' >> >> }); >> >> console.log(loc.language); // "pl" >> >> console.log(loc.hourCycle); // "h12" >> >> console.log(loc.calendar); // "gregory" >> >> console.log(loc.toString()); // "pl-u-ca-gregory-hc-h12" >> >> // use Intl.Locale in Intl.DateTimeFormat constructor >> >> let df = new Intl.DateTimeFormat([loc, "pl"]); >> >> // Add likely subtags to the locale >> >> console.log(loc.maximize().toString()); // >> "pl-Latn-PL-u-ca-gregory-hc-h12" >> >> // Remove likely subtags from locale >> >> console.log((new Intl.Locale("zh-Hant-TW")).minimize().toString()) // >> "zh-TW" >> >> console.log((new Intl.Locale("zh-Hans-CN")).minimize().toString()) // >> "zh" >> >> >> >> Interoperability and compatibility risk >> >> The Intl.Locale is new and should have no risk to break pre-existing >> javascript code. >> >> - >> >> Firefox:In development >> <https://bugzilla.mozilla.org/show_bug.cgi?id=1433303> >> - >> >> Edge:In development >> <https://github.com/Microsoft/ChakraCore/pull/5675> >> - >> >> Safari:No public signals >> - >> >> Web Developers:No signals >> >> >> Is this feature fully tested? >> >> Yes; our implementation passes our own V8 tests as well as the Test262 >> tests for all the features. To pass all the test262 tests, V8 is based on >> the latest ICU version 63 with 3 bug fixing patches (uloc1.patch >> <https://cs.chromium.org/chromium/src/third_party/icu/patches/uloc1.patch>, >> uloc2.patch >> <https://cs.chromium.org/chromium/src/third_party/icu/patches/uloc2.patch>, >> uloc3.patch >> <https://cs.chromium.org/chromium/src/third_party/icu/patches/uloc3.patch>), >> which are part of the coming ICU 64 (schedule to be released on March 29, >> 2019) release. >> > > Based on our previous conversation, it sounds like even with ICU 63 the > failures would only be in edge cases, i.e., very uncommon locales. Can you > confirm? > YES. In my 30+ years involving software internationalization, I have not seen a real system (beyond toy project from college homework) really use these broken cases. The failure are on some uncommon locale ON some additional edge cases. (not just uncommon locales) > >> Tracking bug >> >> https://crbug.com/v8/7684 >> >> >> >> Link to entry on the Chrome Platform Status dashboard >> >> https://www.chromestatus.com/feature/4936310187884544 >> >> >> >> Requesting approval to ship? >> >> Yes. Note that since this is a V8/JS feature, this post is just an FYI to >> blink-dev — no signoff from Blink API owners is required. >> >> >> -- >> Frank Yung-Fong Tang >> 譚永鋒 / 🌭🍊 >> Sr. Software Engineer >> > -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
