Bug 130041 - [DOCX import] localization for automatic date string is not imported
Summary: [DOCX import] localization for automatic date string is not imported
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-16 19:32 UTC by Oliver Grimm
Modified: 2020-11-09 12:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
test document for reproducing date fiel localization bug (15.10 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-01-20 11:39 UTC, Oliver Grimm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Grimm 2020-01-16 19:32:46 UTC
Description:
When importing docx files, Writer ignores localization for automatic date strings.

Steps to Reproduce:
1. be sure to run a non-english locale
2. start Writer with a new document
3. select "insert | automatic string | date" from main menu. (translated from German)
4a. save as odt --> close and reopen --> the date string is correctly in German.
4b. save as docx --> close and reopen --> the date string is in English

Actual Results:
Writer ignores the locale setting when importing from a docx. 
Since this bug does not show up when opening the exported docx with "ms office 365 online", I'd say this is an import bug rather than an export bug.

Expected Results:
Writer docx import should obey the locale setting in that document with respect to  automatic date strings.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.3.4.2.0+ from Debian testing
Build-ID: 1:6.3.4-2
CPU-Threads: 4; BS: Linux 5.4; UI-Render: GL; VCL: kde5; 
Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE
Calc: threaded
Comment 1 Dieter 2020-01-16 19:54:45 UTC
Oliver, I assume, your report is about "field" (in German "Feldbefehl").

I can't confirm it with

Version: 6.3.4.2 (x64)
Build-ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded
Comment 2 Oliver Grimm 2020-01-16 23:22:16 UTC
yes, i am referring to the menu entry "Feldbefehl" (field) in German.
Comment 3 Oliver Grimm 2020-01-20 10:58:39 UTC
I could reproduce this bug on another Linux machine today with LO (same LO version info as in original bug report).

However, opening the same file file on windows in MS Word 365 shows the date string correctly in German.

Interestingly, the date string is correct in German even in LO+Linux when I manually select "extras | language | complete text | German" before saving it. Seems like one need to manually set the document language to German though it already says "German (Germany)" in the status bar.
Comment 4 Oliver Grimm 2020-01-20 11:16:23 UTC
some more tests I ran today:

1) opening a docx with automatic date that was created in MS Word 2016 on windows does NOT show the bug in LO

2) opening a docx with automatic date string that was created on another windows machine with unknown windows and Word version DOES show the bug

When I double click in LO on the correct automatic date from MS Word in the first docx file, the field settings dialog says "type: time" instead of the expected "type: date". Interesting.
Comment 5 Oliver Grimm 2020-01-20 11:39:32 UTC
Created attachment 157264 [details]
test document for reproducing date fiel localization bug

new attachment: test case for reproducing this bug.
This file was created with MS Word 2016 on windows.

For reproducing this bug (in a non-english locale) do

1)
- open the file "Datum2.docx" in LO
--> the automatic date field is correctly localized in German

2)
- save as "Datum3.docx"
- close
- reopen in LO
--> the automatic date field is incorrectly in English

3)
- open "Datum2.docx"
- select ²extras | language | complete text | German"
- save as "Datum4.docx"
--> the automatic date field is now correctly localized in German


For additional confusion, do
- open the original "Datum2.docx" in LO
- double click the automatic date field to enter the type settings dialog
- observe that the field type is "time" instead of the expected "date"
Comment 6 Buovjaga 2020-05-01 17:16:57 UTC
(In reply to Oliver Grimm from comment #5)
> 2)
> - save as "Datum3.docx"
> - close
> - reopen in LO
> --> the automatic date field is incorrectly in English

No problem for me. Stays German. Tried with Finnish UI & locale. Maybe try with master:
https://dev-builds.libreoffice.org/daily/master/current.html
https://wiki.documentfoundation.org/Installing_in_parallel/Linux

Arch Linux 64-bit
Version: 7.0.0.0.alpha0+
Build ID: 23ddc3811d4d1890e4024f4e0f6bb5129a694fdc
CPU threads: 8; OS: Linux 5.6; UI render: default; VCL: kf5; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 30 April 2020
Comment 7 QA Administrators 2020-10-29 04:32:58 UTC Comment hidden (obsolete)
Comment 8 Oliver Grimm 2020-11-09 12:11:07 UTC
This bug has vanished.
I am setting it to resolved | worksforme.

Version: 7.0.3.1
Build ID: 00(Build:1)
CPU threads: 2; OS: Linux 5.9; UI render: default; VCL: kf5
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Debian package version: 1:7.0.3-3
Calc: threaded