History log of /haiku/src/kits/locale/MutableLocaleRoster.cpp
Revision Date Author Comments
# 85344843 16-Mar-2021 Kacper Kasper <kacperkasper@gmail.com>

Fix MutableLocaleRoster::LoadCatalog logic

* It should always try loading parent language.

Change-Id: I3af14beef70a41242d09b11f09abf749ac92e588
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3802
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 6e1e87a3 05-Feb-2021 Adrien Destugues <pulkomandy@pulkomandy.tk>

Locale Kit: do not unload catalog add-ons

Follow-up to #16670.

I have previously changed the locale kit to load all add-ons once at
start, but did not notice that it would unload them later on. This can
also create race conditions if the locale kit is used from inside
load_add_on (as is the case in translation kit add-ons for example).

Should fix the remaining problems in #16670

Change-Id: I0e22f8e146abe4fc85d8357ebe178db948fec1cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3734
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 4cf4daf2 22-Jan-2021 Adrien Destugues <pulkomandy@pulkomandy.tk>

Locale Kit: move catalog add-ons loading to early initialization

The catalog loading has been done lazily since forever (this code was
imported from OpenTracker). It results in a race condition as explained
in #16670.

Moving the catalog loading earlier in the locale loading process avoids
this problem, since load_add_on is called before the locale roster lock
is used.

This should fix #16670.

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


# 41853a8b 25-Aug-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

locale kit: allow creating a catalog without entry_ref

The catalogs are loaded from separate files, so there is no need to have
an app entry_ref to load them, just a MIME type is enough.

The implementation is a bit simplified: only the default catalog format
is allowed (unlike when loading from entry_ref, where extra catalog
formats can be added in add-ons).

Unrelated cleanup: remove unused code to load catalogs from attributes
of an application. We considered this when designing the locale kit, but
using resources or separate files works better.

Use this in Cortex, where some strings are in a static library, so they
don't have an associated executable or library or add-on to identify
them. The code in Cortex is not complete localization, several parts
should use StringForRate, BStringFormat, etc.

Change-Id: I09be22b1f50891250c4497c51e1db8dcee279140
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3172
Reviewed-by: Kacper Kasper <kacperkasper@gmail.com>


# 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.


# a22e8c6f 24-Nov-2012 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup: respect 80 chars/line limit.


# 93b5e561 20-Nov-2012 Oliver Tappe <zooey@hirschkaefer.de>

Adjust Locale Kit to no longer use syslog


# 541ff51a 15-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup BCatalogAddOn.

* rename BCatalogAddOn to BCatalogData, since it doesn't represent an
add-on, but rather the catalog data provided by an add-on
* move BCatalogData out of Catalog.{h,cpp} into its own header and
implementation file
* drop BCatalogData::MarkForTranslation() methods, they're not needed
* drop BCatalog::GetNoAutoCollectString() methods, they're not being
used anywhere
* cleanup the B_TRANSLATE_... macros somewhat
* add versions of the B_TRANSLATE_MARK_... macros that are meant to be
used in void context (when the string isn't being used by the program,
just meant to be picked up by collectcatkeys).
* adjust several apps to use B_TRANSLATE_MARK_..._VOID where needed
* adjust users of BCatalogAddOn accordingly


# eaa5e093 14-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Fix #8452 (app's crashing for non-existent system catalog)

* make the system catalog a BCatalog instead of a BCatalogAddOn*,
such that using a non-existing system catalog won't crash but
simply return the untranslated string instead
* rename MutableLocaleRoster::GetSystemCatalog() to LoadSystemCatalog()
and adjust it to use BCatalog::SetTo() in order to replace the
data used by the given catalog
* adjust all users of gSystemCatalog accordingly


# d9dc0dda 26-Feb-2012 Oliver Tappe <zooey@hirschkaefer.de>

Fix #8350: clockconfig has to use the current offset from GMT.

* instead of re-applying the fixed offset that had been set when the
Time preflet was used last, use the stored timezone name in
clockconfig in order to determine the current GMT-offset for that
timezone
* clockconfig now requires liblocale.so
* drop the offset field from the settings as it is no longer used,
clockconfig was the only client
* automatic whitespace cleanup


# 323b6546 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# cddcc2be 31-Oct-2011 Oliver Tappe <zooey@hirschkaefer.de>

Fix MutableLocaleRoster::GetSystemCatalog()
* Using a hardcoded path is bad, since the library folder might
change and/or the /system/lib/libbe.so may not be the libbe.so
actually in use. Instead, we now lookup the loaded libbe-image
and get the entry_ref from its image_info.



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


