History log of /haiku/headers/os/locale/Catalog.h
Revision Date Author Comments
# 7d5b913b 03-May-2024 PulkoMandy <pulkomandy@pulkomandy.tk>

BCatalog: declare GetString as format_printf function

This tells the compiler that this function takes a format string as a
parameter, and returns a "similar" string with the same formatting
operations. This allows the format string to "propagate" to prinf-file
functions (including BString::SetToFormat) and the format string to be
actually checked with the arguments passed to that function.

Without this, all translated strings were not checked to match with
their arguments.

Change-Id: I5c3c5cbfe7dfede9a6f45cad47a7524f9138fac0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7663
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 2cba2d56 04-Jan-2013 Dancsó Róbert <dancso.robert@d-rendszer.hu>

Added localization support for Cortex app.

* Fixes #7530.

Change-Id: I238c4c8fe32b181a8e1a4bd688bcbe9f3a87f79f
Signed-off-by: Kacper Kasper <kacperkasper@gmail.com>
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3169
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


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

locale kit: allow creating a catalog without entry_ref

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

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

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

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

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


# 10374188 30-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PVS V542: operator precedence issue accross macro expansion

In CodyCam, we attempt to cast the result of this macro to const char*.
However, the ternary operator has lower priority than the cast so it
doesn't work as expected.

Add some protective parentheses here.

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


# d64c7746 04-Aug-2017 Owen <owenca@users.noreply.github.com>

Add B_TRANSLATE_MARK_CONTEXT to Catalog.h and tools/CollectingCatalog.h

Fixes #13656

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


# e19d7089 16-Aug-2012 Oliver Tappe <zooey@hirschkaefer.de>

Fix #8841 (broken localization support for 3rd-party apps).

* made private Catalog.h header public by moving it to
os/locale/tools/CollectingCatalog.h
* reintroduce B_COLLECTING_CATKEYS define (which is expected to be set
during a collectcatkeys session) in order to decide whether or not
to automatically include the CollecingCatalog.h header from Catalog.h
* adjust jam rule for collecting catalog keys accordingly


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 248f2283 15-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Final part of cleanup in Catalog.h.

* move versions of the B_TRANSLATE_...-macros used during collecting
of catalog keys to a specific header file, which will only be picked
up when running collectcatkeys
* fix a couple of build problems during the preprocessing of the libbe-
sources when extracting catalog keys, all due to private headers not
being found
* move ZombieReplicantView.h from kits/interface to
headers/private/interface, as this way it can be picked up when
building the libbe catalog


# 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


# 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


# 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


# 98f88d29 07-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Avoid warning for unused parameters.


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


# 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


# 560ff447 25-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Use resource definition files instead of DoCatalogs rule. Rename B_TRANSLATE_APP_NAME and related macros to the more generic B_TRANSLATE_SYSTEM_NAME, to also fits add-ons, folders, etc, and make 'System name' its standard context. Change CodyCam and PoorMan's app signatures to match the overall x-vnd.Haiku-App pattern. Some clean-up. Make SlideShowSaver build again.

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


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

Adding B_TRANSLATE_NOCOLLECT_APP_NAME. Reordered.

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


# 41ad4911 13-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Make B_TRANSLATE_APP_NAME aware of BLocaleRoster::Default()->IsFilesystemTranslationPreferred().

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


# 480d660f 13-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Introducing a catalog app name context, related macros, and making use of this in DeskCalc.

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


# 312f4392 02-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* Added a B_TRANSLATE_WITH_CONTEXT() macro.
* Added a number of TODOs.
* Cleanup.


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


# ad516863 25-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* improved the locale kit build rules and headers to use a different set of
B_TRANSLATE-macros when running collectcatkeys, simplifying the regex a lot
* added B_TRANSLATE_NOCOLLECT...-macros for the case where a non-literal
string shall be translated, but not picked up by collectcatkeys


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


# 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


# 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


# be8fa2fb 02-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Update all applications in tree to use the new localizing system
* Remove the old one from the locale librairy, with some cleanup
Known regressions :
* readonlybootprompt will no longer update the locale settings : the
method used messed with internal undocumented things
* external localized apps (webpositive for example) will not run
anymore.


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


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

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


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


# e1361e2e 10-May-2010 Matt Madia <mattmadia@gmail.com>

Additional TR*-->B_TRANSLATE* cleanup

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


# 28e9f6c2 07-May-2010 François Revol <revol@free.fr>

Patch by mmadia: Fix locale macros. Fixes the build.


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


# 96949a0a 06-May-2010 Matt Madia <mattmadia@gmail.com>

Relating to #5408
* Added secondary macros, B_TRANSLATE* to replace TR*
* For new localization patches, please use the newer B_TRANSLATE*
* B_TRANSLATE* and TR* are functional during the transition to the new macros
* Autmatic whitespace cleanup


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


# 93647add 24-Sep-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Public headers should not hold commiter names in the licence header. Removed them.


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


# 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


# e19d7089a71bf8a977e7751cdfc2340af22ff2a3 16-Aug-2012 Oliver Tappe <zooey@hirschkaefer.de>

Fix #8841 (broken localization support for 3rd-party apps).

* made private Catalog.h header public by moving it to
os/locale/tools/CollectingCatalog.h
* reintroduce B_COLLECTING_CATKEYS define (which is expected to be set
during a collectcatkeys session) in order to decide whether or not
to automatically include the CollecingCatalog.h header from Catalog.h
* adjust jam rule for collecting catalog keys accordingly


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 248f2283dd5fcfc0bc79f26b84c8fdec9da7e60c 15-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Final part of cleanup in Catalog.h.

