Previewing translations

Release 1.0 - ...

Translations can be previewed directly in both the TestSuite and the CMS.

The Logic field can be used to create testing scenarios. During previews, the current, edited replacement will be used by the publication server.

Configuring Translation Preview in the CMS

First, add the CTFP useTabbedPreview to the Nr field of Translations:

XML CopyCode image Copy Code
<?xml version="1.0" encoding="utf-8" ?>
<properties>
 <property name="useTabbedPreview" type="Boolean" roles="*">1</property>
</properties>

Second, you will have to add the otherwise unused Logic field in the Translation ContentTypes.

Then, import the following CTFPs in the Logic field:

XML CopyCode image Copy Code
<?xml version="1.0" encoding="utf-8" ?>
<properties>
 <property name="Group" type="String" roles="*">
 <![CDATA[Translation]]>
 </property>
 <property name="EditProgID" type="String" roles="*">
 <![CDATA[SixSmartUI.SXMLEditor]]>
 </property>
 <property name="SchemaSetId" type="String" roles="*">
 <![CDATA[sxml+xhtml1-strict]]>
 </property>
 <property name="ctrl:Height" type="String" roles="*">
 <![CDATA[200px]]>
 </property>
 <property name="ctrl:Caption" type="String" roles="*">
 <![CDATA[Preview data]]>
 </property>
</properties>

Finally, add the following ACE rules to the Translation Name field (physical field Title)

XML CopyCode image Copy Code
<?xml version="1.0" encoding="utf-8" ?>
<properties>
 <property name="cust:rules" type="String" roles="*">
 <![CDATA[applyRule(function(t,x){var s = '{'+webControl.value.split('(')[0].toLowerCase(), d=getData(t); if(!d || d.indexOf(s)==-1) setData(t, s+'()}')}, 'Logic');]]>
 </property>
</properties>

 

Even system translations can be previewed this way. You can create test setups in the logic field in order to test ELBA blocks:

ELBA Translation preview setup