History log of /haiku/src/kits/locale/HashMapCatalog.cpp
Revision Date Author Comments
# 60b52ce0 31-Aug-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

HashMapCatalog: handle more standard escpae sequences.

Fixes #14705


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

style fixes


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


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

Revert "Fix access to system catalog strings."

This reverts commit 6d2186615f664194649a4129cf73d7f37696cd40.


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


# 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


# 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


# 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


# 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


# 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


# 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


# 5ac65b7f11e3cec39f7f1540558884427fec935d 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)


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

Revert "Fix access to system catalog strings."

This reverts commit 6d2186615f664194649a4129cf73d7f37696cd40.


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


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


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


# 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


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


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


# 6bf3fe1f2e9a563cc7462f98e643f41f80d58e61 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


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


# 0a255c0c6ae855ad798a5bb518b0e9efd808a8c2 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


# 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