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
This commit is contained in:
Oliver Tappe
2012-08-16 21:12:55 +02:00
parent 2bcc7f40c3
commit e19d7089a7
3 changed files with 15 additions and 14 deletions
+10 -1
View File
@@ -86,6 +86,13 @@ private:
// Tip: Use a descriptive name of the class implemented in that
// source-file.
#ifdef B_COLLECTING_CATKEYS
// pull in all the macros used when collecting catalog keys.
#include <tools/CollectingCatalog.h>
#else
// Translation macros which may be used to shorten translation requests:
#undef B_TRANSLATE
#define B_TRANSLATE(string) \
@@ -172,7 +179,7 @@ private:
#undef B_TRANSLATE_MARK_SYSTEM_NAME_VOID
#define B_TRANSLATE_MARK_SYSTEM_NAME_VOID(string)
// Translation macros which do not let collectcatkeys try to collect the key
// Translation macros which cause collectcatkeys to ignore this key
// (useful in combination with the marking macros above):
#undef B_TRANSLATE_NOCOLLECT
#define B_TRANSLATE_NOCOLLECT(string) \
@@ -194,6 +201,8 @@ private:
#define B_TRANSLATE_NOCOLLECT_SYSTEM_NAME(string) \
B_TRANSLATE_SYSTEM_NAME(string)
#endif /* B_COLLECTING_CATKEYS */
#endif /* B_AVOID_TRANSLATION_MACROS */
@@ -2,16 +2,11 @@
* Copyright 2012, Haiku, Inc.
* Distributed under the terms of the MIT License.
*/
#ifndef _COLLECTING_CATALOG_H_
#define _COLLECTING_CATALOG_H_
#include_next <Catalog.h>
#ifndef _TOOLS_COLLECTING_CATALOG_H_
#define _TOOLS_COLLECTING_CATALOG_H_
// Translation macros used when executing collectcatkeys
#undef B_TRANSLATION_CONTEXT
#undef B_TRANSLATE
#define B_TRANSLATE(string) \
B_CATKEY((string), B_TRANSLATION_CONTEXT)