Commit 0a9004aa authored by ager@chromium.org's avatar ager@chromium.org

Adding vendor prefix to Locale class (becoming v8Locale) to minimize risk of future changes.

Review URL: http://codereview.chromium.org/6332022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e3366d8b
......@@ -39,8 +39,9 @@ namespace internal {
I18NExtension* I18NExtension::extension_ = NULL;
// TODO(cira): maybe move JS code to a .js file and generata cc files from it?
// TODO(cira): Remove v8 prefix from v8Locale once we have stable API.
const char* const I18NExtension::kSource =
"Locale = function(optLocale) {"
"v8Locale = function(optLocale) {"
" native function NativeJSLocale();"
" var properties = NativeJSLocale(optLocale);"
" this.locale = properties.locale;"
......@@ -48,41 +49,41 @@ const char* const I18NExtension::kSource =
" this.script = properties.script;"
" this.region = properties.region;"
"};"
"Locale.availableLocales = function() {"
"v8Locale.availableLocales = function() {"
" native function NativeJSAvailableLocales();"
" return NativeJSAvailableLocales();"
"};"
"Locale.prototype.maximizedLocale = function() {"
"v8Locale.prototype.maximizedLocale = function() {"
" native function NativeJSMaximizedLocale();"
" return new Locale(NativeJSMaximizedLocale(this.locale));"
" return new v8Locale(NativeJSMaximizedLocale(this.locale));"
"};"
"Locale.prototype.minimizedLocale = function() {"
"v8Locale.prototype.minimizedLocale = function() {"
" native function NativeJSMinimizedLocale();"
" return new Locale(NativeJSMinimizedLocale(this.locale));"
" return new v8Locale(NativeJSMinimizedLocale(this.locale));"
"};"
"Locale.prototype.displayLocale_ = function(displayLocale) {"
"v8Locale.prototype.displayLocale_ = function(displayLocale) {"
" var result = this.locale;"
" if (displayLocale !== undefined) {"
" result = displayLocale.locale;"
" }"
" return result;"
"};"
"Locale.prototype.displayLanguage = function(optDisplayLocale) {"
"v8Locale.prototype.displayLanguage = function(optDisplayLocale) {"
" var displayLocale = this.displayLocale_(optDisplayLocale);"
" native function NativeJSDisplayLanguage();"
" return NativeJSDisplayLanguage(this.locale, displayLocale);"
"};"
"Locale.prototype.displayScript = function(optDisplayLocale) {"
"v8Locale.prototype.displayScript = function(optDisplayLocale) {"
" var displayLocale = this.displayLocale_(optDisplayLocale);"
" native function NativeJSDisplayScript();"
" return NativeJSDisplayScript(this.locale, displayLocale);"
"};"
"Locale.prototype.displayRegion = function(optDisplayLocale) {"
"v8Locale.prototype.displayRegion = function(optDisplayLocale) {"
" var displayLocale = this.displayLocale_(optDisplayLocale);"
" native function NativeJSDisplayRegion();"
" return NativeJSDisplayRegion(this.locale, displayLocale);"
"};"
"Locale.prototype.displayName = function(optDisplayLocale) {"
"v8Locale.prototype.displayName = function(optDisplayLocale) {"
" var displayLocale = this.displayLocale_(optDisplayLocale);"
" native function NativeJSDisplayName();"
" return NativeJSDisplayName(this.locale, displayLocale);"
......
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