Start a new topic

Check for duplicate words

Following this thread, with the help of the Keyboard Maestro experts I created a macro to check for duplicates (that don't need to be adjacent).

Press ALT+DOWN and have duplicates of three or more letters marked in bold red in a message:



But it has still some encoding issues and a very small display.

You might change the size by changing

<span style="font-weight: bold; color: red;">%Variable%Word%</span>


<span style="font-weight: bold; color: red; font-size: 200%;">%Variable%Word%</span>

This is better than before, but this means also that the size is accumulated and some strings get really big.


(die and dieser repeating)

And to keep thing simple, add:


To have a feedback that the script works and there are no repetitions.

Yes. I'm aware of the issue with the 'non-standard' characters. Tom proposed a nice solution for this in the Keyboard Maestro forum (which also uses \b for word boundaries). 

And yes, you can set a bigger font. This is all very experimental, since I suspect that at some moment Igor won't be able to suppress his coding addiction and will add a far better solution.

Igor won't be able to suppress his coding addiction and will add a far better solution.


Nevertheless, your solution is already brilliant.

Torsten: Nevertheless, your solution is already brilliant

The original idea to check these duplicates is great, the macro seems to work (though I have my doubts about the minimum number of characters), but "nobody" is going to use the macro. Not only because most CT users simply can't use it (requires macOS + KM), but mainly because the idea is wrong. It takes too much time and actions, so the duplicates should be checked after your translation, like most QA items. Integrating that in the macro is quite possible, but any changes will have to be implemented in the Project, which - again - will take too much time. In other words, Igor will have to do it if he also thinks it's useful. Alain's Terminal command can be a nice starting point since it's cross-platform, like CT.


It might be helpful for longer segments, not for all. You might even automate it, bookmark any segment where duplicates exist (or enter a certain word into the notes) and filter for bookmarked segments. But this would be a bit cumbersome.

Login to post a comment