History log of /haiku/headers/os/locale/LocaleRoster.h
Revision Date Author Comments
# acf02fd2 03-Dec-2017 Augustin Cavalier <waddlesplash@gmail.com>

locale: Fix another class/struct mixup.


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


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


# fed5e612 18-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

LocaleRoster: race condition on catalog loading.

Using a vint32 isn't enough to safely decide if the catalog is
initialized or not. Use init_once features instead.


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


# 635df643 07-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Add BLocaleRoster::GetAvailableTimeZonesWithRegionInfo()

* allow locale kit clients to get all timezones with their corresponding
country/region ID piecemeal


# 702526b1 25-May-2011 Axel Dörfler <axeld@pinc-software.de>

* Added BLanguage::GetIcon(), and BLocaleRoster::GetFlagIconForLanguage(). The
former just calls the latter. Getting the flag for a language is pretty
simplistic for now, but it won't return the wrong flag, just only a few known
ones (should be enough for ReadOnlyBootPrompt, at least).
* Ordered methods in declaration order.


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


# 28373dd1 31-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Remove superfluous function.

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


# ee6a2e55 27-Mar-2011 Jonas Sundström <jonas@kirilla.com>

* Extend the Model class with a method bool HasLocalizedName().
* Disallow renaming of entries with localized names for now - this is meant to be temporary - and so far only in Tracker's Info window. Renames do not result in a change, visually, as the localized name hides the real name, and results in a bad user experience. One could possibly allow renames of the localized name, writing it back to the catalog. I've experimented with using BCatalogAddOn::SetString() but haven't been able to make it stick yet.
* Disallow renaming Trash in Tracker's Info window via Command-E.
* Adjust the argument order of BLocaleRoster::GetLocalizedFileName().
* Add a BLocaleRoster::GetLocalizedFileName() variant to look up another app's name given its signature and unlocalized, canonical name.

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


# 6f477364 21-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Make BLocaleRoster::GetLocalizedFileName() take a const entry_ref& rather than a non-const entry_ref&. Remove private GetLocalizedFileName() from libtracker and make Tracker and Deskbar use the one in BLocaleRoster.

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


# 85366cb5 21-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Add BLocaleRoster::GetLocalizedFileName()

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


# 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


# 6f43faba 20-Oct-2010 Oliver Tappe <zooey@hirschkaefer.de>

* some cleanup in BLocaleRoster

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


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

* moved support for getting timezones-by-country from BCountry to LocaleRoster,
since we'd like to be able to get the timezones of the global (i.e. empty)
country, too.

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


# 039ad7e7 23-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Added support for getting a list of all available timezone IDs to LocaleRoster.

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


# 1855b44c 27-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Set the ICU default time zone from the locale preflet. Unfortunately it looks like this doesn't solve all the problems
yet.


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


# 4ae5a452 26-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Rewrote the timezone selection part of the time preflet to make use of ICU instead of our custom TZData.
* Not completely working yet, hte POSIX API isn't very happy about ICU timezone names.


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


# a03aca6e 21-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

WIP Timezone support
* BCountry can list the timezones applicable for the country
* BCountry can give its name (for example France), or LocaleName (french (France)). The second one will later be moved to BLocale class along with
most of the locale settings ; but this needs a bit of refactoring.
* The Locale preflet now uses LocaleName instead of Name, since it deals with locales. The time preflet will want only country names, without te
language information, for example.


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


# 719313af 21-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Missing from the previous commit. Sorry ! Thanks to luroh for watching.


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


# 4b37c7f8 20-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Remove direct access to ICU in locale preflet, use the locale kit instead.


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


# fe8d7c02 20-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Remove the CatalogStub class and put the Gatcatalog function directly in BLocaleRoster,
* Adjust the B_TRANSLATE macros to take this into account
* Adjust collectkatkeys to take it into account too
Thanks to Ingo for explaining me all the technical details about hiding things in shared objects.


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


