History log of /haiku/src/kits/locale/Locale.cpp
Revision Date Author Comments
# e3857211 02-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Move DateTimeFormat and NumberFormat out of BLocale

* ... and adjust all callers
* Remove NumberFormatImpl: we rely on ICU to provide this and it can be
fully wrapped into the C++ file. The class was a stub anyway.
* "Monetary" format is included in NumberFormat for now. There may be a
more generic solution to handle monetary and BTimeUnitFormat (and other
arbitrary units)


# 03b2550e 01-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Move time formatting to BTimeformat.

* Harmonize API for all B*Format to take an output BString by reference
as the first parameter,
* Move the FormatTime methods from BLocale to BTimeFormat
* Adjust all callers for BTimeFormat, BTimeUnitFormat and
BDurationFormat.


# 2a5e33a9 26-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

Move date formatting from BLocale to BDateFormat

* There is a little code duplication. This will be moved to BFormat once
the time and datetime formatting is also moved out of BLocale
* The way to create a BDateFormat from a BLocale is still open for
discussion. I'm undecided between making BDateFormat a member of
BLocale, or adding a BDateFormat(const BLocale&) constructor.
* Adjust all users of the API.


# 52cdfde0 25-Nov-2012 Oliver Tappe <zooey@hirschkaefer.de>

Fix relying on order of static object destruction in Locale Kit.

* use only a single static object (MutableLocaleRoster) instead of
two, which avoids any problems if the order of static object
destruction would destroy RosterData before MutableLocaleRoster
* rename BPrivate::RosterData to BPrivate::LocaleRosterData and move
it into a header and implementation file of its own
This should hopefully fix problems encountered with a clang-compiled
Locale Kit.


# 3cf2d117 14-Apr-2012 John Scipione <jscipione@gmail.com>

Change Time Format Options in Deskbar preferences.

Added two new methods to the Locale Kit in order to create a custom time
formats from a format string. One method is outputs into a char* array,
the other into a BString() and you can set the timezone.

These methods should be cleaned up, we only need 2, one to get
the time in a predefined style, the other to get a custom time format.
Also should probably do the same for dates and datetimes. But I'll let
this go for now.

I added myself to the Locale.cpp file. I retained the copyright instead
of assigning it to Haiku, Inc. because the file is under the OpenBeOS
license and I don't know what the concequences of copyright sharing are
for that license, unlike MIT.

These new methods are used to generate custom time formats in Deskbar.
Instead of using a set of Radio Buttons to choose between the predefined
time options I build my own by creating a format string and passing it
to the Locale Kit. The format string is generated from 3 checkboxes,
show seconds, show day of week, and show time zone. You can mix and match
between them choose any that you like. By default they are all off.

There are 3 new deskbar settings associated with these new options:
showSeconds, showDayOfWeek, and showTimeZone. timeFormat has gone away.

The time format string gets cached and updated only when Update() gets called
on the TimeView class.

In order to fit all the options in (there is 1 more than before) I had to
reduce the font size of the clock to 11pt when all options are turned on in
12 hour mode. For those with no imagination it looks like this:

http://imagebin.org/208162

Renamed "Open time preferences..." menuitem to "Time preferences...".
Renamed "Show Time" and "Hide Time" to "Show time" and "Hide time".

Other changes include refactoring the header files a bit. There were a lot
of headers included by header files uneccessarily. For instance BarWindow.h
now only includes <Window.h> and <Deskbar.h>. This change is mainly to
to speed up the compile time since it takes a while right now.

I copy the fBarView pointer from BarWindow in the BarApp constructor and then
use that throughout the file rather than getting the pointer from the window
each time by calling BarView(). BarView() is still available in the header
for other classes though.

I moved some message constants around since it was getting a bit jumbled.
Most of the messages related to settings are in PreferenceWindow.h.
fChangeState is moved to BarView.h since that is where the ChangeState()
function is and BarView.cpp uses that constant.

The time interval and format constants are in TimeView.h.

Make some methods public in their respective classes where it made sense.
The preference window methods to update dependent items are public, that
might get called from BarWindow when a message gets received at some point.

Also made ShowHideTime() and Time() public in StatusView.h. These methods
activate showing and hiding the clock and return the fTime clock object.
No reason they should be private.

