-
Notifications
You must be signed in to change notification settings - Fork 27.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect zh-cn translation for Look Up Label in selection controls #142158
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, '查询'); | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 😅 |
||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have
zh_TW
andzh_HK
. Actually I think these ones already got it right somehow:flutter/packages/flutter_localizations/lib/src/l10n/material_en.arb
Line 205 in e985c29
flutter/packages/flutter_localizations/lib/src/l10n/material_zh_TW.arb
Line 2 in e985c29
flutter/packages/flutter_localizations/lib/src/l10n/material_zh_HK.arb
Line 5 in e985c29