gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GSBaseLocalizedString()


From: Germán Arias
Subject: Re: GSBaseLocalizedString()
Date: Mon, 14 Feb 2011 17:53:44 -0600

On mar, 2011-02-15 at 00:20 +0100, Wolfgang Lux wrote:
> Germán Arias wrote:
> 
> > On lun, 2011-02-14 at 21:55 +0100, Wolfgang Lux wrote:
> >>
> >> I didn't have a look whether your definition is correct, because it  
> >> is
> >> simply pointless. The macro _(X) is defined exactly for that purpose
> >> and it is available in -base (provided the header GNUstepBase/
> >> GNUstep.h is included, but this should be the case for  
> >> NSUndoManager).
> >> Furthermore, make_strings will recognize this macro in contrast to
> >> your definition, so you could automatically prepare a strings file
> >> (though -base at present is not prepared to do that). Even without
> >> that macro, you would be off using NSLocalizedString or
> >> NSLocalizedStringFromTable rather than reinventing the wheel.
> >>
> >> Wolfgang
> >>
> >
> > I tried this (include GNUstepBase/GNUstep.h and use _() ) but don't
> > works, I get:
> >
> > NSUndoManager.m: In function ‘-[NSUndoManager
> > redoMenuTitleForUndoActionName:]’:
> > NSUndoManager.m:720: warning: implicit declaration of function
> > ‘NSLocalizedString’
> > NSUndoManager.m:720: warning: return makes pointer from integer  
> > without
> > a cast
> > NSUndoManager.m:725: warning: passing argument 1 of  
> > ‘stringWithFormat:’
> > makes pointer from integer without a cast
> > NSUndoManager.m: In function ‘-[NSUndoManager
> > undoMenuTitleForUndoActionName:]’:
> > NSUndoManager.m:1001: warning: return makes pointer from integer  
> > without
> > a cast
> > NSUndoManager.m:1006: warning: passing argument 1 of  
> > ‘stringWithFormat:’
> > makes pointer from integer without a cast
> >
> > for this reason I implemented the function GSBaseLocalizedString as
> > suggested the FIXME note. Maybe there is a bug in NSLocalizedString?
> 
> This error should tell you that the compiler didn't find the prototype  
> of function NSLocalizedString. Adding #import <Foundation/NSBundle.h>  
> to NSUndoManager fixes that problem.
> 
> Wolfgang
> 

Well, adding NSBundle compile fine, but there aren't localized strings.
The menu puts "Undo" and "Redo", even when the localized strings are in
the Localizable.strings file :(





reply via email to

[Prev in Thread] Current Thread [Next in Thread]