GNOME Bugzilla – Bug 664197
Wrong (Bemba) team suggested for Belarusian UI translation users
Last modified: 2011-11-16 14:43:42 UTC
I've added Belarusian translation, everything is fine with this. The only problem is that for some reason we have 'bem' (Bemba) translation suggested for the user. For German UI, it suggests German team, same for France. I think it's somehow related to ISO codes messed (be for Belarusian, bem for Bemba). This can be reproduced by enabling Belarusian translation and going to l10n.gnome.org homepage.
Also the problem is that f.e. on the following page Bemba language is marked in bold rather than Belarusian: http://l10n.gnome.org/releases/gnome-3-4/
I think this is because get_language_from_ianacode() doesn't work as intended.
In this function, we have: lang_list = cls.objects.filter(locale__startswith=iana_splitted[0]) if len(lang_list) == 0: return None elif len(lang_list) > 1: # Find the best language to return best_lang = lang_list[0] for lang in lang_list: if lang.get_suffix(): if iana_suffix.lower() == lang.get_suffix().lower(): return lang else: best_lang = lang return best_lang So for lang_list every language for which the locale is started with "be" is matched (be, bem, bec...) Since we have no suffix for 'be' language (no @latin or @cyrillic part), it just returns the last lang in lang_list. We should strictly match locale (not with startswith but with equals function).
Fixed in http://git.gnome.org/browse/damned-lies/commit/?id=95b0c60f Thanks for your help.