Commit Graph

25 Commits

Author SHA1 Message Date
Jonas Sundström 07cffb4786 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
2011-03-11 19:52:15 +00:00
Ingo Weinhold 25dc253d6a * 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
2010-11-22 13:06:36 +00:00
Oliver Tappe 6fd2f4a0d1 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
2010-10-24 12:57:55 +00:00
Oliver Tappe 6f43fabafb * some cleanup in BLocaleRoster
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39018 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-20 09:23:06 +00:00
Oliver Tappe d1d8fda637 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
2010-10-19 21:36:44 +00:00
Oliver Tappe b7f609650b * 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
2010-08-30 19:58:19 +00:00
Oliver Tappe c91aa9f4e6 * 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
2010-08-26 22:16:40 +00:00
Oliver Tappe 039ad7e757 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
2010-08-23 14:46:54 +00:00
Adrien Destugues 5c3a303486 * 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
2010-08-04 18:45:06 +00:00
Oliver Tappe 38ac8def5a 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
2010-08-01 20:28:19 +00:00
Adrien Destugues 1855b44cdf * 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
2010-07-27 09:45:52 +00:00
Adrien Destugues 4ae5a45220 * 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
2010-07-26 13:56:50 +00:00
Adrien Destugues a03aca6e06 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
2010-07-22 12:47:00 +00:00
Adrien Destugues 719313afdd * 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
2010-07-21 17:49:00 +00:00
Adrien Destugues 4b37c7f861 * 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
2010-07-20 15:47:16 +00:00
Adrien Destugues fe8d7c0225 * 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
2010-07-20 11:38:34 +00:00
Adrien Destugues be8fa2fb30 * 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
2010-07-02 11:36:13 +00:00
Adrien Destugues 76a4353b79 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
2010-07-01 11:54:09 +00:00
Axel Dörfler 96eaa02e8f * 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
2010-05-07 17:38:40 +00:00
Adrien Destugues e9024a3be5 * 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
2010-04-11 23:00:25 +00:00
Adrien Destugues 5570fd11c0 - 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
2010-01-20 22:44:34 +00:00
Axel Dörfler f9a80fec95 * 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
2009-11-10 13:44:22 +00:00
Oliver Tappe 75f1522155 * 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
2009-09-18 22:23:34 +00:00
Oliver Tappe 723383c0f4 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
2009-05-01 21:56:16 +00:00
Oliver Tappe c3ac87e8fc * 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
2009-05-01 19:23:59 +00:00