app/assets/javascripts/i18n.js in i18n-js-3.0.8 vs app/assets/javascripts/i18n.js in i18n-js-3.0.9
- old
+ new
@@ -386,11 +386,10 @@
// public API.
I18n.lookup = function(scope, options) {
options = options || {}
var locales = this.locales.get(options.locale).slice()
- , requestedLocale = locales[0]
, locale
, scopes
, fullScope
, translations
;
@@ -445,11 +444,10 @@
// Lookup dedicated to pluralization
I18n.pluralizationLookup = function(count, scope, options) {
options = options || {}
var locales = this.locales.get(options.locale).slice()
- , requestedLocale = locales[0]
, locale
, scopes
, translations
, message
;
@@ -609,9 +607,13 @@
return translation;
};
// This function interpolates the all variables in the given message.
I18n.interpolate = function(message, options) {
+ if (message === null) {
+ return message;
+ }
+
options = options || {}
var matches = message.match(this.placeholder)
, placeholder
, value
, name