[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.
diff --git a/packages/flutter/lib/src/material/material_localizations.dart b/packages/flutter/lib/src/material/material_localizations.dart
index 8cfd4b0..e048ad8 100644
--- a/packages/flutter/lib/src/material/material_localizations.dart
+++ b/packages/flutter/lib/src/material/material_localizations.dart
@@ -1195,7 +1195,7 @@
String get searchWebButtonLabel => 'Search Web';
@override
- String get shareButtonLabel => 'Share...';
+ String get shareButtonLabel => 'Share';
@override
String get viewLicensesButtonLabel => 'View licenses';
diff --git a/packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart b/packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart
index ec6a20a..8c2c01c 100644
--- a/packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart
+++ b/packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart
@@ -7879,7 +7879,7 @@
String? get selectedRowCountTitleZero => 'No items selected';
@override
- String get shareButtonLabel => 'Share...';
+ String get shareButtonLabel => 'Share';
@override
String get showAccountsLabel => 'Show accounts';
@@ -7943,6 +7943,9 @@
});
@override
+ String get shareButtonLabel => 'Share...';
+
+ @override
String get lookUpButtonLabel => 'Look up';
@override
@@ -8149,6 +8152,9 @@
});
@override
+ String get shareButtonLabel => 'Share...';
+
+ @override
String get lookUpButtonLabel => 'Look up';
@override
@@ -8249,6 +8255,9 @@
});
@override
+ String get shareButtonLabel => 'Share...';
+
+ @override
String get lookUpButtonLabel => 'Look up';
@override
@@ -8349,6 +8358,9 @@
});
@override
+ String get shareButtonLabel => 'Share...';
+
+ @override
String get lookUpButtonLabel => 'Look up';
@override
@@ -8446,6 +8458,9 @@
});
@override
+ String get shareButtonLabel => 'Share...';
+
+ @override
String get lookUpButtonLabel => 'Look up';
@override
@@ -8543,6 +8558,9 @@
});
@override
+ String get shareButtonLabel => 'Share...';
+
+ @override
String get lookUpButtonLabel => 'Look up';
@override
@@ -8640,6 +8658,9 @@
});
@override
+ String get shareButtonLabel => 'Share...';
+
+ @override
String get lookUpButtonLabel => 'Look up';
@override
diff --git a/packages/flutter_localizations/lib/src/l10n/material_en.arb b/packages/flutter_localizations/lib/src/l10n/material_en.arb
index bcce0e2..06fa666 100644
--- a/packages/flutter_localizations/lib/src/l10n/material_en.arb
+++ b/packages/flutter_localizations/lib/src/l10n/material_en.arb
@@ -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",
diff --git a/packages/flutter_localizations/test/material/translations_test.dart b/packages/flutter_localizations/test/material/translations_test.dart
index 24b176b..15b5785 100644
--- a/packages/flutter_localizations/test/material/translations_test.dart
+++ b/packages/flutter_localizations/test/material/translations_test.dart
@@ -535,9 +535,18 @@
// 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');
+ });
}