Bug 106202 - Locale: period is not always interpreted as a decimal separator key
Summary: Locale: period is not always interpreted as a decimal separator key
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.2.3.2 rc
Hardware: x86-64 (AMD64) All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Decimal-Separator-Key
  Show dependency treegraph
 
Reported: 2017-02-26 20:30 UTC by palmierivinc.ent
Modified: 2017-10-27 09:06 UTC (History)
2 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 palmierivinc.ent 2017-02-26 20:30:45 UTC
Description:
With locales using comma as decimal separator, the numpad dot is interpreted as such in document, but not in the interface.

Steps to Reproduce:
1. In the menu Tools > Options > Linguistic parameters, select a user interface and a locale setting using comma as decimal separator (such as french or german).
2. Uncheck "decimal separator key: same as locale setting"
3. Go to a form using decimal number. (In Writer: Format > Page > Width ; In Calc: Format > Row > Height)
4. Type a decimal value as "3.14", with a dot, and unfocus the field.

Actual Results:  
The dot is ignored. The field takes "314" or the max possible value.

Expected Results:
LO interprets the dot as a decimal separator.


Reproducible: Always

User Profile Reset: No

Additional Info:
I think the problem comes from the incomplete support of the locale by the OS. However:
1. In the language option form, since user interface and locale setting are set just above the choice of the decimal separator, the contract between the user and LO is explicitly "We'll use the dot as the decimal separator in the documents AND in the interface".
2. I tested this behavior with other softwares, as Gnome-calculator and Inkscape and they interpret the dot as a decimal separator, as expected.
3. In Calc, for instance, this behavior constrains the user to make a difference wether he is in a form or in a cell formula. It's really anti-ergonomic.

Solution 1: (If the problem comes from the OS)
Override OS behavior and interpret numpad dot as a comma in the forms when it's the expected behavior.

Solution 2:
In the language option form, change the "decimal separator key" checkbox to a multiple choice, so that the user can explicitly choose to interpret the numpad dot as a decimal separator.

Solution 3:
Add a warning: "this option doesn't work with every OS"

Solution 4:
Remove the checkbox on Linux.



User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 Buovjaga 2017-03-13 09:34:06 UTC
(In reply to palmierivinc.ent from comment #0)
> 4. Type a decimal value as "3.14", with a dot, and unfocus the field.

Are you using the numpad for this? On my Finnish keyboard, Numpad has a comma and not a period. If I input a period for 3.14, it goes to 300 cm. Am I reproducing your problem?
Comment 2 palmierivinc.ent 2017-03-13 15:22:40 UTC
Yes, you are reproducing the problem!

I focused unnecessarily on the numpad, the problem is about the interpretation of the dot in the interface.
Comment 3 Buovjaga 2017-03-13 15:31:46 UTC
Thanks. I tested on Windows at work, so I'll set the OS to all.
Comment 4 Jean-Baptiste Faure 2017-09-08 09:29:10 UTC
On Linux distribution, at least on Ubuntu, the configuration option "same as locale setting" works only with few keyboard layout. I know it works with "Français variante obsolète". Sadly this keyboard layout does not have useful characters like œ and is not widely used by French users. 
I think that point of keyboard layout need more investigation.

Best regards. JBF
Comment 5 palmierivinc.ent 2017-09-08 14:37:19 UTC
I confirm Jean-Baptiste Faure comment. With "same as locale setting" enabled:
- with the keyboard layout "Français (variante obsolète)",i have the expected behavior,
- with the keyboard layout "Français",i have the expected behavior,
- with the keyboard layout "Français (variante)", i have to keep the button AltGr pressed. This is the layout i used when i reported the bug.

So, if i'm not wrong, this is not a bug, but a feature from the keyboard layout.
Comment 6 Buovjaga 2017-09-08 14:43:09 UTC
(In reply to palmierivinc.ent from comment #5)
> I confirm Jean-Baptiste Faure comment. With "same as locale setting" enabled:
> - with the keyboard layout "Français (variante obsolète)",i have the
> expected behavior,
> - with the keyboard layout "Français",i have the expected behavior,
> - with the keyboard layout "Français (variante)", i have to keep the button
> AltGr pressed. This is the layout i used when i reported the bug.
> 
> So, if i'm not wrong, this is not a bug, but a feature from the keyboard
> layout.

Ok, let's close.