About as common as duplicate hotkeys are dialogs with clipped text. And just as with duplicate hotkeys, there are a couple of different ways these can happen. I’ll show a few examples, starting with the most trivial case.
One note before I start: I will talk about clipped text, not truncated text. For the purpose of these posts, “clipped text” means that the entire string survived until it was drawn on the screen, but there wasn’t room to draw the full string and so not everything is visible to the user. “Truncated text” on the other hand means that the string was cut off by code somewhere after it was loaded from the localizable binaries but before it was drawn on screen. From the user’s point of view these can appear to be the same thing, and we might even use the same fix [shorten the string]. Most of the time though both the cause and fix differ.
The absolutely simplest example of clipped text is where I can already see the text as clipped in my favourite localization tool. It can look something like this:
or like this:
Both of these are trivial. There’s nothing really interesting going on here; the strings simply do not fit within their controls. What’s good about these cases is that they’re easy to detect. Anyone can see that the first one is clipped, since you can see half of the lower row. The second one might be trickier though since you don’t have a visual clue that the text is clipped, but a native speaker would spot it quickly and even a non-native could notice that the string doesn’t end with a colon. That’s a good clue. Also, both of these are easy to detect automatically, either at localization time or at runtime.
How do I fix them? Either resize the controls, or shorten the string. The first one above, I’d resize. Just make the label a few pixels taller. The second, I’d change the translation from “Contact name:” to just “Name:”. I’d also change the second string from “Phone number:” to just “Number:”. I could size the dialog to fit the text, but it’d look strange and the words “Contact” and “Phone” don’t really add anything useful to the text. The context makes it clear what kind of name and what kind of number you should enter.
To me, this type of bug is very similar to the first kind of hotkey bug I showed – easy to prevent, easy to detect. Therefore we rarely see this type of clipping bug any more.
Next up I’ll show something a little bit more challenging.
This posting is provided “AS IS” with no warranties, and confers no rights