Implement taking date strings from messages locale.
* mimic LocaleKit and add option to POSIX locale backend for taking the date strings from the messages locale (instead of time locale)
This commit is contained in:
@@ -31,6 +31,8 @@ public:
|
||||
const char* PosixLocaleName()
|
||||
{ return fPosixLocaleName; }
|
||||
|
||||
const Locale& ICULocale() const;
|
||||
|
||||
protected:
|
||||
status_t _ConvertUnicodeStringToLocaleconvEntry(
|
||||
const UnicodeString& string,
|
||||
@@ -52,6 +54,14 @@ private:
|
||||
};
|
||||
|
||||
|
||||
inline
|
||||
const Locale&
|
||||
ICUCategoryData::ICULocale() const
|
||||
{
|
||||
return fLocale;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Libroot
|
||||
} // namespace BPrivate
|
||||
|
||||
|
||||
@@ -18,11 +18,15 @@ namespace BPrivate {
|
||||
namespace Libroot {
|
||||
|
||||
|
||||
class ICUMessagesData;
|
||||
|
||||
|
||||
class ICUTimeData : public ICUCategoryData {
|
||||
typedef ICUCategoryData inherited;
|
||||
public:
|
||||
ICUTimeData(pthread_key_t tlsKey,
|
||||
struct lc_time_t& lcTimeInfo);
|
||||
struct lc_time_t& lcTimeInfo,
|
||||
const ICUMessagesData& messagesData);
|
||||
~ICUTimeData();
|
||||
|
||||
void Initialize(LocaleTimeDataBridge* dataBridge);
|
||||
@@ -33,8 +37,6 @@ public:
|
||||
|
||||
const char* GetLanginfo(int index);
|
||||
|
||||
const Locale& ICULocale() const;
|
||||
|
||||
private:
|
||||
status_t _SetLCTimeEntries(const UnicodeString* strings,
|
||||
char* destination, int entrySize,
|
||||
@@ -59,6 +61,8 @@ private:
|
||||
struct lc_time_t& fLCTimeInfo;
|
||||
|
||||
LocaleTimeDataBridge* fDataBridge;
|
||||
|
||||
const ICUMessagesData& fMessagesData;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user