# 54fad654 31-Oct-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Rework the handling of catalog loading in locale kit :
Instead of computing the mime signature and giving this to the catalog system,
give an entry_ref instead. The default catalog add-on can thus look at the
right place when searching local catalogs (embedded as resources, or stored
as files next to the executable.
* This allows different versions of the same app to each have their own
catalog set,
* And also make the embedded/local catalog searching work for add-ons and
libs, instead it only worked for apps because of a getAppInfo call.

Fix cpufrequency to make use of it properly (that wouldhave worked without the
change, but nowit's mandatory, since loading a catlog by mimesignature is not
possible anymore).

Should fix #8037.



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


# 3dfd9cb9 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn


# ed7ee7a4 11-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Localization support for filesystem entries in Tracker and Deskbar (leaf menu). (It appears to work, but is likely incomplete and quite possibly incorrect.) Fix issue with RosterData::Refresh() resulting in a B_LOCALE_CHANGED broadcast, and Deskbar looping. Add a global boolean gLocalizedNamePreferred to avoid calling BLocaleRoster::Default()->IsFilesystemTranslationPreferred() too often from Model instances. Following Tracker code style in libtracker, so as to not mix in too much clean-up.

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


# 07cffb47 11-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Introducing a Locale option to display localized filesystem entries (primarily apps and folders) in Deskbar, Tracker, etc. Making use of this in Deskbar's list of apps. The option currently defaults to off, to avoid exposing everyone to unfinished work.

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


# 1d8dff01 16-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* improve locale roster to no longer rely on static object
initialization order
This was meant to fix #7227, but just seems to have bypassed it - the crash is now somewhere else ... needs more investigation

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


# ce5bc205 26-Dec-2010 Oliver Tappe <zooey@hirschkaefer.de>

* drop TODO as it doesn't apply - catalogs have nothing to do with ICU
and there are no catalog-specializations for encoding or currency

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


# fc6502a6 26-Dec-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix CID-10337 (unreachable code):
* only return the catalog if it isn't NULL, thus allowing the loop
to potentially increase the loop var - in turn making code reachable
that wasn't before


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


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

Fix CID-10553:
* avoid possible use of deleted catalog (didn't occur because we
currently only have a single type of catalog add-on)

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


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

* removed all BLocale-related getters from BLocaleRoster - they're available
in BLocale (which is accessible via be_locale)
* adjusted all users accordingly


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


# 7244db26 23-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix regression introduced with r38322
* the chosen preferred languages weren't restored in Locale preflet

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


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

* Refresh() should make sure to try and load both "locale" and "timezone"
settings, not give up when one is missing (like on a fresh image)
* try harder to fallback to proper default values when loading the locale
settings file fails

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


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

* we need to initialize ICU's default timezone, as the date formatting
implementation in BLocale assumes this matches the system's timezone
This little bugger should fix #6277, #6370 and #6396.

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


# 58fa4d57 05-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* The locale roster keeps its own Language instead of using the locale one, so that changing the locale doesn't reset the
language.


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


# 34a79bff 04-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* renamed BPrivate::mutable_locale_roster to BPrivate::gMutableLocaleRoster,
to follow coding guidelines

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


# 5517ab99 03-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* store numeric timezone offset along with ID of timezone in 'Time settings',
as this can then be used in clockconfig

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


# 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.


# a22e8c6fe28437bc4b4036d1388282e1f5a756e4 24-Nov-2012 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup: respect 80 chars/line limit.


# 93b5e5614cab5777788dff6f6ecd7cbe00892fe0 20-Nov-2012 Oliver Tappe <zooey@hirschkaefer.de>

Adjust Locale Kit to no longer use syslog


# 541ff51a6ef4c47f8ab105ba6ff895cdbba83aca 15-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup BCatalogAddOn.

* rename BCatalogAddOn to BCatalogData, since it doesn't represent an
add-on, but rather the catalog data provided by an add-on
* move BCatalogData out of Catalog.{h,cpp} into its own header and
implementation file
* drop BCatalogData::MarkForTranslation() methods, they're not needed
* drop BCatalog::GetNoAutoCollectString() methods, they're not being
used anywhere
* cleanup the B_TRANSLATE_... macros somewhat
* add versions of the B_TRANSLATE_MARK_... macros that are meant to be
used in void context (when the string isn't being used by the program,
just meant to be picked up by collectcatkeys).
* adjust several apps to use B_TRANSLATE_MARK_..._VOID where needed
* adjust users of BCatalogAddOn accordingly


# eaa5e0936d94e7d0bb2e6066a87d485e7613414c 14-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Fix #8452 (app's crashing for non-existent system catalog)

* make the system catalog a BCatalog instead of a BCatalogAddOn*,
such that using a non-existing system catalog won't crash but
simply return the untranslated string instead
* rename MutableLocaleRoster::GetSystemCatalog() to LoadSystemCatalog()
and adjust it to use BCatalog::SetTo() in order to replace the
data used by the given catalog
* adjust all users of gSystemCatalog accordingly


# d9dc0dda439ccb68f955f69a31d30d560ae401da 26-Feb-2012 Oliver Tappe <zooey@hirschkaefer.de>

Fix #8350: clockconfig has to use the current offset from GMT.

* instead of re-applying the fixed offset that had been set when the
Time preflet was used last, use the stored timezone name in
clockconfig in order to determine the current GMT-offset for that
timezone
* clockconfig now requires liblocale.so
* drop the offset field from the settings as it is no longer used,
clockconfig was the only client
* automatic whitespace cleanup


# 323b65468e5836bb27a5e373b14027d902349437 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# cddcc2bea95011c47b7a9ee25b630e2f639a1191 31-Oct-2011 Oliver Tappe <zooey@hirschkaefer.de>

Fix MutableLocaleRoster::GetSystemCatalog()
* Using a hardcoded path is bad, since the library folder might
change and/or the /system/lib/libbe.so may not be the libbe.so
actually in use. Instead, we now lookup the loaded libbe-image
and get the entry_ref from its image_info.



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


# 54fad654ce9986a2b0ce4849608e738907509292 31-Oct-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Rework the handling of catalog loading in locale kit :
Instead of computing the mime signature and giving this to the catalog system,
give an entry_ref instead. The default catalog add-on can thus look at the
right place when searching local catalogs (embedded as resources, or stored
as files next to the executable.
* This allows different versions of the same app to each have their own
catalog set,
* And also make the embedded/local catalog searching work for add-ons and
libs, instead it only worked for apps because of a getAppInfo call.

Fix cpufrequency to make use of it properly (that wouldhave worked without the
change, but nowit's mandatory, since loading a catlog by mimesignature is not
possible anymore).

Should fix #8037.



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


# 3dfd9cb95ce45f59160d50975210bc55e3fc0709 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn


# ed7ee7a43256baac60e2345f42fc28897cf5585e 11-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Localization support for filesystem entries in Tracker and Deskbar (leaf menu). (It appears to work, but is likely incomplete and quite possibly incorrect.) Fix issue with RosterData::Refresh() resulting in a B_LOCALE_CHANGED broadcast, and Deskbar looping. Add a global boolean gLocalizedNamePreferred to avoid calling BLocaleRoster::Default()->IsFilesystemTranslationPreferred() too often from Model instances. Following Tracker code style in libtracker, so as to not mix in too much clean-up.

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


# 07cffb4786d1ad91631b60045e9f85c611380d27 11-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Introducing a Locale option to display localized filesystem entries (primarily apps and folders) in Deskbar, Tracker, etc. Making use of this in Deskbar's list of apps. The option currently defaults to off, to avoid exposing everyone to unfinished work.

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


# 1d8dff01970e56c3cbd7f8c46e369e3d42dee18a 16-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* improve locale roster to no longer rely on static object
initialization order
This was meant to fix #7227, but just seems to have bypassed it - the crash is now somewhere else ... needs more investigation

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


# ce5bc205b13d17787f199a6170b15e9bda406ef1 26-Dec-2010 Oliver Tappe <zooey@hirschkaefer.de>

* drop TODO as it doesn't apply - catalogs have nothing to do with ICU
and there are no catalog-specializations for encoding or currency

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


# fc6502a69f97e4e27c54be35845b20eee978b8bd 26-Dec-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix CID-10337 (unreachable code):
* only return the catalog if it isn't NULL, thus allowing the loop
to potentially increase the loop var - in turn making code reachable
that wasn't before


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


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

Fix CID-10553:
* avoid possible use of deleted catalog (didn't occur because we
currently only have a single type of catalog add-on)

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


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

* removed all BLocale-related getters from BLocaleRoster - they're available
in BLocale (which is accessible via be_locale)
* adjusted all users accordingly


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


# 7244db260e32440fadcabe38e4bf3a6a8acb8935 23-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix regression introduced with r38322
* the chosen preferred languages weren't restored in Locale preflet

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


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

* Refresh() should make sure to try and load both "locale" and "timezone"
settings, not give up when one is missing (like on a fresh image)
* try harder to fallback to proper default values when loading the locale
settings file fails

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


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

* we need to initialize ICU's default timezone, as the date formatting
implementation in BLocale assumes this matches the system's timezone
This little bugger should fix #6277, #6370 and #6396.

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


# 58fa4d5717e933428be5e117c2a2f5f71a58ceed 05-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* The locale roster keeps its own Language instead of using the locale one, so that changing the locale doesn't reset the
language.


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


# 34a79bff8ad710b8e8024b0006a77ec8a9f45b16 04-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* renamed BPrivate::mutable_locale_roster to BPrivate::gMutableLocaleRoster,
to follow coding guidelines

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


# 5517ab99186cd569083c42074330a526ce6adcde 03-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* store numeric timezone offset along with ID of timezone in 'Time settings',
as this can then be used in clockconfig

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