You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My fix to allow line breaks (\n) in the translation js files was to introduce a line of code on line 159 of i18n.js:
__: function(){varmsg=this.translate(this.locale,arguments[0]);if(arguments.length>1){msg=vsprintf(msg,Array.prototype.slice.call(arguments,1));}msg=msg.replace(/\n/g,"<br />");//allow line breaksreturnmsg;},
that means that an input like this:
{"Never miss out, you can watch a replay.": "永远不会错过,\n您可观看重播",}
outputs like this in express.js:
in template file: <%- __("Never miss out, you can watch a replay.") %>
actual code printed on page: 永远不会错过,<br />您可观看重播
Is there a better way to do this? Or any plan to allow for output in future?
The text was updated successfully, but these errors were encountered:
My fix to allow line breaks (\n) in the translation js files was to introduce a line of code on line 159 of i18n.js:
that means that an input like this:
outputs like this in express.js:
in template file:
<%- __("Never miss out, you can watch a replay.") %>
actual code printed on page:
永远不会错过,<br />您可观看重播
Is there a better way to do this? Or any plan to allow for
output in future?
The text was updated successfully, but these errors were encountered: