History log of /haiku/src/kits/locale/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
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).

58dbf89d 12-Jun-2020 Murai Takashi <tmurai01@gmail.com>

Locale Kit: Fix PVS V773

Fix BTimeUnitFormat::Formatunction() was exited
without releasing 'timeUnitAmount' pointer.

Change-Id: I1d3cedd3ca376a7874ce5305b31194ae054e1a0c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2911
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

f51ea162 25-May-2020 Augustin Cavalier <waddlesplash@gmail.com>

Locale: Enable folder/application translation by default.

Should fix #16076.

Change-Id: Ibf109453c11a83e840774c079c7878cc10f2dad4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2811
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

ec43e4f4 15-May-2020 X512 <danger_mail@list.ru>

AutoDeleter: do not allow copy

Change-Id: Ieab0fea46fc23c446bbaca407e3e80a4a7901896
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2704
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

755a88de 31-Dec-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

Actual build fix.

c67336bf 31-Dec-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

Build fix.

d57174ea 31-Dec-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

BLanguage: check locale validity in SetTo.

Fixes #15514

70cdd7d4 19-Sep-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

BCountry: add SetTo and InitCheck.

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

60b52ce0 31-Aug-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

HashMapCatalog: handle more standard escpae sequences.

Fixes #14705

994c8567 16-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PVS V603: useless creation of objects

Change-Id: Ia40d26a9a5c1f4b3383b05f94eb8220fbb36583d
Reviewed-on: https://review.haiku-os.org/c/1615
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>

7db28d38 30-Jan-2019 Murai Takashi <tmurai01@gmail.com>

kits/locale: Fix PVS 495

Fix memory leak when realloc() fails.

Change-Id: I9062bb177919805e9973c5afd6bc01f8fbb753b6
Reviewed-on: https://review.haiku-os.org/c/1016
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>

26b2733a 22-Nov-2018 Murai Takashi <tmurai01@gmail.com>

Locale kit: Fix PVS 550, 551

Use BStackOrHeapArray instead of applying auto_ptr to array.

Change-Id: I204dcb97a1bc2d047783bc6015f86b36ca0cc15b
Reviewed-on: https://review.haiku-os.org/725
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

7457ccb4 13-Aug-2018 Augustin Cavalier <waddlesplash@gmail.com>

BMessageFormat: Rename to BStringFormat.

