Issue 124654 - locale setting should be saved with the document
Summary: locale setting should be saved with the document
Status: UNCONFIRMED
Alias: None
Product: Internationalization
Classification: Code
Component: localedata (show other issues)
Version: 4.1.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needhelp
Depends on: 124651
Blocks:
  Show dependency tree
 
Reported: 2014-04-10 16:44 UTC by mroe
Modified: 2015-09-18 13:05 UTC (History)
5 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
screenshot of language settings (38.90 KB, image/png)
2014-04-11 07:53 UTC, Edwin Sharp
no flags Details
mockup for the Language Settings page (96.16 KB, image/png)
2014-04-11 08:54 UTC, mroe
no flags Details
differences "wrong" vs. "right" locale settings (114.91 KB, image/png)
2014-04-11 15:15 UTC, mroe
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mroe 2014-04-10 16:44:19 UTC
For a reason of this issue look at issue 124651 and issue 124644.


If a spreadsheet document is created, the used locale setting should be saved with the document.

If this locale setting is loaded later with the document, where the application have an other default locale setting, the same locale formats (Format Cells, tab Numbers) are available how it was at saving time of the document.

So there is a need that in
Tools → Options… - Language Settings
the Locale settings should have an option
[x] For the current document only

but independent from the similar option as for the language.
Comment 1 Edwin Sharp 2014-04-11 07:53:40 UTC
Created attachment 83168 [details]
screenshot of language settings
Comment 2 Edwin Sharp 2014-04-11 07:54:23 UTC
Is this the request?
Comment 3 mroe 2014-04-11 08:54:15 UTC
Created attachment 83170 [details]
mockup for the Language Settings page

@Edwin: No.
I've created a mockup, how the Language Settings page could look. But it shows only the change in the UI resulted for the enhancement that the settings under "Default locale settings for documents" should be saved with the document.
Comment 4 Edwin Sharp 2014-04-11 09:57:58 UTC
Regarding the UI, there are existing requests for explicit definition of decimal separator, date format and time format instead of the implicit definition enforced by the current locale selection.
Regarding the functionality, loading the original locale setting is IMHO confusing and unwanted.
Comment 5 mroe 2014-04-11 12:21:45 UTC
(In reply to Edwin Sharp from comment #4)
> Regarding the functionality, loading the original locale setting is IMHO
> confusing and unwanted.

If you don't have any international contact and do you never need to edit spreadsheets with other locale formats then yours, you'll never need this issue and perhaps you can't understand it.

Load
https://issues.apache.org/ooo/attachment.cgi?id=83157
look at Format Cells, tab Numbers for cell A3
a) with your locale settings (en)
b) with the original (Bulgarian) locale settings of the document
and find out the difference.
Comment 6 Edwin Sharp 2014-04-11 13:09:57 UTC
I see no difference - both have format code D.MM.YYYY" r."
Comment 7 mroe 2014-04-11 15:15:41 UTC
Created attachment 83171 [details]
differences "wrong" vs. "right" locale settings
Comment 8 Edwin Sharp 2014-04-12 16:57:10 UTC
Same here.
So the proposed benefit is the availability of incomprehensible formats?
A correspondence with international contacts is usually based on predefined and mutually agreed norm via standard operating procedures. Formats other than the agreed one are unnecessary.
Comment 9 Andreas Säger 2014-04-12 18:01:13 UTC
Set the locale of cell style "Standard" explicitly.
Comment 10 mroe 2014-04-14 09:05:52 UTC
(In reply to Edwin Sharp from comment #8)
> A correspondence with international contacts is usually based on predefined
> and mutually agreed norm via standard operating procedures. Formats other
> than the agreed one are unnecessary.

This is the best explanatory statement to confirm this issue!
Thank you! My English isn't so good.
Comment 11 Rainer Bielefeld 2014-05-01 05:58:58 UTC
I think this is not a simple "we need an additional checkbox" problem.

(a) Is it possible to have documents in AOO opened with different locale?
    I don't think so
(b) Is the requested "locale in document" part of ODF 1.2 specifications?
    I do not know.
(c) I can't confirm difference with "User Defined" formatting due to 
    Attachment 83171 [details] for Issue 124654
    with 4.1.0 (WIN). I never see "User defined" below formatting string.
Comment 12 mroe 2014-05-01 10:07:41 UTC
(In reply to Rainer Bielefeld from comment #11)
> I think this is not a simple "we need an additional checkbox" problem.
> 
> (a) Is it possible to have documents in AOO opened with different locale?
>     I don't think so

Yes, AOO creates and open such documents! This is the reason for this issue!

> (c) I can't confirm difference with "User Defined" formatting due to 
>     Attachment 83171 [details] for Issue 124654
>     with 4.1.0 (WIN). I never see "User defined" below formatting string.

Please make the difference between a) and b) in comment 5!
a) Tools → Options… - Language Settings - Locale setting: any different from Bulgarian
b) Tools → Options… - Language Settings - Locale setting: Bulgarian

