Browse Source

Fixed entities in strings with .nocopy

Closes #1060
master
Igor Zhukov 9 years ago
parent
commit
0e9b2163b3
  1. 3
      app/js/lib/i18n.js

3
app/js/lib/i18n.js

@ -114,10 +114,11 @@ angular.module('myApp.i18n', ['izhukov.utils']) @@ -114,10 +114,11 @@ angular.module('myApp.i18n', ['izhukov.utils'])
formats.each(function(index, 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 msgstr = _(msgid, params);
if (format.hasClass('nocopy')) {
var msgstr = _(msgid + '_raw', params);
format.attr('data-content', msgstr);
} else {
var msgstr = _(msgid, params);
format.html(msgstr);
}
});

Loading…
Cancel
Save