Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"searchTextFieldPlaceholderLabel": "搜索",
"noSpellCheckReplacementsLabel": "找不到替换文字",
"menuDismissLabel": "关闭菜单",
"lookUpButtonLabel": "向上看",
"lookUpButtonLabel": "查询",
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have a separate localization for traditional chinese?

Copy link
Contributor

Choose a reason for hiding this comment

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

We have zh_TW and zh_HK. Actually I think these ones already got it right somehow:

Locale lookupButtonLabel
en
zh_TW
zh_HK

"searchWebButtonLabel": "在网络上搜索",
"shareButtonLabel": "分享…",
"clearButtonLabel": "Clear"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14015,7 +14015,7 @@ class CupertinoLocalizationZh extends GlobalCupertinoLocalizations {
String? get datePickerMinuteSemanticsLabelZero => null;

@override
String get lookUpButtonLabel => '向上看';
String get lookUpButtonLabel => '查询';

@override
String get menuDismissLabel => '关闭菜单';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43724,7 +43724,7 @@ class MaterialLocalizationZh extends GlobalMaterialLocalizations {
String get licensesPageTitle => '许可';

@override
String get lookUpButtonLabel => '向上看';
String get lookUpButtonLabel => '查询';

@override
String get menuBarMenuLabel => '菜单栏的菜单';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"expandedHint": "已收起",
"collapsedHint": "已展开",
"menuDismissLabel": "关闭菜单",
"lookUpButtonLabel": "向上看",
"lookUpButtonLabel": "查询",
"searchWebButtonLabel": "在网络上搜索",
"shareButtonLabel": "分享…",
"clearButtonTooltip": "Clear text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, '查询');
});
Copy link
Contributor

@justinmc justinmc Jan 25, 2024

Choose a reason for hiding this comment

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

Nit: Is it actually useful to add tests like this? If we've done it before then no worries, just checking.

Copy link
Contributor Author

@LouiseHsu LouiseHsu Jan 25, 2024

Choose a reason for hiding this comment

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

added it just cuz the translations havent been approved yet, so small chance this change might get overwritten by the translation tool. i definitely also just copied this test because there were other tests in this file that do the same thing 😅

}