protect text in xml translation project

Hi there,

i have to adapt the filetype of an existing Project Type in WorldServer. The actual implemented state is, that there are xml files to be translated which can contain html-tags. The filetype used is xml v 1.3.0.5 and also Embedded Content Plain Text. I am using Trados Studio 2021 for the changes.

The following needs to be adapted

1. text which is in curly brackets needs to be protected from translation e.g. "Zum Beispiel {model.trunkCapacity}"
2. for xml-elements which have certain attribute (anchor, itemLink, linkURL, modelCode, path, sling:alias) the text needs to be protected from translation
3. for xml-elements which have certain attributes (navTitle, jcr:description) the text needs to be colored

I have done following changes in Trados Studio to implement the changes

1. protected text in curly brackets:
I created a placeholder in the inline-tags for the embedded content, in the placeholder i entered a regular expression which should cover all text in curly brackets. When i preview in Trados Studio the curly brackets are not protected....what am i doing wrong here?

Trados Studio dialog showing inline rules with a regular expression for placeholders. The expression is intended to match text in curly brackets.

Preview window in Trados Studio displaying XML content. Text within curly brackets is highlighted, indicating it is not protected as intended.

2. protected text for xml-elements with certain attributes:
I created a parser rule for the file type (for tests only for the anchor attribute) and set it to not translatable. This works but the problem is that the text is therefore not shown in the preview, he is removed completely. This is not what is needed, the text needs to be shown but only protected...what am i doing wrong here?

Trados Studio parser rules settings window. An XPath rule is set for the 'anchor' attribute to make text non-translatable and displayed in aqua color.

3. differently colored text for certain xml-elements:
i created a parser rule and set the formating to a different color, this works as intended, so no questions here.

i have attached a example xml-file with which i tested the changes

<?xml version="1.0" encoding="UTF-8"?><translationObjectFile fileType="PAGE" sourcePath="/content/bmw/marketMASTER/language_blueprint/it_IT/all-models/5-series/5-series-touring/5-series-touring-2024-g61">
  <translationObjectProperties>
    <property isMultiValue="false" nodePath="/content/bmw/marketMASTER/language_blueprint/it_IT/all-models/5-series/5-series-touring/5-series-touring-2024-g61/jcr:content" propertyName="jcr:title">Modell: Modelle, technische Daten und Preise</property>
    <property isMultiValue="false" nodePath="/content/bmw/marketMASTER/language_blueprint/it_IT/all-models/5-series/5-series-touring/5-series-touring-2024-g61/jcr:content" propertyName="sling:alias">neues Modell </property>
    <property isMultiValue="false" nodePath="/content/bmw/marketMASTER/language_blueprint/it_IT/all-models/5-series/5-series-touring/5-series-touring-2024-g61/jcr:content" propertyName="jcr:description">Alle Highlights des neuen Modells: Modelle, Ausstattung, technische Daten, Preise und Services. Jetzt entdecken und konfigurieren.</property>
    <property isMultiValue="false" nodePath="/content/bmw/marketMASTER/language_blueprint/it_IT/all-models/5-series/5-series-touring/5-series-touring-2024-g61/jcr:content" propertyName="navTitle">Modell: Überblick</property>
    <property isMultiValue="false" nodePath="/content/bmw/marketMASTER/language_blueprint/it_IT/all-models/5-series/5-series-touring/5-series-touring-2024-g61/jcr:content/root/maincontent" propertyName="linkLabel">Test Modell</property>
    <property isMultiValue="false" nodePath="/content/bmw/marketMASTER/language_blueprint/it_IT/all-models/5-series/5-series-touring/5-series-touring-2024-g61/jcr:content/root/maincontent" propertyName="anchor">false</property>
	<property isMultiValue="false" nodePath="/content/bmw/marketMASTER/language_blueprint/it_IT/all-models/5-series/5-series-touring/5-series-touring-2024-g61/jcr:content/root/maincontent/contentblueprint_306689145/container/text" propertyName="text">Zum Beispiel {model.trunkCapacity} l(1) Kofferraumvolumen, in denen von Fahrrad bis Kinderwagen alles Raum findet. Ein großzügiges Interieur, in dem Sie auch auf Langstrecken komfortabel reisen. Digitale Highlights wie das große, geschwungene BMW Curved Display. Und sportliche {model.Power} kW ({model.horsePower} PS)(1), die jeden Tag noch aufregender machen. Entdecken Sie seine Modellvarianten, Ausstattungsoptionen und technische Daten sowie vielfältige Leasing- und Finanzierungsmöglichkeiten.</property>
  </translationObjectProperties>
</translationObjectFile>

Can someone help me with the first two points, i dont know how to solve this. Any help is greatly appreciated, thanks in advance



Generated Image Alt-Text
[edited by: RWS Community AI at 9:07 AM (GMT 1) on 16 Sep 2024]
emoji