Bug 143946 - Add klingon as a supported language
Summary: Add klingon as a supported language
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Eike Rathke
URL:
Whiteboard: target:7.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-18 20:58 UTC by fergusq
Modified: 2022-08-05 09:00 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fergusq 2021-08-18 20:58:21 UTC
Description:
Klingon is one of the most popular constructed languages. I'm currently working on a spell checker for it and would like to make a LibreOffice extension. For this, Klingon needs to be added as a supported language.

The ISO 639-3 language code of Klingon is "tlh". It is written from left to right with latin alphabet or its own alphabet.

Steps to Reproduce:
Change the language of the document.

Actual Results:
Klingon is not available in the language drop-down menu when choosing the document's language.

Expected Results:
Klingon is available as a language.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.3.2
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.12; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: fi-FI
Calc: threaded
Comment 1 Eike Rathke 2021-08-20 12:12:17 UTC
If the spell-checker dictionary defines to support the 'tlh' language in its dictionaries.xcu Locales property then {tlh} will be automatically added to the character/paragraph/font attribution's available languages list. Real Klingons should be able to figure out they'll have to select that language entry.
Comment 2 fergusq 2021-08-20 12:42:29 UTC
(In reply to Eike Rathke from comment #1)
> If the spell-checker dictionary defines to support the 'tlh' language in its
> dictionaries.xcu Locales property then {tlh} will be automatically added to
> the character/paragraph/font attribution's available languages list. Real
> Klingons should be able to figure out they'll have to select that language
> entry.

You are expecting all Klingon hobbyists to be good with computers, which is not true.

LibreOffice has this kind of basic support for Esperanto and Lojban, so I see no reason why not add similar support for Klingon.
Comment 3 Eike Rathke 2021-08-20 21:15:21 UTC
I will add it just because it's Klingon..

Anyhow, the difference with Esperanto and Lojban is that they have locale data, for which the language list entries are needed anyway.

Do you plan to contribute locale data as well? Otherwise the language will be selectable for character/paragraph/font attribution and spell-check, but not as default language for all documents or for number formatting. See
https://wiki.documentfoundation.org/LibreOffice_Localization_Guide/How_To_Submit_New_Locale_Data
Comment 4 fergusq 2021-08-20 23:38:06 UTC
Yes, I can contribute the locale data.

Klingon has a specific collation system where words that start with the grapheme "n" should come before words that start with "ng" as they are considered separate letters (same with "t" and "tlh"). Is it easy to add these rules to the locale data? It seems there is an option for changing the collation but I'm not sure how it works.
Comment 5 Commit Notification 2021-08-21 12:39:02 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bae2fbfd341b2cb5e5053c7977176f68b5d658dd

Resolves: tdf#143946 Add Klingon, tlhIngan Hol {tlh} 0x06AC to language list

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Eike Rathke 2021-08-21 19:10:43 UTC
(In reply to fergusq from comment #4)
> Klingon has a specific collation system where words that start with the
> grapheme "n" should come before words that start with "ng" as they are
> considered separate letters (same with "t" and "tlh")
That would need a tailored collator, which can be defined in locale data. See
https://wiki.documentfoundation.org/LibreOffice_Localization_Guide/Advanced_Source_Code_Modifications#Collation_.28correct_alphabetic_order_for_a_given_locale.29
Comment 7 Cory M. Bishop 2022-08-05 02:07:32 UTC Comment hidden (spam)