Can Passolo Text Parser handle multi-line source file

Hi everybody

I was asked for a suggestion on how to handle this kind of content in Passolo. 

It is the TXT file output with the following structure:

@id=Value
 ;{Locked} comment or trasnlation info

With Tex parser I'm  able to extract the content for ID and Source 

but I don't know how to:


1. Parse the comment content, which is save in the following line of the ResID and source string (as per definition above).

2.  Exclude the strings where comment string contains the {Locked} in the comment line and 

The issue for me is, that the comment content is not in the same line as ResID and Source.

Can anybody help me with any idea on how to handle the 1. and 2. ?

 

Sample:

GeneralSetup=General setup
;Workspace tab title
ReportSetup=Reporting setup
;Workspace tab title
SalesTaxRoundingRule=Sales tax rounding rule
;Sales tax rounding rule
RoundingPrecision=Rounding precision
;Rounding precision
RoundingMethod=Rounding method
;Rounding method
VALIDATE_IN_CAPS=VALIDATE
;{Locked=!en}Caption for a menu item in Data to make it more noticable

Parents
  • Yes, it can. The Text Parser rule must contain a back reference for both, the ID and the comment.

    Trados Studio String tags dialog box showing fields for string begins with, ends with, ID of string, and comment of string with regular expression option checked.

    Then the imported list will also import the comments

    Trados Studio All strings window displaying a list of strings with columns for Number, ID, State, Text, and Comment, highlighting a comment containing 'Locked' string.

    To exclude strings with “{Locked” in the comment from translation you can manually define a filter

    Trados Studio Filter Settings for Source List dialog box with a filter expression 'instr(Comment, "Locked") > 0' entered to exclude strings with 'Locked' in the comment.

    After applying the filter you can select all displayed entries and mark them as read-only. This usually takes just a minute.

    A more automated way can be achieved by implemented a system macro that automatically parses the comment after the file is imported and then is setting the read-only flag if the comment contains the “{Locked” string.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 5:10 AM (GMT 0) on 5 Mar 2024]
Reply
  • Yes, it can. The Text Parser rule must contain a back reference for both, the ID and the comment.

    Trados Studio String tags dialog box showing fields for string begins with, ends with, ID of string, and comment of string with regular expression option checked.

    Then the imported list will also import the comments

    Trados Studio All strings window displaying a list of strings with columns for Number, ID, State, Text, and Comment, highlighting a comment containing 'Locked' string.

    To exclude strings with “{Locked” in the comment from translation you can manually define a filter

    Trados Studio Filter Settings for Source List dialog box with a filter expression 'instr(Comment, "Locked") > 0' entered to exclude strings with 'Locked' in the comment.

    After applying the filter you can select all displayed entries and mark them as read-only. This usually takes just a minute.

    A more automated way can be achieved by implemented a system macro that automatically parses the comment after the file is imported and then is setting the read-only flag if the comment contains the “{Locked” string.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 5:10 AM (GMT 0) on 5 Mar 2024]
Children