Segmentation rule - divide segments by a specific word.
Thread poster: Raul Becerra
Raul Becerra
Raul Becerra
Germany
German to Spanish
+ ...
Nov 18, 2022

I am testing the lates version of Memoq 2022 (memoQ-9.13.7). I need to translate text embedded in code. The text I need to translate appears after the tag "body":

What I would like memoq to do is to start a new segment after this word (I am also testing Trados and there it is pretty simple to do). This would hugely facilitate the translation work, as otherwise segments are very big and filled with code.

So far I have entered the "segmentation rules" section and have tr
... See more
I am testing the lates version of Memoq 2022 (memoQ-9.13.7). I need to translate text embedded in code. The text I need to translate appears after the tag "body":

What I would like memoq to do is to start a new segment after this word (I am also testing Trados and there it is pretty simple to do). This would hugely facilitate the translation work, as otherwise segments are very big and filled with code.

So far I have entered the "segmentation rules" section and have tried to add the word "body": as the end of the segment but without success as the regex only seems to accept single characters.

Does anybody know how to do this?

Text sample:

"type":"choice","actions":[{"$type":"TreeLibrary.Dto.Actions.ChoiceButtonsAction, TreeLibrary","body":"¿En qué puedo ayudarte?","outputVariable":"","hideOptions":true,"type":"ChoiceButtons","options":[{"id":"properties-box-1582018158003-9941-choice-2","caption":"¿Es la primera vez que compras con nosotros?, te explicamos como hacerlo.","icon":"","body":"¿Es la primera vez que compras con nosotros?, te explicamos como hacerlo.","variableValue":null,"goToNode":{"nodeId":"box-1594369625553-5571"}},{"id":"properties-box-1582018158003-9941-choice-3","caption":"Estoy buscando un artículo","icon":"","body":"Estoy buscando un artículo","variableValue":null,"goToNode":{"nodeId":"box-1594369811741-4925"}},{"id":"properties-box-1582018158003-9941-choice-4","caption":"Envios : Internacional, Seguimiento, Precio","icon":"","body":"Envios : Internacional, Seguimiento, Precio","variableValue":null,"goToNode":{"nodeId":"box-1594369689673-5816"}},{"id":"properties-
Collapse


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 10:39
English to Russian
memoQ > Segmentation rules > Advanced view Nov 18, 2022

You need to add two expressions:
(?<="body":")#!#
and
#!#","


*Also, if you want memoQ not to segment by ":", you can remove that character from the 'Segment end' field in the simple view. Then you will be able to filter segments by a qu
... See more
You need to add two expressions:
(?<="body":")#!#
and
#!#","


*Also, if you want memoQ not to segment by ":", you can remove that character from the 'Segment end' field in the simple view. Then you will be able to filter segments by a quotation mark (in the source filter field, type " or ^" with 'Use regex' box checked to make sure you only filter segments starting with ") and lock them all:



[Edited at 2022-11-18 12:59 GMT]
Collapse


Grigori Gazarian
Raul Becerra
 
Raul Becerra
Raul Becerra
Germany
German to Spanish
+ ...
TOPIC STARTER
It works like a charm. Nov 21, 2022

Thank you so much. It works like a charm. You have saved me many hours of research.

 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Segmentation rule - divide segments by a specific word.






CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »
Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »