Index: src/extensions/experimental/i18n-extension.cc |
=================================================================== |
--- src/extensions/experimental/i18n-extension.cc (revision 6529) |
+++ src/extensions/experimental/i18n-extension.cc (working copy) |
@@ -39,8 +39,9 @@ |
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 @@ |
" 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);" |