-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
a: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)c: parityWorks on one platform but not anotherWorks on one platform but not anothercustomer: googleVarious Google teamsVarious Google teamscustomer: huggsy (g3)engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.35Found to occur in 3.35Found to occur in 3.35found in release: 3.37Found to occur in 3.37Found to occur in 3.37frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamOwned by Web platform team
Description
Steps to reproduce
- Create two locales
one = Locale('en')andtwo = Locale('en', '') - Log both
This is an exact duplicate of #43607. That issue was fixed for native platforms but not for web platforms. The same fix should be applied to https://github.com/flutter/flutter/blob/master/engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart and https://github.com/flutter/flutter/blob/master/engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart
Expected results
Both should print as en.
Actual results
See that one is en and two is en_
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
print(Locale('en'));
print(Locale('en', ''));
}Can be run in dartpad
Screenshots or Video
N/A
Logs
N/A
Flutter Doctor output
N/A
Metadata
Metadata
Assignees
Labels
a: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)c: parityWorks on one platform but not anotherWorks on one platform but not anothercustomer: googleVarious Google teamsVarious Google teamscustomer: huggsy (g3)engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.35Found to occur in 3.35Found to occur in 3.35found in release: 3.37Found to occur in 3.37Found to occur in 3.37frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamOwned by Web platform team