Start a new topic

KM macro: automatic adjustment of segment start and end

Whenever I press Ctrl+Enter to navigate to the next untranslated segment, this keyboard shortcut is intercepted and triggers the following macro:

image

Note that the 2.0 seconds pause is depending on the speed of your computer, the MT systems that are active and the size of your Memories.


This is not a good approach!


As it turns out, the first pause varies very much, depending on the TM.


Perhaps it's a better approach to adjust the start and end of the segment just before navigating to the next untranslated segment.


This, of course, requires some flexibility of the user: she shouldn't bother about incorrect start and end, before pressing CTRL+Enter (since the macro will fix them).

Something like this:


image


As it turned out, an extra IF statement is needed, to exclude the New term dialogue box (which also uses CTRL+Enter):


image


There will be some more modifications necessary:

  • If the start of a segment contains a tag, this tag will get destroyed by adjusting the segment start
  • If the end (and possibly the start) of a segment contains a quotation mark, other than the source segment, the adjusting of the end will lead to problems.
All in all, a dedicated feature in CafeTran Espresso would be the better solution!

Errors like this:


image


I can prevent this by adding some extra IF statements, but it's clumsy.

>if the start of a segment contains a tag, this tag will get destroyed by adjusting the segment start


I'll add a post in the Problems forum ...

I've added an extra IF statement to trap closing quotes (the adjust segment end feature isn't tolerant for deviating quote characters):


image


Added some lines to prevent unwanted change of quote characters at segment end:


image


Login to post a comment