Files
Julien Nabet 790dd1d0c6 tdf#173547: fix wrong alphabetical sorting for Kurdish Latn alphabetical
Following tdf#173579 by removing broken dynamic loading of collators,
I focused on Kurdish Latn collation.

Root cause and fix provided by GPT-5.6 Luna
Cause:
when "kmr-Latn-TR", LO uses Language "qlt", Country "TR" (Turkey), Variant "kmr-Latn-TR"
but "kmr-Latn-TR" wasn't used in LOCAL_RULE_LANGS (a variable generated in i18npool/CustomTarget_collator.mk)
and used in i18npool/source/collator/collator_unicode.cxx, method Collator_Unicode::loadCollatorAlgorithm
so "func" and "funclen" weren't initialized with appropriate collator functions.

Fix:
rename file and functions containing "ku" by using "kmr_Latn"
(I suppose the right move since it mimics Eike Rathke's commit 45d4b9b5e3
"renamed ku* to kmr-Latn*, fdo#63460")

Add a specific use case bKmrLatn to load "kmr_Latn" collator functions
to deal with "qlt" language (yes it's a bit kludgy...)

We must remind that "kmr_Latn" can be used for "kmr_Latn_TR" but also with "kmr_Latn_SY"
that's why I avoided using "kmr_Latn_TR"

Also, to avoid the bKmrLatn specific case,
I thought about changing "LangID" tag of i18npool/source/localedata/data/kmr_Latn_TR.xml
from "qlt" into "kmr-Latn" but I'm not sure of the impact.

Change-Id: Ifc608da19b4bd2d05667121e3c6f2455f5d45ca9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210977
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-21 22:34:45 +02:00

59 lines
1.7 KiB
C

/* Configuration of restriction on supported locales, by the
* --with-locales option.
*
* (Note that this is totally unrelated to what UI language(s) were
* configured with the --with-lang option.)
*
* Normally, especially for desktop OSes, LibreOffice is built to
* support all the locales and character encodings that it has code
* (data) for in the source code. By using the --with-locales
* configure switch, this can be restricted.
*
* This file defines feature test macros for those languages for which
* at least one locale is to be supported. In some cases, a feature
* test macro for a script is provided in addition or instead.
*
* Only languages for which there exists separate code and/or data in
* the source code need to be mentioned here.
*/
#ifndef CONFIG_LOCALES_H
#define CONFIG_LOCALES_H
/* In the normal case WITH_LOCALE_ALL is one and this
* overrides the others which are zero.
*/
#define WITH_LOCALE_ALL 0
/* When --with-locales was used, WITH_LOCALE_ALL is zero and some of
* these are one.
*/
#define WITH_LOCALE_ca 0
#define WITH_LOCALE_cu 0
#define WITH_LOCALE_dz 0
#define WITH_LOCALE_el 0
#define WITH_LOCALE_he 0
#define WITH_LOCALE_hi 0
#define WITH_LOCALE_hr 0
#define WITH_LOCALE_hu 0
#define WITH_LOCALE_is 0
#define WITH_LOCALE_ja 0
#define WITH_LOCALE_kmr_Latn 0
#define WITH_LOCALE_ko 0
#define WITH_LOCALE_ln 0
#define WITH_LOCALE_my 0
#define WITH_LOCALE_ne 0
#define WITH_LOCALE_ro 0
#define WITH_LOCALE_ru 0
#define WITH_LOCALE_sid 0
#define WITH_LOCALE_th 0
#define WITH_LOCALE_tr 0
#define WITH_LOCALE_uk 0
#define WITH_LOCALE_vro 0
#define WITH_LOCALE_zh 0
#define WITH_LOCALE_FOR_SCRIPT_Cyrl 0
#define WITH_LOCALE_FOR_SCRIPT_Deva 0
#endif