# 76a4353b 01-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Add a new way of using the locale kit with static accessors instead of global variables. This has the following consequences :
* Applications don't have to declare BCatalog fCatalog themselves, it's now done automatically
* Libs and add-ons can be localized just the same way (except static libraries)
For now this new system is yet disabled as I'm looking for some peer review before going on. To enable it you have to define B_TRANSLATE_USE_NEW_MACROS in each file doing catalog access. This will not stay, I'll update the
other apps to use it.
The linking in jamfiles must be not only with liblocale.so, but also liblocalestub.a. Not sure how to handle this for user-side applications. Libraries are also required to provide a MIME signature to use any catalog.
The locale preflet is updated to the new system (as a test). Othe rapps will follow if everyone is ok with this approach.


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


# 96eaa02e 07-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Changed BLocaleRoster::GetLanguage() to a signature that makes more sense,
and looks more like the rest of the API.
* Also, it will now return an appropriate error code if the language couldn't
be allocated (anything else than B_OK is an improvement :-)).
* Several changes in BLanguage:
- GetName() now gets a BString reference, also
- it now returns the name in its own language, ie. for German this would
always be "deutsch", no matter the current language settings, and finally,
- it now empties the string it gets before adding the name.
- added GetTranslatedName() that behaves like the previous version.
- added const where it made sense (ie. almost everywhere).
- Code() now returns the code of the language only.
- ID() now returns the full ID of this language, ie. including country,
variant, and keywords if any.
- added Country(), and Variant().
- renamed IsCountry() to IsCountrySpecific().
- added IsVariant().
* Cleaned up Language.h, minor cleanup in LocaleRoster.cpp.
* Removed the whole move item logic from LanguageListView; while this was not
only spaghetti code, it doesn't make much sense in the first place.
* Instead of removing stuff from the left, and even worse, moving all countries
for a language even if only one had been dragged, we now only mark the items
that are already in the preferred list, and only those.
* Fixed various mixups of FullList*() vs. *() methods that could lead to things
like bug #5896.
* Pressing the delete key in the preferred list view will now remove the
language.
* Moved LocaleWindow specific message constants to LocaleWindow.cpp; Locale.h
is supposed to contain application wide constants.
* The drop logic is now in LocaleWindow.
* We now make sure that each base language can only be in the list once.
* Lots of cleanup, even though I mostly replaced spaghettie code with different
looking spaghettie code - still, I think things have slightly improved.


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


# e9024a3b 11-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Build tools : allow to run DoCatalogs with a custom regexp for special cases
* Introduce a system-wide localization catalog used for strings hidden deep in some libraries. Add special API to get it.
* string_for_size is the first to make use of this system wide catalog. This allows to have a fully localized DriveSetup.
* As a side effect, tracker also uses it. It now requires liblocale.so.


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


# 5570fd11 20-Jan-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

- Locale kit : made the language class live. It now uses ICU as a backend as expected
- Some changes in the locale roster to allow instanciating a language
- Locale preflet : use this new API instead of directly calling ICU
Side effect : all languages in Locale window are now displayed in the current locale. It makes more sense as otherwise the list would be unsortable. However it can get annoying if you mistakenly set a strange language as default.


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


# f9a80fec 10-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* LocaleRoster.h was not self-containing.
* Moved the locale stuff to the data directory as well (some parts were in /etc).
* The DefaultCatalog will now also scan the user directory for catalogs.
* Minor cleanup.


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


# 75f15221 18-Sep-2009 Oliver Tappe <zooey@hirschkaefer.de>

* reintegrated gsoc-locale-kit branch into trunk - there's more
work to do, but it's about time to give this code more exposure.



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


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


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


# fed5e6126b1340b5f40dee2570f12c0c651f71da 18-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

LocaleRoster: race condition on catalog loading.

Using a vint32 isn't enough to safely decide if the catalog is
initialized or not. Use init_once features instead.


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


# 635df643527f1c43faacdec5bfec86b12768e68a 07-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Add BLocaleRoster::GetAvailableTimeZonesWithRegionInfo()

