Is it possible to map comments ( ) from an xml file into a Comment column in Passolo?

I have an xml file that looks like this:

<string name="dialog_forgot_password_edit_text_error_reset_fail">The email failed to send. Please try again.</string><!-- This is an error message displayed when the user fails to properly request a password reset. -->
<string name="dialog_forgot_password_title">Reset password</string><!-- Title for the dialog in which the user asks for a password reset email -->

Is it possible to map the comments between <!-- ... --> into the column comment?

Trados Studio interface showing a list of strings with a 'Comment' column highlighted in red, indicating where to map comments from an XML file.



Generated Image Alt-Text
[edited by: Trados AI at 5:17 AM (GMT 0) on 5 Mar 2024]
emoji
Parents
  • The proposed XPath expression in the answer below will not work.

    In general it would be easier to insert the comment into the XML structure itself like 

    <string name="dialog_forgot_password_title" comment="Title for the dialog in which...">Reset password</string>

    If this is not possible you can import a processing instruction into the comment field if it is above the translatable line and does contain a keyword that helps to identify the comment like

    <!-- comment: Title for the dialog in which the user asks for a password reset email -->
    <string name="dialog_forgot_password_title">Reset password</string>

Reply
  • The proposed XPath expression in the answer below will not work.

    In general it would be easier to insert the comment into the XML structure itself like 

    <string name="dialog_forgot_password_title" comment="Title for the dialog in which...">Reset password</string>

    If this is not possible you can import a processing instruction into the comment field if it is above the translatable line and does contain a keyword that helps to identify the comment like

    <!-- comment: Title for the dialog in which the user asks for a password reset email -->
    <string name="dialog_forgot_password_title">Reset password</string>

Children