Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327846 - The Calendar can't show day title correctly when the locale is China
Summary: The Calendar can't show day title correctly when the locale is China
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Nebula (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Emil Crumhorn CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-14 21:58 EDT by hshi CLA
Modified: 2021-07-05 11:39 EDT (History)
0 users

See Also:


Attachments
Patch to fix the issue (1.28 KB, patch)
2010-10-14 22:33 EDT, hshi CLA
wim.jongman: iplog+
Details | Diff
Test result to apply the fix (77.06 KB, image/jpeg)
2010-10-14 22:50 EDT, hshi CLA
wim.jongman: iplog-
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hshi CLA 2010-10-14 21:58:34 EDT
Build Identifier: eclispe 3.6

Please see the  method init()  of class org.eclipse.nebula.widgets.calendarcombo.CalendarComposite
The following is my fix(i change it form line 158)

boolean isCNLocale = mSettings.getLocale().equals(Locale.CHINA) || mSettings.getLocale().equals(Locale.TAIWAN);
for (int i = 0; i < weekdays.length; i++) {
            String weekday = weekdays[i];
            if (weekday.length() > 0) {
                if (isCNLocale) {
                    mDayTitles[i] = weekday.substring(2, 3).toUpperCase();
                } else {
                    mDayTitles[i] = weekday.substring(0, 1).toUpperCase();
                }
            }
        }

Reproducible: Always

Steps to Reproduce:
1 Create a project to use the CalendarComposite
2 Not only CalendarComposite but also other component related to calendar also have such kind of issue
Comment 1 hshi CLA 2010-10-14 22:33:05 EDT
Created attachment 180923 [details]
Patch to fix the  issue

Maybe other Calendar component also need to fix
Comment 2 hshi CLA 2010-10-14 22:50:37 EDT
Created attachment 180924 [details]
Test result to apply the fix

Test result to apply the fix
Comment 3 Emil Crumhorn CLA 2011-09-24 11:45:05 EDT
Sorry for taking ages to get to this. Patch applied and checked in to CVS. Thank you!