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?

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>

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

    I was just guessing, assuming that XPath functions work in the XML parser (that's why I wrote that it needs to be tested).

    Just out of curiosity, why exactly will it not work? Are the functions not supported?

  • Something that I can't answer comprehensively and which must be checked by development. As far as I know the XPath feature in SDL Passolo doesn't support function calls and always need to evaluate (and give back) a XML node.

  • Hi,

    Thank you so much for your answers. 

    I tried the xpath solution and at some point I was able to see these comments in User interface in Passolo. I know those comments were not manually inserted because they were preceded by 'P:', (the comments I add manually display with a 'C:').

    However, when I got the project back from the LSP, those comments are not there anymore.

    I'm trying adding the comment on top of the corresponding string as Achim suggested.

    Thanks again for taking the time to look into this. I'll report back.

Reply
  • Hi,

    Thank you so much for your answers. 

    I tried the xpath solution and at some point I was able to see these comments in User interface in Passolo. I know those comments were not manually inserted because they were preceded by 'P:', (the comments I add manually display with a 'C:').

    However, when I got the project back from the LSP, those comments are not there anymore.

    I'm trying adding the comment on top of the corresponding string as Achim suggested.

    Thanks again for taking the time to look into this. I'll report back.

Children
No Data