Unverified Commit caba667e authored by LouiseHsu's avatar LouiseHsu Committed by GitHub

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.
parent 204a8848
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
"searchTextFieldPlaceholderLabel": "搜索", "searchTextFieldPlaceholderLabel": "搜索",
"noSpellCheckReplacementsLabel": "找不到替换文字", "noSpellCheckReplacementsLabel": "找不到替换文字",
"menuDismissLabel": "关闭菜单", "menuDismissLabel": "关闭菜单",
"lookUpButtonLabel": "向上看", "lookUpButtonLabel": "查询",
"searchWebButtonLabel": "在网络上搜索", "searchWebButtonLabel": "在网络上搜索",
"shareButtonLabel": "分享…", "shareButtonLabel": "分享…",
"clearButtonLabel": "Clear" "clearButtonLabel": "Clear"
......
...@@ -14015,7 +14015,7 @@ class CupertinoLocalizationZh extends GlobalCupertinoLocalizations { ...@@ -14015,7 +14015,7 @@ class CupertinoLocalizationZh extends GlobalCupertinoLocalizations {
String? get datePickerMinuteSemanticsLabelZero => null; String? get datePickerMinuteSemanticsLabelZero => null;
@override @override
String get lookUpButtonLabel => '向上看'; String get lookUpButtonLabel => '查询';
@override @override
String get menuDismissLabel => '关闭菜单'; String get menuDismissLabel => '关闭菜单';
......
...@@ -43724,7 +43724,7 @@ class MaterialLocalizationZh extends GlobalMaterialLocalizations { ...@@ -43724,7 +43724,7 @@ class MaterialLocalizationZh extends GlobalMaterialLocalizations {
String get licensesPageTitle => '许可'; String get licensesPageTitle => '许可';
@override @override
String get lookUpButtonLabel => '向上看'; String get lookUpButtonLabel => '查询';
@override @override
String get menuBarMenuLabel => '菜单栏的菜单'; String get menuBarMenuLabel => '菜单栏的菜单';
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
"expandedHint": "已收起", "expandedHint": "已收起",
"collapsedHint": "已展开", "collapsedHint": "已展开",
"menuDismissLabel": "关闭菜单", "menuDismissLabel": "关闭菜单",
"lookUpButtonLabel": "向上看", "lookUpButtonLabel": "查询",
"searchWebButtonLabel": "在网络上搜索", "searchWebButtonLabel": "在网络上搜索",
"shareButtonLabel": "分享…", "shareButtonLabel": "分享…",
"clearButtonTooltip": "Clear text" "clearButtonTooltip": "Clear text"
......
...@@ -231,6 +231,14 @@ void main() { ...@@ -231,6 +231,14 @@ void main() {
expect(buttonItems.first.onPressed, isNull); 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 { class _FakeEditableText extends EditableText {
......
...@@ -549,4 +549,13 @@ void main() { ...@@ -549,4 +549,13 @@ void main() {
expect(localizations, isA<MaterialLocalizationEn>()); expect(localizations, isA<MaterialLocalizationEn>());
expect(localizations.shareButtonLabel, 'Share'); 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, '查询');
});
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment