Bug 125035 - Date format in Base is wrong.(zh-CN version)
Summary: Date format in Base is wrong.(zh-CN version)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:7.3.0 target:7.2.0.0.beta2
Keywords:
Depends on:
Blocks: CJK-Chinese-Simplified
  Show dependency treegraph
 
Reported: 2019-04-30 04:20 UTC by yichuang驿窗
Modified: 2021-07-06 19:21 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
screenshot : week displays error (132.95 KB, image/png)
2019-05-10 00:22 UTC, yichuang驿窗
Details
screenshot: week display problem (21.06 KB, image/png)
2019-05-10 00:50 UTC, yichuang驿窗
Details
screenshot : another week displays error (112.24 KB, image/png)
2019-05-10 00:55 UTC, yichuang驿窗
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yichuang驿窗 2019-04-30 04:20:30 UTC
Description:
Date format in Base is wrong Date format in Base is wrong:
Language:
  User interface: Chinese (simplified)
  Local setting: Chinese (simplified)
System Env:
  Debian Stretch 9.8/Gnome/LibreOffice 6.2.3.2

Steps to Reproduce:
1.Open Base, create a new database (Firebird Embedded), then click create Form in Design View; 
2.On the form controls bar left, select Date Field, draw a date field in the form; 
3.Double click the date field, set "Date format" to "Standard(long)" and "Dropdown" to "Yes"; 
4. Save the form;
5. Open the form, select a date; 
6. Now you can find that two "month" displayed and without "date", it's wrong. 

Actual Results:
two "month" displayed and without "date" displayed.

Expected Results:
1. One month displayed;
2. One date displayed;
3; The week is shown at the end


Reproducible: Always


User Profile Reset: Yes



Additional Info:
I don't know how to upload a screetshot within this bugs-report-system, so, I upload the screenshot here:

https://img.vim-cn.com/82/2ffd2f1abed2919cb7b84deab25b036e57b244.png

PS:
The wrong format appeared only in zh-CN-Chinese (simplified) version, in English verion the format is OK.
Comment 1 yichuang驿窗 2019-05-10 00:22:04 UTC Comment hidden (obsolete)
Comment 2 yichuang驿窗 2019-05-10 00:50:45 UTC
Created attachment 151280 [details]
screenshot: week display problem

Week display error
Comment 3 yichuang驿窗 2019-05-10 00:55:54 UTC
Created attachment 151281 [details]
screenshot : another week displays error

In version of master 6.3 (2019-05-04_04.44.35), this problem can be reproduced.

Necessary conditions for recurring problems(Language options in LibreOffice):
1-User interface: Chinese(simplified)
2-Locale setting: Chinese(simplified)

My operating system:
Debian Stretch 9.8/Gnome
Comment 4 Ming Hua 2019-05-10 07:48:11 UTC
(In reply to yichuang驿窗 from comment #2)
> Created attachment 151280 [details]
> screenshot: week display problem

I think this should be reported as a different bug.
我觉得这个问题另行报告一个新的 bug 为好。

Also, why did you set the assignee of the bug to yourself?  It usually means you are working on fixing this bug.
还有就是你为什么把这个 bug 的 Assignee 设成你自己了?一般只有开发者在自己打算修复这个 bug 时才会这样做。
Comment 5 yichuang驿窗 2019-05-12 01:28:45 UTC
Thanks for your tips~  I will resubmit as a new bug later.
谢谢提示~  后面我会作为新bug重新提交;


I don't know about the setting of Assignee; if it's not your prompt, I may never notice it; I think it should be caused by misuse, because too little use here, the settings are not familiar. I will pay more attention to such problems in the follow-up.
关于 Assignee 的设置,我并不清楚;如果不是你提示的话,我可能永远也注意不到;我想应该是误操作造成的,因为太少使用这里,各种设置都不太熟;我会慢慢改进,提高后续bug的提交效率。
Comment 6 Ming Hua 2019-06-03 08:52:42 UTC
I can reproduce the bug described in attachment 151281 [details] with 6.3.0 Alpha1 on Windows 10.

Also that erroreous translation doesn't come from LO l10n team as there is no KeyID associated with it.  From the discussion in the Chinese LO user group (with one of the translators), nobody seems to know exactly from where it comes.
Comment 7 yichuang驿窗 2019-06-09 01:06:26 UTC
我刚把Assignee设置成默认了,因为我自己并没有能力修正这个问题。
I just set the assignee to the default because I have no ability to fix this problem myself.
Comment 8 Kevin Suo 2019-06-23 08:01:37 UTC
I can reproduce on master. Set to NEW.
Could some dev people give some tips where the stings as shown on the screenshots are located?
Comment 9 Kevin Suo 2019-06-23 08:11:14 UTC
The locale data data seems to be correct:
https://cgit.freedesktop.org/libreoffice/core/tree/i18npool/source/localedata/data/zh_CN.xml
Comment 10 Xisco Faulí 2019-06-28 12:53:45 UTC
(In reply to Kevin Suo from comment #8)
> I can reproduce on master. Set to NEW.
> Could some dev people give some tips where the stings as shown on the
> screenshots are located?

@Eike, do you have any idea where it's located ?
Comment 11 Eike Rathke 2019-06-28 17:09:15 UTC
No adhoc idea. As locale data was mentioned to be correct, either some Base routine assembles an own date format code, in which case setting a breakpoint on SvNumberFormatter::GetOutputString() could help to trace up from where in Base it is called (if so then likely through SvNumberFormatterServiceObj and not directly); or Firebird has its own notion of date formats, either built-in or maybe through ICU. Also I'm puzzled what calendar widget in the first screenshot that actually is.
Comment 12 QA Administrators 2021-06-28 03:48:12 UTC Comment hidden (obsolete)
Comment 13 yichuang驿窗 2021-07-02 11:16:09 UTC
I tested the two bugs with version 7.1.4.2.

The first one: screenshot: week display problem (21.06 KB, image/png) has been solved.

The second one:  screenshot : another week displays error (112.24 KB, image/png) is still unresolved. 



---------------
Below is what I copied from menu Help-About:

Version: 7.1.4.2 / LibreOffice Community
Build ID: a529a4fab45b75fefc5b6226684193eb000654f6
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: zh-CN (zh_CN.UTF-8); UI: en-US
Calc: threaded
Comment 14 Eike Rathke 2021-07-02 15:19:27 UTC
Just a code pointer, trace, for the resulting long date string:

in vcl/source/control/field2.cxx
DateFormatter::ImplGetDateAsText() calls
DateFormatter::FormatDate() for ExtDateFieldFormat::SystemLong calls
in unotools/source/i18n/localedatawrapper.cxx
LocaleDataWrapper::getLongDate()

Problem ist that LocaleDataWrapper::getLongDate() assembles localized
date particles but is agnostic about a locale's format codes or their
interpretation or any particular ordering of date particles other than
the Day/Month/Year order.

To solve that, a proper SvNumberFormatter instance would have to be used
instead. vcl has a static instance of SvNumberFormatter that could be
used, see include/vcl/formatter.hxx Formatter::StaticFormatter. Class
DateFormatter inherits from Formatter (via EntryFormatter) so that
should be viable, but propagating the actual locale may be needed.
Didn't investigate deeper, DateFormatter::FormatDate() gets that
indirectly passed from DateFormatter::ImplGetDateAsText() via
ImplGetLocaleDataWrapper() and GetCalendarWrapper().
Comment 15 Eike Rathke 2021-07-02 18:06:42 UTC
Bah, there are two class DateFormatter and this is the wrong one that does not know the SvNumberFormatter.. :-/
Comment 16 Commit Notification 2021-07-03 09:48:30 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/56ae948b08010ed1b61be9857c8c6ae4e97e86b2

Related: tdf#125035 Include day of week in formatindex="19" DATE_SYSTEM_LONG

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2021-07-04 00:29:08 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2cc8ec691cc37b07e4f134bf379164f375b8a481

Resolves: tdf#125035 Use number formatter for long date in DateFormatter fields

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2021-07-04 23:06:39 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/57e0b8637a0c6f53a43c987df51a00a5a0f3909f

Related: tdf#125035 Include day of week in formatindex="19" DATE_SYSTEM_LONG

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2021-07-04 23:08:55 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/1f229309a0e5bed816cb58613335e06b009542b0

Related: tdf#125035 Include day of week in formatindex="19" DATE_SYSTEM_LONG

It will be available in 7.2.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2021-07-04 23:09:06 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/af6f3aaddaa0b83a73dca073008e360ece998110

Related: tdf#125035 en_US formatindex="19" DATE_SYSTEM_LONG with D not DD

It will be available in 7.2.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2021-07-05 08:30:24 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/f9fab8cd5a7ebccc6b659dbc831385e3722d97d6

Related: tdf#125035 Include day of week in formatindex="19" DATE_SYSTEM_LONG

It will be available in 7.2.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2021-07-05 08:30:37 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/96f2a6d16e6a6bf070e6875776b6153a70e75a7a

Resolves: tdf#125035 Use number formatter for long date in DateFormatter fields

It will be available in 7.2.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2021-07-05 15:25:19 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0335a319c5662f0b849a2231e48338dfeb6aa845

Pass Formatter::StaticFormatter also from weld:DateFormatter, tdf#125035

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 24 Commit Notification 2021-07-05 20:04:56 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/28859cd06cc699708bb43cb5e4ac7077d3a10f5b

DateFormatter: make TextToDate() long date calendar aware, tdf#125035

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 25 Commit Notification 2021-07-05 21:41:52 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/e8b1f2197776a08ac0b3d7e9a754c3e92327345a

Pass Formatter::StaticFormatter also from weld:DateFormatter, tdf#125035

It will be available in 7.2.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 26 Commit Notification 2021-07-05 21:42:18 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/ccc48da9f9de2c93c01b9571f98221ff2eb07275

DateFormatter: make TextToDate() long date calendar aware, tdf#125035

It will be available in 7.2.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 27 Commit Notification 2021-07-06 15:54:45 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5e3bfdeb5ea4878a2546a7e1e16d0f3b6482024e

Related: tdf#125035 Introduce LongDateOrder and handle YDM in DateFormatter

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 28 Commit Notification 2021-07-06 19:21:21 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/f94c004a978a43616266ed43e91d9d129e985da2

Related: tdf#125035 Introduce LongDateOrder and handle YDM in DateFormatter

It will be available in 7.2.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.