angular / angular/components

Update NativeDateAdapter to use the new i18n api

Đang mở
#8,100 4 bình luận 8 reaction 0 người được giao Xem trên GitHub
area: material/datepicker i18n P2
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

#### Bug, feature request, or proposal:
Feature Request

#### What is the expected behavior?
Material should no longer use the intl API with Angular v5.

#### What is the current behavior?
Material's NativeDateAdapter uses the intl API

#### What are the steps to reproduce?
Providing a StackBlitz/Plunker (or similar) is the *best* way to get the team to see your issue.

Plunker starter (using on `@master`): https://goo.gl/DlHd6U

StackBlitz starter (using latest `npm` release): https://goo.gl/wwnhMV

#### What is the use-case or motivation for changing an existing behavior?
In Angular v5 we have removed the dependency on the intl API to use CLDR data instead. We've also added a new I18n API that can be used by libraries for such a case.
It's very easy to rewrite the NativeDateAdapter to use this instead of intl. The only problem is that Material requires a few formats that are not yet supported by the API.
We can write an adapter that does partial matching, but it'd be better to wait for https://github.com/angular/angular/issues/19823 to be resolved first.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách tìm implementation của NativeDateAdapter và xem xét cách nó hiện đang sử dụng intl API. So sánh các định dạng ngày tháng bắt buộc với I18n API mới của Angular v5 và kiểm tra dependency vào Angular issue 19823; được xem là hoàn thành khi NativeDateAdapter không còn sử dụng intl nhưng vẫn hỗ trợ các định dạng bắt buộc.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
internationalization
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.