Bug 153842 - Wrong currency format for Euro € Upper Sorbian in Calc
Summary: Wrong currency format for Euro € Upper Sorbian in Calc
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:7.6.0 target:7.5.2 target:7.5.3
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-26 14:28 UTC by milupo
Modified: 2023-03-18 20:06 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 milupo 2023-02-26 14:28:39 UTC
Description:
When I want to select the currency format for Euro € Upper Sorbian in Calc, a number is displayed, for example, as €1.235. But it should displayed as 1.235 € (like for Euro € German (Germany) and Lower Sorbian.



Steps to Reproduce:
1. Type a numer in a Calc table
2. Click currency icon arrow in toolbar
3. Scroll to Euro € Upper Sorbian
4. Assign the currency format to the number

Actual Results:
€1.235

Expected Results:
1.235 €


Reproducible: Always


User Profile Reset: No

Additional Info:
Returned wrong currency format
Comment 1 Xisco Faulí 2023-02-27 08:44:16 UTC
@Eike, I thought you might be interested in this issue
Comment 2 Julien Nabet 2023-02-27 09:31:35 UTC
With this patch, it seems ok:
diff --git a/i18npool/source/localedata/data/hsb_DE.xml b/i18npool/source/localedata/data/hsb_DE.xml
index 3e150e96096a..9cf84c21431e 100644
--- a/i18npool/source/localedata/data/hsb_DE.xml
+++ b/i18npool/source/localedata/data/hsb_DE.xml
@@ -87,22 +87,22 @@
       <FormatCode>0,00" "%</FormatCode>
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12">
-      <FormatCode>[CURRENCY]#.##0;-[CURRENCY]#.##0</FormatCode>
+      <FormatCode># ##0 [CURRENCY];-# ##0 [CURRENCY]</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13">
-      <FormatCode>[CURRENCY]#.##0,00;-[CURRENCY]#.##0,00</FormatCode>
+      <FormatCode># ##0,00 [CURRENCY];-# ##0,00 [CURRENCY]</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14">
-      <FormatCode>[CURRENCY]#.##0;[RED]-[CURRENCY]#.##0</FormatCode>
+      <FormatCode># ##0 [CURRENCY];[RED]-# ##0 [CURRENCY]</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15">
-      <FormatCode>[CURRENCY]#.##0,00;[RED]-[CURRENCY]#.##0,00</FormatCode>
+      <FormatCode># ##0,00 [CURRENCY];[RED]-# ##0,00 [CURRENCY]</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16">
-      <FormatCode>CCC#.##0,00</FormatCode>
+      <FormatCode>CCC# ##0,00</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
     </FormatElement>
     <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17">
-      <FormatCode>[CURRENCY]#.##0,--;[RED]-[CURRENCY]#.##0,--</FormatCode>
+      <FormatCode># ##0,-- [CURRENCY];[RED]-# ##0,-- [CURRENCY]</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
     </FormatElement>
     <FormatElement msgid="DateFormatskey11" default="true" type="short" usage="DATE" formatindex="18">

I just copied pasted from i18npool/source/localedata/data/dsb_DE.xml

Now is there some official reference? (https://www.localeplanet.com/icu/hsb-DE/index.html doesn't show currency patterns or missed them).
Comment 3 Eike Rathke 2023-02-28 20:03:53 UTC
Note though that hsb-DE does not use a space as group separator (apart from that, dsb-DE probably doesn't either and that locale data seems to be completely off). See
https://icu4c-demos.unicode.org/icu-bin/locexp?d_=en&_=hsb_DE
https://icu4c-demos.unicode.org/icu-bin/locexp?d_=en&_=dsb_DE
Comment 4 milupo 2023-02-28 20:44:57 UTC
Sorbian languages use German format here. There is no difference.
Comment 5 Eike Rathke 2023-02-28 23:05:13 UTC
What is it with hsb-DE that

    <FormatElement msgid="TimeFormatskey3" default="true" type="short" usage="TIME" formatindex="41">
      <FormatCode>HH:MM AM/PM</FormatCode>
    </FormatElement>
    <FormatElement msgid="TimeFormatskey4" default="true" type="medium" usage="TIME" formatindex="42">
      <FormatCode>HH:MM:SS AM/PM</FormatCode>
    </FormatElement>

defaults the AM/PM time formats? Looks wrong to me.
Comment 6 Commit Notification 2023-02-28 23:26:25 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1309e6332d7ff2bd1f9b6bf87385b8b570e59158

Resolves: tdf#153842 {hsb-DE} currency symbol follows amount with blank

It will be available in 7.6.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 7 Commit Notification 2023-03-01 01:15:35 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/86942a85b32efeb0b7fee25f00991e69f4446ddc

Related: tdf#153842 {dsb-DE} group separator is '.' dot instead of NBSP

It will be available in 7.6.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 8 Commit Notification 2023-03-02 09:11:34 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/862fab8244319bf3f5d481f73ed873aaff933878

Related: tdf#153842 {dsb-DE} group separator is '.' dot instead of NBSP

It will be available in 7.5.2.

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 9 milupo 2023-03-02 09:47:04 UTC
Hi,

thank you very much.

I've just dowloaded and installed Daily 7.6 build 46e74a8bf03c06776cb144418206db7c4b843b41 and the currency format 1.235,00 € is standard now.

I know that non-breaking space resp. non-breaking thin space is recently recommended (at least for German) but I think that this is not common yet.
Comment 10 Eike Rathke 2023-03-02 14:47:14 UTC
The initial hsb-DE and dsb-DE locale data were contributed in 2011 by the same author back in OOo times still, I doubt it was due to some recommendation that only dsb-DE had the NBSP (non-thin).

But back to the AM/PM time formats defaults for hsb-DE, I guess they should be changed to standard 24h times. Nobody uses AM/PM that in DE..
Comment 11 milupo 2023-03-02 20:03:18 UTC
You are right, Sorbian languages use 24 h format.
Comment 12 milupo 2023-03-02 21:25:00 UTC
Yes, Lower Sorbian has hh:mm:ss as time format. Upper Sorbian should have it, too.
Comment 13 Commit Notification 2023-03-17 15:45:23 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/993e13768116dd3a1ac61b83520b3f6cdbb55e54

Related: tdf#153842 {hsb-DE} does not use AM/PM

It will be available in 7.6.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 15 Commit Notification 2023-03-17 22:10:07 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#153842 {dsb-DE} remove confusing comment

It will be available in 7.6.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 16 Commit Notification 2023-03-18 20:06:07 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

Resolves: tdf#153842 {hsb-DE} currency symbol follows amount with blank

It will be available in 7.5.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.
Comment 17 Commit Notification 2023-03-18 20:06:09 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

Related: tdf#153842 {hsb-DE} does not use AM/PM

It will be available in 7.5.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.