RESOLVED FIXED100329
Rename Localizer to Locale
https://bugs.webkit.org/show_bug.cgi?id=100329
Summary Rename Localizer to Locale
Kent Tamura
Reported 2012-10-24 22:39:22 PDT
I'd like to rename them to LocalizerFoo. However Alexey objected the name 'Localizer'. https://bugs.webkit.org/show_bug.cgi?id=96355#c7 Alexey, do you have a proposal for the name? LocaleData, LocalizedData?
Attachments
Alexey Proskuryakov
Comment 1 2012-10-24 22:43:34 PDT
Can you describe in several ways what this class is? One way to pick a good name is to start with such a description.
Kent Tamura
Comment 2 2012-10-24 23:07:01 PDT
Ok. What is Localizer class? - An object of Localizer class is associated to a specific locale - It converts number strings represented in the HTML5 format to localized number strings , and vice versa. - It formats date/time data represented in DateComponents class to localized strings, and parses localized date/time strings. - It provides localized date format patterns for date, datetime, month, and time input types - It provides various localized data to build UI. e.g. localized month names, localized AM/PM, localized decimal point, localized day-of-week names, the first day of week, text direction It is a combination of NSLocale, NSNumberFormatter, NSDateFormatter, NSCalendar, and it's similar to QLocale of Qt. We discussed the name before introducing Localizer, and other class name candidates were Locale, LocaleData, and LocaleInfo. We dropped Locale because locale.h will conflict with a C standard header.
Alexey Proskuryakov
Comment 3 2012-10-25 09:51:01 PDT
> We dropped Locale because locale.h will conflict with a C standard header. This is certainly a good reason not to use this name for the header, but how about using it for the class? This happened before with String, so we had PlatformString.h, and now have WTFString.h. WebCore/platform/PlatformLocale.h doesn't look bad. Alternatively, you could consider following Cocoa design, and actually having separate classes for each of these.
Kent Tamura
Comment 4 2012-10-28 18:07:18 PDT
Alexey, thank you for the comment. PlatformLocale.h and Locale class sound reasonable. I'll rename so.
Note You need to log in before you can comment on or make changes to this bug.