History log of /haiku/headers/os/locale/Format.h
Revision Date Author Comments
# a1ceb000 30-Jul-2017 Augustin Cavalier <waddlesplash@gmail.com>

Remove even more Locale Kit cruft.

Not included in the build and not used.


# 5d5ec05b 27-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

B*Format: make immutable and remove locking

The language and formatting conventions can now only be set when
creating the objects. This removed the needs for locking them when
formatting to avoid some other thread changing the format while it's
being used.

Adjust tests and DeskBar TimeView to the API changes.


# 44f11d09 01-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Make BDateFormat inherit from BFormat again

* Move relevant parts up into BFormat so other format classes can use
those
* Adjust BDurationFormat and BTimeUnitFormat for the changes
* Remove the "default" date format, it is better to keep only a default
locale and let applications create B*Formats from it as needed.
* Creating a B*Format without arguments to the constructor now
configures it for the default locale, which allows for easy use in
standard cases (formatting something with the current language and
format)
* Creating a B*Format is potentially an expansive operation, it is
advised to keep the instance around and reuse it whenever possible.
However it must be "refreshed" when the locale changes, for apps which
supports that, since it keeps a copy of the language and formatting
convention, rather than a pointer to the locale as it did before.


# 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


# 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


# 33eead33 17-Feb-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Improve the test for TimeFormat (style and error checking)
* Fix the TimeFormat API, there was a double free. Make it work as expected : you send it a number of seconds and it will format it properly in days, hours, minutes, seconds with proper plural.
* Cleanup other parts of the Format API from useless things. They may get reintroduced later if we feel the need to do so.
* AboutSystem now use TimeFormat to display the uptime in properly localized way.


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


# b2c385c0 16-Feb-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

-Added new TimeFormat API for formatting and localizing a time (uptime, copy duration, ...)
-Added a very simple test that shows the API is corrupting memory and ends up crashing
-Fixed build of other locale tests


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


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

Applied patch by PulkoMandy, adjusted and extended by myself:
* integrating most of the locale kit into the build (and image)
* removed LocaleBuild.h and _IMPEXP_LOCALE since that does not make
sense for elf (which usually exports all symbols anyway)
* added a couple of locale kit related pseudo targets for convenience
Hey, some of that stuff already seems to work :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30545 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


# 5d5ec05b1df089eff03f04a7122ac7cf355c4f3e 27-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

B*Format: make immutable and remove locking

The language and formatting conventions can now only be set when
creating the objects. This removed the needs for locking them when
formatting to avoid some other thread changing the format while it's
being used.

Adjust tests and DeskBar TimeView to the API changes.


# 44f11d0982feb6ed1cc66c4d6d0a26bffd8ce4d4 01-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Make BDateFormat inherit from BFormat again

* Move relevant parts up into BFormat so other format classes can use
those
* Adjust BDurationFormat and BTimeUnitFormat for the changes
* Remove the "default" date format, it is better to keep only a default
locale and let applications create B*Formats from it as needed.
* Creating a B*Format without arguments to the constructor now
configures it for the default locale, which allows for easy use in
standard cases (formatting something with the current language and
format)
* Creating a B*Format is potentially an expansive operation, it is
advised to keep the instance around and reuse it whenever possible.
However it must be "refreshed" when the locale changes, for apps which
supports that, since it keeps a copy of the language and formatting
convention, rather than a pointer to the locale as it did before.


# 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


# 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


# 33eead339b2cf4b27f271e3f7fdae433b02bef6a 17-Feb-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Improve the test for TimeFormat (style and error checking)
* Fix the TimeFormat API, there was a double free. Make it work as expected : you send it a number of seconds and it will format it properly in days, hours, minutes, seconds with proper plural.
* Cleanup other parts of the Format API from useless things. They may get reintroduced later if we feel the need to do so.
* AboutSystem now use TimeFormat to display the uptime in properly localized way.


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


# b2c385c0727b400b447efa535a3a67042bd52af8 16-Feb-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

-Added new TimeFormat API for formatting and localizing a time (uptime, copy duration, ...)
-Added a very simple test that shows the API is corrupting memory and ends up crashing
-Fixed build of other locale tests


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


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

Applied patch by PulkoMandy, adjusted and extended by myself:
* integrating most of the locale kit into the build (and image)
* removed LocaleBuild.h and _IMPEXP_LOCALE since that does not make
sense for elf (which usually exports all symbols anyway)
* added a couple of locale kit related pseudo targets for convenience
Hey, some of that stuff already seems to work :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30545 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