We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 70cf0c2 + b09f0ec commit 15cee4cCopy full SHA for 15cee4c
dev/tests/js/jasmine/tests/lib/mage/translate.test.js
@@ -33,7 +33,8 @@ define([
33
34
translation = {
35
'Hello World!': 'Hallo Welt!',
36
- 'Some text with symbols!-+"%#*': 'Ein Text mit Symbolen!-+"%#*'
+ 'Some text with symbols!-+"%#*': 'Ein Text mit Symbolen!-+"%#*',
37
+ 'Text with empty value': ''
38
};
39
40
$.mage.translate.add(translation);
lib/web/mage/translate.js
@@ -39,7 +39,7 @@ define([
* @return {String}
*/
41
translate: function (text) {
42
- return _data[text] ? _data[text] : text;
+ return typeof _data[text] !== 'undefined' ? _data[text] : text;
43
}
44
45
}())
0 commit comments