[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:  ## Related Issue Step 2 for https://github.com/flutter/flutter/issues/138728 ## Tests Adds 1 test.
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user