The-Panacea-Projects / Gnomenu

GnoMenu - is a traditional styled full featured Gnome-Shell apps-menu, that aims to offer all the essentials in a simple uncluttered intuitive interface. Menu fully supports user theme integration and in addition themes that carry native support can be found here http://the-panacea-projects.deviantart.com/
GNU General Public License v3.0
119 stars 49 forks source link

Gnomenu doesn't sort names correctly with accented letters. #100

Closed ghentdebian closed 5 years ago

ghentdebian commented 6 years ago

Hi,

The accented letters are sort after all others letters. Examples : 1-Normal sort : E É Z 1-Gnomenu sort : E Z É 2- Normal sort : De Dé Du 2- Gnomenu sort : De Du Dé

My locale : French

My proposition for extension.js,

Now :

    // Ignore favorites when sorting
    if (category_menu_id != 'favorites') {
        res.sort(function(a,b) {
            return a.get_name().toLowerCase() > b.get_name().toLowerCase();
        });
    }

Modified :

    // Ignore favorites when sorting
    if (category_menu_id != 'favorites') {
        res.sort(function(a,b) {
            return a.get_name().toLowerCase().localeCompare(b.get_name().toLowerCase());
        });
    }

Thanks for this extension I use since the beginning of gnome-shell.

ghentdebian commented 5 years ago

Has been fixed in the latest versions