Closed Bug 1767961 Opened 2 years ago Closed 2 years ago

Remove DateTimeFormat::TryCreateFromSkeleton in favour of TryCreateFromComponents

Categories

(Core :: Internationalization, task)

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(4 files)

TryCreateFromSkeleton is only used by fluent-ffi, where we translate a components bag structure to a skeleton string. Instead of doing that, we can simply pass the components bag to C++ and translate it into DateTimeFormat::ComponentsBag.

All callers were passing Nothing() for the hour-cycle override parameter, so
we might as well remove the parameter from the public API surface.

Instead of creating a skeleton from the components bag on the Rust side,
directly pass the Rust components bag and translate it into the C++
components bag after crossing the FFI boundary.

Depends on D145580

There aren't any callers left for TryCreateFromSkeleton() after part 2.

Depends on D145581

TryCreateFromSkeleton() is only called internally in DateTimeFormat, so we
can make it a private method to reduce the API surface.

Depends on D145582

Pushed by andre.bargull@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/edfd6f83323a
Part 1: Remove hour-cycle override from TryCreateFromSkeleton public API. r=platform-i18n-reviewers,dminor
https://hg.mozilla.org/integration/autoland/rev/fcb9681fb43c
Part 2: Switch fluent-ffi to use TryCreateFromComponents. r=platform-i18n-reviewers,dminor
https://hg.mozilla.org/integration/autoland/rev/c01bc143e756
Part 3: Remove no longer used TryCreateFromSkeleton() method. r=platform-i18n-reviewers,dminor
https://hg.mozilla.org/integration/autoland/rev/188e42a20c32
Part 4: Make TryCreateFromSkeleton a private method. r=platform-i18n-reviewers,dminor
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: