Bug 46947 - Date format bug of "中華民國" system
Summary: Date format bug of "中華民國" system
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
(earliest affected)
3.5.0 release
Hardware: Other All
: medium trivial
Assignee: Eike Rathke
Whiteboard: target:3.6.0
Depends on:
Reported: 2012-03-03 21:44 UTC by Cheng-Chia Tseng
Modified: 2012-03-18 12:06 UTC (History)
0 users

See Also:
Crash report or crash signature:

The patch for localedata/data/zh_TW.xml (598 bytes, patch)
2012-03-16 19:52 UTC, Cheng-Chia Tseng

Note You need to log in before you can comment on or make changes to this bug.
Description Cheng-Chia Tseng 2012-03-03 21:44:34 UTC
There are two problems with 民國 date format.

1. Now LibreOffice provides two 中華民國88年12月31日. But It should has 中華民國88年12月31日 and "民國88年12月31日", the latter one is missing and having a duplicate.

Steps to reproduce:
(1) Launch Writer
(2) Insert > Field > Date
(3) Double click the date, and you will see two  中華民國88年12月31日 in the dialogue
(4) One of 中華民國88年12月31日 should be corrected as 民國88年12月31日

2. When in Calc, choosing 中華民國88年12月31日 format to use will result displaying ####.

Steps to reproduce:
(1) Input 2012-03-04
(2) Format > Cell
(3) Scroll up and choose any one date format which is 民國 system, and press OK
(4) The date in the cell transforms into ####
(5) It should be 中華民國101年3月4日 or something like that instead of ####
Comment 1 Urmas 2012-03-04 21:57:19 UTC
There's two identical formats " GGGEE"年"M"月"D"日" " listed for Traditional Chinese locale. Reporter wants " GGEE"年"M"月"D"日" " format.
Comment 2 Cheng-Chia Tseng 2012-03-13 03:46:58 UTC
The problem 2, which says choosing 中華民國88年12月31日 format to use will result displaying ####, is caused by Calc not adjusting the cell width to fit the length of all characters.

I found outh that I can see all the characters by adjusting cell width manually.

However, I suggest it be automatically done by Calc. Many people like me do not know this tip and see it as a bug.
Comment 3 Cheng-Chia Tseng 2012-03-16 19:49:46 UTC
I created a diff to fix problem 1. Thanks Sérgio Marques for telling me what file I should edit.

And I think that I should file anther bug for problem 2 because it is not related to date format of "中華民國" system.
Comment 4 Cheng-Chia Tseng 2012-03-16 19:52:45 UTC
Created attachment 58581 [details]
The patch for localedata/data/zh_TW.xml

DateFormatskey7 and DateFormatskey8 are the same in this file. I edit it to let FormatCode of 7 to be GGEE"年"M"月"D"日.
Comment 5 Cheng-Chia Tseng 2012-03-16 19:54:09 UTC
The actual file is located in http://cgit.freedesktop.org/libreoffice/core/tree/i18npool/source/localedata/data/zh_TW.xml
Comment 6 Not Assigned 2012-03-18 12:04:48 UTC
Cheng-Chia Tseng committed a patch related to this issue.
It has been pushed to "master":


resolved fdo#46947 duplicated date format [zh-TW]
Comment 7 Eike Rathke 2012-03-18 12:06:19 UTC
Thanks for the patch, I pushed it to master.