I reindented the StatusView.h and PreferenceWindow.h headers to the standard
style. Question here, are the public: protected: and private: lines inside
of classes suppose to get indented 1 tab or not? I've seen both, the style
guide says no indent but 1 indent seems reasonable and looks pretty good.

Style fixes here and there. That's enough for one commit I think.


# 740ae7fe 02-Nov-2011 John Scipione <jscipione@gmail.com>

Return B_ERROR if a locking error occurs in while locking the BLocale object, return B_BAD_VALUE if an ICU error occurs or the passed in value is NULL. Update BLocale API documentation to reflect this and also add some more documentation fixes. Closes #7901 pending confirmation.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43095 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6846765f 07-Sep-2011 Oliver Tappe <zooey@hirschkaefer.de>

Work on #7947 (CalendarView not respecting locale's start of week)
* support all weekdays as start of week, not only Sunday and Monday
(at least Saturday is used for real, too)
* introduce BWeekday as enumeration of weekdays (currently in Locale.h,
may be moved somewhere else later)
* change CalendarView to use BDate as its model, not individual values
for day, month and year, such that no more date computation is done
in CalendarView itself
* some more style cleanups in CalendarView along the way
* add monthwise paging to CalendarView
* adjusted Deskbar and Time preflet accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42720 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 45f2f22b 18-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

* update (not-so-)optional package ICU to 4.8.1, which contains interesting stuff
for message formatting
* adjust LocaleKit to use namespace 'icu', as ICU has been configured to no longer
use a version specific namespace
* adjust LocaleKit to general API changes in ICU 4.8
Note: all software using ICU (like WebPositive) needs to be rebuilt!
Note: the ICU package for PPC needs to be updated before it can be used!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42638 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ff6f0d4 09-Aug-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch by John Scipione : use B_WOULD_BLOCK when locking fails, to avoid returning B_ERROR like when there's an ICU error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42605 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25dc253d 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6fd2f4a0 23-Oct-2010 Oliver Tappe <zooey@hirschkaefer.de>

One more monster commit (sorry ...) concerning the Locale Kit:
* extracted new class BFormattingConventions from BCountry, which
manages the formatting conventions from a given locale and
allows to get/set the four different date/time formats supported
by ICU-locales as well as number and monetary formats
* overhauled the Locale preflet:
+ drop editing features for all formats, since I don't think
they do not make much sense to have in a prefs GUI - being
able to select from the existing locales should be good
enough. Please note that you can still change the formats
programmatically in an application.
+ renamed the 'Countries' tab to 'Formatting'
+ the locale formatting conventions list in the 'Formatting'
tab is now hierarchical for easier access (less scrolling)
+ fixed functionality of 'Revert' and 'Defaults' buttons
+ added support for using the month/day-names of your preferred
language during date formatting
* adjusted BLocale to ask BFormattingConventions for the current
formats when formatting dates and times and to offer 4
different format styles (full, long, medium and short).
* adjust all classes formatting dates/times to pick the
appropriate format style
* BLocaleRoster no longer directly archives/unarchives the
individual formatting conventions but delegates that to
BFormattingConventions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39123 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1d8fda6 19-Oct-2010 Oliver Tappe <zooey@hirschkaefer.de>

