eclipse / nebula

Nebula Project
https://eclipse.org/nebula
Eclipse Public License 2.0
85 stars 98 forks source link

In the Chinese (zh_cn) environment, if displayed in week mode in GanttChart, incorrect date conversion may occur. #600

Open liutaoPLM opened 3 months ago

liutaoPLM commented 3 months ago

In the GanttComposite.java file of the package org. eclipse. newula. widgets. Ganttchart, in the getDate String method, DateHelper. getDate (cal, _settings. getWeekHeaderTextDisplayBottom()) performs string splitting on the return value, causing "星期一(Monday)" and "星期二(Tuesday)" to become "星" in the Chinese environment. This seems very unfriendly to Chinese users. Since I am using a lower version, I modified substring (0,1) to substring by decompiling. (2, 3), temporarily resolved this issue. I think the Gant diagram plugin is very good, so I hope this issue can be fixed in a new version. Before making changes QQ截图20240618185103 After making changes QQ截图20240618190245 Thanks!

merks commented 3 months ago

Is this something to which you could contribute a fix? It's very easy to set up a development environment:

https://github.com/eclipse/nebula?tab=readme-ov-file#setup-a-development-enviroment

I think you mean this line:

image

I have no idea why it's taking just the first character. That doesn't seem very locale sensitive, but doubt hard coding (2, 3) is going to be correct in all cases either.