Signal-android: Sort Chinese contacts by Pinyin

Created on 11 Feb 2016  ·  4Comments  ·  Source: signalapp/Signal-Android

Chinese has a Pinyin phonetic system so it can also be sorted alphabetically. CM messaging, Google Messenger and most other messenger apps have this feature. Currently I don't see how Chinese contacts are sorted. They look totally random to me.

feature

Most helpful comment

@hrzhu I'm not familiar with Pinyin sorting (in fact don't know much about the Chinese language at all). But I do wonder how it would work in conjunction with Chinese characters used in a Japanese context.

Also, what is your Android language setting? Can you confirm whether changing this gets the desired sorting or not?

I'm confirming the issue with not sorting by manually entered phonetic names. Every other app seems to respect this properly and Signal best would too.

I tested in a few steps:

  1. Without phonetic names entered, Dutch locale.
  2. With phonetic names entered, Dutch locale.
  3. Without phonetic names entered, Japanese locale.
  4. With phonetic name entered, Japanese locale.

I entered as example contacts:

  • たなか君 (Tanaka-kun)
  • 田中隊長 (Tanaka-taichou)
  • 夢さん (Yume-san)

A summary of my findings:

  • Language setting does have an effect on the sorting algorithm, for Signal as well.
  • Signal ignores phonetic names where most apps use it for sorting in-line with Roman character names.

Without phonetic names, Dutch

Android contacts Signal contacts
Left image Android contacts puts them at the bottom and fails to even make different groupings.
Right image Signal does make character groups, but also appends them to the bottom, not sorting by the romanized version.

With phonetic names, Dutch

Android contacts Signal contacts
Android contacts now groups correctly based on the phonetic name. Signal is unchanged.

Without phonetic names, Japanese

Android contacts Signal contacts

With Android contacts, this language setting changed the sorting to put the Roman alphabet at the bottom. The grouping also changed from one blob to 2. Which appears to be one for Hiragana and one for Kanji?

Signal did the same thing, but with 3 groups.

Note that in _both applications_ also the inner order changed and 田中隊長 switched places with 夢さん.

With phonetic names, Japanese

Android contacts Signal contacts

Here as well, Android contacts respects the phonetic name where Signal remains unchanged from before.

All 4 comments

Some more info. I have explicitly entered a phonetic name for all my contacts to make them sorted alphabetically. It seems Signal is not honouring this phonetic name when sorting contacts.

@hrzhu I'm not familiar with Pinyin sorting (in fact don't know much about the Chinese language at all). But I do wonder how it would work in conjunction with Chinese characters used in a Japanese context.

Also, what is your Android language setting? Can you confirm whether changing this gets the desired sorting or not?

I'm confirming the issue with not sorting by manually entered phonetic names. Every other app seems to respect this properly and Signal best would too.

I tested in a few steps:

  1. Without phonetic names entered, Dutch locale.
  2. With phonetic names entered, Dutch locale.
  3. Without phonetic names entered, Japanese locale.
  4. With phonetic name entered, Japanese locale.

I entered as example contacts:

  • たなか君 (Tanaka-kun)
  • 田中隊長 (Tanaka-taichou)
  • 夢さん (Yume-san)

A summary of my findings:

  • Language setting does have an effect on the sorting algorithm, for Signal as well.
  • Signal ignores phonetic names where most apps use it for sorting in-line with Roman character names.

Without phonetic names, Dutch

Android contacts Signal contacts
Left image Android contacts puts them at the bottom and fails to even make different groupings.
Right image Signal does make character groups, but also appends them to the bottom, not sorting by the romanized version.

With phonetic names, Dutch

Android contacts Signal contacts
Android contacts now groups correctly based on the phonetic name. Signal is unchanged.

Without phonetic names, Japanese

Android contacts Signal contacts

With Android contacts, this language setting changed the sorting to put the Roman alphabet at the bottom. The grouping also changed from one blob to 2. Which appears to be one for Hiragana and one for Kanji?

Signal did the same thing, but with 3 groups.

Note that in _both applications_ also the inner order changed and 田中隊長 switched places with 夢さん.

With phonetic names, Japanese

Android contacts Signal contacts

Here as well, Android contacts respects the phonetic name where Signal remains unchanged from before.

So here's my tests and observations.

zh-CN (Simplified Chinese in PRC)

  • Both CM contacts and Google Messenger sort all the Chinese contacts, along with English contacts, A-Z no matter whether phonetic names are provided. This is my desired sorting.
  • Signal also sorts Chinese contacts by Pinyin no matter whether phonetic names are provided. The problem is, unlike CM contact and Google Messenger, Chinese contacts and English contacts are split with all English contacts at bottom. The is less convenient.
  • There is a little glitch in Signal's sorting. Some Chinese characters, while used in surname, may have a different pronunciation. For example, 单(dan1), while used in surname, is pronounced as shan4. 区(qu1), while used in surname, is pronounced as ou1. CM contacts and Google Messenger are aware of these special usage but they only deal with Simplified Chinese. If 單 and 區, the Traditional Chinese of the above two characters are in contacts, they would be wrongly sorted. This special usage has no pattern to follow. Signal fails to sort these surnames. But it's definitely inappropriate to request someone who doesn't know Chinese in the first place to deal with such problem. I just mention it here.

zh-HK and zh-TW (Traditional Chinese in Hong Kong and Taiwan)

  • CM contacts and Google Messenger sort all the Chinese contacts with phonetic names A-Z. For those without phonetic names, they sort them by stroke in increasing order.
  • Signal sorts all Chinese contacts by stroke no matter whether phonetic name is provided.
  • In my opinion, sorting by stroke is less convenient, especially when you have both Chinese and English contacts. But that might be the custom of people in Hong Kong and Taiwan.

English locales

  • CM contacts and Google Messenger sort all the Chinese contacts with phonetic names A-Z. For those without phonetic names, well, I don't see how they are sorted. It looks bug to me. I'm pretty sure that in previous version of CM/Android, all Chinese contacts are sorted A-Z no matter whether phonetic names are provided. Android M doesn't has this feature, probably an upsteam bug.
  • At first glance, I thought Signal sort Chinese contacts randomly. In fact, Signal sorts Chinese contacts by radical. This is not very useful in this case.

All in all, I hope Signal could honour phonetic name when sorting contacts. This could save me most of the hassle.

GitHub Issue Cleanup:
See #7598 for more information.

Was this page helpful?
0 / 5 - 0 ratings