Next step of Locale Kit refactoring:
* BLocale now keeps language and country completely separate and
mixes the formatting conventions into the current language's locale
when formatting dates and times (needs to be done for number- and
currency-formatting, too, since the digits may not be in the
preferred language)
* optimized fetching of the flag icons such that they are all loaded
in one go (by the locale roster) - this alone speeds up the Locale
preflet considerably
* worked on fixing the language confusion in the Locale preflet
* fixed a couple of bugs in the Locale preflet that would lead to
illegal characters being displayed in the date-subpart menus


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39013 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2bd0cd6c 30-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* improved const-correctness of BLocale

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38457 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a9faf943 29-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* reintroduced be_locale as global information point for the current locale
values
* added locking to BLocale (needed since the data of the global object may
change any time)
* BLocale no longer passes out pointers to internal objects, it fill objects
passed in by the client instead (just like be_locale_roster does)
* dropped default language as member from RosterData, it is no part of the
default locale
* fleshed out implementation of TimeUnitFormat and DurationFormat, both
of which can now be given a BLocale in order to set the strings being used
during formatting


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38428 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ef134d9 26-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* added timezone-support to some more date/time-formatting methods in BLocale

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38381 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bca1690b 24-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Preliminary support for adjusting the money format in the locale preflet :
* API for formatting a number and recovering the field positions
* Some changes in the preflet to display the formatted number and start filling in the fields.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38335 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 750e57b8 23-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Optimized Time preflet:
* use upon-demand initialization in BTimeZone to avoid unnecessary work
* renamed BTimeZone::Code() to BTimeZone::ID() and adjusted all callers
* avoid using BCountry in the Time preflet for the time being, this means
the icon-flags are gone for now (but they could be re-added if the demand
is pressing ;-)
* group the timezones by regions and then by country instead
The performance improvement is considerable and I personally think the new grouping is an improvement, too. Please share your thoughts!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38322 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ee338625 16-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* dropped one more instance of debug output

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38157 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f23b9d8a 16-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* added possibility to pass in the timezone when formatting the time
* added TODOs about the need to get rid of some of the date/time-formatting
shortcut methods

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38146 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4a7b2e04 07-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Add FormatDateTime function to BLocale
* Use the function to localize the date/time in tracker.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37949 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ebeabb6 05-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Remove GetLocaleName from BCountry
* Add GetName to BLocale instead


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37919 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c3a3034 04-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Move the locale-related stuff away from BCountry to BLocale.
* Remove the be_locale global object and go through the be_locale_roster instead
* Rework the storage of data for the be_locale_roster, since BLocale already holds a BCountry and a BLanguage.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37907 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38ac8def 01-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Largish cleanup sweep concerning the Locale Kit (sorry it got so big):
* refactored private/mutable stuff out of LocaleRoster into MutableLocaleRoster
* moved management of Locale/Time settings file and broadcasting of any changes
out of preflets and into MutableLocaleRoster
* added proper sorting to the listviews of the Locale preflet
* the Time preflet no longer overlaps long timezone names into the actual time
* several fixes with respect to leaking ICU objects, esp. in BCountry
* the locale roster no longer passes out references to its own BCountry object,
but uses copies, instead - this makes locking superfluous, as the clients'
BCountry objects can no longer be changed by the setting a new default
country in the locale roster
* removed pretty useless POSIX-style symbol fetching from BCountry - if we
need that at all, it should live in the dedicated formatter classes
* adjusted readonlybootprompt, dstcheck and Deskbar to the changed Locale API
* refactored existing Time-formatter into TimeUnitFormat and DurationFormat
(the latter of which is now used by AboutSystem)
* added stubs for Date, DateTime and Time formatters
* lots of coding style fixes throughout the Locale Kit and the Locale and Time
preflets
This will probably break most external apps making use of the Locale Kit - it
does break WebPositive.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 51145d87 08-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Support for setting 12/24Hr mode in locale preflet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37427 a95241bf-73f2-0310-859d-f6bbb57e9c96


# be8fa2fb 02-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Update all applications in tree to use the new localizing system
* Remove the old one from the locale librairy, with some cleanup
Known regressions :
* readonlybootprompt will no longer update the locale settings : the
method used messed with internal undocumented things
* external localized apps (webpositive for example) will not run
anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37336 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 005a5d0b 21-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Stumbled across some problems while using the Locale Kit and added TODOs
accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35214 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c3ac87e8 01-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* Copied imported OpenTracker Locale Kit files from the vendor branch
into their new homes (at least for now, might need some adjustment).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30540 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e3857211d305a595c2d0b58768f25623d5967675 02-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Move DateTimeFormat and NumberFormat out of BLocale

* ... and adjust all callers
* Remove NumberFormatImpl: we rely on ICU to provide this and it can be
fully wrapped into the C++ file. The class was a stub anyway.
* "Monetary" format is included in NumberFormat for now. There may be a
more generic solution to handle monetary and BTimeUnitFormat (and other
arbitrary units)


# 03b2550ef1fba975beb15689659a4a5f38986aa0 01-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Move time formatting to BTimeformat.

