I'll show one final clipping. Just like the last one, we have a case where the text in a control is added at runtime. The main difference between this one and the last is the hints I get when I localize.

Consider this dialog box in shell32.dll, as seen in my favourite localization tool:

Here's what it can look like at runtime:

But then again, it could also look like this:

I highlighted the interesting parts. What happened is pretty obvious - at runtime, the dialog shows the name of the target file that couldn't be found. Which is what you'd expect. Problem is, if the file name is really, really [etc] long, the entire text doesn't fit.

Unlike the example in my last post, I should have seen this one coming. The text contains a placeholder, that's a good hint. In this particular case, I should even be able to guess exactly what the placeholder will be replaced by and I should be clever enough to be able to figure out how to bring it up at runtime. Therefore, I really should have been able to make sure that an extra-long file name would fit at runtime*.

Of course there are other dialogs where it's not as easy to figure out what will be shown at runtime. Take this one for instance:

Even though I can guess that the percentage sign will be replaced by a URL at runtime, how long will that URL be..? How much space should I leave?

This is the last type of clipping I'll write about for now. As you might have seen now, there are some subtle differences between the different types. Some of them I'd be really ashamed not to catch while I localize. Some I have no chance of finding until runtime. In between, there's a bunch of bugs I might be able to prevent if I keep alert and make the right assumptions. It's a lot of guesswork though...

Next time I'll move to bugs that are both rarer and interestinger.

* I feel a bit sheepish right now. Most of the examples I've shown before have been faked just to show a point, but this one is actually real. I just happened to stumble on it now when I was looking for a dialog box with a suitable placeholder... Then again, I bet it's repro in all other languages too - including English. So, not a localization bug :)


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