Unverified Commit b6fa0418 authored by Bruno Leroux's avatar Bruno Leroux Committed by GitHub

[l10n] Update Material shareButtonLabel (#138899)

## Description

This PR updates the Material label for the share option, currently it is "**Share...**" (the expected label on iOS), on Android it should be "**Share**".

Native Android TextField screenshot:

![Capture d’écran du 2023-11-20 17-19-02](https://github.com/flutter/flutter/assets/840911/6004b900-0ba4-441e-a814-4afd0c0e2fe2)

## Related Issue

Step 2 for https://github.com/flutter/flutter/issues/138728

## Tests

Adds 1 test.
parent b2d90eb6
...@@ -1195,7 +1195,7 @@ class DefaultMaterialLocalizations implements MaterialLocalizations { ...@@ -1195,7 +1195,7 @@ class DefaultMaterialLocalizations implements MaterialLocalizations {
String get searchWebButtonLabel => 'Search Web'; String get searchWebButtonLabel => 'Search Web';
@override @override
String get shareButtonLabel => 'Share...'; String get shareButtonLabel => 'Share';
@override @override
String get viewLicensesButtonLabel => 'View licenses'; String get viewLicensesButtonLabel => 'View licenses';
......
...@@ -7879,7 +7879,7 @@ class MaterialLocalizationEn extends GlobalMaterialLocalizations { ...@@ -7879,7 +7879,7 @@ class MaterialLocalizationEn extends GlobalMaterialLocalizations {
String? get selectedRowCountTitleZero => 'No items selected'; String? get selectedRowCountTitleZero => 'No items selected';
@override @override
String get shareButtonLabel => 'Share...'; String get shareButtonLabel => 'Share';
@override @override
String get showAccountsLabel => 'Show accounts'; String get showAccountsLabel => 'Show accounts';
...@@ -7942,6 +7942,9 @@ class MaterialLocalizationEnAu extends MaterialLocalizationEn { ...@@ -7942,6 +7942,9 @@ class MaterialLocalizationEnAu extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat, required super.twoDigitZeroPaddedFormat,
}); });
@override
String get shareButtonLabel => 'Share...';
@override @override
String get lookUpButtonLabel => 'Look up'; String get lookUpButtonLabel => 'Look up';
...@@ -8148,6 +8151,9 @@ class MaterialLocalizationEnGb extends MaterialLocalizationEn { ...@@ -8148,6 +8151,9 @@ class MaterialLocalizationEnGb extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat, required super.twoDigitZeroPaddedFormat,
}); });
@override
String get shareButtonLabel => 'Share...';
@override @override
String get lookUpButtonLabel => 'Look up'; String get lookUpButtonLabel => 'Look up';
...@@ -8248,6 +8254,9 @@ class MaterialLocalizationEnIe extends MaterialLocalizationEn { ...@@ -8248,6 +8254,9 @@ class MaterialLocalizationEnIe extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat, required super.twoDigitZeroPaddedFormat,
}); });
@override
String get shareButtonLabel => 'Share...';
@override @override
String get lookUpButtonLabel => 'Look up'; String get lookUpButtonLabel => 'Look up';
...@@ -8348,6 +8357,9 @@ class MaterialLocalizationEnIn extends MaterialLocalizationEn { ...@@ -8348,6 +8357,9 @@ class MaterialLocalizationEnIn extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat, required super.twoDigitZeroPaddedFormat,
}); });
@override
String get shareButtonLabel => 'Share...';
@override @override
String get lookUpButtonLabel => 'Look up'; String get lookUpButtonLabel => 'Look up';
...@@ -8445,6 +8457,9 @@ class MaterialLocalizationEnNz extends MaterialLocalizationEn { ...@@ -8445,6 +8457,9 @@ class MaterialLocalizationEnNz extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat, required super.twoDigitZeroPaddedFormat,
}); });
@override
String get shareButtonLabel => 'Share...';
@override @override
String get lookUpButtonLabel => 'Look up'; String get lookUpButtonLabel => 'Look up';
...@@ -8542,6 +8557,9 @@ class MaterialLocalizationEnSg extends MaterialLocalizationEn { ...@@ -8542,6 +8557,9 @@ class MaterialLocalizationEnSg extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat, required super.twoDigitZeroPaddedFormat,
}); });
@override
String get shareButtonLabel => 'Share...';
@override @override
String get lookUpButtonLabel => 'Look up'; String get lookUpButtonLabel => 'Look up';
...@@ -8639,6 +8657,9 @@ class MaterialLocalizationEnZa extends MaterialLocalizationEn { ...@@ -8639,6 +8657,9 @@ class MaterialLocalizationEnZa extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat, required super.twoDigitZeroPaddedFormat,
}); });
@override
String get shareButtonLabel => 'Share...';
@override @override
String get lookUpButtonLabel => 'Look up'; String get lookUpButtonLabel => 'Look up';
...@@ -199,17 +199,17 @@ ...@@ -199,17 +199,17 @@
"lookUpButtonLabel": "Look Up", "lookUpButtonLabel": "Look Up",
"@lookUpButtonLabel": { "@lookUpButtonLabel": {
"description": "The label for the Look Up button and menu items on iOS." "description": "The label for the Look Up button and menu items."
}, },
"searchWebButtonLabel": "Search Web", "searchWebButtonLabel": "Search Web",
"@searchWebButtonLabel": { "@searchWebButtonLabel": {
"description": "The label for the Search Web button and menu items on iOS." "description": "The label for the Search Web button and menu items."
}, },
"shareButtonLabel": "Share...", "shareButtonLabel": "Share",
"@shareButtonLabel": { "@shareButtonLabel": {
"description": "The label for the Share button and menu items on iOS." "description": "The label for the Share button and menu items."
}, },
"okButtonLabel": "OK", "okButtonLabel": "OK",
......
...@@ -535,9 +535,18 @@ void main() { ...@@ -535,9 +535,18 @@ void main() {
// Regression test for https://github.com/flutter/flutter/issues/110451. // Regression test for https://github.com/flutter/flutter/issues/110451.
testWidgets('Finnish translation for tab label', (WidgetTester tester) async { testWidgets('Finnish translation for tab label', (WidgetTester tester) async {
const Locale locale = Locale('fi'); const Locale locale = Locale('fi');
expect(GlobalCupertinoLocalizations.delegate.isSupported(locale), isTrue); expect(GlobalMaterialLocalizations.delegate.isSupported(locale), isTrue);
final MaterialLocalizations localizations = await GlobalMaterialLocalizations.delegate.load(locale); final MaterialLocalizations localizations = await GlobalMaterialLocalizations.delegate.load(locale);
expect(localizations, isA<MaterialLocalizationFi>()); expect(localizations, isA<MaterialLocalizationFi>());
expect(localizations.tabLabel(tabIndex: 1, tabCount: 2), 'Välilehti 1 kautta 2'); expect(localizations.tabLabel(tabIndex: 1, tabCount: 2), 'Välilehti 1 kautta 2');
}); });
// Regression test for https://github.com/flutter/flutter/issues/138728.
testWidgets('Share button label on Material', (WidgetTester tester) async {
const Locale locale = Locale('en');
expect(GlobalMaterialLocalizations.delegate.isSupported(locale), isTrue);
final MaterialLocalizations localizations = await GlobalMaterialLocalizations.delegate.load(locale);
expect(localizations, isA<MaterialLocalizationEn>());
expect(localizations.shareButtonLabel, 'Share');
});
} }
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