Unverified Commit a872a701 authored by Shi-Hao Hong's avatar Shi-Hao Hong Committed by GitHub

Canonicalize locale string in `gen_l10n.dart` (#44758)

* Canonicalize locale string for gen_l10n.dart script

* Refresh stocks example to use canonicalized locale
parent 0d348138
......@@ -73,7 +73,7 @@ import 'messages_all.dart';
/// be consistent with the languages listed in the @className.supportedLocales
/// property.
class @className {
@className(Locale locale) : _localeName = locale.toString();
@className(Locale locale) : _localeName = Intl.canonicalizedLocale(locale.toString());
final String _localeName;
......
......@@ -59,7 +59,7 @@ import 'messages_all.dart';
/// be consistent with the languages listed in the StockStrings.supportedLocales
/// property.
class StockStrings {
StockStrings(Locale locale) : _localeName = locale.toString();
StockStrings(Locale locale) : _localeName = Intl.canonicalizedLocale(locale.toString());
final String _localeName;
......
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