gnustep-dev
[Top][All Lists]
Advanced

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

Re: GSBaseLocalizedString()


From: Wolfgang Lux
Subject: Re: GSBaseLocalizedString()
Date: Mon, 14 Feb 2011 21:55:13 +0100

Germán Arias wrote:

I did add the function GSBaseLocalizedString() in NSUndoManager to
localize Undo/Redo strings. I added this function in this class since,
as I know, this is the one place where this is needed. Can somebody
check if this is the correct way? I Have a doubt with

RETAIN(baseBundle);

because I don't release it after. But this is the way that is done in
NSApplication. Is this correct or we need release this object?

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




reply via email to

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