The ICU class is named MessageFormat, but on Haiku, it sounds too much
like something related to BMessage (which it isn't in the slightest)
and not part of the Locale system. It works almost entirely with BStrings,
so naming it BStringFormat makes much more sense.

OK'ed by PulkoMandy and Humdinger.

cd6365c7 17-May-2018 Jérôme Duval <jerome.duval@gmail.com>

style fixes

42745b94 03-Sep-2017 Akshay Agarwal <agarwal.akshay.akshay8@gmail.com>

BDateFormat: Properly map day values to ICU day-of-week.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

bb3ad41a 30-Aug-2017 Akshay Agarwal <agarwal.akshay.akshay8@gmail.com>

Implement functions to get localized long/short dayofweek name and short month name in BDateFormat.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

1e4ab34c 23-Aug-2017 Akshay Agarwal <agarwal.akshay.akshay8@gmail.com>

Implement a formatter for relative dates.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

It can give results such as "in 2 hours", "2 days ago", etc.
This is different from BDurationFormat which will just say "1 hour, 2
minute and 36 seconds"

a1ceb000 30-Jul-2017 Augustin Cavalier <waddlesplash@gmail.com>

Remove even more Locale Kit cruft.

Not included in the build and not used.

01c1bb62 30-Jul-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

Remove more Locale Kit cruft.

BNumberFormat is the way to go for all of this. This code was not even
compiled in.

037ea84b 23-Jul-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

BNumberFormat: add Parse() and GetSymbol().

6cbcfc19 23-Jul-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

BNumberFormat: cache ICU formatters

For performance reasons, it is a good idea to keep the formatters
instanciated, instead of re-creating them each time we need to format a
number.

0e4ad75e 23-Jul-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

Remove more unneeded files from the Locale Kit

All of this is replaced by the single BNumberFormat class.

1d6af34b 21-Jul-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

LocaleKit: remove obsolete files.

Formatting floats is handled by BNumberFormat already.

a19a18f5 28-May-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

Rework BCollator API

- Strength is now set once, instead of at each comparison, to improve
performance and fix potential locking issues
- Add a way to enable "numeric" collation (aka "natural order")

ec6735b5 25-May-2017 Akshay Agarwal <agarwal.akshay.akshay8@gmail.com>

Handle UDAT_DAY_OF_WEEK_FIELD in BDateFormat::GetFields().

Handle the UDAT_DAY_OF_WEEK_FIELD case and assign the corresponding
BDateElement object i.e B_DATE_ELEMENT_WEEKDAY to the fields array
at the appropriate offset.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #13529

f5c544b5 16-May-2017 Akshay Agarwal <agarwal.akshay.akshay8@gmail.com>

Fix style formatting issue in BTimeUnitFormat, update BDurationFormat accordingly.

* Issue: BTimeUnitFormat doesn't incorporate style formatting while
formatting a time unit. Format() does take style as an argument but the
style is not used anywhere. So currently the abbreviated style doesn't
work and by default the time unit is formatted to the full style.

* Fix: Move the style flag from BTimeUnitFormat::Format() to the
BTimeUnitFormat constructors and call the relevant icu::TimeUnitFormat
constructor. Map the Haiku defined style unit to the corresponding ICU
unit. Move the style flag from BDurationFormat::Format() to the
BDurationFormat constructors to map the changes in BTimeUnitFormat.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #13508

b6f76ebe 09-Feb-2017 Augustin Cavalier <waddlesplash@gmail.com>

s/OpenBeOS License/MIT License/ universally, as they're the same thing.

Fixes #8681.

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.

534f2203 15-Oct-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Catalog stub: fix undefinied initiamization order.

As investigated by korli in #13001.

f638c82a 29-Sep-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

StyledText: fix reading of utf-8 documents

BNode::ReadAttrString does not check for the attribute to actually be a
string. It will return B_OK (and useless data) if called on a
B_INT32_TYPE attribute. Check the attribute type before reading.

Also remove various debug ouput leftovers.

May fix #12976.

a71b10d7 27-Sep-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

BTextEncoding: fix naming and move to BPrivate namespace.

08e52491 25-Sep-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

TextEncoding: add Encode/Decode methods.

This replaces convert_from/to_utf8 in a way that doesn't leak memory.

Use the new method in StyledEdit.

Fixes #6252, #3065.

fbb725bb 25-Sep-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Add text encoding detection to the Locale Kit.

As usual we ask ICU to do the actual work. The TextEncoding constructor
is fed with a sample of the text to identify (ICU docs recommend a few
hundred bytes). The text is analyzed in various ways (bytes patterns
such as UTF-8 escaping schemes, common letter sequences from known
languages, byte order marks) and an encoding is determined.

Replace code in StyledEdit by this new implementation.

Note that ICU seems to always return some valid encoding, even with fed
with obviously non-text data. This makes StyledEdit open the files no
matter what, where it would error out before.

Fixes #9395.

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.

56d0435f 02-May-2016 Murai Takashi <tmurai01@gmail.com>

LocaleRoster.cpp: fix gcc6 build

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>

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.

83d5a531 04-Mar-2015 John Scipione <jscipione@gmail.com>

MessageFormat: Use int64 instead of off_t

They are effectively the same thing, but int64 is more generic.

I used an off_t because that is what Tracker passed in, yet, this could be
used in other places where an off_t doesn't make as much sense.

b726ad92 04-Mar-2015 John Scipione <jscipione@gmail.com>

MessageFormat: Use off_t argument instead of int32

Which doubles the maximum width fixing #11809. I wanted to convert this to
a variadic functionbut that would require updating all of the instance that use
MessageFormat or a clever hack to get around the ambiguity of an off_t
argument and an int argument count with 0 arguments. Either way seemed
out of the scope of fixing this bug.

Fixes #11809

Another Beta1 bug down!

658f64c3 17-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

LocaleRosterData: use BPathFinder to locate catalog add-ons

* Makes the code slightly simpler and more future proof.

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

B*Format: make immutable and remove locking

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

Adjust tests and DeskBar TimeView to the API changes.

bb2a5b4d 20-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

DateTimeFormat: set the locale to the pattern generator.

Unfortunately this isn't enough to fix the bug shown by the test just
added.

89397bab 19-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

MessageFormat: use language and ignore formatting conventions.

The formatting conventions shouldn't change the rules used for singular/plural.

64bda0cc 13-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Add missing error check in BMessageFormat

* Avoids a crash when an invalid format pattern is used
* Add tests exercising this with various badly formatted patterns.

26b0a53d 09-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Add parsing support to BTimeFormat.

961fdd8c 08-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

BMessageFormat: parse the pattern at construction

* Instead of parsing the pattern everytime Format() is called, parse it
only once when the object is created.
* Adjust all callers to make use of the feature and reuse the instance
as much as possible. This also allows calling B_TRANSLATE only once
instead of everytime the formatting needs to be done. We use either a
static instance (when the message pattern is constant) or a field (when
it is not known to be constant).
* Since the BMessageFormat instances are now reused, add locking to
avoid race conditions (ICU itself is thread safe, but the format pattern
is recreated when the locale is changed)

824cb460 08-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

DateTimeFormat: handle custom 24 hours clock.

The "j" format pattern selects a 12 or 24 hours clock automatically
depending on the locale, but it doesn't work when the format is forced
in the locale preflet or through the BFormattingConventions API. So we
manually pick either K or H depending on that setting.

892f3b8b 07-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

DateTimeFormat: use the proper format for timezone.

V used to mean the same as z, but was repurposed to someone else. So
actually use z which is what we want.

Fixes #11325.

97d07c8a 07-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Add API for parsing dates.

090a0d76 07-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Add an API to get month names.

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.

0da7796e 07-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Add BMessageFormat class.

This can be used to format complex messages properly. It moves the
complexity of handling plural forms, gender, and anything else needed
into the localizable string, rather than hardcoding it in the code.

This moves the difficulty of handling these things properly to people
doing translations, rather than relying on developers to do it.

Fixes #10755, but our localization must now be updated to make use of
the feature.

df4a02e0 02-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Fix initialization of BTimeUnitFormat

* The default constructor must configure it for the default locale
* Fix uptime not showing in AboutSystem
* Add a testcase for this

e3857211 02-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Move DateTimeFormat and NumberFormat out of BLocale

* ... and adjust all callers
* Remove NumberFormatImpl: we rely on ICU to provide this and it can be
fully wrapped into the C++ file. The class was a stub anyway.
* "Monetary" format is included in NumberFormat for now. There may be a
more generic solution to handle monetary and BTimeUnitFormat (and other
arbitrary units)

03b2550e 01-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Move time formatting to BTimeformat.

* Harmonize API for all B*Format to take an output BString by reference
as the first parameter,
* Move the FormatTime methods from BLocale to BTimeFormat
* Adjust all callers for BTimeFormat, BTimeUnitFormat and
BDurationFormat.

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.

526d4839 30-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

Make BDateFormat mutable

* Add setters for the language and formatting conventions
* Add shortcut getter and setter for the date format
* Use those in the locale roster to make the BDateFormat actually use
the system preferred language and format.
* Applications can also use this to extract specific information from
the system format (eg. set date format to "LLLL" to extract month
names), or define specific formats more easily (eg. for parsing and
generating e-mail headers or HTTP cookies).

f188c1de 30-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

BDateFormat: improve API

* Use a reference rather than a pointer for the output string, removing
the need for NULL checks (which were missing, anyway)
* Adjust callers to that change
* Add new Format variant taking a BDate argument

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.

735ec4d9 14-Aug-2014 Oliver Tappe <zooey@hirschkaefer.de>

Fix LocaleRosterData::CompareInfos.

* The given void pointers are pointers to the actual list items, which
are pointers themselves, so there was an indirection missing
* Fix inverted sort order

This could have caused spurious crashes related to initialization of
the locale kit, most notably this was responsible for triggering a
crashing bug in the plaintext add-on that caused the x86 image
not being able to boot.
I will continue with trying to find the actual crash, too.

219bf21e 11-Jun-2014 John Scipione <jscipione@gmail.com>

Style fixes to Locale Kit, focus on docs.

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.

38fa81bf 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove B_COMMON*_DIRECTORY and kCommon*Directory constants

* This does intentionally break source compatibility, so that a review
of concerned code is forced.
* Binary compatibility should be maintained in most cases. The values
of the constants for the writable directories are now used for the
writable system directories. The values for the non-writable
directories are mapped to "/boot/system/data/empty/...", an empty or
non-existent directory, so that they will simply be skipped in search
paths. Only code that explicitly expects to find something in a
B_COMMON_* directory, will fail.

cf70d345 12-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge remote-tracking branch 'haiku/master' into package-management

This reverts 8f7f28a7c3db28711920ad5d15df401fae90bcf1 (OpenGL: Upgrade
to
Mesa 9.2).

Conflicts:
build/jam/BuildFeatures
build/jam/HaikuImage
build/jam/OptionalPackages
build/scripts/build_cross_tools_gcc4
src/add-ons/opengl/swpipe/Jamfile
src/apps/diskusage/Jamfile
src/kits/tracker/ContainerWindow.cpp
src/kits/tracker/DeskWindow.cpp
src/kits/tracker/Jamfile


b0944c78 01-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

More work towards hybrid support

* All packaging architecture dependent variables do now have a
respective suffix and are set up for each configured packaging
architecture, save for the kernel and boot loader variables, which
are still only set up for the primary architecture.
For convenience TARGET_PACKAGING_ARCH, TARGET_ARCH, TARGET_LIBSUPC++,
and TARGET_LIBSTDC++ are set to the respective values for the primary
packaging architecture by default.
* Introduce a set of MultiArch* rules to help with building targets for
multiple packaging architectures. Generally the respective targets are
(additionally) gristed with the packaging architecture. For libraries
the additional grist is usually omitted for the primary architecture
(e.g. libroot.so and <x86>libroot.so for x86_gcc2/x86 hybrid), so that
Jamfiles for targets built only for the primary architecture don't
need to be changed.
* Add multi-arch build support for all targets needed for the stage 1
cross devel package as well as for libbe (untested).

517050ad 13-Jul-2013 Murai Takashi <tmurai01@gmail.com>

BCollator::Archive(), use free() instead of delete

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

e5ab37ae 13-Jul-2013 Murai Takashi <tmurai01@gmail.com>

Fix "Called C++ object pointer is null" for EditableCatalog.cpp

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

178da21a 13-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Update icu package

Also use the new build feature rules.

04b78a40 11-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Fix #9659.

BUnicodeChar::ToUTF8() had the same regression as ::FromUTF8() as far as
not advancing the input string pointer, which broke building
case-insensitive queries.

26f129ef 09-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Fix #9649.

- Fix regression introduced in hrev45462: BUnicodeChar::FromUTF8 was no
longer advancing the passed in string pointer, resulting in endless
loops in functions relying on that behavior such as the locale kit's
CoerceFormatTo*() functions.

b6fd91b4 01-Apr-2013 Siarzhuk Zharski <zharik@gmx.li>

Switch BUnicodeChar to wrap the ICU's UChar32 one

Improve the unicode character processing and classifying routines by
wrapping up the UChar32 procedures from ICU. That fixes functional
regression introduced in hrev38017 and allows to fix East Asian Width
problems int the Temrinal.

37fb2473 23-Jan-2013 Matt Madia <mattmadia@gmail.com>

Renamed ReadOnlyBootPrompt to FirstBootPrompt.

The previous name is no longer applicable, as *BootPrompt is now launched on
the first boot of writable medium (e.g., USB thumb drive and hard drives).
Fixes part of #9399.

Notes:
* BootPrompt.rdef may have lost its history.
* The renaming was done with the following command:
git mv src/apps/readonlybootprompt src/apps/firstbootprompt

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.

f139447d 24-Nov-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Fix catalogs stored in resources
We used the hash of the language code as a key for identifying catalogs.
However, hash do collide, and in particular, "en" and "fi" have the same hash.
Identify catalog resources by name instead.

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

Adjust Locale Kit to no longer use syslog

11c9f9a1 18-Nov-2012 Alex Smith <alex@alex-smith.me.uk>

Merge branch 'master' into x86_64

Conflicts:
build/jam/FloppyBootImage
build/jam/OptionalBuildFeatures
build/jam/OptionalPackages
headers/private/shared/cpu_type.h
src/bin/ps.c
src/bin/sysinfo.cpp
src/kits/tracker/PoseView.cpp
src/preferences/appearance/DecorSettingsView.cpp
src/preferences/virtualmemory/Settings.cpp
src/servers/input/AddOnManager.cpp
src/servers/input/InputServer.cpp
src/servers/input/InputServerMethod.cpp
src/system/boot/Jamfile
src/system/boot/platform/raspberrypi_arm/mmu.cpp
src/system/boot/platform/u-boot/arch/arm/Jamfile
src/system/kernel/arch/x86/arch_cpu.cpp
src/system/kernel/arch/x86/arch_thread.cpp
src/system/kernel/cache/block_cache.cpp
src/system/kernel/vm/VMAnonymousCache.cpp


f5df0bc8 04-Nov-2012 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Use uppercase country codes in catalog names.

nielx+pulkomandy: With the switch from Pootle we switched to the correct
representation of country codes by using lang_COUNTRY (instead of lang_country).
Haiku did not respect that yet and instead always looked for lower case country
codes, thus not finding all the hard work of the pt_BR team.

Other translations currently affected are en_CA and en_GB, though these are not
actively maintained.

+alpha4

379dcaa1 19-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Look up the entry_ref for a signature for localized file names.

Fixes #8124.

e688bf23 16-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Merge branch 'master' into x86_64

Conflicts:
src/servers/app/ServerWindow.cpp


86e47974 15-Aug-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Fix build.

3b85241a 15-Aug-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Fix build.

7dfdb91a 15-Aug-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Fix language mapping again for indi.

4be15fbb 14-Aug-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Add language to country mappings for ReadOnlyBootPrompt
* Greek > Greece
* Croatian > Croatia
* Pakistanese > Pakistan
* Indi > India

9be774b5 30-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Compilation and 64-bit fixes to libbe.so sources.

Fixed the usual issues - printf format strings, uint32 instead of
addr_t, etc. One thing that isn't so nice is several places where
BList is used to store (u)int32, these require a double cast to addr_t
then void* to silence a warning on x86_64.

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

5ac65b7f 14-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More cleanup in locale kit, this time regarding namespaces.

* it's bad practice to do a 'using <namespace>' in a header, as that
is very likely to have unintended effects, so drop those from a couple
of private Locale headers
* adjust files all over the locale kit in order to fix the problems
(by explicitly importing the required classes in the implementation
files)

16e50923 14-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Extract EditableCatalog from Catalog.{h,cpp}.

* move EditableCatalog to its own header and implementation file
* move problematic BCatalog::CatalogAddOn() to EditableCatalog
* adjust Locale tools accordingly

3cf2d117 14-Apr-2012 John Scipione <jscipione@gmail.com>

Change Time Format Options in Deskbar preferences.

Added two new methods to the Locale Kit in order to create a custom time
formats from a format string. One method is outputs into a char* array,
the other into a BString() and you can set the timezone.

These methods should be cleaned up, we only need 2, one to get
the time in a predefined style, the other to get a custom time format.
Also should probably do the same for dates and datetimes. But I'll let
this go for now.

I added myself to the Locale.cpp file. I retained the copyright instead
of assigning it to Haiku, Inc. because the file is under the OpenBeOS
license and I don't know what the concequences of copyright sharing are
for that license, unlike MIT.

These new methods are used to generate custom time formats in Deskbar.
Instead of using a set of Radio Buttons to choose between the predefined
time options I build my own by creating a format string and passing it
to the Locale Kit. The format string is generated from 3 checkboxes,
show seconds, show day of week, and show time zone. You can mix and match
between them choose any that you like. By default they are all off.

There are 3 new deskbar settings associated with these new options:
showSeconds, showDayOfWeek, and showTimeZone. timeFormat has gone away.

The time format string gets cached and updated only when Update() gets called
on the TimeView class.

In order to fit all the options in (there is 1 more than before) I had to
reduce the font size of the clock to 11pt when all options are turned on in
12 hour mode. For those with no imagination it looks like this:

http://imagebin.org/208162

Renamed "Open time preferences..." menuitem to "Time preferences...".
Renamed "Show Time" and "Hide Time" to "Show time" and "Hide time".

Other changes include refactoring the header files a bit. There were a lot
of headers included by header files uneccessarily. For instance BarWindow.h
now only includes <Window.h> and <Deskbar.h>. This change is mainly to
to speed up the compile time since it takes a while right now.

I copy the fBarView pointer from BarWindow in the BarApp constructor and then
use that throughout the file rather than getting the pointer from the window
each time by calling BarView(). BarView() is still available in the header
for other classes though.

I moved some message constants around since it was getting a bit jumbled.
Most of the messages related to settings are in PreferenceWindow.h.
fChangeState is moved to BarView.h since that is where the ChangeState()
function is and BarView.cpp uses that constant.

The time interval and format constants are in TimeView.h.

Make some methods public in their respective classes where it made sense.
The preference window methods to update dependent items are public, that
might get called from BarWindow when a message gets received at some point.

Also made ShowHideTime() and Time() public in StatusView.h. These methods
activate showing and hiding the clock and return the fTime clock object.
No reason they should be private.

I reindented the StatusView.h and PreferenceWindow.h headers to the standard
style. Question here, are the public: protected: and private: lines inside
of classes suppose to get indented 1 tab or not? I've seen both, the style
guide says no indent but 1 indent seems reasonable and looks pretty good.

Style fixes here and there. That's enough for one commit I think.

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

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

Make BCatalog threadsafe.

* use a locker to protect the CatalogAddOn-chain against parallel
access
* rename BCatalog::SetCatalog() to SetTo() and make it a proper
initializing function
* adjust implementation of BLocaleRoster accordingly

250eca32 14-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Start cleanup of Catalog.{h,cpp}

* unify pointer style (to type* )
* always use boolean expressions in if
* introduce some spacing for better readability
* make a couple inline methods non-inline

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

Revert "Fix access to system catalog strings."

This reverts commit 6d2186615f664194649a4129cf73d7f37696cd40.

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

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

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

6d218661 06-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Fix access to system catalog strings.

* fix regression introduced in hrev43950:
HashMapCatalog::GetString() didn't return the non-translated
string in case there was no translation found, which e.g.
caused AboutWindows to trigger a debugger message about the
alert not having any buttons.
Thanks to diver for the hint.

60f75e90 04-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Merge liblocale.so into libbe.so.

* Make the locale kit a part of libbe.
* Drop the LocaleBackend kludge used from within libbe (and from
other places, too) in order to access system catalog strings.
This is now done via gSystemCatalog, which is provided and initialized
by libbe.
* Drop all references to liblocale.so from all Jamfiles.
* Add legacy symlink liblocale.so in order to keep optional packages
that rely on it in a working state.

TODO: the documentation hasn't been updated.

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>

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

d68d73f7 27-Dec-2011 Oliver Tappe <zooey@hirschkaefer.de>

Improve timezone names returned by BTimeZone.

* Use TimeZone::SHORT specifier instead of SHORT_COMMONLY_USED, since
the former yields more appropriate (textual) values. Strangely enough,
it used to be the other way around, which is why we didn't used SHORT
in the past.

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.

740ae7fe 02-Nov-2011 John Scipione <jscipione@gmail.com>

Return B_ERROR if a locking error occurs in while locking the BLocale object, return B_BAD_VALUE if an ICU error occurs or the passed in value is NULL. Update BLocale API documentation to reflect this and also add some more documentation fixes. Closes #7901 pending confirmation.

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

1a5c1f9e 01-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Use const references instead of pointers for the read from/write to
attribute/resource method in locale kit catalogs
* Only load the embedded catalog if nothing else was found, so it can easily
be overridden
* Change the resource type to 'CADA' (CAtalog DAta) for embedded catalogs, and
use a hash of the language code as the resource ID. This allows multiple
languages to be stored in the same file and does not interfere with the user
storing his own BMessages as resources.


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

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

924ead9a 31-Oct-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Coding style
* Stub out the unneeded code in the buildtool version of DefaultCatalog.


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

48215ce4 30-Oct-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Use a more correct mimetype for libbe catalogs.


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

92bae21a 29-Oct-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Try to load resource-embedded catalog from application. Should fix #8037.


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

6846765f 07-Sep-2011 Oliver Tappe <zooey@hirschkaefer.de>

Work on #7947 (CalendarView not respecting locale's start of week)
* support all weekdays as start of week, not only Sunday and Monday
(at least Saturday is used for real, too)
* introduce BWeekday as enumeration of weekdays (currently in Locale.h,
may be moved somewhere else later)
* change CalendarView to use BDate as its model, not individual values
for day, month and year, such that no more date computation is done
in CalendarView itself
* some more style cleanups in CalendarView along the way
* add monthwise paging to CalendarView
* adjusted Deskbar and Time preflet accordingly


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

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

5ff6f0d4 09-Aug-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch by John Scipione : use B_WOULD_BLOCK when locking fails, to avoid returning B_ERROR like when there's an ICU error.


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

6c22c453 14-Jul-2011 Joachim Seemer <humdingerb@googlemail.com>

Applied patch by taos to show Slovakian flag in ReadOnlyBootPrompt. Fixes #7806. Thanks.

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

3191427a 10-Jul-2011 Axel Dörfler <axeld@pinc-software.de>

* Moved the resource loading into a separate private function
load_resources_if_needed().
* Renamed the Esperanto flag resource to "eo" since it is a language; language
specific flags are now found by their two letter language code.
* This closes ticket #7614, as the Esperanto flag is now found and displayed
by ReadOnlyBootPrompt.
* Rearranged code in BLocaleRoster::GetFlagIconForCountry() to make it more
readable.


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

5719d5c9 31-May-2011 Joachim Seemer <humdingerb@googlemail.com>

Added LanguageFlags.rdef with the Esperanto flag data. Now Axel can play with it, see #7614. Thanks.

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

547a76fe 31-May-2011 Joachim Seemer <humdingerb@googlemail.com>

Removed the Esperanto flag again from the rdef, as it's not country, as correctly pointed out by Axel.

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

18384171 30-May-2011 Joachim Seemer <humdingerb@googlemail.com>

Added flag for Esperanto. Updated CountryFlags.rdef. Thanks dejam for noticing. Fixes #7614.

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

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

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

* Minor cleanup.


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

ee3d8836 21-May-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

* BHashMapCatalog::SetString(): Also process escaped characters in the comment.
Fixes #7543 (ReadOnlyBootPrompt only showing English welcome text).
* Disabled fingerprint check in linkcatkeys. Fingerprints change due to the
BHashMapCatalog::SetString() change.

+alpha 3


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

f79510c1 04-May-2011 Joachim Seemer <humdingerb@googlemail.com>

Changed comment prefix from # to //. Thanks yourpalal.

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

8235ff07 29-Apr-2011 Joachim Seemer <humdingerb@googlemail.com>

* Added all yet missing flags (245 all in all) plus some more optimizations.
* GS, KY and PN all share the same flag, because I'm too lazy to add their
specific code of arms, which one wouldn't recognize in the small flag
anyway... At least every country is now listed in CountryFlags.rdef, so
anyone can improve flags and simply replace the rdef data there.
* Added newly generated CountryFlags.rdef
* Added little script to create CountryFlags.rdef to build/scripts/ just in
case.


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

2a06b5bd 02-Apr-2011 Oliver Tappe <zooey@hirschkaefer.de>

Closing #6721: avoid unescaping when linking catalogs together
* add SetRawString() to both implementations of DefaultCatalog which sets
the translated string as given
* use SetRawString() in both (standard- and build-)versions of linkcatkeys


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

4115645a 17-Mar-2011 Siarzhuk Zharski <zharik@gmx.li>

Localization of some UI parts:
- context menu of the replicant dragger. Fixes #7363;
- default <empty> menu placeholder. Fixes #7072;
- other messages used in PrintJob, Dragger and ZombieReplicantView classes.



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

d7f342e8 15-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Simplifying the BAboutMenuItem and adding it properly to the locale kit's DoCatalogs list.

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

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

0805772b 25-Feb-2011 Jonas Sundström <jonas@kirilla.com>

Use the correct ICU country code for the Swedish flag resource.

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

4153964a 25-Feb-2011 Stephan Aßmus <superstippi@gmx.de>

Moved IconUtils.h to Interface Kit and therefor made it an "official" header. Since the class has no
virtual but only static methods, it is not so likely that binary compatibility issues may arrise
from using it in new apps. Adjusted all the Jamfiles that included the private libicon headers. Note
that it was never necessary to link against libicon.a, since it's part of libbe anyway. There was one
instance where that was done. Hopefully it does not break the build, but I did this change a while ago,
tested it and then the harddrive began failing.


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

83d2f587 20-Feb-2011 Rene Gollent <anevilyak@gmail.com>

Style fix.



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

f16c55b0 20-Feb-2011 Rene Gollent <anevilyak@gmail.com>

Due to the changes in r40529, the resource data pointer was no longer pointing to static data.
Consequently the locale kit would fail to load resources since the pointer was no longer an address within the liblocale.so image,
with the result that things like flag bitmaps would no longer be accessible.
Fixes #7246.



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

efccf04a 16-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Second (and last) part of fixing #7226:
* fix most obvious problems in parseQuotedChars()
* drop separate HashMapCatalog in tools-folder, which isn't much
different from the original one (we now just use that one instead)


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

91f0846f 27-Jan-2011 Ryan Leavengood <leavengood@gmail.com>

Add a default right click context menu to BTextView.

This fixes #7022 and is mostly based on the patch attached to that ticket, with
these changes:
- The patch was adding this to the private _TextInput_ class, not BTextView.
- The patch had a Clear menu item too. I removed that due to the different
semantics between Clear in a BTextView and in a TextInput. The former just
clears the selection where the latter clears the whole view.

We could later add a virtual callback for adding menu items to this context
menu which could be used to add Clear with the two semantics in each class
(this is mainly needed for the enabling logic...each class could handle a clear
message in its own way.) This callback could also obviously be used for other
things, like a spell-check menu or whatever an application would want to add.
Since BTextView has 10 free virtual slots it seems reasonable to add.


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

d2f34ea3 22-Jan-2011 Siarzhuk Zharski <zharik@gmx.li>

Fixed cosmetic problem in diagnostic messages: one space was missed, one was extra.
Pointed by Diver. Thanks!


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

0119051c 22-Dec-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix CID-2358:
* check result of BMessage::FindString() (plus more ...)

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

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

Fix CID-2460:
* check result of BMessage::FindString() (plus more ...)

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

10c73bcb 20-Dec-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Don't returns NULL if the systemCatalog is not localized yet. Instead, fallback
to native string.


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

5ae52982 17-Dec-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Made BAboutWindow class localized.


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

a528bdee 01-Nov-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Make ReadOlyBootPrompt look a bit nicer : don't use a regular BTextView but a custom view with an "haiku background leaf outline" below the text. The color and size of the leaf may still be altered, feel free to play around with it.
* Also do some changes to ReadOnlyBootPrompt layouting to include some insets and similar stuff.
* Add country flags in the language selection menu
* Modify locale roster method for getting a flag so it is a bit more tolerant. It is case insensitive on the country code, and also works if given a full locale code such as pt_BR.

Known problems :
* The new BitmapTextView doesn't work well with the chinese text as it does line breaks only on space chars (0x20), and there is no such char in chinese text. However, the usual BTextView is also unable to do proper linebreaking. This should
be solved by using tools provided by ICU.
* The way I altered LocaleRoster is not as good as it could be. Locales with variants such as zh-hans are not going to work (the computed country code is now 'NS'). Not sure there is a better way
* The way the list is sorted in ReadOnlyBootPrompt is annoying as it prevents keyboard navigation. As the sorting changes each time you select a language, it's impossible to travel through the whole list. One possible solution is to do the
language change on invoking an item. Another one is to sort the languages in a locale-neutral way.


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

2bd0cd6c 30-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* improved const-correctness of BLocale

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

6e30c4b8 30-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* rename BTimeZone::Accessor to BTimeZone::Private to match the other
private accessor classes
* adjust style in BTimeZone::Private implementation to match other classes
of this kind


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

f3dd81ab 29-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* style adjustments

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

f059c93c 28-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* minor cleanup

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

81fe5a92 28-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* re-added GetAvailableTimeZones() to BCountry - it is now a convenience wrapper
around BLocaleRoster::GetAvailableTimeZonesForCountry()
* minor cleanup

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

9ef134d9 26-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* added timezone-support to some more date/time-formatting methods in BLocale

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

aa8372c4 24-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* changed BTimeZone to use BLanguage instead of BLocale, as that what represents
the locale of messages (timezone names in this case)

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

bca1690b 24-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Preliminary support for adjusting the money format in the locale preflet :
* API for formatting a number and recovering the field positions
* Some changes in the preflet to display the formatted number and start filling in the fields.


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

3bdedcf3 24-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* added support for getting the names of a timezone for a specific locale
(not currently used anywhere, but should be part of the BTimeZone interface)

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

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

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

ee338625 16-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* dropped one more instance of debug output

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

f23b9d8a 16-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* added possibility to pass in the timezone when formatting the time
* added TODOs about the need to get rid of some of the date/time-formatting
shortcut methods

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

0417c0fd 10-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Remove everything related to direct access to unicode.properties file. All of it should be done through ICU.


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

15575718 11-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Don't build stubbed and useless files in liblocale.so


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

5509491f 10-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Style fix. Sorry, looks like I spent too much time on other projects today.


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

aed7e5e9 10-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Make BCountry::Measurement() actually do something useful.


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

c9b2be8b 07-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

CID 1643 : Off-byÃ-one rray access.


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

4a7b2e04 07-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Add FormatDateTime function to BLocale
* Use the function to localize the date/time in tracker.


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

e4da3d66 05-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* added support for all the different names (std/dst, long/short) and daylight
support to BTimeZone

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

4ebeabb6 05-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Remove GetLocaleName from BCountry
* Add GetName to BLocale instead


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

3bf890b9 03-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* do not leak ICU timezone
* minor cleanup

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

a09c2bb3 03-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* ReadOnlyBootPrompt finally saves the locale settings again, so at first bot the system will be in the right language.


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

5dbb457c 03-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Allow ReadOnlyBootPrompt to change languages at runtime again.


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

99d2aa98 29-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

Improved the Time preflet (still not working properly, though)
* basically rewrote TimeZone to sport a nicer to use interface
* adjusted all users of TimeZone accordingly
* changed TZDisplay to show the Date next to the label, in
order to avoid that long timezone names draw all over it
* the timezone listview is now properly sorted according
to the current language (using BCollator)
* fixed a couple of bugs (overflows, etc.) that caused
incorrect GMT offsets to be used during computations


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

8b39afea 28-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix wrong function call in TimeZone.Code() leading to a localized string being returned instead of the expected code.


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

1c990309 28-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Style fixes pointed out by Axel.


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

e88fbde6 28-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix some issues in collators archiving and key computation
* The test now pass. But unarchiving still isn't working and restores the default collator instead of the archved one.


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

2c6ebfaa 28-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix collator text
* Fix archiving/unarchiving to provide at least a valid object. However, ICU archiving system doesn't look like it's working well.


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

110649a1 28-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Collator API now actually uses ICU.


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

c090a0fd 26-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* updated ICU build packages with newer builds that try a bit harder to avoid
warnings and incorporate some of the ICU-patches we had in our repo before
we upgraded to 4.4.1
* fixed remaining warnings when building locale kit
* activated EnableWerror for locale kit
* added 'Unicode' license, which is the second license in use by ICU


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

b891b0ac 23-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* broke out locale-related jam rules into their own file, LocaleRules
* made locale build tools shut up about anything except warnings or errors


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

282582c0 23-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Bcountry : private methods start with underscore. The timezone list isnow actually a list of BTimeZone objects, that holdsall the needed info, not only the code. Also tweak the listing code to
remove duplicatesfromthe list generated by ICU.
* BTimeZone : remove Code, rename Name to GetName. The class is likely to change again for further optimization.


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

2774e142 23-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Add a BTimeZone class for handling time zones.


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

6c178e1e 23-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Add locking system to BCountry to avoid problems with the formatters being deleted while you use them, or created multiple times.


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

eaf70455 23-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Ensure if ICU formatters allocation fails, we return an empty string
* Use a CheckedArrayByteSink for formatting to a char*, instead of allocating a BString then copying it back to the buffer using strncpy


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

f48ad0d9 22-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Style fixes (some pointed out by Axel, some others by the vim stylechecker).


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

d4f3002d 22-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* BCountry : add error checking in case the system runs out of memory, cleanup function prototypes (we don't need virtual, this was a leftover of
OpenTracker days)


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

3bdfd7f3 22-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* BCountry : use lazy initialisation for the date and time formatters, since they are not always used. Makes instancaiating a country faster, and
so, loading the locale preflet is also faster and use less memory.


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

9a78a691 21-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Locale Roster : add a function to update the settings from a BMessage
* Locale preference : send such a message broadcast to all applications when the settings are changed
* Deskbar : receive the message and forward it to the locale roster. This way the time display on the deskbar changes as
soon as you close the locale preflet.


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

82a115e8 21-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* BCountry : add copy constructor and assignment operator
* The locale roster uses them instead of messing with pointers, to avoid ownership problems
* The Locale preflet works on a copy of the default country instead of altering it directly


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

5d498edb 21-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Removed registering of non-existing application as preferred for catalogs.


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

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

* Locale Roster : exclude the "gcc4" and "gcc2" folders when searching for add-ons. Avoids an useless debug message.


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

2aeaae99 21-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Locale Roster : store an instance of BCountry instead of replicating all of its intrnals and creating instances on demand
* Locale preflet : save the time formats to the settings file if they are different from the defaut.


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

2d67f5fc 20-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Locale preflet : make the 12/24hr switching system more robust and lossless
* When selecting chinese, the AM/PM stays at the beginning of the string
* When clicking multiple times on the 12 hours button, the AM/PM indicator is added only once.
* Only regression : the default format for cherokee (US) uses a 12hour clock without AM/PM indicator, so it is not possible
to switch it to a 24Hr clock scheme.


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

0e23b87f 19-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Style fixes as pointed out by Ingo. Sorry !


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

30478150 19-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix \x parsing in collectcatkeys again (thanks to Kaliber)
* Hide the CatalogStub::GetCatalog method so that if liblocalestub.a is missing from a localized image, it will not try to steal the catalog of another one.


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

e2cc7215 19-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix bug spotted by Rimas Kudelis : if an escaped sequence (such as \xA9) was immediately followed by other digits,
collectcatkeys parsed all the digits instead of just the two associated to the \x, leading to wrong characters in thecatkeys
file.


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

7af097b9 16-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Add FormatDate variant returning fields positions and associated DateFields returning their identifiers
* Use them in the time preflet to display and edit the date in a local-aware way


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

7ad694e3 15-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

Some more ICU-related improvements:
* updated icu-devel package to 4.4.1
* create appropriate devel lib links when icu-devel is being installed
(which only works during build, not when using installoptionalpackage)
* dropped ICU headers from repository and instead fetch them from the
icu-devel package when needed during the build
* adjusted Jamfiles that make use of ICU-headers accordingly (hopefully
I didn't miss any)
* fixed license in OptionalPackage description of icu packages


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

a7e183f8 14-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

BDateField is already used in ColumnListView, so use another name for this enum.


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

57500c63 14-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Allow use of unicode character in time view
* Some support for languages having an order different than H:M:S:AM (like chinese). Does not seem to work too well, but I can't spot what I missed
* API to get the infos about the type of each field in a time format


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

c96d1da7 14-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Add an API to get a formatted time along with delimiters for the differrent fields, for further parsing/formatting


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

5098ba1b 13-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Update ICU to 4.4
* Remove 4.2 sourcecode
* ICU is now an optional package (mandatory)
* Adjust the namespaces and libraries names where needed


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

080f483b 13-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Make locale kit Hybrid build aware, so that the catalog add-ons will be available for gcc4 applications.


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

51145d87 08-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Support for setting 12/24Hr mode in locale preflet.


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

2f0eb7b1 02-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Introduce a new method in BCountry to get the first day of week (monday or sunday)
* Localize date in deskbar properly, and use the new API to show the calendar. The "show european date" checkbox is now gone.


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

757e7059 02-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Patch by Jorma Karvonnen updated by me : localize NetworkStatus
* Fix a small bug in LocaleRoster : a / was left out in the mimesignature. Didn't cause any harm, but it's cleaner this way.


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

17f902d7 01-Jul-2010 Rene Gollent <anevilyak@gmail.com>

Don't leak the time formatter. Fixes ticket #6250.



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

b5e52140 24-Jun-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fixed a typo in filename of Austria flag
* Converted all the flags to rdef and put them in use.


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

3fc995d1 24-Jun-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Deskbar now uses localized time from locale kit. Thus the "24 hour
clock" setting is not needed anymore.
* The locale kit now provide a less complete 'full' time format : hour
minutes seconds, I don't think anyone cares much about the "UTC + 1" or
other similar stuff.


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

a478859f 05-Jun-2010 Stephan Aßmus <superstippi@gmx.de>

Added liblocale and the ICU libs to the libbe_test target (app_server test
environment). Allows "TARGET_PLATFORM=libbe_test jam install-test-apps" to
build cleanly again.


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

fd49f484 26-Apr-2010 Oliver Tappe <zooey@hirschkaefer.de>

* removed debug output

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

0638c3ab 15-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Add some more icons for better testing
* Use the country name instead of the language name to identify each icon
* Cleanup, fixed copyrights, and some more checks to avoid crashing in case of a missing icon


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

ffbcecd4 15-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Add support for flags in BCountry. The flags are stored as HVIF icon resources in liblocale.so.
Test french flag took from http://www.bastisoft.de/misc/flags/ (licence is very permissive), converted to HVIF with Icon O Matic.


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

87158047 15-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Add a call in BCountry to get an icon for that country.
Untested and not working yet since we don't provide any icon.


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

e6769b02 15-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Fix Language::GetName using the system-wide language settings instead of the current application one. Make ReadOnlyBootPrompt localize the list instantly when you select a language in it.


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

eec1db5a 14-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Fix language display i ReadOnlyBootPrompt :
* On a simple language like "fr", it will display "French"
* On more complex things like "pt_BR", it will display "Portuguese (Brazil)"


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

0223612e 14-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Fix bug that crashed ReadOnlyBootPrompt. Basically it would not check the right function in the catalog addons before calling it.


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

80254771 14-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Implement a function to get all the available languages for a given application
* use it in readonlybootprompt instead of previous workaround code.
This makes the readonlybootprompt faster and lighter as it doesn't open and parse all the catalogs anymore, but only checks for their existence.


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

18383104 14-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Fix generating en.catalog for the system, it was missing some strings, leading to StringForSize not working properly in english. Sorry !


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

e7e7e5b3 13-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Style fix spotted by Jérôme Duval.


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

6e412697 13-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Non-localised applications will not manage to get the system catalog. Provide a fallback in this case.
This allows to use ColorControl in non-localized apps. In that case, it will not be localized either.


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

4343960f 12-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

olta+pulkomandy:
* Introduce an add-on system to allow libbe to call things living inside liblocale (as liblocale depends on libbe, it can't be linked the usual way)
* This allows localizing the BColorControl class that had some text inside it.


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

f237e418 15-Mar-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix a small bug in BLanguage::GetName
* Use BLanguage in AboutSystem to get the names of the languages in the credit list, no need to add useless work for the translators
* Add some contributors to the credits for japanese translation


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

a7764b30 09-Mar-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Change the catalog loading so it will crawl up the catalogs even if the rt root one is not found. This will allow to load "fr" even if "fr_FR" is not found. This way the preflet in its current state works again.


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

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

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


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

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

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


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

cee04e80 08-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Fixed various errors/warnings reported by cppcheck:
* memory leaks
* resource leaks
* added const's to getters
* removed a few reundant conditions


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

e6a7a30e 31-Jan-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

This should have been part of previous commit :
Add Language->IsCountry to tell if a language holds a country specifier (like fr_FR) or not (fr alone). This allows separating them in the preflet.


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

a292eb4a 20-Jan-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Removed useless static qualifier on some variables that made them behave weird.


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

005a5d0b 21-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Stumbled across some problems while using the Locale Kit and added TODOs
accordingly.


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

c668114b 26-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed broken FormatMonetary() versions which also fixes a warning.


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

ad34440e 27-Oct-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

-Removed unseless reference to adler32 in hashmapcatalog
-Localized Keymap preflet and translated it to french


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

6bf3fe1f 28-Sep-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Fixed handling of \xNN in strings. This way it is possible to translate a string even if there is a B_UTF8_ELLIPSIS or some other weird char in it. Improves the bluetooth preflet translation :)


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

e6b7213c 28-Sep-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

-Fingerprint checking now use a simple sum of the hash values, instead of the adler32 algorithm. This allows to match a catalog even if, due to the hashmap instanciation, it is not iterated in the same order. Updated all the existing catkeys files to match this new system.
-As the fingerprint is now fully working, all catkeys fingerprints are now checked, and if they don't match, the build will fail.
-This helped find an error in the Locale Preflet french catalog. It now works again.
-Usual set of cleanups and small style fixes.


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

0a255c0c 27-Sep-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Cleanup of the locale kit tools :
-Jamrule for collectcatkeys no longer print all the strings, only a message when it can't parse one (happens for TR(variable) basically)
-Added fingerprint check in the plaintext catalog ReadFromFile. However, the adler checksum is different each time the catalog is loaded because it relies on the string being iterated always in the same order, but this is not always the case with an HashMap ! Some rethinking is needed, so disabled the check for now so it does not breaks the build
-Some try to debug the bluetooth preflet localization. Still buggy, but I wanted to commit all this mess before I break everything up again.
-Also sorted the fr.catkeys files to be in the same order as the autogenerated en.catkeys (this is useless but makes them easier to check) and updated their fingerprint even if they are still not checked.
-Miscelaneous style fixes, small bugfixes, more error checking and error messages saying where they come from.


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

9ac21cc7 21-Sep-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Fixed the language listing so the preflet allows you to select your preferred languages in a working way.


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

b2543193 20-Sep-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

-Started to localize the appearance preflet to find more locale kit bugs. It worked.
-MarkForTranslation was not scanned by collectcatkeys, improved the regexp to take it into account
-Some gristing was missing in jamrules, added a bit, still seem to miss some.
-Replaced $(var:B).ext with $(var:S=.ext) as it is the proper way in order not to loose grist and mess things up
-Removed icu include and replaced direct class nesting with pointer to avoid binary compatibility breakage on ICU updates.
-Fixed TimeFormatSettingsView to properly include needed icu things. Should not be there, actually. Needs cleanup.


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

76065080 20-Sep-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

-Delete some old unused files
-Some style fixes (mostly whitespace)
-Switch to the short language list and make it build again. seems to have trouble with BStringByteSink and utf8, or is it just my build env having encoding problems ?


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

fb581e32 18-Sep-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Fixed licence headers.


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

d837161f 06-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* moved locale language files from B_BEOS_ETC_DIRECTORY to
B_SYSTEM_DATA_DIRECTORY, as that seems more appropriate


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

13be439c 02-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* should be linked against target-c++-lib (as I'm told by Rene)

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

89b5d397 02-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

err, fix for my fix:
* its __GNUC__, not __GCC__, tsk!

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

6449afb1 02-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

fix gcc2 build:
* __gnu_cxx namespace is unknown to gcc2

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

0d487f65 02-May-2009 Rene Gollent <anevilyak@gmail.com>

Move using directives into the cpp files so they don't leak into apps making use of the locale kit.



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

a0352959 02-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* followed advice by Rene to explicitly import the used std-classes instead
of simply importing the whole namespace - thanks for proofreading!


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

3a268d90 02-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* applied several fixes to make locale kit buildable with gcc4, too
* actually, all those fixes were already contained in PulkoMandys patch,
but I just missed that :-/


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