Authoring, editing and maintenance best practices

Here is an old "silent" video showing how I edit an auto-translation ruleset for dates in Notepad++

I work like this to adapt a lot of existing resources to output different target text formats or content in other language. Usually this is a very quick process, and it takes just a few minutes, for example, to take German to English date rules and change them into rules that will transform a date in German to one in Portuguese, Italian or Swahili.

This video may be a little confusing, because I never got around to doing the voiceover for it, and the technical staff I for whom I made it got the point and got to work.

Newer material with clearer guidance will be available in this topic section of the course soon.

A key takeaway here is that you should usually avoid using the auto-translation rules editor integrated with memoQ.

The integrated editor can be very confusing for many reasons. One of the biggest reasons is that the editing fields on the first page of the dialog are often not big enough to show the entire regex for the rule. The horizontal width of the dialog can be increased to improve this, but often that is not enough. Changing the content of lists such as the one shown here for the months (for example, if I were rewriting these rules to output Hebrew dates) is also a very cumbersome process in the integrated editor, and it is not possible to change the order of the entries without a lot of deleting and re-entry. Comments are not possible in the integrated editor. Notice the green text shown in the Notepad++ editor. Those texts are comments that help me to understand and remember important things about the rules.

Even if I start writing rules "on-the-fly" in the memoQ editor, if I intend to keep and improve the rules, I export them to an MQRES resource file and begin editing externally. The rules are then always maintained externally, outside of memoQ, and when there is a new version, it is imported after the old rules are deleted or the names are changed to avoid a conflict.

I might test small changes with the integrated editor, but only briefly, for the sake of speed, then I write these changes to the ruleset in Notepad++, change the version notes in the Description field (well, between the tags <Description> and </Description> there) and import the updated ruleset to memoQ.

Importing a ruleset (or any other externally maintained light resource) strips out all the comments. This is another reason to do all your maintenance externally.

Use white space liberally to make your code more readable in the external editor (Notepad++ or whatever other tool you prefer). See the guidelines in this course for how to configure Notepad++ to display colors, which also make the code easier to read and which help to avoid errors.

When in doubt, <!-- write a comment using this tag structure --> because later you won't remember what that clever bit or regex means or maybe you need a reminder of some Unicode that you keep having to look up in Google. Comments can

<!-- extend across

multiple lines but always

begin and end with

the same characters! -->

See the lesson on the anatomy of an MQRES file for auto-translation rules to help you get oriented in this Brave New Resource Editing World (coming soon!!!).

Complete and Continue