* allow locale kit clients to get all timezones with their corresponding
country/region ID piecemeal


# 702526b17f11858618c2a037dd25da57af48a4de 25-May-2011 Axel Dörfler <axeld@pinc-software.de>

* Added BLanguage::GetIcon(), and BLocaleRoster::GetFlagIconForLanguage(). The
former just calls the latter. Getting the flag for a language is pretty
simplistic for now, but it won't return the wrong flag, just only a few known
ones (should be enough for ReadOnlyBootPrompt, at least).
* Ordered methods in declaration order.


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


# 28373dd18a90c132330f35735e8edc48c5ed12bc 31-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Remove superfluous function.

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


# ee6a2e5589a8ff169bb64870650b8f194aa9da14 27-Mar-2011 Jonas Sundström <jonas@kirilla.com>

* Extend the Model class with a method bool HasLocalizedName().
* Disallow renaming of entries with localized names for now - this is meant to be temporary - and so far only in Tracker's Info window. Renames do not result in a change, visually, as the localized name hides the real name, and results in a bad user experience. One could possibly allow renames of the localized name, writing it back to the catalog. I've experimented with using BCatalogAddOn::SetString() but haven't been able to make it stick yet.
* Disallow renaming Trash in Tracker's Info window via Command-E.
* Adjust the argument order of BLocaleRoster::GetLocalizedFileName().
* Add a BLocaleRoster::GetLocalizedFileName() variant to look up another app's name given its signature and unlocalized, canonical name.

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


# 6f477364cc55e3d6d26880c79cada179d9f93f76 21-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Make BLocaleRoster::GetLocalizedFileName() take a const entry_ref& rather than a non-const entry_ref&. Remove private GetLocalizedFileName() from libtracker and make Tracker and Deskbar use the one in BLocaleRoster.

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


# 85366cb58bf0367a18a7af187216eec7ad000fd0 21-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Add BLocaleRoster::GetLocalizedFileName()

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


# 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


# 6f43fabafb968148eb5c70d5489d7e81d07d44d2 20-Oct-2010 Oliver Tappe <zooey@hirschkaefer.de>

* some cleanup in BLocaleRoster

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


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

* moved support for getting timezones-by-country from BCountry to LocaleRoster,
since we'd like to be able to get the timezones of the global (i.e. empty)
country, too.

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


# 039ad7e7570c9a90744ded7361440fc2973b319f 23-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Added support for getting a list of all available timezone IDs to LocaleRoster.

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


# 1855b44cdf9cc85d44ee47beebd15f589e16955b 27-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Set the ICU default time zone from the locale preflet. Unfortunately it looks like this doesn't solve all the problems
yet.


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


# 4ae5a4522056245eaf4a6340d8f21d7617bd9ad8 26-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Rewrote the timezone selection part of the time preflet to make use of ICU instead of our custom TZData.
* Not completely working yet, hte POSIX API isn't very happy about ICU timezone names.


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


# a03aca6e0619095634916826781a08b046a36e24 21-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

WIP Timezone support
* BCountry can list the timezones applicable for the country
* BCountry can give its name (for example France), or LocaleName (french (France)). The second one will later be moved to BLocale class along with
most of the locale settings ; but this needs a bit of refactoring.
* The Locale preflet now uses LocaleName instead of Name, since it deals with locales. The time preflet will want only country names, without te
language information, for example.


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


# 719313afdd6d14861c62b96f69f56f144a1b4e06 21-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Missing from the previous commit. Sorry ! Thanks to luroh for watching.


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


# 4b37c7f861efbf2e31685ffaba80f3e923a8a6c8 20-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Remove direct access to ICU in locale preflet, use the locale kit instead.


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


# fe8d7c0225bd8e782b0a9b281d895bde6bbcc15e 20-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Remove the CatalogStub class and put the Gatcatalog function directly in BLocaleRoster,
* Adjust the B_TRANSLATE macros to take this into account
* Adjust collectkatkeys to take it into account too
Thanks to Ingo for explaining me all the technical details about hiding things in shared objects.


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