* Harmonize API for all B*Format to take an output BString by reference
as the first parameter,
* Move the FormatTime methods from BLocale to BTimeFormat
* Adjust all callers for BTimeFormat, BTimeUnitFormat and
BDurationFormat.


# 2a5e33a98056c2b92d46a6c9aae6da808c8524b1 26-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

Move date formatting from BLocale to BDateFormat

* There is a little code duplication. This will be moved to BFormat once
the time and datetime formatting is also moved out of BLocale
* The way to create a BDateFormat from a BLocale is still open for
discussion. I'm undecided between making BDateFormat a member of
BLocale, or adding a BDateFormat(const BLocale&) constructor.
* Adjust all users of the API.


# 52cdfde04b346aa33eaebd4063321b80683973aa 25-Nov-2012 Oliver Tappe <zooey@hirschkaefer.de>

Fix relying on order of static object destruction in Locale Kit.

* use only a single static object (MutableLocaleRoster) instead of
two, which avoids any problems if the order of static object
destruction would destroy RosterData before MutableLocaleRoster
* rename BPrivate::RosterData to BPrivate::LocaleRosterData and move
it into a header and implementation file of its own
This should hopefully fix problems encountered with a clang-compiled
Locale Kit.


# 3cf2d117e570356c8487e67a0e38b09b1639ab6c 14-Apr-2012 John Scipione <jscipione@gmail.com>

Change Time Format Options in Deskbar preferences.

Added two new methods to the Locale Kit in order to create a custom time
formats from a format string. One method is outputs into a char* array,
the other into a BString() and you can set the timezone.

These methods should be cleaned up, we only need 2, one to get
the time in a predefined style, the other to get a custom time format.
Also should probably do the same for dates and datetimes. But I'll let
this go for now.

I added myself to the Locale.cpp file. I retained the copyright instead
of assigning it to Haiku, Inc. because the file is under the OpenBeOS
license and I don't know what the concequences of copyright sharing are
for that license, unlike MIT.

These new methods are used to generate custom time formats in Deskbar.
Instead of using a set of Radio Buttons to choose between the predefined
time options I build my own by creating a format string and passing it
to the Locale Kit. The format string is generated from 3 checkboxes,
show seconds, show day of week, and show time zone. You can mix and match
between them choose any that you like. By default they are all off.

There are 3 new deskbar settings associated with these new options:
showSeconds, showDayOfWeek, and showTimeZone. timeFormat has gone away.

The time format string gets cached and updated only when Update() gets called
on the TimeView class.

In order to fit all the options in (there is 1 more than before) I had to
reduce the font size of the clock to 11pt when all options are turned on in
12 hour mode. For those with no imagination it looks like this:

http://imagebin.org/208162

Renamed "Open time preferences..." menuitem to "Time preferences...".
Renamed "Show Time" and "Hide Time" to "Show time" and "Hide time".

Other changes include refactoring the header files a bit. There were a lot
of headers included by header files uneccessarily. For instance BarWindow.h
now only includes <Window.h> and <Deskbar.h>. This change is mainly to
to speed up the compile time since it takes a while right now.

I copy the fBarView pointer from BarWindow in the BarApp constructor and then
use that throughout the file rather than getting the pointer from the window
each time by calling BarView(). BarView() is still available in the header
for other classes though.

I moved some message constants around since it was getting a bit jumbled.
Most of the messages related to settings are in PreferenceWindow.h.
fChangeState is moved to BarView.h since that is where the ChangeState()
function is and BarView.cpp uses that constant.

The time interval and format constants are in TimeView.h.

Make some methods public in their respective classes where it made sense.
The preference window methods to update dependent items are public, that
might get called from BarWindow when a message gets received at some point.

Also made ShowHideTime() and Time() public in StatusView.h. These methods
activate showing and hiding the clock and return the fTime clock object.
No reason they should be private.

I reindented the StatusView.h and PreferenceWindow.h headers to the standard
style. Question here, are the public: protected: and private: lines inside
of classes suppose to get indented 1 tab or not? I've seen both, the style
guide says no indent but 1 indent seems reasonable and looks pretty good.

Style fixes here and there. That's enough for one commit I think.


# 740ae7fef6788697bb687b6789cfb331361d84d9 02-Nov-2011 John Scipione <jscipione@gmail.com>

