<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Double escape of slash in translatable js strings]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=6842</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6842&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Double escape of slash in translatable js strings.]]></description>
		<lastBuildDate>Wed, 28 Jun 2017 17:56:20 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Double escape of slash in translatable js strings]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28065#p28065</link>
			<description><![CDATA[<p>Thanks @joe for the <a href="https://github.com/FrontAccountingERP/FA/commit/c389dc1204205da3235907b9db3ab4aaf246719b">commit</a>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 28 Jun 2017 17:56:20 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28065#p28065</guid>
		</item>
		<item>
			<title><![CDATA[Re: Double escape of slash in translatable js strings]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28061#p28061</link>
			<description><![CDATA[<p>@joe?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 26 Jun 2017 14:23:08 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28061#p28061</guid>
		</item>
		<item>
			<title><![CDATA[Double escape of slash in translatable js strings]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28056#p28056</link>
			<description><![CDATA[<p>In the file <strong>sales/sales_order_entry</strong>, line 762 to 765:<br /></p><div class="codebox"><pre><code>        if ($_SESSION[&#039;Items&#039;]-&gt;trans_type==ST_SALESORDER)
            submit_js_confirm(&#039;CancelOrder&#039;, _(&#039;You are about to cancel undelivered part of this order.\nDo you want to continue?&#039;));
        else
            submit_js_confirm(&#039;CancelOrder&#039;, _(&#039;You are about to void this Document.\nDo you want to continue?&#039;));</code></pre></div><p>the &quot;<strong>\n</strong>&quot; in the translatable strings are listed as &quot;<strong>\\n</strong>&quot; in the <strong>lang/new_language_template/LC_MESSAGES/empty.po</strong> file and in the translation .po files. </p><p>Is this intentional?</p><p>The code however mitigates this using functions that replace them in files in the <strong>includes/ui/</strong> folder:<br /></p><div class="codebox"><pre><code>Line 677 in ui_controls.inc: $msg ? &#039;\&#039;&#039;.strtr($msg, array(&quot;\n&quot;=&gt;&#039;\\n&#039;)) . &#039;\&#039;;&#039; : &#039;null;&#039;);
Line 484 in gettext.inc: $this-&gt;_current_value = str_replace(&#039;\\n&#039;, &quot;\n&quot;, $this-&gt;_current_value);
Line 276 in ui_input.inc: . strtr($msg, array(&quot;\n&quot;=&gt;&#039;\\n&#039;)) . &quot;&#039;);};&quot;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 23 Jun 2017 11:28:28 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28056#p28056</guid>
		</item>
	</channel>
</rss>