Look at 
https://issues.apache.org/ooo/attachment.cgi?id=83157
from issue 124644. This file is saved with 

> (b) Is the requested "locale in document" part of ODF 1.2 specifications?
>     I do not know.

I think there is no need for. Maybe it cold be some day. But till then it is only a field that AOO reads and other programs can silently drop it. But it enables AOO to choose the right locale setting for the document.
Comment 13 Rainer Bielefeld 2014-05-01 10:50:47 UTC
(In reply to mroe from comment #12)
Of course I know the screenshots from comment 5, that exactly was the difference I wanted to reproduce with gambling cell/locale and AOO locale. It's strange, I now after a PC reboot since comment 11 I can reproduce the difference ("user defined ..."). Additional issue? Something with my installation? Still testing!
Comment 14 Rainer Bielefeld 2014-05-01 11:32:08 UTC
I think I have to disagree with the request for some reasons until I will have understood all aspects of the request.

An example:
With my German AOO with German UI and German menu 'Tools -> Options -> Language Settings -> Languages - Locale=German' I have 2 cells
10.000|km     what for me  means ten thousand kilometers.

I send the document with saved 'Tools -> Options -> Language Settings -> Languages - Locale=German' to a co worker in Ecuador. 

He opens the document with saved Tools -> Options -> Language Settings -> Languages - Locale=German' and sees 2 cells 
10.000|km     what for him means ten kilometers +- 0m.
Can I expect such a brilliance that he will know that Document comes from Gerany (what is not visible) and how they use decimal separators here?

I think it would ease co-working if we would keep current behavior so that he will see
10,000|km

Where is the advantage of the requested behavior? Or do I misunderstand intention?
Comment 15 Regina Henschel 2014-05-01 12:50:39 UTC
ODF 1.2 has the attributes 'number:language' and 'number:country'. AOO writes both for a number style, if you select an item other than 'default' from the 'Language' list in tab Number of the cell properties. When you want to force the style to a specific language/country, then choose the corresponding item from the list and do not use 'default'. The date value itself is stored in the unambiguous ISO format. For a currency it writes number:currency as three character code, e.g. EUR. That is unambiguous too. I see no need to store the 'Local settings'.

AOO has some predefined format codes in the 'Format' list. The set depends on the language. When AOO opens a document and does not find a format code in the current set of predefined ones, then it puts the format code into the category "user-defined". I see no error in that behavior. This behavior makes sure, that the cell content is shown identically, independent of the settings of a special user.
Comment 16 mroe 2014-05-01 12:54:59 UTC
(In reply to Regina Henschel from comment #15)
> AOO has some predefined format codes in the 'Format' list. The set depends
> on the language. When AOO opens a document and does not find a format code
> in the current set of predefined ones, then it puts the format code into the
> category "user-defined". I see no error in that behavior. This behavior
> makes sure, that the cell content is shown identically, independent of the
> settings of a special user.

Because this is an ENHANCEMENT wish that could make international work on the same document easier, I never stated any error!
Comment 17 Andreas Säger 2014-05-01 13:01:06 UTC
There is a difference betwenn the number format locales "Default - English(US)" and "English(US)". The latter is explicitly set and should look the same on all machines. The former is the number format locale which happens to be active because nobody applied one.

Unless the cell locale is explicitly set, the cell locale is "Default - English(US)" which means the same language in the same country as set in the global options.
When someone sends me an English number 10,000 (ten thousands) to me I will see it as a German 10.000 if my own locale is German. The cell's locale is shown as "Default - German(Germany)
As far as I understand the matter, some kind of "translation" takes place formats when the cell's locale is not set explicitly ("Default - Lang(Country)")
#############################################################################
IF the cell's locale is explicitly set, the cell locale may be "English(US)" (without "Default -"), which means an explicit language in an explicit country.
When someone sends me an English number 10,000 (ten thousands) to me with an explicitly set number format locale, I will see it as a English 10,000 regardless of my own locale.

The request is: Drop any "Default - ..." locale setting for the cell's number format. Apply the currently set number format locale, so that every receipient of the same document will see the same number format. 
This behaviour would be similar to the text language (on the "Font" tab of the formatting dialog) which is always set one way or the other because any string of words is supposed to be written in some human language or "[None]" when the language is abstract or unknown. An English text must not switch to German just because it is opened on a German system. Contrary to words in human language, a numeric value remains the same when displayed in some other locale context. However, human reception may confuse 10,000 with 10.000 in any case. From plain eyesight you can never know which is which.

The workaround I suggested in comment #9 is: Define an explicit number format locale for cell style "Default" (root of all the other styles) and save it as a template. Then you may use this template as your default template, so every new spreadsheet will have an explicitly set number format locale in each cell.
Comment 18 mroe 2014-05-01 13:23:41 UTC
(In reply to Rainer Bielefeld from comment #14)
> Where is the advantage of the requested behavior? Or do I misunderstand
> intention?

2 points:

1) What have me pointed to this issue is, that AOO knows _Standard_ number formats that are _not_ available for _all_ locale.
Such a number format is
D.MM.YYYY" г." for Bulgarian, but not for English or German. That's the reason why it is for other languages a user defined format.
(Look https://issues.apache.org/ooo/attachment.cgi?id=83157 from issue 124644.)
If you (as a co-worker) have to create new entries with this number format (or other bulgarian number formats) in this sheet you have the following options:

a) You can select it directly from the date format list, because it was used previously in this document. But if not
b) You create your own user defined format
c) You select the right language (resp. locale) for the number format
d) You change the locale setting of AOO.

