I am translating a project in Studio 2017 consisting of several json2 files. Client prepped such files and sent a Studio package for me to translate.
When I started translating the project, I noticed that some strings containing "\n" (hard return) have had this entity converted into a "\\n" tag in Studio.
For instance, the following string in source JSON2 file:
Appears in Studio as follows:
Is there any way to create a segmentation rule in the TM I'm using or otherwise "play" with the "json2" File type so that the "\n" entities or the "\\n" tags are recognized within Studio as an end-of-string delimiter?
The example I provided is not a big problem, but I have some other quite long segments consisting of several sentences separated by such "\n" entity and hence it would be great to have them automatically separated in different segments in Editor view, not only to make my work easier, but also to improve internal leverage and avoid "polluting" TM with huge entries consisting of several sentences.
This filetype "allows" the Split Segments feature (the example I provided being part of a longer JSON string), but this is too time-consuming and I'm not 100% sure if splitting/joining strings could cause issues in final format.
Any help would be greatly appreciated.
M Carmen Sosa
If the source file is already parsed and converted to SDLXLIFF, there is nothing you can do since it's already segmented.You would need to re-parse the original source and create new, better segmented SDLXLIFF.
I would use the SDL's JSON file type, since - as opposed to the SuperText's one - it allows to pass the JSON strings to Studio's built-in Embedded Content Processor, which should allow to sub-parse the passed string to individual sentences, separated by the linebreaks.
It seems to me that the person preparing the project at client's side did not pay enough attention to the result... and prepared the project incorrectly.
Thank you for your prompt answer, Evzen.
It's a pity that the only thing that I can do to somehow fix that is manually splitting strings (because I guess splitting would not affect the target .json2 file, isn't it?).
I'll let client know about this issue so that for potential future projects this issue with \n linebreaks is taken into account.
Good to know. Thanks!