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
Parents Reply
  •  

    ok - I don't have 1.3.0.5, so I guess this is something you got from Worldserver perhaps?  I'm not familiar with that at all.  So I used the 1.2 (legacy embedded) version after I installed Trados Studio 2021:

    Screenshot of Trados Studio interface showing a side-by-side comparison of source and target text segments with XML tags and placeholders. Some tags are highlighted indicating potential issues or selections.

    It's working for me as you intended I think.  So I put t my settings file here: MH_v1.zip

    The only things I can think might be affecting you based on what you have shared so far are these:

    • in the advanced settings you need to make sure your segmentation hint is set to "include" otherwise that segment will be excluded altogether
    • in the embedded content part... perhaps your other rules are interfering?  I don't have your rules so can't check that one

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 10:37 AM (GMT 1) on 16 Sep 2024]
Children