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

Unified Diff: src/i18n.cc

Issue 2248563003: Support language tag extensions with multiple subtags for a key (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add a real test for nu in presence of multiple type subtags for ca Created 4 years, 4 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 | src/js/i18n.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/i18n.cc
diff --git a/src/i18n.cc b/src/i18n.cc
index b64fc17cde94a22693092a480de51f803edbacf5..3418ae79f1e095d4db7b606e72c416938cbee74e 100644
--- a/src/i18n.cc
+++ b/src/i18n.cc
@@ -157,6 +157,9 @@ void SetResolvedDateSettings(Isolate* isolate,
// Set time zone and calendar.
const icu::Calendar* calendar = date_format->getCalendar();
+ // getType() returns legacy calendar type name instead of LDML/BCP47 calendar
+ // key values. i18n.js maps them to BCP47 values for key "ca".
+ // TODO(jshin): Consider doing it here, instead.
const char* calendar_name = calendar->getType();
JSObject::SetProperty(resolved, factory->NewStringFromStaticChars("calendar"),
factory->NewStringFromAsciiChecked(calendar_name),
« no previous file with comments | « no previous file | src/js/i18n.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698