Workplace safety: get placeholders out of the way with the regex tagger
The is Part 2 of the series Localizing an iOS drawing app with memoQ, one cliffhanger at a time.
The regex text filter will deal with the files in the iOS localization package, but some strings still have odd stuff in there:
Downloading “%@” Delete %d Drawings
These are placeholders for information that the app will insert at runtime: the name of a file, the number of drawings about the be deleted, etc. Every software platform has different conventions. With iOS it’s apparently “percentage sign followed by one or two other characters.” Quite frankly, you don’t need to know much more that that when a new format comes your way. When you glance at all the diffent placeholders in your text, the relevant patterns will become clear pretty quickly.
The key thing is, you don’t want these codes to show up in their naked form when you’re translating. They are hard to type and easy to mess up, which will make the app crash. And the codes, in turn, mess up your word count as well as your terminology and TM matches.
The regex tagger, a maternal aunt of the regex text filter, is memoQ’s tool to find-replace text and substitute codes like these with a tag that acts like a single character. The command is on the Preparation ribbon tab, and its options look like this:
The regex rule I used here is:
In human language, it matches a percentage sign, followed by either a “d” or an “lu” or an “@”. $1 in the Display text field says that in the tag that memoQ inserts, I only want to see the d, lu or @, not the %.
Running the regex tagger will turn the nasty text below into the friendly text underneath. When you export your translation, the reverse will automagically happen so you get the correct jumble in the file that goes back to the developer.
Awesomeness all the way. But how do I know this will really work, out there in the real world? Check the next post in the series to find out!