Skip to content

Conversation

@uku3lig
Copy link

@uku3lig uku3lig commented Jun 1, 2025

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of changes

Adds a simple transliteration step in the sorting process (if supported by the device, requires Android 10 or higher), allowing for more natural sorting (eg. names in other languages will be placed approximately on how they're pronounced)

Fixes the following issues

Fixes #1110

Any additional information

I took the liberty to add the code to the Naming class to group it with the intelligent sorting, avoiding any disruption with what some users would expect from "simple" sorting

APK testing

app-debug.zip

Due Diligence

@NecRaul
Copy link
Contributor

NecRaul commented Jun 1, 2025

Tested it out with a small library containing both Japanese and Cyrillic characters.

Screenshot_2025-06-01-23-59-01-720_org oxycblt auxio debug

Screenshot_2025-06-01-23-59-06-669_org oxycblt auxio debug

Screenshot_2025-06-01-23-59-23-971_org oxycblt auxio debug

Screenshot_2025-06-01-23-59-32-368_org oxycblt auxio debug

Screenshot_2025-06-01-23-59-47-961_org oxycblt auxio debug

I included an artist with kanji in the name, but it ended up placing 暁Records (Akatsuki Records) at the bottom of the list, rather than between AC/DC and Judas Priest, as shown in the example. That aside, it worked great with all the other entries.

Also, while I personally won’t be using this feature (I don’t use intelligent sorting either), some users might end up requesting the ability to toggle them separately. That may be something to think about.

@uku3lig
Copy link
Author

uku3lig commented Jun 1, 2025

It seems that ICU4J interprets 暁 as "xiao" (which, from my very limited knowledge of kanji seems to be how you read it in chinese), hence putting it at the bottom of the list

Kanji transliteration appears to be a known issue alas without much of a solution

@OxygenCobalt
Copy link
Owner

Sorry for the delay reviewing here, I've been considering the interaction of contribution licensing and #572 and how I want to approach it in the case that I consider adding some out of scope features to a premium fork (dont worry, not gonna paywall what's already added, this would be new complex stuff like subsonic or lyrics).

This does look good and Ill merge eventually after some cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better sorting with ICU4J transliteration

3 participants