Skip to content

feat: support partial i18n in time picker #9141

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sissbruecker
Copy link
Contributor

Description

Adds support for partial I18N objects to time picker. This allows setting an I18N object that only overrides some of the translations and uses default translations as fallback.

Type of change

  • Feature

Comment on lines +196 to +197
* Both `formatTime` and `parseTime` need to be implemented
* to ensure the component works properly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this statement can be removed with the partial i18n approach, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That part is indeed a bit confusing at the moment. Technically you can omit either function, but then the component likely won't work correctly, as the component logic depends on the parse function to work with what the format function produces. But I didn't have any good ideas on how to make that clearer. I can take another look if I can formulate this better.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. We can keep probably keep it, and consider this change a refactoring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants