Bug 110751 - UI: The Arab language is listed as {sd-Arab-PK} in the drop down list for the User Interface language
Summary: UI: The Arab language is listed as {sd-Arab-PK} in the drop down list for the...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.2.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2017-08-01 08:47 UTC by Telesto
Modified: 2018-08-15 15:40 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (120.29 KB, image/jpeg)
2017-08-01 08:48 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-08-01 08:47:13 UTC
Description:
UI: The Arab language is listed as {sd-Arab-PK} in the drop down list for the User Interface language

Steps to Reproduce:
1. Alt+F12 (Options)
2. Language settings -> Languages
3. Click on the user Interface language drop down menu. Scroll to the top of the list -> notice {sd-Arab-PK}

Actual Results:  
{sd-Arab-PK} is shown instead of a proper description

Expected Results:
A proper description



Reproducible: Always

User Profile Reset: No

Additional Info:
Version: 5.4.0.3
Build ID: 7556cbc6811c9d992f4064ab9287069087d7f62c
CPU threads: 4; OS: Windows 6.2; UI render: default; 
Locale: nl-NL (nl_NL); Calc: CL


User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Telesto 2017-08-01 08:48:15 UTC
Created attachment 135042 [details]
Screenshot
Comment 2 Xisco Faulí 2017-08-01 09:14:16 UTC
It's the expected behaviour. Please see: https://cgit.freedesktop.org/libreoffice/core/commit/?id=bde834ee6b0cb43cebece47cac55cc9b80aadc24
Closing as RESOLVED NOTABUG
Comment 3 Aron Budea 2017-08-01 09:26:17 UTC
This is actually a regression, as in version 4.0.0.3 it still read Sindhi, but in 4.4.0.3 it read sd-Arab-PK.

Possibly the following commit is the cultprit:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=8697b72ef81aab80b4fd657e5f8d68c9904735dd
author		Eike Rathke <erack@redhat.com>	2013-10-25 17:35:20 (GMT)
committer	Eike Rathke <erack@redhat.com>	2013-10-25 17:39:11 (GMT)

Sindhi 'sd-PK' => 'sd-Arab-PK'
Comment 4 Xisco Faulí 2017-08-01 09:32:28 UTC
@Eike, Can you comment on this one?
Comment 5 QA Administrators 2018-08-02 02:49:26 UTC Comment hidden (obsolete)
Comment 6 Eike Rathke 2018-08-15 15:14:31 UTC
Actually the "{sd-Arab-PK}" is correct here because the "Sindhi" language listbox entry we have is for LANGUAGE_SINDHI 0x0459 mapped to 'sd-Deva-IN' (that's how MS defined the LCID, see https://msdn.microsoft.com/en-us/library/cc233965), shortcut to 'sd-IN' with suppressed script tag (which suppressing probably may be wrong anyway).

That the language "Sindhi" was displayed for our translation's 'sd' (which is in Arabic script hence does not match 'sd-IN') before commit 8697b72ef81aab80b4fd657e5f8d68c9904735dd was by mere chance because 'sd-IN' was the then first 'sd-*' locale known, however mapping the 'sd' translation to 'sd-IN' was always wrong.

That commit then introduced 'sd-Arab-PK' (as an override for 'sd-PK') and a follow-up commit efa1f08be8194ed97a4b48effd0bbe109d5c2164 changed ordering so 'sd-PK' is encountered first (and then overridden by 'sd-Arab-PK') to match our translation, this for the correct LANGUAGE_SINDHI_PAKISTAN 0x0859, but for which a language listbox entry doesn't exist so the BCP 47 language tag is displayed.

Long story short: we'll need a new language listbox entry, and reword the existing one.
Comment 7 Commit Notification 2018-08-15 15:39:34 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2f058c33c85958c77adf103da1865aae333126e9

Resolves: tdf#110751 add "Sindhi, Arabic" to language list

It will be available in 6.2.0.

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

Affected users are encouraged to test the fix and report feedback.