Yesterday I showed some bugs that really shouldn't happen any more. Easy to avoid, easy to detect. Today, I'll show something a little bit more interesting.

My favourite localization tool is altogether not too poxy, but it's not great at predicting what will happen at runtime. This means that if the code does anything that affects the appearance of a control, I can't preview the result. This is actually quite common too, a good portion of the bugs I fix are because some text is bolded or the font is changed at runtime.

Here's an example. This is Add Printer Wizard as I see it in my localization tool:

And here's the same at runtime:

See how the welcome text is now bold? We find this in wizards all the time, both at the Welcome page and the Finishing page. Even though I should know what will happen to these strings at runtime, it is still rather hard for me to visually ensure that the text will actually fit after it has been embolded. Every now and again, a clipping slips through for some language.

Not German though, the German localizers took a more practical approach. In all their wizards, they simply do this:

Nice one.

So where does the font info come from? Well, a lot of wizards have two resources in the string table that affect the font. One says "Verdana Bold", and one says "12". No prize for guessing what they do.

All things considered, wizards are kinda ok. We know, or can figure out, exactly which resources will be shown with a different font at runtime, and we know or can figure out which font will be used. Which means, even if I can't preview the dialog easily in my localization tool, it'd still be fairly straight forward to create a check that can detect any problem before I even have a build.

Fun stuff. But sometimes it's not quite this easy. As we'll see next...


This posting is provided "AS IS" with no warranties, and confers no rights.