From 2ff35b7fb1929e36c08a5bca395e152178b00103 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 25 Sep 2002 01:50:20 +0000 Subject: [PATCH] Re#define _() and NSLocalizedString() for gui purposes git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14544 72102866-910b-0410-8b05-ffd578937521 --- Headers/gnustep/gui/GSGuiPrivate.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Headers/gnustep/gui/GSGuiPrivate.h b/Headers/gnustep/gui/GSGuiPrivate.h index 41e27d295..ffcd559da 100644 --- a/Headers/gnustep/gui/GSGuiPrivate.h +++ b/Headers/gnustep/gui/GSGuiPrivate.h @@ -39,11 +39,7 @@ NSBundle *GSGuiBundle (); /* - * Localize a message of the gnustep-gui library. When we have a tool - * generating the Localizable.strings file, we'll have it read strings - * from any function/macro name of the form GSXXXLocalizedString (,), - * and that should cover all invocations of GSGuiLocalizedString(). - * What a pain to type this long name for all strings. + * Localize a message of the gnustep-gui library. */ static inline NSString *GSGuiLocalizedString (NSString *key, NSString *comment) { @@ -59,6 +55,20 @@ static inline NSString *GSGuiLocalizedString (NSString *key, NSString *comment) } } +/* + * Redefine _() to be our own GSGuiLocalizedString(). This is so that + * make_strings will recognize it, and for easy typing. + */ +#ifdef _ +# undef _ +#endif +#define _(X) GSGuiLocalizedString (X, @"") + +#ifdef NSLocalizedString +# undef NSLocalizedString +#endif +#define NSLocalizedString(key,comment) GSGuiLocalizedString (key, comment) + #endif /* _GNUstep_H_GSGuiPrivate */