Add David's generalisation of _()

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32184 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-02-16 06:26:14 +00:00
parent 6d3afd3d38
commit c546924dd5
3 changed files with 58 additions and 33 deletions

View file

@ -20,6 +20,12 @@
#import "GNUstepBase/preface.h"
#import "GNUstepBase/GSConfig.h"
/* Set localisation macro for use within the base library itsself.
*/
#define GS_LOCALISATION_BUNDLE \
[NSBundle bundleForLibrary: @"gnustep-base" version: \
OBJC_STRINGIFY(GNUSTEP_BASE_MAJOR_VERSION.GNUSTEP_BASE_MINOR_VERSION)]
#import "GNUstepBase/GNUstep.h"
/* Foundation/NSObject.h imports <Foundation/NSZone.h> and
@ -37,15 +43,10 @@
*/
#import "Foundation/NSString.h"
#import "Foundation/NSDebug.h"
#import "Foundation/NSBundle.h"
#import "GNUstepBase/NSBundle+GNUstepBase.h"
/* Change localisation macro for use within the base library itsself.
*/
#undef _
#define _(X) [[NSBundle bundleForLibrary: @"gnustep-base" version: \
OBJC_STRINGIFY(GNUSTEP_BASE_MAJOR_VERSION.GNUSTEP_BASE_MINOR_VERSION)] \
localizedStringForKey:(X) value: @"" table: nil]
#include <string.h>
#include <ctype.h>