Fix korean cupertino datepicker datetime order (#163850)
Currently, in the Korean locale (`ko`), the `CupertinoDatePicker` displays the time in the order of `hour : minute : AM/PM`. However, the correct format for Korean conventions is `AM/PM : hour : minute`. This PR modifies the `CupertinoDatePicker` to display the time in the correct order when the Korean locale is used. ## Changes - Updated the time display order for the Korean (`ko`) locale in `CupertinoDatePicker`. - Previous format: `hour : minute : AM/PM` - Updated format: `AM/PM : hour : minute` ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
This commit is contained in:
parent
2bc40b39dc
commit
25f2df623d
1
AUTHORS
1
AUTHORS
@ -132,3 +132,4 @@ dy0gu <support@dy0gu.com>
|
|||||||
Albert Wolszon <albert@wolszon.me>
|
Albert Wolszon <albert@wolszon.me>
|
||||||
Mohammed Chahboun <m97.chahboun@gmail.com>
|
Mohammed Chahboun <m97.chahboun@gmail.com>
|
||||||
Abdessalem Mohellebi <mohellebiabdessalem@gmail.com>
|
Abdessalem Mohellebi <mohellebiabdessalem@gmail.com>
|
||||||
|
Jin Jeongsu <jinjs.dev@gmail.com>
|
@ -4,7 +4,7 @@
|
|||||||
"datePickerMinuteSemanticsLabelOne": "1분",
|
"datePickerMinuteSemanticsLabelOne": "1분",
|
||||||
"datePickerMinuteSemanticsLabelOther": "$minute분",
|
"datePickerMinuteSemanticsLabelOther": "$minute분",
|
||||||
"datePickerDateOrder": "ymd",
|
"datePickerDateOrder": "ymd",
|
||||||
"datePickerDateTimeOrder": "date_time_dayPeriod",
|
"datePickerDateTimeOrder": "date_dayPeriod_time",
|
||||||
"anteMeridiemAbbreviation": "오전",
|
"anteMeridiemAbbreviation": "오전",
|
||||||
"postMeridiemAbbreviation": "오후",
|
"postMeridiemAbbreviation": "오후",
|
||||||
"todayLabel": "오늘",
|
"todayLabel": "오늘",
|
||||||
|
@ -8182,7 +8182,7 @@ class CupertinoLocalizationKo extends GlobalCupertinoLocalizations {
|
|||||||
String get datePickerDateOrderString => 'ymd';
|
String get datePickerDateOrderString => 'ymd';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get datePickerDateTimeOrderString => 'date_time_dayPeriod';
|
String get datePickerDateTimeOrderString => 'date_dayPeriod_time';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String? get datePickerHourSemanticsLabelFew => null;
|
String? get datePickerHourSemanticsLabelFew => null;
|
||||||
|
@ -287,6 +287,20 @@ void main() {
|
|||||||
expect(localizations.datePickerDayOfMonth(1), '1日');
|
expect(localizations.datePickerDayOfMonth(1), '1日');
|
||||||
expect(localizations.datePickerDayOfMonth(1, 2), '周二 1日');
|
expect(localizations.datePickerDayOfMonth(1, 2), '周二 1日');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
testWidgets('Test correct time order for CupertinoDatePicker in Korean locale', (
|
||||||
|
WidgetTester tester,
|
||||||
|
) async {
|
||||||
|
const Locale locale = Locale('ko');
|
||||||
|
expect(GlobalCupertinoLocalizations.delegate.isSupported(locale), isTrue);
|
||||||
|
|
||||||
|
final CupertinoLocalizations localizations = await GlobalCupertinoLocalizations.delegate.load(
|
||||||
|
locale,
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(localizations, isA<CupertinoLocalizationKo>());
|
||||||
|
expect(localizations.datePickerDateTimeOrder, DatePickerDateTimeOrder.date_dayPeriod_time);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
class _FakeEditableText extends EditableText {
|
class _FakeEditableText extends EditableText {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user