We have moved to a new Sailfish OS Forum. Please start new discussions there.

[Fixed, not yet released]People app start first character sorting

asked 2016-02-01 21:10:17 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2019-10-02 22:11:13 +0300

Hello all,

I have created a localization for Jolla, and it added the following annoying side effect:

In the people app there is a "subview" where the contacts are grouped by the the first letter.

By setting the locale to Hungarian the Hungarian ABC's accented and double characters (ty, ny, etc.) groups got shown. Unfortunatelly the unaccented characters are got grouped to the accented ones, and the unaccented group is empty.

image description

I have checked the jolla-contacts and the /usr/lib/qt5/qml/Sailfish/Contacts/*qml files, but I have not found any references to these sortings.

Any directions, suggestions would be helpful!

Thank you in advance!

edit retag flag offensive close delete



The People app is populated from the SeasideNameGroupModel, which populates itself by calling SeasideCache::nameGroupMembers();


The SeasideCache will place individual contacts into specific name-groups when the contacts are added to the cache:


Note that it calls SeasideNameGrouper::nameGroupForContact() to see if there is some special language-specific name grouping which should be applied (currently, Jolla internally has some closed-source name groupings for Chinese language), but then falls back to a default name-group allocation which basically just asks the current locale settings which bucket it should be in based upon either the name or display label data:


I don't immediately know a good way to resolve your issue. There are a couple of possibilities:

1) implement your own name-grouper (but then you'd need to get your patch into our closed-source components which provide the name grouping...)

2) perhaps the locale settings have a plugin mechanism to allow extending / improving them, in which case you could override the return value from mLocale.indexBucket().

chris.adams ( 2016-02-02 07:29:49 +0300 )edit

Dear Chris,

Thank you very much for spending time on this issue and writing the detailed description.

So if my understanding is correct the Jolla created an own sublcass from the SeasideNameGrouper. which is going to return a group which will prevent me from overriding that result later with the mLocale results.

I have checked the MLocale codes, but I have not found any signs of handling the Hungarian alphabet specially. so that should be patched either or other way.

Do you know about any official way how could I request Jolla to release that particular library publicly or even under NDA for patching?

Thanks again!

martonmiklos ( 2016-02-02 22:56:36 +0300 )edit

Well, I'm not certain whether the (Chinese-language-specific) name groupers are being used for the text in your case. I would assume that they're not, but perhaps they are? So, I suspect that the grouping is purely being determined by the MLocale result - and if that doesn't handle Hungarian characters properly, then the grouping will be wrong.

I think you should raise this issue at the Sailfish Community Meeting (see https://together.jolla.com/question/54157/sailfishos-open-source-collaboration-meeting-planning/) and specifically ask Pekka or Joona about the MLocale issue, and Carsten or Vesa-Matti about the opensourcing request.

chris.adams ( 2016-02-05 01:55:34 +0300 )edit

2 Answers

Sort by » oldest newest most voted

answered 2019-10-02 22:10:03 +0300

@pvoulera merged a fix for this issue in the mlocale: https://git.merproject.org/mer-core/libmlocale/merge_requests/8

edit flag offensive delete publish link more

answered 2018-01-05 20:24:12 +0300

FYI: I have did some investigation around the mlocale and it seems that this is the source of the problem:

QStringList testList;
testList << "á" << "í" << "ű" << "ő" << "ü"  << "ú" << "ó" << "é";
testList << "a" << "i" << "u" << "o" << "u"  << "u" << "o" << "e";
qWarning() << "árvíztűrő tükörfúrógép";
foreach (QString letter, testList) {
    qWarning() << letter << mLocale.indexBucket(letter);
    qWarning() << letter.toUpper() << mLocale.indexBucket(letter.toUpper());

It outputs when the LANG is set to hu_HU.UTF-8:

[W] main:57 - árvíztűrő tükörfúrógép
[W] main:59 - "á" "Á"
[W] main:60 - "Á" "Á"
[W] main:59 - "í" "Í"
[W] main:60 - "Í" "Í"
[W] main:59 - "ű" "Ű"
[W] main:60 - "Ű" "Ű"
[W] main:59 - "ő" "Ő"
[W] main:60 - "Ő" "Ő"
[W] main:59 - "ü" "Ű"
[W] main:60 - "Ü" "Ű"
[W] main:59 - "ú" "Ú"
[W] main:60 - "Ú" "Ú"
[W] main:59 - "ó" "Ó"
[W] main:60 - "Ó" "Ó"
[W] main:59 - "é" "É"
[W] main:60 - "É" "É"
[W] main:59 - "a" "Á"
[W] main:60 - "A" "Á"
[W] main:59 - "i" "Í"
[W] main:60 - "I" "Í"
[W] main:59 - "u" "Ú"
[W] main:60 - "U" "Ú"
[W] main:59 - "o" "Ó"
[W] main:60 - "O" "Ó"
[W] main:59 - "u" "Ú"
[W] main:60 - "U" "Ú"
[W] main:59 - "u" "Ú"
[W] main:60 - "U" "Ú"
[W] main:59 - "o" "Ó"
[W] main:60 - "O" "Ó"
[W] main:59 - "e" "É"
[W] main:60 - "E" "É"
edit flag offensive delete publish link more
Login/Signup to Answer

Question tools



Asked: 2016-02-01 21:10:17 +0300

Seen: 497 times

Last updated: Oct 02 '19