Can Trados extract TEXT to make it easier to translate?

Hello. Can Trados extract TEXT from this example to make it easier to translate?
Example: <Text ClassID="826269" Text="TEXT."/>
I.e. so that only the TEXT (for translation) gets into the segment, and the original version appears on the output.

If this is not realizable, is it possible to set the settings so that all or part of the fragment ( <Text ClassID="826269" Text="") goes straight into the translation segment?
XML file format, but Trados doesn't like it, so I converted it to WORD.

Screenshot of XML code with two Text ClassID elements, one containing the text 'Level of all skills learned in the stance Lethargy +1.' and the other 'Extinction Ring.' Both are highlighted indicating selection.

Thank you.



Generated Image Alt-Text
[edited by: Trados AI at 1:26 PM (GMT 0) on 29 Feb 2024]
emoji
Parents
  •  

    This should be fairly straightforward.  But I think you'd benefit from reading through this article to get an idea of how to work with xml files: https://multifarious.filkin.com/2014/06/01/custom-xml/  It's nearly a decade old now but the principles are still good and you should learn how to handle this.

    I created a sample file (which is always good to provide if you want help) based on the two lines you shared:

    <?xml version="1.0" encoding="UTF-8"?>
    <Instructions>
        <Text ClassID="1001" Text="When you open an XML, it's like a book; each tag a chapter, just take a look." />
        <Text ClassID="1002" Text="Attributes in XML are quite keen, like adjectives, they describe the scene." />
        <Text ClassID="1003" Text="Elements are friends, not food, nested neatly in a hierarchical mood." />
        <Text ClassID="1004" Text="Remember to close every tag you write, or the XML tree won't grow up right." />
        <Text ClassID="1005" Text="In the land of XML, 'well-formed' is king, ensuring your markup doesn't lose its zing." />
        <Text ClassID="1006" Text="XML is like a recipe, ingredients and steps in perfect harmony." />
        <Text ClassID="1007" Text="Do not fret if XML looks complex; with a bit of practice, you'll be coding in reflex." />
        <Text ClassID="1008" Text="Like a secret code without a Rosetta, XML seems tough until you getta." />
        <Text ClassID="1009" Text="With XML, you can craft a tale, of data and nodes that never go stale." />
        <Text ClassID="1010" Text="Schemas and DTDs are the maps, guiding your tags to avoid mishaps." />
    </Instructions>

    I created two rules in my custom XML that look like this:

    Image shows the location of the parser rules for a custom XML filetype in Trados Studio.

    The image shows two parser rules:

    1. /Text/@Text which is set to "Always translatable".  This rule indicates that the content of the Text attribute within the Text element is always to be considered for translation.
    2. //* which is set to "Not translatable".  This is a catch-all XPath expression that selects all elements in the XML document and marks them as not translatable.  This rule is processed first and ensures nothing else is parsed for translation, only the rules above it.

    That gets me this:

    This image displays a preview of the XML file's content within SDL Trados Studio, specifically the translation preview pane. It shows the text elements that are marked as translatable based on the file type settings you showed in the previous image. Each line of the XML content is presented alongside its corresponding translation column, ready for the translator to work on.

    Note that the Document Structure column on the right says ATT.  This is because these are all attribute values and better localization practice would be to not use attributes for translatable content... but nobody told the content producers!

    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
  • Thank. I tried, but, unfortunately, I've had this.Screenshot of Trados Studio showing multiple tabs open with 'Preview (XML 2: Any XML) - E:Notepad++' and 'New 1.xml' tabs highlighted.

    Settings

    Screenshot of Trados Studio settings with options for 'Definition', 'Syntactic analysis tool', and 'Recording module'. Options are in a foreign language.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 1:27 PM (GMT 0) on 29 Feb 2024]
Reply Children
No Data