Bug 135518

Summary: Locale en-HK is not supported
Product: LibreOffice Reporter: Steven Drinnan <steven>
Component: LocalizationAssignee: Eike Rathke <erack>
Status: RESOLVED FIXED    
Severity: enhancement CC: erack, ming.v.hua, serval2412
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
Whiteboard: target:7.1.0 target:7.0.3
Crash report or crash signature: Regression By:

Description Steven Drinnan 2020-08-07 05:44:06 UTC
Description:
If the locale of the compute is set to - en-HK, the date format is incorectly set to US (mm/dd/yy) it should be dd/mm/yy - UK standard. Could effect other applications as well

Steps to Reproduce:
1. Have your computers locale set to en-HK (most likely the Chinese eqiv too)
2. type in a date in calc
3.

Actual Results:
date changes to US format (mm/dd/yy)

Expected Results:
Date should be in UK format (dd/mm/yy)


Reproducible: Always


User Profile Reset: No



Additional Info:
If you change the locale to another compatible like English-NZ
Comment 1 Julien Nabet 2020-08-07 12:41:32 UTC
Indeed taking a look at:
sc/source/filter/oox/numberformatsbuffer.cxx
I noticed there's already this:
English, Australia
English, Belize
English, Canada
English, Caribbean
English, United Kingdom
English, Ireland
English, Jamaica
English, New Zealand
English, Philippines
English, Trinidad and
English, USA
English, South Africa
English, Zimbabwe

But nothing about English, Hong-Kong
See https://opengrok.libreoffice.org/xref/core/sc/source/filter/oox/numberformatsbuffer.cxx?r=45170005#1635
Comment 2 Ming Hua 2020-08-08 09:13:59 UTC
In LibreOffice the way to add support for a new locale is by providing a new file in core/i18npool/source/localdata/data:
https://git.libreoffice.org/core/+/refs/heads/master/i18npool/source/localedata/data/

The format is simple XML and the preparation can be done by a user without much experience in programming.  And it's usually done by a user of the locale.  See, for example, bug 127011.

Eike is the developer responsible for this area, so I'm adding him to CC.  And he'll correct anything I've missed or got wrong in the explanation above.
Comment 3 Eike Rathke 2020-08-21 09:21:55 UTC
The en-HK data can be inherited from en-GB using the ref=... mechanisms, I'll do.


(In reply to Julien Nabet from comment #1)
> sc/source/filter/oox/numberformatsbuffer.cxx
Those are only some default presets used during import from Excel OOXML.
Comment 4 Commit Notification 2020-08-21 11:24:42 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5dffb7ba361ad76aa249d6c93fd87fff67362726

Resolves: tdf#135518 Add English (Hong Kong) [en-HK] locale data

It will be available in 7.1.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 5 Commit Notification 2020-08-21 16:27:16 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#135518 Add English (Hong Kong) [en-HK] to language list

It will be available in 7.1.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 2020-08-21 16:29:56 UTC Comment hidden (off-topic)
Comment 7 Eike Rathke 2020-08-21 16:38:36 UTC
So we could backport the locale data to 7-0, but not the language list entry (now after UI freeze) as it would be added to translation work. The consequence would be that the locale would be listed as
{en-HK}
or if it's inherited from the system's default
Default - {en-HK}
I wouldn't mind that, but some may.. YMMV.
Comment 8 Eike Rathke 2020-09-24 15:24:09 UTC
Pending review https://gerrit.libreoffice.org/c/core/+/103328 for 7-0

Note that in the language list this shows up as
  {en-HK}
or
  Default - {en-HK}
as there is, on purpose, no language list entry that would need translation.

If there are concerns about this UX please object..
Comment 9 Commit Notification 2020-09-28 00:10:13 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/37352332a3b6e6d068ce77b46f616e0b752e3ba8

Resolves: tdf#135518 Add English (Hong Kong) [en-HK] locale data

It will be available in 7.0.3.

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.