Return B_ERROR if a locking error occurs in while locking the BLocale object, return B_BAD_VALUE if an ICU error occurs or the passed in value is NULL. Update BLocale API documentation to reflect this and also add some more documentation fixes. Closes #7901 pending confirmation.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43095 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6846765fbf83f501df7ab9b10811971cbb5375a3 07-Sep-2011 Oliver Tappe <zooey@hirschkaefer.de>

Work on #7947 (CalendarView not respecting locale's start of week)
* support all weekdays as start of week, not only Sunday and Monday
(at least Saturday is used for real, too)
* introduce BWeekday as enumeration of weekdays (currently in Locale.h,
may be moved somewhere else later)
* change CalendarView to use BDate as its model, not individual values
for day, month and year, such that no more date computation is done
in CalendarView itself
* some more style cleanups in CalendarView along the way
* add monthwise paging to CalendarView
* adjusted Deskbar and Time preflet accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42720 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 45f2f22b5250a7be9cdb0a82dee2ca91aaa8398d 18-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

* update (not-so-)optional package ICU to 4.8.1, which contains interesting stuff
for message formatting
* adjust LocaleKit to use namespace 'icu', as ICU has been configured to no longer
use a version specific namespace
* adjust LocaleKit to general API changes in ICU 4.8
Note: all software using ICU (like WebPositive) needs to be rebuilt!
Note: the ICU package for PPC needs to be updated before it can be used!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42638 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ff6f0d491d624f99fce94b0985772fec0d37189 09-Aug-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch by John Scipione : use B_WOULD_BLOCK when locking fails, to avoid returning B_ERROR like when there's an ICU error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42605 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25dc253d6ab28ce204fa4de2d3e7a27d167fc817 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6fd2f4a0d14b45a316defe994e9790de062ff3ff 23-Oct-2010 Oliver Tappe <zooey@hirschkaefer.de>

One more monster commit (sorry ...) concerning the Locale Kit:
* extracted new class BFormattingConventions from BCountry, which
manages the formatting conventions from a given locale and
allows to get/set the four different date/time formats supported
by ICU-locales as well as number and monetary formats
* overhauled the Locale preflet:
+ drop editing features for all formats, since I don't think
they do not make much sense to have in a prefs GUI - being
able to select from the existing locales should be good
enough. Please note that you can still change the formats
programmatically in an application.
+ renamed the 'Countries' tab to 'Formatting'
+ the locale formatting conventions list in the 'Formatting'
tab is now hierarchical for easier access (less scrolling)
+ fixed functionality of 'Revert' and 'Defaults' buttons
+ added support for using the month/day-names of your preferred
language during date formatting
* adjusted BLocale to ask BFormattingConventions for the current
formats when formatting dates and times and to offer 4
different format styles (full, long, medium and short).
* adjust all classes formatting dates/times to pick the
appropriate format style
* BLocaleRoster no longer directly archives/unarchives the
individual formatting conventions but delegates that to
BFormattingConventions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39123 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1d8fda63745350804d76b4ed160732086fa9655 19-Oct-2010 Oliver Tappe <zooey@hirschkaefer.de>

Next step of Locale Kit refactoring:
* BLocale now keeps language and country completely separate and
mixes the formatting conventions into the current language's locale
when formatting dates and times (needs to be done for number- and
currency-formatting, too, since the digits may not be in the
preferred language)
* optimized fetching of the flag icons such that they are all loaded
in one go (by the locale roster) - this alone speeds up the Locale
preflet considerably
* worked on fixing the language confusion in the Locale preflet
* fixed a couple of bugs in the Locale preflet that would lead to
illegal characters being displayed in the date-subpart menus


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39013 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2bd0cd6cb81083f3d070bc780644db8e63ff054d 30-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* improved const-correctness of BLocale

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38457 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a9faf943925a9041088130c4b9bb247e16d73322 29-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* reintroduced be_locale as global information point for the current locale
values
* added locking to BLocale (needed since the data of the global object may
change any time)
* BLocale no longer passes out pointers to internal objects, it fill objects
passed in by the client instead (just like be_locale_roster does)
* dropped default language as member from RosterData, it is no part of the
default locale
* fleshed out implementation of TimeUnitFormat and DurationFormat, both
of which can now be given a BLocale in order to set the strings being used
during formatting


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38428 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ef134d918080b32962b6cc0522ba45efc0c26b8 26-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* added timezone-support to some more date/time-formatting methods in BLocale

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38381 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bca1690bfa99e8932b890b881debc817f6d32f06 24-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Preliminary support for adjusting the money format in the locale preflet :
* API for formatting a number and recovering the field positions
* Some changes in the preflet to display the formatted number and start filling in the fields.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38335 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 750e57b842a77d99005e07ee04b504c5e816d610 23-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Optimized Time preflet:
* use upon-demand initialization in BTimeZone to avoid unnecessary work
* renamed BTimeZone::Code() to BTimeZone::ID() and adjusted all callers
* avoid using BCountry in the Time preflet for the time being, this means
the icon-flags are gone for now (but they could be re-added if the demand
is pressing ;-)
* group the timezones by regions and then by country instead
The performance improvement is considerable and I personally think the new grouping is an improvement, too. Please share your thoughts!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38322 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ee33862568854248ed47183e2e64793082ea779d 16-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* dropped one more instance of debug output

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38157 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f23b9d8a7261881cfa9c4f721de5483c9ce96049 16-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* added possibility to pass in the timezone when formatting the time
* added TODOs about the need to get rid of some of the date/time-formatting
shortcut methods

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38146 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4a7b2e0484dc12783c1cf56dd23175ffb7c7649a 07-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Add FormatDateTime function to BLocale
* Use the function to localize the date/time in tracker.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37949 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ebeabb63965856cc0aa165536afd36220a70feb 05-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Remove GetLocaleName from BCountry
* Add GetName to BLocale instead


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37919 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c3a30348613821de032e50f1633e47dc732651f 04-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Move the locale-related stuff away from BCountry to BLocale.
* Remove the be_locale global object and go through the be_locale_roster instead
* Rework the storage of data for the be_locale_roster, since BLocale already holds a BCountry and a BLanguage.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37907 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38ac8def5a72de58d6ae4e82d8c4a6be1021e67e 01-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Largish cleanup sweep concerning the Locale Kit (sorry it got so big):
* refactored private/mutable stuff out of LocaleRoster into MutableLocaleRoster
* moved management of Locale/Time settings file and broadcasting of any changes
out of preflets and into MutableLocaleRoster
* added proper sorting to the listviews of the Locale preflet
* the Time preflet no longer overlaps long timezone names into the actual time
* several fixes with respect to leaking ICU objects, esp. in BCountry
* the locale roster no longer passes out references to its own BCountry object,
but uses copies, instead - this makes locking superfluous, as the clients'
BCountry objects can no longer be changed by the setting a new default
country in the locale roster
* removed pretty useless POSIX-style symbol fetching from BCountry - if we
need that at all, it should live in the dedicated formatter classes
* adjusted readonlybootprompt, dstcheck and Deskbar to the changed Locale API
* refactored existing Time-formatter into TimeUnitFormat and DurationFormat
(the latter of which is now used by AboutSystem)
* added stubs for Date, DateTime and Time formatters
* lots of coding style fixes throughout the Locale Kit and the Locale and Time
preflets
This will probably break most external apps making use of the Locale Kit - it
does break WebPositive.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 51145d87bd00e1dea54c7bca7e4904bfb6ca425c 08-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Support for setting 12/24Hr mode in locale preflet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37427 a95241bf-73f2-0310-859d-f6bbb57e9c96


# be8fa2fb3088ab1921612b60f352dd9334b40b3d 02-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Update all applications in tree to use the new localizing system
* Remove the old one from the locale librairy, with some cleanup
Known regressions :
* readonlybootprompt will no longer update the locale settings : the
method used messed with internal undocumented things
* external localized apps (webpositive for example) will not run
anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37336 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 005a5d0bfeda8b1f5b4de97f0368ef6f3ad89193 21-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Stumbled across some problems while using the Locale Kit and added TODOs
accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35214 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c3ac87e8fc6f81023c44faed6cf00c8a916f4e31 01-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* Copied imported OpenTracker Locale Kit files from the vendor branch
into their new homes (at least for now, might need some adjustment).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30540 a95241bf-73f2-0310-859d-f6bbb57e9c96