* move versions of the B_TRANSLATE_...-macros used during collecting
of catalog keys to a specific header file, which will only be picked
up when running collectcatkeys
* fix a couple of build problems during the preprocessing of the libbe-
sources when extracting catalog keys, all due to private headers not
being found
* move ZombieReplicantView.h from kits/interface to
headers/private/interface, as this way it can be picked up when
building the libbe catalog


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

Cleanup BCatalogAddOn.

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


# 16e5092306efca466d27519953cdbb803f3d5f5e 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


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


# 250eca3254c11a3f2762768287b83f39ff992855 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


# 98f88d29c4b21d4f90ba24deef5e2a38a9481158 07-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Avoid warning for unused parameters.


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


# 1a5c1f9ed57fae37829befc007cd51c32205c1cd 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


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

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

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

Should fix #8037.



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


# 560ff4478d5c85455ea3e5ed5e392ef93132d545 25-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Use resource definition files instead of DoCatalogs rule. Rename B_TRANSLATE_APP_NAME and related macros to the more generic B_TRANSLATE_SYSTEM_NAME, to also fits add-ons, folders, etc, and make 'System name' its standard context. Change CodyCam and PoorMan's app signatures to match the overall x-vnd.Haiku-App pattern. Some clean-up. Make SlideShowSaver build again.

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


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

Adding B_TRANSLATE_NOCOLLECT_APP_NAME. Reordered.

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


# 41ad4911ad138c665519de08529848b279935824 13-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Make B_TRANSLATE_APP_NAME aware of BLocaleRoster::Default()->IsFilesystemTranslationPreferred().

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


# 480d660fb023665b76b44aa2ad9e9ce17499b25b 13-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Introducing a catalog app name context, related macros, and making use of this in DeskCalc.

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


# 25dc253d6ab28ce204fa4de2d3e7a27d167fc817 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


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


# 312f43920aa00a7374d7f052c9c27d9a490b6f28 02-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* Added a B_TRANSLATE_WITH_CONTEXT() macro.
* Added a number of TODOs.
* Cleanup.


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


# 38ac8def5a72de58d6ae4e82d8c4a6be1021e67e 01-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Largish cleanup sweep concerning the Locale Kit (sorry it got so big):
* refactored private/mutable stuff out of LocaleRoster into MutableLocaleRoster
* moved management of Locale/Time settings file and broadcasting of any changes
out of preflets and into MutableLocaleRoster
* added proper sorting to the listviews of the Locale preflet
* the Time preflet no longer overlaps long timezone names into the actual time
* several fixes with respect to leaking ICU objects, esp. in BCountry
* the locale roster no longer passes out references to its own BCountry object,
but uses copies, instead - this makes locking superfluous, as the clients'
BCountry objects can no longer be changed by the setting a new default
country in the locale roster
* removed pretty useless POSIX-style symbol fetching from BCountry - if we
need that at all, it should live in the dedicated formatter classes
* adjusted readonlybootprompt, dstcheck and Deskbar to the changed Locale API
* refactored existing Time-formatter into TimeUnitFormat and DurationFormat
(the latter of which is now used by AboutSystem)
* added stubs for Date, DateTime and Time formatters
* lots of coding style fixes throughout the Locale Kit and the Locale and Time
preflets
This will probably break most external apps making use of the Locale Kit - it
does break WebPositive.


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


# ad516863532f9b1ad947b88c329d498cfcd5971b 25-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* improved the locale kit build rules and headers to use a different set of
B_TRANSLATE-macros when running collectcatkeys, simplifying the regex a lot
* added B_TRANSLATE_NOCOLLECT...-macros for the case where a non-literal
string shall be translated, but not picked up by collectcatkeys


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


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


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

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


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


# 30478150363e7644bda967c71f941218d3a3b58e 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


# be8fa2fb3088ab1921612b60f352dd9334b40b3d 02-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Update all applications in tree to use the new localizing system
* Remove the old one from the locale librairy, with some cleanup
Known regressions :
* readonlybootprompt will no longer update the locale settings : the
method used messed with internal undocumented things
* external localized apps (webpositive for example) will not run
anymore.


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


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

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


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


# e1361e2e66e817c05449256e21f177ef7b96523a 10-May-2010 Matt Madia <mattmadia@gmail.com>

Additional TR*-->B_TRANSLATE* cleanup

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


# 28e9f6c22aa456af427cc134752e4802e67f2b48 07-May-2010 François Revol <revol@free.fr>

Patch by mmadia: Fix locale macros. Fixes the build.


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


# 96949a0a8d8ba26783f158d7b04db8840ebbcd0f 06-May-2010 Matt Madia <mattmadia@gmail.com>

Relating to #5408
* Added secondary macros, B_TRANSLATE* to replace TR*
* For new localization patches, please use the newer B_TRANSLATE*
* B_TRANSLATE* and TR* are functional during the transition to the new macros
* Autmatic whitespace cleanup


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


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

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


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


# 93647add858940a7e431cf5ff7c1564a2d5e18e9 24-Sep-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Public headers should not hold commiter names in the licence header. Removed them.


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


# 76065080e65ea7903e2f89413e7c5c43e23238e0 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


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


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

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



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


# 723383c0f41f8d3833d7792e5b3fc70c4068bd47 01-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

Applied patch by PulkoMandy, adjusted and extended by myself:
* integrating most of the locale kit into the build (and image)
* removed LocaleBuild.h and _IMPEXP_LOCALE since that does not make
sense for elf (which usually exports all symbols anyway)
* added a couple of locale kit related pseudo targets for convenience
Hey, some of that stuff already seems to work :-)

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


# c3ac87e8fc6f81023c44faed6cf00c8a916f4e31 01-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* Copied imported OpenTracker Locale Kit files from the vendor branch
into their new homes (at least for now, might need some adjustment).


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