# 76a4353b79418ab1d9050821a5578bef0d40df0c 01-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Add a new way of using the locale kit with static accessors instead of global variables. This has the following consequences :
* Applications don't have to declare BCatalog fCatalog themselves, it's now done automatically
* Libs and add-ons can be localized just the same way (except static libraries)
For now this new system is yet disabled as I'm looking for some peer review before going on. To enable it you have to define B_TRANSLATE_USE_NEW_MACROS in each file doing catalog access. This will not stay, I'll update the
other apps to use it.
The linking in jamfiles must be not only with liblocale.so, but also liblocalestub.a. Not sure how to handle this for user-side applications. Libraries are also required to provide a MIME signature to use any catalog.
The locale preflet is updated to the new system (as a test). Othe rapps will follow if everyone is ok with this approach.


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


# 96eaa02e8f3976114f4db607ea41ebe158916823 07-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Changed BLocaleRoster::GetLanguage() to a signature that makes more sense,
and looks more like the rest of the API.
* Also, it will now return an appropriate error code if the language couldn't
be allocated (anything else than B_OK is an improvement :-)).
* Several changes in BLanguage:
- GetName() now gets a BString reference, also
- it now returns the name in its own language, ie. for German this would
always be "deutsch", no matter the current language settings, and finally,
- it now empties the string it gets before adding the name.
- added GetTranslatedName() that behaves like the previous version.
- added const where it made sense (ie. almost everywhere).
- Code() now returns the code of the language only.
- ID() now returns the full ID of this language, ie. including country,
variant, and keywords if any.
- added Country(), and Variant().
- renamed IsCountry() to IsCountrySpecific().
- added IsVariant().
* Cleaned up Language.h, minor cleanup in LocaleRoster.cpp.
* Removed the whole move item logic from LanguageListView; while this was not
only spaghetti code, it doesn't make much sense in the first place.
* Instead of removing stuff from the left, and even worse, moving all countries
for a language even if only one had been dragged, we now only mark the items
that are already in the preferred list, and only those.
* Fixed various mixups of FullList*() vs. *() methods that could lead to things
like bug #5896.
* Pressing the delete key in the preferred list view will now remove the
language.
* Moved LocaleWindow specific message constants to LocaleWindow.cpp; Locale.h
is supposed to contain application wide constants.
* The drop logic is now in LocaleWindow.
* We now make sure that each base language can only be in the list once.
* Lots of cleanup, even though I mostly replaced spaghettie code with different
looking spaghettie code - still, I think things have slightly improved.


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


# e9024a3be5be47004b588fdb80cd3021bd18680e 11-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Build tools : allow to run DoCatalogs with a custom regexp for special cases
* Introduce a system-wide localization catalog used for strings hidden deep in some libraries. Add special API to get it.
* string_for_size is the first to make use of this system wide catalog. This allows to have a fully localized DriveSetup.
* As a side effect, tracker also uses it. It now requires liblocale.so.


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


# 5570fd11c032110ee0bbfd01a2265d810301687b 20-Jan-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

- Locale kit : made the language class live. It now uses ICU as a backend as expected
- Some changes in the locale roster to allow instanciating a language
- Locale preflet : use this new API instead of directly calling ICU
Side effect : all languages in Locale window are now displayed in the current locale. It makes more sense as otherwise the list would be unsortable. However it can get annoying if you mistakenly set a strange language as default.


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


# f9a80fec953fdd37b5299b015989b4766afc8429 10-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* LocaleRoster.h was not self-containing.
* Moved the locale stuff to the data directory as well (some parts were in /etc).
* The DefaultCatalog will now also scan the user directory for catalogs.
* Minor cleanup.


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


# 75f152215517c2af1a93938f46d3156503329a5e 18-Sep-2009 Oliver Tappe <zooey@hirschkaefer.de>

* reintegrated gsoc-locale-kit branch into trunk - there's more
work to do, but it's about time to give this code more exposure.



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