After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 664197 - Wrong (Bemba) team suggested for Belarusian UI translation users
Wrong (Bemba) team suggested for Belarusian UI translation users
Status: RESOLVED FIXED
Product: damned-lies
Classification: Infrastructure
Component: l10n.gnome.org
unspecified
Other Linux
: Normal normal
: ---
Assigned To: damned-lies Maintainer(s)
damned-lies Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-11-16 12:40 UTC by Ihar Hrachyshka
Modified: 2011-11-16 14:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ihar Hrachyshka 2011-11-16 12:40:59 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.
Comment 1 Ihar Hrachyshka 2011-11-16 12:59:55 UTC
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/
Comment 2 Ihar Hrachyshka 2011-11-16 13:00:54 UTC
I think this is because get_language_from_ianacode() doesn't work as intended.
Comment 3 Ihar Hrachyshka 2011-11-16 13:03:38 UTC
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).
Comment 4 Claude Paroz 2011-11-16 14:43:42 UTC
Fixed in http://git.gnome.org/browse/damned-lies/commit/?id=95b0c60f

Thanks for your help.