Bug 139288 - Date field content cannot be translated to desired language
Summary: Date field content cannot be translated to desired language
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.1 rc
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-28 17:56 UTC by muso
Modified: 2021-01-05 17:16 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot showing that the language was applied to the field (294.07 KB, image/png)
2020-12-28 17:57 UTC, muso
Details
screenshot of my language settings (25.62 KB, image/png)
2020-12-28 17:58 UTC, muso
Details
Example document with English and German date fields (9.21 KB, application/vnd.oasis.opendocument.text)
2020-12-30 12:09 UTC, Ming Hua
Details
screenshot of the edit fields dialog (27.01 KB, image/png)
2021-01-04 01:04 UTC, muso
Details
screenshot of mangled English date field (4.43 KB, image/png)
2021-01-04 01:10 UTC, muso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description muso 2020-12-28 17:56:14 UTC
Description:
I have to write documents in English and German, in the particular case it is a letter, one version for German readers and one for the English readers.

In the letter head I inserted a date field and chose the layout I like. In the English version it looks correct "Monday, 28. December 2020", but I cannot find a way to translate it to German for the German version.

Attached is a screenshot that shows that I applied the language German to the field but it is not changed.

Steps to Reproduce:
1. Insert a date field
2. Select it and apply the language you like to it

Actual Results:
the date field still shows English day and month names.

Expected Results:
the date field will contain the day and month names of the applied language.


Reproducible: Always


User Profile Reset: No



Additional Info:
I googled around without success and also bug 46448 doesn't seem to address my problem.
Comment 1 muso 2020-12-28 17:57:51 UTC
Created attachment 168535 [details]
screenshot showing that the language was applied to the field
Comment 2 muso 2020-12-28 17:58:52 UTC
Created attachment 168536 [details]
screenshot of my language settings

you see that I set already my locale to German
Comment 3 m_a_riosv 2020-12-30 10:50:33 UTC
Please attach a sample file.
Comment 4 Ming Hua 2020-12-30 11:59:50 UTC
As far as I know, the language choice in Tools > Language menu doesn't affect date fields.  To make a field display dates to a particular language's convention (other than LibreOffice's locale setting, in your case English), the user needs to change the field explicitly.

To do so, select the field, Edit > Fields... menu, choose "Additional Formats..." in the Format column, change the "Language" dropdown list in the new Format dialog, then choose your desired format.

If these steps still don't work for you, please indeed attach a sample document to illustrate your problem.
Comment 5 Ming Hua 2020-12-30 12:09:04 UTC
Created attachment 168576 [details]
Example document with English and German date fields
Comment 6 muso 2021-01-04 01:02:58 UTC
> As far as I know, the language choice in Tools > Language menu doesn't affect date fields.

Why not? I think this is a bug. I mean that's simply intuition: select the text and/or element and change its language.

> To do so, select the field, Edit > Fields... menu, choose "Additional Formats..."

It seems I am too untalented. I still cannot find there a language setting, see the screenshot attached.
(Btw. I also get this dialog on double-clicking on the field as alternative to use the menu.)
Comment 7 muso 2021-01-04 01:04:07 UTC
Created attachment 168651 [details]
screenshot of the edit fields dialog

As you can see, there is no language selection.
Comment 8 muso 2021-01-04 01:07:21 UTC
(In reply to Ming Hua from comment #5)
> Created attachment 168576 [details]
> Example document with English and German date fields

Thanks. But what hidden/expert feature have you used to get this?
However, the English field appears here with CJK characters, see attached. Was this intentional or is this another bug?
Comment 9 muso 2021-01-04 01:10:43 UTC
Created attachment 168652 [details]
screenshot of mangled English date field

I think the non-Latin characters should not appear right?
I got this by just opening your example file with LO 7.1RC1. I see that your document uses the font "Liberation Serif". However, using another font does not fix the issue.
Comment 10 Ming Hua 2021-01-04 01:47:36 UTC
(In reply to muso from comment #6)
> > As far as I know, the language choice in Tools > Language menu doesn't
> > affect date fields.
> 
> Why not? I think this is a bug. I mean that's simply intuition: select the
> text and/or element and change its language.
I don't know the exact details, but AFAIK it affects linguistic features like spellchecking, hyphenation, etc., but not fields.  I agree intuitively it should also affect fields, and encourage you to file a separate bug about that.

> > To do so, select the field, Edit > Fields... menu, choose "Additional
> > Formats..."
> 
> It seems I am too untalented. I still cannot find there a language setting,
> see the screenshot attached.
You missed one step:
(In reply to Ming Hua from comment #4)
> [...] choose "Additional Formats..." in the Format column, change the
> "Language" dropdown list in the new Format dialog
Please click the "Additional Formats..." entry of the Format column in your screenshot, and click "OK" button, then a new dialog will open, in which you can change the language for the field.

(In reply to muso from comment #8)
> (In reply to Ming Hua from comment #5)
> > Created attachment 168576 [details]
> > Example document with English and German date fields
> 
> Thanks. But what hidden/expert feature have you used to get this?
> However, the English field appears here with CJK characters, see attached.
> Was this intentional or is this another bug?
It's Chinese, because my Windows is in Chinese (although my LibreOffice is set to English UI).  It's not intentional, and is either some mistake of mine, or another bug.  I'll investigate later.
Comment 11 muso 2021-01-05 02:10:12 UTC
> I don't know the exact details, but AFAIK it affects linguistic features
> like spellchecking, hyphenation, etc., but not fields.  I agree intuitively
> it should also affect fields, and encourage you to file a separate bug about
> that.

Done: bug 139415

> Please click the "Additional Formats..." entry of the Format column in your
> screenshot, and click "OK" button, then a new dialog will open, in which you
> can change the language for the field.

Ah, many thanks!
So I am indeed to untalented. But this is very unintuitive and also no suitable workflow when you have several fields. Without your help, I would have never found out how to get the language right and the solution requires to open 2 dialogs. There should at least be a separate button to open the second dialog. As it is is is badly hidden.

> It's Chinese, because my Windows is in Chinese (although my LibreOffice is
> set to English UI).  It's not intentional, and is either some mistake of
> mine, or another bug.  I'll investigate later.

Since I cannot get rid of the Chinese characters, despite I assured that everything is in English, it must be a bug. Can you please report it (since I don't know a way to get the Chinese characters and thus cannot provide the steps to reproduce).
Comment 12 Ming Hua 2021-01-05 17:16:20 UTC
(In reply to muso from comment #11)
> > Please click the "Additional Formats..." entry of the Format column in your
> > screenshot, and click "OK" button, then a new dialog will open, in which you
> > can change the language for the field.
> 
> Ah, many thanks!
Glad to help.

> > It's Chinese, because my Windows is in Chinese (although my LibreOffice is
> > set to English UI).  It's not intentional, and is either some mistake of
> > mine, or another bug.  I'll investigate later.
> 
> Since I cannot get rid of the Chinese characters, despite I assured that
> everything is in English, it must be a bug. Can you please report it (since
> I don't know a way to get the Chinese characters and thus cannot provide the
> steps to reproduce).
Yes I will once I've figured out all the details about how to reproduce the bug.  I'll leave a note here after I report it, too.

Also let's change the status out of INVALID since that one is usually reserved for spam.