From 2a1debfccfe2cc00e596607ac7cb1d29d2af8834 Mon Sep 17 00:00:00 2001 From: hugovdm Date: Fri, 21 Sep 2018 21:29:45 +0200 Subject: [PATCH] Update deprecated subtags from language subtag registry. (#6280) --- lib/ui/window.dart | 5 +++-- tools/gen_locale.dart | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/ui/window.dart b/lib/ui/window.dart index f645e1e6b77..0b1318c997a 100644 --- a/lib/ui/window.dart +++ b/lib/ui/window.dart @@ -171,7 +171,7 @@ class Locale { static String _canonicalizeLanguageCode(String languageCode) { // This switch statement is generated by //flutter/tools/gen_locale.dart - // Mappings generated for language subtag registry as of 2017-08-15. + // Mappings generated for language subtag registry as of 2018-08-08. switch (languageCode) { case 'in': return 'id'; // Indonesian; deprecated 1989-01-01 case 'iw': return 'he'; // Hebrew; deprecated 1989-01-01 @@ -218,6 +218,7 @@ class Locale { case 'mwj': return 'vaj'; // Maligo; deprecated 2015-02-12 case 'myt': return 'mry'; // Sangab Mandaya; deprecated 2010-03-11 case 'nad': return 'xny'; // Nijadali; deprecated 2016-05-30 + case 'ncp': return 'kdz'; // Ndaktup; deprecated 2018-03-08 case 'nnx': return 'ngv'; // Ngong; deprecated 2015-02-12 case 'nts': return 'pij'; // Natagaimas; deprecated 2016-05-30 case 'oun': return 'vaj'; // !O!ung; deprecated 2015-02-12 @@ -273,7 +274,7 @@ class Locale { static String _canonicalizeRegionCode(String regionCode) { // This switch statement is generated by //flutter/tools/gen_locale.dart - // Mappings generated for language subtag registry as of 2017-08-15. + // Mappings generated for language subtag registry as of 2018-08-08. switch (regionCode) { case 'BU': return 'MM'; // Burma; deprecated 1989-12-05 case 'DD': return 'DE'; // German Democratic Republic; deprecated 1990-10-30 diff --git a/tools/gen_locale.dart b/tools/gen_locale.dart index 82fe08d5efd..47d256c7508 100644 --- a/tools/gen_locale.dart +++ b/tools/gen_locale.dart @@ -40,7 +40,7 @@ Map> parseSection(String section) { Future main() async { final HttpClient client = new HttpClient(); - final String body = (await (await (await client.getUrl(Uri.parse(registry))).close()).transform(UTF8.decoder).toList()).join(''); + final String body = (await (await (await client.getUrl(Uri.parse(registry))).close()).transform(utf8.decoder).toList()).join(''); final List>> sections = body.split('%%').map>>(parseSection).toList(); final Map> outputs = >{'language': [], 'region': []}; String fileDate; @@ -68,4 +68,4 @@ Future main() async { print(outputs['language'].join('\n')); print('// For regionCode:'); print(outputs['region'].join('\n')); -} \ No newline at end of file +}