mirror of
https://github.com/flutter/flutter
synced 2024-09-17 23:31:55 +00:00
Fix incorrect zh-cn translation for Look Up Label in selection controls (#142158)
Fixes https://github.com/flutter/flutter/issues/141764 Translation suggestion here: https://tc.corp.google.com/btviewer/edittranslation?project=Flutter&msgId=8222331119728136330&language=zh-CN ## 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. - [x] 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] All existing and new tests are passing.
This commit is contained in:
parent
204a8848a6
commit
caba667ed4
|
@ -24,7 +24,7 @@
|
|||
"searchTextFieldPlaceholderLabel": "搜索",
|
||||
"noSpellCheckReplacementsLabel": "找不到替换文字",
|
||||
"menuDismissLabel": "关闭菜单",
|
||||
"lookUpButtonLabel": "向上看",
|
||||
"lookUpButtonLabel": "查询",
|
||||
"searchWebButtonLabel": "在网络上搜索",
|
||||
"shareButtonLabel": "分享…",
|
||||
"clearButtonLabel": "Clear"
|
||||
|
|
|
@ -14015,7 +14015,7 @@ class CupertinoLocalizationZh extends GlobalCupertinoLocalizations {
|
|||
String? get datePickerMinuteSemanticsLabelZero => null;
|
||||
|
||||
@override
|
||||
String get lookUpButtonLabel => '向上看';
|
||||
String get lookUpButtonLabel => '查询';
|
||||
|
||||
@override
|
||||
String get menuDismissLabel => '关闭菜单';
|
||||
|
|
|
@ -43724,7 +43724,7 @@ class MaterialLocalizationZh extends GlobalMaterialLocalizations {
|
|||
String get licensesPageTitle => '许可';
|
||||
|
||||
@override
|
||||
String get lookUpButtonLabel => '向上看';
|
||||
String get lookUpButtonLabel => '查询';
|
||||
|
||||
@override
|
||||
String get menuBarMenuLabel => '菜单栏的菜单';
|
||||
|
|
|
@ -142,7 +142,7 @@
|
|||
"expandedHint": "已收起",
|
||||
"collapsedHint": "已展开",
|
||||
"menuDismissLabel": "关闭菜单",
|
||||
"lookUpButtonLabel": "向上看",
|
||||
"lookUpButtonLabel": "查询",
|
||||
"searchWebButtonLabel": "在网络上搜索",
|
||||
"shareButtonLabel": "分享…",
|
||||
"clearButtonTooltip": "Clear text"
|
||||
|
|
|
@ -231,6 +231,14 @@ void main() {
|
|||
expect(buttonItems.first.onPressed, isNull);
|
||||
});
|
||||
|
||||
// Regression test for https://github.com/flutter/flutter/issues/141764
|
||||
testWidgets('zh-CN translation for look up label', (WidgetTester tester) async {
|
||||
const Locale locale = Locale('zh');
|
||||
expect(GlobalCupertinoLocalizations.delegate.isSupported(locale), isTrue);
|
||||
final CupertinoLocalizations localizations = await GlobalCupertinoLocalizations.delegate.load(locale);
|
||||
expect(localizations, isA<CupertinoLocalizationZh>());
|
||||
expect(localizations.lookUpButtonLabel, '查询');
|
||||
});
|
||||
}
|
||||
|
||||
class _FakeEditableText extends EditableText {
|
||||
|
|
|
@ -549,4 +549,13 @@ void main() {
|
|||
expect(localizations, isA<MaterialLocalizationEn>());
|
||||
expect(localizations.shareButtonLabel, 'Share');
|
||||
});
|
||||
|
||||
// Regression test for https://github.com/flutter/flutter/issues/141764
|
||||
testWidgets('zh-CN translation for look up label', (WidgetTester tester) async {
|
||||
const Locale locale = Locale('zh');
|
||||
expect(GlobalCupertinoLocalizations.delegate.isSupported(locale), isTrue);
|
||||
final MaterialLocalizations localizations = await GlobalMaterialLocalizations.delegate.load(locale);
|
||||
expect(localizations, isA<MaterialLocalizationZh>());
|
||||
expect(localizations.lookUpButtonLabel, '查询');
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue