I'm trying to create a regex-based file type for a Typescript/Javascript file that contains line-breaks between the id and the translatable text in some of the lines.
For example:
'title': 'This is the title',
'line1': 'This is the first line',
'line2': 'This is the second line',
'loremipsumloremipsumloremipsumloremipsumloremipsumloremipsum':
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
'line4': 'This is the fourth line',
I've created a new regex-based file type using the following settings:
Document structure:
^
$
Multiline (yes)
Inline tags:
(?m) +'[^']+':\s+'
',
Unfortunately, these settings don't work if the colon that separates the id from the translatable content is followed by a line break:
How do I need to modify the regex for the opening tag so that very long id is no longer extracted as a translatable string?
(For technical reasons, I can't simply reformat the source file.)
Generated Image Alt-Text
[edited by: Trados AI at 4:47 AM (GMT 0) on 5 Mar 2024]