quicksilver/Quicksilver — pull request #1257 by pjrobertson (2012-11-29 08:00:58+00:00)
Title: ß71: Don't set the label as an empty string

I think when the OS doesn't have a localisation for a file (such as when the language is set to Welsh), `mdls` gives the `kMDItemDisplayName` as an empty string. Check for this before blindly using it as the label

This was only really causing problems for .prefPane files, but I think there were a few others. It means that an empty label `@""` was being set and nothing was showing in the interface

http://cl.ly/image/0g3N1e3z4719

Here's what `mdls` gives for the Localization.prefPane file:

```
PaddyMBP:PreferencePanes patrick$ mdls Localization.prefPane
kMDItemAlternateNames = (
"Localization.prefPane"
)
kMDItemCFBundleIdentifier = "com.apple.Localization"
kMDItemContentCreationDate = 2012-06-20 22:08:38 +0000
kMDItemContentModificationDate = 2012-06-20 22:08:38 +0000
kMDItemContentType = "com.apple.systempreference.prefpane"
kMDItemContentTypeTree = (
"com.apple.systempreference.prefpane",
"com.apple.package",
"public.directory",
"public.item",
"com.apple.bundle"
)
kMDItemDateAdded = 2012-07-22 02:21:55 +0000
kMDItemDisplayName = ""
```

Note `kMDItemDisplayName = ""`