Changeset 113166 in webkit


Ignore:
Timestamp:
Apr 4, 2012 4:06:03 AM (12 years ago)
Author:
tkent@chromium.org
Message:

Add localization functions for the calendar picker
https://bugs.webkit.org/show_bug.cgi?id=83129

Reviewed by Hajime Morita.

No behavior changes yet.

  • WebCore.gypi: Add LocalizedCalendar.h and LocalizedCalendarICU.cpp.
  • platform/LocalizedStrings.h: Add calendarTodayText() and calendarClearText().
  • platform/text/LocalizedCalendar.h:

Added. This provides monthLabels(), weekDayShortLabels(), and firstDayOfWeek().

  • platform/text/LocalizedCalendarICU.cpp: Added. ICU implementations of the above functions.

(WebCore::ScopedDateFormat): A wrapper for UDateFormat*.
(WebCore::ScopedDateFormat::ScopedDateFormat):
(WebCore::ScopedDateFormat::~ScopedDateFormat):
(WebCore::ScopedDateFormat::get):
(createFallbackMonthLabels): Creates fallback month labels in English.
(createLabelVector):
A helper for createMonthLabels() and createWeekDayShortLabels().
(createMonthLabels):
Creates month labels using createLabelVector() or createFallbackMonthLabels().
(WebCore::monthLabels):
(createFallbackWeekDayShortLabels): Creates fallback week labels in English.
(createWeekDayShortLabels):
Creates month labels using createLabelVector() or createFallbackWeekDayShortLabels().
(WebCore::weekDayShortLabels):
(getFirstDayOfWeek):
(WebCore::firstDayOfWeek):

Location:
trunk/Source/WebCore
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r113164 r113166  
     12012-04-04  Kent Tamura  <tkent@chromium.org>
     2
     3        Add localization functions for the calendar picker
     4        https://bugs.webkit.org/show_bug.cgi?id=83129
     5
     6        Reviewed by Hajime Morita.
     7
     8        No behavior changes yet.
     9
     10        * WebCore.gypi: Add LocalizedCalendar.h and LocalizedCalendarICU.cpp.
     11        * platform/LocalizedStrings.h: Add calendarTodayText() and calendarClearText().
     12        * platform/text/LocalizedCalendar.h:
     13        Added. This provides monthLabels(), weekDayShortLabels(), and firstDayOfWeek().
     14        * platform/text/LocalizedCalendarICU.cpp: Added. ICU implementations of the above functions.
     15        (WebCore::ScopedDateFormat): A wrapper for UDateFormat*.
     16        (WebCore::ScopedDateFormat::ScopedDateFormat):
     17        (WebCore::ScopedDateFormat::~ScopedDateFormat):
     18        (WebCore::ScopedDateFormat::get):
     19        (createFallbackMonthLabels): Creates fallback month labels in English.
     20        (createLabelVector):
     21        A helper for createMonthLabels() and createWeekDayShortLabels().
     22        (createMonthLabels):
     23        Creates month labels using createLabelVector() or createFallbackMonthLabels().
     24        (WebCore::monthLabels):
     25        (createFallbackWeekDayShortLabels): Creates fallback week labels in English.
     26        (createWeekDayShortLabels):
     27        Creates month labels using createLabelVector() or createFallbackWeekDayShortLabels().
     28        (WebCore::weekDayShortLabels):
     29        (getFirstDayOfWeek):
     30        (WebCore::firstDayOfWeek):
     31
    1322012-04-03  Hans Wennborg  <hans@chromium.org>
    233
  • trunk/Source/WebCore/WebCore.gypi

    r113111 r113166  
    44384438            'platform/text/LocaleToScriptMappingDefault.cpp',
    44394439            'platform/text/LocaleToScriptMappingICU.cpp',
     4440            'platform/text/LocalizedCalendar.h',
     4441            'platform/text/LocalizedCalendarICU.cpp',
    44404442            'platform/text/LocalizedDate.h',
    44414443            'platform/text/LocalizedDateNone.cpp',
  • trunk/Source/WebCore/platform/LocalizedStrings.h

    r110865 r113166  
    212212    String validationMessageRangeOverflowText(const String& maximum);
    213213    String validationMessageStepMismatchText(const String& base, const String& step);
     214#if ENABLE(CALENDAR_PICKER)
     215    String calendarTodayText();
     216    String calendarClearText();
     217#endif
    214218
    215219#if !PLATFORM(CHROMIUM)
Note: See TracChangeset for help on using the changeset viewer.