Passolo - handle comments in Java properties files.

Hi

My Java .properties file has this contents:

# This is a description of string1
string1=This is string one

# This is a description of string2
string2=this is another string

I'd like Passolo to keep the comments, as they might contain useful information for a translator.

As it stands the Java Add-on strips comments out - is there a trick to keep them? (without resorting to using another parser type)

This seems like a reasonable request.


Thanks

Mark

Parents
  • What do you mean by "keep the comments"? When creating a translated target file the comment lines are written to the translated file so I think they are kept / preserved.

    On the other side the comment lines are not imported into the project for translators. The reason is just simple: Sun / Oracle never defined or documented that the comment above a key / value pair line in a Java properties file is associated with the text below. This is user defined syntax and a tacit assumption that is not always true and I have seen client files where the comment was below the key / value pair line.

    In SDL Passolo, there are 3 possible solution approaches:

    • When using the resource display in Passolo the original file with its comment will be displayed

    Screenshot of Trados Studio showing JAVA_PROPERTIES 'Strings' file with comments above keyvalue pairs and corresponding translation columns for English and French.

    • The Java parser defines its own user defined syntax for comments that allow to import comments and maximum string length. See online help for more details.

    • In the past we already have implemented some automated macro based customizations that imports the comment lines above the key / value pair.

    Screenshot of Trados Studio displaying 'All strings' view with columns for Number, ID, State, Text, and Comment, showing two strings 'string1' and 'string2' with their descriptions in comments.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 5:25 AM (GMT 0) on 5 Mar 2024]
Reply
  • What do you mean by "keep the comments"? When creating a translated target file the comment lines are written to the translated file so I think they are kept / preserved.

    On the other side the comment lines are not imported into the project for translators. The reason is just simple: Sun / Oracle never defined or documented that the comment above a key / value pair line in a Java properties file is associated with the text below. This is user defined syntax and a tacit assumption that is not always true and I have seen client files where the comment was below the key / value pair line.

    In SDL Passolo, there are 3 possible solution approaches:

    • When using the resource display in Passolo the original file with its comment will be displayed

    Screenshot of Trados Studio showing JAVA_PROPERTIES 'Strings' file with comments above keyvalue pairs and corresponding translation columns for English and French.

    • The Java parser defines its own user defined syntax for comments that allow to import comments and maximum string length. See online help for more details.

    • In the past we already have implemented some automated macro based customizations that imports the comment lines above the key / value pair.

    Screenshot of Trados Studio displaying 'All strings' view with columns for Number, ID, State, Text, and Comment, showing two strings 'string1' and 'string2' with their descriptions in comments.

    emoji


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