Due to essential maintenance, access to Trados cloud will be unavailable on Saturday 30 August from 00:00 to 12:00 UTC.

File type settings for alt text in .props files

With the help of https://community.rws.com/product-groups/trados-portfolio/trados-studio/f/studio/34537/how-to-import-props-files-in-trados-studio, I was able to create file types settings for the .props files from MadCap.

Screenshot of XML code with highlighted text showing an ImageOverlay element with various attributes including OriginalImageType, ShapeTimeSpan, EnableGrayScaleFormat, and Alt text for an image.

Still, I wasn't able to set up a correct parser rule for the alt text that we need to translate. I tried with //ImageOverlay/@Alt, but it only extracts all the noise, and not the actual alt text.

Continuation of the XML code from the first screenshot, displaying more attributes within the ImageOverlay element, with no visible user interface elements or errors.



Generated Image Alt-Text
[edited by: RWS Community AI at 9:37 AM (GMT 1) on 11 Apr 2025]
emoji
  • "Probability score": 0.7

    "Question improvement suggestion": Please provide the exact version of Trados Studio you are using, the operating system, and any error messages you may have encountered. Also, it would be helpful to know if there have been any recent changes to your system or software.

    In the meantime, based on the information you have provided, here is a suggested answer to your question:

    Hello,

    It seems like you're having trouble setting up a parser rule for the alt text in .props files. The XPath you're using might not be correctly targeting the alt text.

    Here's a step-by-step guide to help you:

    Step 1: Open Trados Studio and go to File > Options > File Types.

    Step 2: Select the File Type filter you are using to parse your .props files.

    Step 3: Click on the Parser menu and select Add.

    Step 4: In the Add Rule dialog, select XPath from the Rule type list.

    Step 5: In the XPath field, enter the correct XPath to target the alt text in your .props files. If you're unsure of the correct XPath, you might need to consult the documentation of your .props files or ask the developer who created them.

    Step 6: Under Properties, set Translate to Always translatable and Tag Type to Inline.

    Step 7: In the Whitespace list, choose the appropriate setting for your needs.

    Step 8: In the Formatting section, select Edit and choose the appropriate setting for your needs.

    Step 9: In the Structure info section, add any necessary details about the context of a structure element in your .props files.

    Step 10: Click OK to save your new parser rule.

    Please note that the XPath can vary depending on the structure of your .props files. If the above steps do not solve your issue, it might be due to an incorrect XPath.

    I hope this answer addressed your question. If not, please reject the answer, add the question improvement suggestion information, and click the RWS Community AI checkbox on the right to try again.

    RWS Community AI

    emoji
  •  

    Still, I wasn't able to set up a correct parser rule for the alt text that we need to translate. I tried with //ImageOverlay/@Alt, but it only extracts all the noise, and not the actual alt text.

    I guess your rule is wrong.  Try this:

    //fileProperties/ImageOverlay/OriginalImage/@Alt

    There is no @Alt under ImageOverlay.

    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
  • I forgot that "OriginalImage" part indeed, thanks a lot !

    emoji