OSDN Git Service

Useful quick fix for #1363 (SR language not labeled correctly). Now at least it just...
authorMichael Curran <mick@kulgan.net>
Sat, 12 Feb 2011 04:44:09 +0000 (14:44 +1000)
committerMichael Curran <mick@kulgan.net>
Sat, 12 Feb 2011 04:44:09 +0000 (14:44 +1000)
commitb56a574774a8da7d8ccdae25d726fd7ebf62d613
tree96dc1789ad6776dbe46325ac6f664fdc1d787ea7
parente1208793734ee83b22cac58fadfe4c14879c82ff
Useful quick fix for #1363 (SR language not labeled correctly). Now at least it just shows sr, rather than also including the user's default language. Specific changes:
* languageHandler.getLanguageDescription: if localeNameToWindowsLCID returns 0, return None instead of going on and trying to use this 0 LCID to fetch a description. It seems that an LCID of 0 actually means the user's default language (in my case it shows English).
* languageHandler.getAvailableLanguages: Only include a description if getLanguageDescription for the locale does not return None. I.e. the label will either be "description, locale" or just "locale".
source/languageHandler.py