mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
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
This commit is contained in:
parent
bf436ee084
commit
7d9c0d6d4e
1 changed files with 15 additions and 5 deletions
|
@ -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 */
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue