Discussion:
[kst] [Bug 375612] New: Session files not portable between different system locales
Jonathan Liu
2017-01-27 12:49:06 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=375612

Bug ID: 375612
Summary: Session files not portable between different system
locales
Product: kst
Version: 2.0.8
Platform: MS Windows
OS: MS Windows
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
Assignee: ***@kde.org
Reporter: ***@gmail.com
Target Milestone: ---

Kst session files saved on Windows 7 with English locale don't open properly on
Windows 7 with German locale. This is because when using German locale, it
expects to find items in the session file with German names instead of English
names.
--
You are receiving this mail because:
You are the assignee for the bug.
Jonathan Liu
2017-01-27 13:01:23 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=375612

--- Comment #1 from Jonathan Liu <***@gmail.com> ---
This can be tested from a command prompt:
1. cd "C:\Program Files (x86)\Kst-2.0.8\bin"
2. set LANG=de_DE
3. kst2.exe
4. Create plot and save session, exit Kst.
5. set LANG=en_US
6. kst2.exe
7. Open the saved session
--
You are receiving this mail because:
You are the assignee for the bug.
b***@kde.org
2017-01-27 14:59:57 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=375612

***@astro.utoronto.ca changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@astro.utoronto.
| |ca

--- Comment #2 from ***@astro.utoronto.ca ---
Thanks, Jonathan.

Can you post a couple example session files?
--
You are receiving this mail because:
You are the assignee for the bug.
Jonathan Liu
2017-01-28 13:44:29 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=375612

--- Comment #3 from Jonathan Liu <***@gmail.com> ---
Created attachment 103681
--> https://bugs.kde.org/attachment.cgi?id=103681&action=edit
Sample Data File
--
You are receiving this mail because:
You are the assignee for the bug.
Jonathan Liu
2017-01-28 13:44:57 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=375612

--- Comment #4 from Jonathan Liu <***@gmail.com> ---
Created attachment 103682
--> https://bugs.kde.org/attachment.cgi?id=103682&action=edit
English session file
--
You are receiving this mail because:
You are the assignee for the bug.
Jonathan Liu
2017-01-28 13:45:17 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=375612

--- Comment #5 from Jonathan Liu <***@gmail.com> ---
Created attachment 103683
--> https://bugs.kde.org/attachment.cgi?id=103683&action=edit
German session file
--
You are receiving this mail because:
You are the assignee for the bug.
b***@kde.org
2017-02-03 21:07:32 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=375612

***@astro.utoronto.ca changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |CONFIRMED
Ever confirmed|0 |1

--- Comment #6 from ***@astro.utoronto.ca ---
This is a ... deep bug.

When no column names are provided by the file, the ascii datasource plugin
automatically names the columns "Column 1" etc, and, of course, makes "Column"
a translatable string. So in German it calls it "Spalte 1" etc.

Kst proper knows nothing of the names being automatic or translated - it just
knows the list of field names that the datasource provides - and when it saves
a vector, it uses the only name it has been given.

Trying to load in a different language fails.

Options:
- don't translate "Column" - field would be called "Column 1", etc, regardless
of language.
- don't add "Column" to the automatically generated name of the field. So
"Column 1" would just become "1".
- Save the translated name in the data source config section of the session
file, and use that translation regardless of what language the session is
reopened in.
- Apologize that session files are not compatible between languages.

Other options that might be more desirable seem to require significant
re-architecturing how data sources handle field names.

Thoughts?
--
You are receiving this mail because:
You are the assignee for the bug.
Jonathan Liu
2017-02-03 21:24:47 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=375612

--- Comment #7 from Jonathan Liu <***@gmail.com> ---
I think the following would be desirable:
- Make the session file data the same regardless of the current Kst locale,
could standardize on English
- Just because a German user creates a Kst session file without manually
specifying labels, an English user opening the Kst session file shouldn't see
automatic German labels but should see the corresponding automatic English
labels
--
You are receiving this mail because:
You are the assignee for the bug.
C Barth Netterfield
2017-02-03 21:30:05 UTC
Permalink
Yes.

This is the top of my list of options that "might be more desirable" but
"seem to require significant re-architecturing how data sources handle field
names."

I am honestly not sure that this can be done without a pretty serious re-write
:-(
Post by Jonathan Liu
https://bugs.kde.org/show_bug.cgi?id=375612
- Make the session file data the same regardless of the current Kst locale,
could standardize on English
- Just because a German user creates a Kst session file without manually
specifying labels, an English user opening the Kst session file shouldn't
see automatic German labels but should see the corresponding automatic
English labels
b***@kde.org
2017-02-03 21:30:14 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=375612

--- Comment #8 from ***@astro.utoronto.ca ---
Yes.

This is the top of my list of options that "might be more desirable" but
"seem to require significant re-architecturing how data sources handle field
names."

I am honestly not sure that this can be done without a pretty serious re-write
:-(
Post by Jonathan Liu
https://bugs.kde.org/show_bug.cgi?id=375612
- Make the session file data the same regardless of the current Kst locale,
could standardize on English
- Just because a German user creates a Kst session file without manually
specifying labels, an English user opening the Kst session file shouldn't
see automatic German labels but should see the corresponding automatic
English labels
--
You are receiving this mail because:
You are the assignee for the bug.
Jonathan Liu
2017-02-03 21:36:42 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=375612

--- Comment #9 from Jonathan Liu <***@gmail.com> ---
How about having the default column names C1, C2, C3, etc.?
--
You are receiving this mail because:
You are the assignee for the bug.
Jonathan Liu
2017-02-03 21:38:23 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=375612

--- Comment #10 from Jonathan Liu <***@gmail.com> ---
(In reply to Jonathan Liu from comment #9)
Post by Jonathan Liu
How about having the default column names C1, C2, C3, etc.?
Of course we also need a fallback for compatibility with older session files.
--
You are receiving this mail because:
You are the assignee for the bug.
Loading...