Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prototype an initial data provider for the Ideal Components Bag #1318

Open
Tracked by #1317
gregtatum opened this issue Nov 18, 2021 · 9 comments
Open
Tracked by #1317

Prototype an initial data provider for the Ideal Components Bag #1318

gregtatum opened this issue Nov 18, 2021 · 9 comments
Labels
C-datetime Component: datetime, calendars, time zones help wanted Issue needs an assignee S-large Size: A few weeks (larger feature, major refactoring) T-core Type: Required functionality

Comments

@gregtatum
Copy link
Member

This is a subtask of #1317.

Prototype and land an initial design for the provider data. This first pass does not need to be perfect, but will inform what additional information we need from CLDR. This step will probably use some of the skeleton matching and manipulation already present in the current implementation.

@gregtatum gregtatum added C-datetime Component: datetime, calendars, time zones S-large Size: A few weeks (larger feature, major refactoring) labels Nov 18, 2021
@sffc sffc added this to the ICU4X 0.6 milestone Dec 9, 2021
@sffc sffc added help wanted Issue needs an assignee T-core Type: Required functionality labels Dec 9, 2021
@gregtatum
Copy link
Member Author

@sffc where should prototype data provider could go? Should it live in the main data providers or can we do it in experimental?

@gregtatum
Copy link
Member Author

The Provider data format section of the design document shows the general shape of what the data provider information should look like.

There is some design work that needs to be done to decide exactly how the data should look, but I think there is enough to start prototyping an initial solution.

The work here is to build a data provider that can output the desired format. Much of the information can be taken directly from the CLDR availableFormats section. However, for anything that's missing, these patterns will need to be generated using the existing DateTimeFormat components bag machinery.

@sffc
Copy link
Member

sffc commented Feb 15, 2022

The lion's share of the code in the datetime crate is built on assumptions of the old data model, and many of the pieces independent of the data model have been moved to the calendar crate. I therefore believe the best place to start working on this is in a new experimental crate. At the end, once things are working, we will reconcile the two.

@gregtatum
Copy link
Member Author

CLDR is the repository of patterns for the date time format for different locales.
https://cldr.unicode.org/

ICU4X uses the JSON version of it: https://github.com/unicode-org/cldr-json

When doing DateTimeFormat operations, we use our own types from a provider: The existing DateTimeFormat data providers are here: components/datetime/src/provider

However, we need to transform CLDR data into the format we want. This code lives here: provider/cldr/src/transform/datetime/

The new component should live in experimental/.

@gregtatum
Copy link
Member Author

@ozghimire I tried to provide the context you need to get going. Feel free to ask questions here, or reach out in other channels that work better for you. There is slack and we can schedule a video call if you need.

I would suggest opening a draft PR as soon as you get any code going as I think it will be easier to comment on the direction and approach, even the code is not even compiling.

@ozghimire
Copy link
Contributor

ozghimire commented Feb 15, 2022

@gregtatum you mentioned slack channel, what's the url to join the working group. Also these documents are great, I am just starting out with the project as well as open source contributions. I would love to connect over a call and get directions before I start working on things.

Update : I have tried joining unicode-org.slack.com but I feel I need a @unicode.org email. I wasn't able to join the group via personal email.

@gregtatum
Copy link
Member Author

I'm looking into it.

@ozghimire
Copy link
Contributor

@gregtatum Ready to start working on this. Would like to get an overall general idea about it.

@gregtatum
Copy link
Member Author

To loop in our conversation outside of GitHub, I suggested finding another small issue to get a bit more practice in the codebase before taking on the larger issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-datetime Component: datetime, calendars, time zones help wanted Issue needs an assignee S-large Size: A few weeks (larger feature, major refactoring) T-core Type: Required functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants