History log of /haiku/src/kits/locale/FormattingConventions.cpp
Revision Date Author Comments
# 779ab335 09-Dec-2020 X512 <danger_mail@list.ru>

use .IsSet() instead if .Get() != NULL

Change-Id: Ia2b7a719fd398e78cc3b11d4f7b02cb81179f65f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3488
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 1bad1ff3 02-Aug-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

Prepare for ICU update

- libicule and libiculx do not exist anymore in newer ICU versions
(harfbuzz replaces them), but we didn't actually use them, so remove
them from the build feature and from the package dependencies
- Add namespace usage marcos since the newer ICU packages put ICU things
in a namespace, making it easier to have multiple versions of ICU used
side by side.

No functional change intended, but this makes it possible to build the
code with either ICU 57 (for gcc2) or 66 (for other architectures).


# 3eac8208 09-Jan-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

Remove BStringRef and users.

As discussed in 2008
(http://www.freelists.org/post/haiku-development/BString-on-GCC4,1),
this class was not efficient because of lack of inlining. Implement the
suggested solution of a SetCharAt method instead. Also add a CompareAt
which covers a specific use case in KeyboardLayout.cpp.

Adjust all places which were using this feature to safer APIs.

Also fixes a copypaste error in FormattingConventions.cpp.


# ac315db0 29-May-2016 Mark Hellegers <mark@firedisk.net>

locale: Fix 24 hour format for DateTimeFormats.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Fixes #12575. I checked with PulkoMandy on IRC before merging this,
and fixed some whitespace violations of the coding style.


# 73de5837 10-May-2015 Jérôme Duval <jerome.duval@gmail.com>

Update icu x86_64 package with namespace renaming enabled.

"Renaming" means the icu namespace is suffixed with the version number,
atm icu_55. Using "renaming" allows to use two different versions of ICU,
thus easing upgrades. For instance haikuwebkit uses a current version of ICU,
while the system uses a newer one after an upgrade.

* Replace all uses of the icu namespace in our public headers, with a macro
defaulting to icu. As the namespace is only used for private fields pointers,
there should be no impact.
* Locale kit *.cpp have to import the macro from <unicode/uversion.h> *before*
including any locale headers. Ditto for a Time preferences cpp file. This way,
the correct current icu namespace is referenced.
* Fixes bug #12057.


# 4a3a4742 06-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Reimplement BDateTimeFormat using ICU support

* Avoid hardcoding the format to "date, time"
* Allows using DateTimePatternGenerator to create custom formats from a
set of fields.


# 40b6c14d 09-Apr-2012 John Scipione <jscipione@gmail.com>

If full time format, don't abbreviate the time zone.


# 5dca884f 28-Mar-2012 luckypower <luckypower@localhost>

Fix #8257: Locale not showing 24h/12h mode.

* apply patch from 'luckypower', that fixes the problem
in BFormattingConventions - thanks!

Signed-off-by: Oliver Tappe <zooey@hirschkaefer.de>


# e267238f 21-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

* add predicate FormattingConventions::AreCountrySpecific()

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


# c905e535 22-Dec-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix CID-5982-5985:
* assign arrays members explicitly instead in initialization list


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


# abd80e8a 22-Dec-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix CID-9827:
* the unarchival constructor didn't initialize some members

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


# 73de58376ac8f983ae64a643e01ec5bf047208d2 10-May-2015 Jérôme Duval <jerome.duval@gmail.com>

Update icu x86_64 package with namespace renaming enabled.

"Renaming" means the icu namespace is suffixed with the version number,
atm icu_55. Using "renaming" allows to use two different versions of ICU,
thus easing upgrades. For instance haikuwebkit uses a current version of ICU,
while the system uses a newer one after an upgrade.

* Replace all uses of the icu namespace in our public headers, with a macro
defaulting to icu. As the namespace is only used for private fields pointers,
there should be no impact.
* Locale kit *.cpp have to import the macro from <unicode/uversion.h> *before*
including any locale headers. Ditto for a Time preferences cpp file. This way,
the correct current icu namespace is referenced.
* Fixes bug #12057.


# 4a3a4742241f0843867e76cbc49694b9e4146b2f 06-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Reimplement BDateTimeFormat using ICU support

* Avoid hardcoding the format to "date, time"
* Allows using DateTimePatternGenerator to create custom formats from a
set of fields.


# 40b6c14db7fb21b461a17038587d344487fa28bf 09-Apr-2012 John Scipione <jscipione@gmail.com>

If full time format, don't abbreviate the time zone.


# 5dca884fa50e80d762b8f165fb5939648f658f75 28-Mar-2012 luckypower <luckypower@localhost>

Fix #8257: Locale not showing 24h/12h mode.

* apply patch from 'luckypower', that fixes the problem
in BFormattingConventions - thanks!

Signed-off-by: Oliver Tappe <zooey@hirschkaefer.de>


# e267238ff171df146a3386e2ab6fffbe500385e7 21-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

* add predicate FormattingConventions::AreCountrySpecific()

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


# c905e535a24dd3737b869d86634e273e01ae3581 22-Dec-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix CID-5982-5985:
* assign arrays members explicitly instead in initialization list


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


# abd80e8a976274dcde2cc83cea11f97c1cfc1b78 22-Dec-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix CID-9827:
* the unarchival constructor didn't initialize some members

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