<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged spycases</title>
<link>https://overflow.efficy.io/?qa=tag/spycases</link>
<description>Powered by Question2Answer</description>
<item>
<title>How translate message / label into a standard serverJS like spyCases.js</title>
<link>https://overflow.efficy.io/?qa=6604/translate-message-label-into-standard-serverjs-like-spycases</link>
<description>&lt;p&gt;We need to customize the Spycase file with lot of translations  into the declared var MAILS.&lt;/p&gt;

&lt;p&gt;Depending on USER language preferences we want to translate in some language all the value.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var MAILS = {
Close  : &quot;The case has been closed by the SpyCase.&quot;,
Remind : &quot;The Customer/Partner has not replied in $0 days.\nPlease send a reminder or tentatively close the case.&quot;,
Revive : &quot;This case has not changed in $0 days.\nThe ticket was waiting for $1.\nPlease take action to activate this case.&quot;,
Links  : &quot;\n___________________________________\nThis case is linked to $0$1$2&quot;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So we basically searched into the standard to find all those labels into the EfficyLabels txt file and adding our own definitions. But without any success.&lt;br&gt;
So we try to compare with native serverJS where some labels are translated.&lt;br&gt;
So we found some translation into few serverJS like invoicing/invoicing.js with &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;if (!mainLinkedEntityId) throw new Error(format(Utils.translate('The main linked $0 could not be retrieved'), linkedEntity)); 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or into workload/roadmapElement.js&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;if (!this.hasRight(right, projKey, nodeType, nodeKey, fields)) {
throw new Error(
format(
Request.translate('You need the $0 right on the $1 #$2 to perform this action'),
right,
Efficy.entityCatalog.getEntityName(ntTable),
nodeKey
)
);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We tried to add needed modules to run a translation but nothing worked.&lt;br&gt;
So anybody has already translated this kind of labels into a serverJS used into the Scheduled Efficy Service ?&lt;/p&gt;

&lt;p&gt;Thank's&lt;br&gt;
Laurent Tuffraud &lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6604/translate-message-label-into-standard-serverjs-like-spycases</guid>
<pubDate>Thu, 16 Jun 2022 09:23:06 +0000</pubDate>
</item>
</channel>
</rss>