Bug 118298 - Update preview in CSV import dialog when the language is changed
Summary: Update preview in CSV import dialog when the language is changed
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CSV-Dialog
  Show dependency treegraph
 
Reported: 2018-06-21 08:49 UTC by Heiko Tietze
Modified: 2021-06-28 15:09 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 Heiko Tietze 2018-06-21 08:49:08 UTC
When loading a CSV file with non-locale delimiters like 1,2;1,3;1,4 the supposed workflow to get these values as numbers is to change the language accordingly - German in that case. However, doing this doesnt updates the preview and users don't get a feedback on this option.

Alternatively or in addition, we could show the delimiters for the language setting to make it perfectly clear what happens.
Comment 1 Buovjaga 2018-06-24 19:19:28 UTC
Sounds good -> NEW
Comment 2 Andreas Heinisch 2021-06-28 09:09:21 UTC
The csv import relies on the separators shown in the import dialog. So, if you change the language, the old separators are still used. A solution could be that on changing the language, the separators will be updated according to the decimal separator, but I don't know if that causes side effects for the user:

The dialog shows Tab, Comma, Semicolon, etc. The user changes the language from English to German. Now the semicolon should not be used as a separator, because it may interfer with the thousand separator, and the preview is updated accordingly. This can be achieved also by clicking on the separator checkbox.

Opinions?
Comment 3 Andreas Heinisch 2021-06-28 09:10:12 UTC
Sry, a typo:

Now the comma should not be used as a separator ...
Comment 4 Heiko Tietze 2021-06-28 09:34:42 UTC
I think we don't have the logic yet to check/uncheck the delimiters depending on the chosen language. 

This ticket was about 1,2;3,4 (German) vs. 1.2;3.4 (English) and the wish to set the language automatically. Switching to English could indeed also uncheck the comma to read 1,234.56;7,890.12 as numbers. However, in contrast to the first request 1.2 and 1,2 being a proper number eventually, the wrong delimiter is easy to spot in the preview.
Comment 5 Heiko Tietze 2021-06-28 14:02:18 UTC
What's your take, Andreas, after unassigning yourself? Better not touch it at all and resolve WF?
Comment 6 Andreas Heinisch 2021-06-28 15:09:18 UTC
Hm, we could set the separators accordingly when changing the language (un- or checking the comma separator), and checking for the correct language for the given numbers, which can be tricky.

I was unchecking myself, since I don't know exactly how the dialog should react to different scenarios:

- Handle the correct separator when changing the language 
- Try to parse thr correct separator and change the language accordingly, but this could be tricky: 123,345 could be German or English or even two cols 123 , 345 depending on the separator.