Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: src/js/i18n.js

Issue 2639333003: [intl] Check for duplicate BCP 47 tags in a case-insensitive way (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/test262/local-tests/test/intl402/6.2.2_b.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/i18n.js
diff --git a/src/js/i18n.js b/src/js/i18n.js
index 50ed5bcb8943cfeae6264e24ebdadf62e60a33f8..26ebe7e8431a02345348122d8f0c549666f48acc 100644
--- a/src/js/i18n.js
+++ b/src/js/i18n.js
@@ -851,6 +851,8 @@ function isStructuallyValidLanguageTag(locale) {
return false;
}
+ locale = %StringToLowerCase(locale);
+
// Just return if it's a x- form. It's all private.
if (%StringIndexOf(locale, 'x-', 0) === 0) {
return true;
« no previous file with comments | « no previous file | test/test262/local-tests/test/intl402/6.2.2_b.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698