|
|
@@ -98,7 +98,9 @@ module.exports = {
|
|
98
|
98
|
return i18n.lng();
|
|
99
|
99
|
},
|
|
100
|
100
|
translateElement: function (selector, options) {
|
|
101
|
|
- selector.i18n(options);
|
|
|
101
|
+ // i18next expects undefined if options are missing, check if its null
|
|
|
102
|
+ selector.i18n(
|
|
|
103
|
+ options === null ? undefined : options);
|
|
102
|
104
|
},
|
|
103
|
105
|
generateTranslationHTML: function (key, options) {
|
|
104
|
106
|
var str = "<span data-i18n=\"" + key + "\"";
|
|
|
@@ -106,7 +108,8 @@ module.exports = {
|
|
106
|
108
|
str += " data-i18n-options='" + JSON.stringify(options) + "'";
|
|
107
|
109
|
}
|
|
108
|
110
|
str += ">";
|
|
109
|
|
- str += i18n.t(key, options);
|
|
|
111
|
+ // i18next expects undefined if options ARE missing, check if its null
|
|
|
112
|
+ str += i18n.t(key, options === null ? undefined : options);
|
|
110
|
113
|
str += "</span>";
|
|
111
|
114
|
return str;
|
|
112
|
115
|
|