Fixed entities in strings with .nocopy

Closes #1060
This commit is contained in:
Igor Zhukov 2016-02-11 14:09:05 +00:00
parent 9db67363b0
commit 0e9b2163b3

View File

@ -114,10 +114,11 @@ angular.module('myApp.i18n', ['izhukov.utils'])
formats.each(function(index, element) { formats.each(function(index, element) {
var format = angular.element(element); var format = angular.element(element);
var msgid = format.attr("my-i18n") || format.attr("msgid") || format.attr("my-i18n-format") || format.html().replace(/\s+/g, ' ').trim(); var msgid = format.attr("my-i18n") || format.attr("msgid") || format.attr("my-i18n-format") || format.html().replace(/\s+/g, ' ').trim();
var msgstr = _(msgid, params);
if (format.hasClass('nocopy')) { if (format.hasClass('nocopy')) {
var msgstr = _(msgid + '_raw', params);
format.attr('data-content', msgstr); format.attr('data-content', msgstr);
} else { } else {
var msgstr = _(msgid, params);
format.html(msgstr); format.html(msgstr);
} }
}); });