[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.
This commit is contained in:
Bruno Leroux 2023-12-02 00:32:57 +01:00 committed by GitHub
parent b2d90eb6d3
commit b6fa041808
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 7 deletions

View file

@ -1195,7 +1195,7 @@ class DefaultMaterialLocalizations implements MaterialLocalizations {
String get searchWebButtonLabel => 'Search Web';
@override
String get shareButtonLabel => 'Share...';
String get shareButtonLabel => 'Share';
@override
String get viewLicensesButtonLabel => 'View licenses';

View file

@ -7879,7 +7879,7 @@ class MaterialLocalizationEn extends GlobalMaterialLocalizations {
String? get selectedRowCountTitleZero => 'No items selected';
@override
String get shareButtonLabel => 'Share...';
String get shareButtonLabel => 'Share';
@override
String get showAccountsLabel => 'Show accounts';
@ -7942,6 +7942,9 @@ class MaterialLocalizationEnAu extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat,
});
@override
String get shareButtonLabel => 'Share...';
@override
String get lookUpButtonLabel => 'Look up';
@ -8148,6 +8151,9 @@ class MaterialLocalizationEnGb extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat,
});
@override
String get shareButtonLabel => 'Share...';
@override
String get lookUpButtonLabel => 'Look up';
@ -8248,6 +8254,9 @@ class MaterialLocalizationEnIe extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat,
});
@override
String get shareButtonLabel => 'Share...';
@override
String get lookUpButtonLabel => 'Look up';
@ -8348,6 +8357,9 @@ class MaterialLocalizationEnIn extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat,
});
@override
String get shareButtonLabel => 'Share...';
@override
String get lookUpButtonLabel => 'Look up';
@ -8445,6 +8457,9 @@ class MaterialLocalizationEnNz extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat,
});
@override
String get shareButtonLabel => 'Share...';
@override
String get lookUpButtonLabel => 'Look up';
@ -8542,6 +8557,9 @@ class MaterialLocalizationEnSg extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat,
});
@override
String get shareButtonLabel => 'Share...';
@override
String get lookUpButtonLabel => 'Look up';
@ -8639,6 +8657,9 @@ class MaterialLocalizationEnZa extends MaterialLocalizationEn {
required super.twoDigitZeroPaddedFormat,
});
@override
String get shareButtonLabel => 'Share...';
@override
String get lookUpButtonLabel => 'Look up';

View file

@ -199,17 +199,17 @@
"lookUpButtonLabel": "Look Up",
"@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": {
"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": {
"description": "The label for the Share button and menu items on iOS."
"description": "The label for the Share button and menu items."
},
"okButtonLabel": "OK",

View file

@ -535,9 +535,18 @@ void main() {
// Regression test for https://github.com/flutter/flutter/issues/110451.
testWidgets('Finnish translation for tab label', (WidgetTester tester) async {
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);
expect(localizations, isA<MaterialLocalizationFi>());
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');
});
}