Summary: | Language list is displayed in wrong order (getLanguages doesn't sort it, the order is UB) | ||
---|---|---|---|
Product: | Koha | Reporter: | Michał <schodkowy.omegi-0r> |
Component: | OPAC | Assignee: | Owen Leonard <oleonard> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | dcook, jonathan.druart, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38646 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Michał
2025-01-30 10:12:16 UTC
Also wasn't sure whether to mark it as OPAC or I18N category. Technically the user-facing display bug is in OPAC, even though also unit test regressed after MariaDB update due to the UB. Welp. I was going to say that sorting the @languages_list at the end of getLanguages() would be the easiest solution, but that wouldn't be translation friendly... ...but it looks like we just use the description straight from the database, so that's fine. I don't recall if sort() can handle UTF-8 or not. I think it should. But if not it might be necessary to use something like Unicode::Collate's sort() Or do we sort by code? Using Unicode::Collate might be useful with the description because that would use whatever the default is used in the Unicode Collation Algorithms... I wonder if Greek speakers would expect to find Greek at the end of the list or in the Es... This could be another case where Unicode::Collate::Locale could be useful although it runs into issues of installed locales... see bug 36947 |