If AOO could choose the locale setting that was used when the sheet was created, you need not think about.


2) You create a document and mostly it have descriptions beside any numbers.
So you write:
Versuch durchgeführt am:|Donnerstag, 01.05.2014.

Now you send it to your friend in Ecuador. Make it sense, that he read:
Versuch durchgeführt am:|jueves 1 de mayo de 2014
?
Comment 19 mroe 2014-05-01 13:33:50 UTC
(In reply to Andreas Säger from comment #17)
> The workaround I suggested in comment #9 is: Define an explicit number
> format locale for cell style "Default" (root of all the other styles) and
> save it as a template. Then you may use this template as your default
> template, so every new spreadsheet will have an explicitly set number format
> locale in each cell.

Thank you. This workaround does that what this issue advise. But the user must explicitly choose is. With the wish of this issue this would be set without any user interaction.

And because of the fact, that it is not only related to spreadsheets as well as it touches letters/text documents with date/number fields, I change the Product.
Comment 20 Andreas Säger 2014-10-24 11:56:49 UTC
All defaults can be overridden by means of templates and styles e.g. locale of cell style "Default" in your default spreadsheet template.
Comment 21 mroe 2015-09-18 13:05:25 UTC
*** Issue 125636 has been marked as a duplicate of this issue. ***