Bug 125483 - Changing Locale does not update the label of the separator key
Summary: Changing Locale does not update the label of the separator key
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.4.0 target:6.3.1 target:6.2.7
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2019-05-25 08:22 UTC by csongor
Modified: 2019-08-13 08:25 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Decimal separator still shows the original character (42.49 KB, image/png)
2019-05-25 08:22 UTC, csongor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description csongor 2019-05-25 08:22:44 UTC
Created attachment 151670 [details]
Decimal separator still shows the original character

My local setting in `Tools` -> `Options` -> `Language Settings` -> `Languages` -> `Locale setting` is Hungarian and the label of the checkbox under it is "Same as locale setting (,)"

This is correct, in Hungarian, decimal comma is used, for example, 1/2 = "0,5".

However, if I change the Locale setting to "English (USA)" then the label remains comma. This is wrong. It should be "Same as locale setting (.)". It should reflect that for the currently selected locale, the character is not a comma anymore. 

Note: if I close the dialog with OK and reopen it then the label shows the currently correct value (comma). However, if I set "Hungarian" again then the label is not updated. 

Proposed behaviour: when the locale is changed then the label of the checkbox should be updated.
Comment 1 csongor 2019-05-25 08:44:13 UTC
My local setting in `Tools` -> `Options` -> `Language Settings` -> `Languages` -> `Locale setting` is Hungarian and the label of the checkbox under it is "Same as locale setting (,)"

If I enter the formula `=1/2` in the cell A1 then "0,5" is displayed which is correct, in Hungarian, decimal comma is used, not period. 

If I enter the formula `="A:"&A1` then "A:0,5" is displayed which is also correct.

However, if I change the locale setting to "English (USA)" then the following things happen:
- A1 is changed to "0.5" which is correct.
- B1 is not changed, it remains "A:0,5" (comma) which seems to be wrong
- a vague error message is displayed which seems to be related to this issue.

Instead of this, the following should happen:
- displaying a question: "Some text-resulting formulae refer to cells containing numbers. Do you want to update them according to the new locale setting?"
- if the user says YES then B1 should show "A:0.5" (period), otherwise it should remain "A:0,5" (comma).
Comment 2 csongor 2019-05-25 08:47:13 UTC
Sorry, the above comment meant to be a separate bug. Unfortunately I cannot delete it from here.
Comment 3 Oliver Brinzing 2019-05-26 08:04:29 UTC
(In reply to csongor from comment #0)
> Note: if I close the dialog with OK and reopen it then the label shows the
> currently correct value (comma). However, if I set "Hungarian" again then
> the label is not updated. 
> 
> Proposed behaviour: when the locale is changed then the label of the
> checkbox should be updated.

confirming, the label should update on change, at least after pressing [Apply].
Comment 4 csongor 2019-05-26 10:09:45 UTC
I would say it should be updated as soon as the new locale is selected, otherwise the user can see a contradicting and confusing form.
Comment 5 Xisco Faulí 2019-05-27 13:59:23 UTC Comment hidden (obsolete)
Comment 6 csongor 2019-05-27 14:06:02 UTC
If it needs to be restarted then it should be mentiond in a message. For example:

"Plese restart LibreOffice so that the changes take effect"

or something similar. Keeping the wrong value on the display is a poor user experience. Could you re-open the ticket, please? (I also try it, maybe I can.)
Comment 7 Xisco Faulí 2019-05-27 14:13:21 UTC
Actually, my previous comment was wrong. If locale is changed, it doesn't ask for restarting... Sorry
Comment 8 Xisco Faulí 2019-05-27 14:17:26 UTC
Reproduced in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.15; Render: default; 

but not in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 9 Aron Budea 2019-06-16 23:24:10 UTC
Still fine in 4.1.0.4, buggy in 4.2.0.4.
Comment 10 raal 2019-08-07 06:01:03 UTC
This seems to have begun at the below commit.
Adding Cc: to abdulmajeed ahmed ; Could you possibly take a look at this one?
Thanks

0ddc06f05a5b00473a312eb1723ed41c1c1ce41c is the first bad commit
commit 0ddc06f05a5b00473a312eb1723ed41c1c1ce41c
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sat Sep 5 18:00:11 2015 +0800

    source-hash-fa3d5ca1f99fe253689004a45ec2888ebbe85fd3
    
    commit fa3d5ca1f99fe253689004a45ec2888ebbe85fd3
    Author:     abdulmajeed ahmed <aalabdulrazzaq@kacst.edu.sa>
    AuthorDate: Thu May 30 12:33:32 2013 +0200
    Commit:     abdulmajeed ahmed <aalabdulrazzaq@kacst.edu.sa>
    CommitDate: Thu May 30 12:42:45 2013 +0200
    
        Convert Languages tab page to .ui
    
        Deleted the readonly images too,it was not used any where else and was just confusing.
Comment 11 Xisco Faulí 2019-08-07 09:00:01 UTC
(In reply to raal from comment #10)
> This seems to have begun at the below commit.
> Adding Cc: to abdulmajeed ahmed ; Could you possibly take a look at this one?
> Thanks
> 
> 0ddc06f05a5b00473a312eb1723ed41c1c1ce41c is the first bad commit
> commit 0ddc06f05a5b00473a312eb1723ed41c1c1ce41c
> Author: Matthew Francis <mjay.francis@gmail.com>
> Date:   Sat Sep 5 18:00:11 2015 +0800
> 
>     source-hash-fa3d5ca1f99fe253689004a45ec2888ebbe85fd3
>     
>     commit fa3d5ca1f99fe253689004a45ec2888ebbe85fd3
>     Author:     abdulmajeed ahmed <aalabdulrazzaq@kacst.edu.sa>
>     AuthorDate: Thu May 30 12:33:32 2013 +0200
>     Commit:     abdulmajeed ahmed <aalabdulrazzaq@kacst.edu.sa>
>     CommitDate: Thu May 30 12:42:45 2013 +0200
>     
>         Convert Languages tab page to .ui
>     
>         Deleted the readonly images too,it was not used any where else and
> was just confusing.

Caolán, I thought you might be interested in this issue...
Comment 12 Commit Notification 2019-08-07 10:05:16 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/18d195e7bb62eb95939411e93850a529a4e9b60c%5E%21

Resolves: tdf#125483 locale separator label needs to be derived from original

It will be available in 6.4.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 13 Caolán McNamara 2019-08-07 10:18:11 UTC
fixed in master, backports to 6-3 and 6-2 in gerrit
Comment 14 Xisco Faulí 2019-08-08 09:09:51 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: 6d024a69164716f7856ec936a72d01a6630d2a7c
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Caolán, thanks for fixing this issue!!
Comment 15 Commit Notification 2019-08-08 09:11:31 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/836b4f1ad8b1921123949328a6f910cf4cc46b5a%5E%21

Resolves: tdf#125483 locale separator label needs to be derived from original

It will be available in 6.3.1.

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 2019-08-13 08:25:56 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/4d45200945462fda2ed3ae906106b5c6df6466e0%5E%21

Resolves: tdf#125483 locale separator label needs to be derived from original

It will be available in 6.2.7.

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.