Updated localization macros for new GSGuiPrivate - should be parseable

by make_strings now


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14545 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
nico 2002-09-25 01:51:23 +00:00
parent 2ff35b7fb1
commit 75cdeba43d

View file

@ -85,12 +85,6 @@ _NSAppKitUncaughtExceptionHandler (NSException *exception)
{ {
int retVal; int retVal;
#ifdef DEBUG
#define DEBUG_BUTTON @"Debug"
#else
#define DEBUG_BUTTON nil
#endif
/* Reset the exception handler to the Base library's one, to prevent /* Reset the exception handler to the Base library's one, to prevent
recursive calls to the gui one. */ recursive calls to the gui one. */
NSSetUncaughtExceptionHandler (defaultUncaughtExceptionHandler); NSSetUncaughtExceptionHandler (defaultUncaughtExceptionHandler);
@ -109,13 +103,16 @@ _NSAppKitUncaughtExceptionHandler (NSException *exception)
} }
retVal = NSRunCriticalAlertPanel retVal = NSRunCriticalAlertPanel
([NSString stringWithFormat: ([NSString stringWithFormat: _(@"Critical Error in %@"),
GSGuiLocalizedString (@"Critical Error in %@", @""),
[[NSProcessInfo processInfo] processName]], [[NSProcessInfo processInfo] processName]],
@"%@: %@", @"%@: %@",
GSGuiLocalizedString (@"Abort", @""), _(@"Abort"),
GSGuiLocalizedString (@"Ignore", @""), _(@"Ignore"),
GSGuiLocalizedString (DEBUG_BUTTON, @""), #ifdef DEBUG
_(@"Debug"),
#else
nil,
#endif
[exception name], [exception name],
[exception reason]); [exception reason]);
@ -191,32 +188,25 @@ initialize_gnustep_backend(void)
/* FIXME/TODO - update localized error messages. */ /* FIXME/TODO - update localized error messages. */
/* Backend found ? */ /* Backend found ? */
NSCAssert1(path != nil, NSCAssert1(path != nil, _(@"Unable to find backend %@"), bundleName);
GSGuiLocalizedString (@"Unable to find backend %@", nil),
bundleName);
NSDebugLog(@"Loading Backend from %@", path); NSDebugLog(@"Loading Backend from %@", path);
NSDebugFLLog(@"BackendBundle", @"Loading Backend from %@", path); NSDebugFLLog(@"BackendBundle", @"Loading Backend from %@", path);
/* Create a bundle object. (Should normally succeed). */ /* Create a bundle object. (Should normally succeed). */
theBundle = [NSBundle bundleWithPath: path]; theBundle = [NSBundle bundleWithPath: path];
NSCAssert1(theBundle != nil, NSCAssert1(theBundle != nil,
GSGuiLocalizedString _(@"Can't create NSBundle object for backend at path %@"),
(@"Can't create NSBundle object for backend at path %@",
nil),
path); path);
/* Now load the object file from the bundle. */ /* Now load the object file from the bundle. */
NSCAssert1 ([theBundle load], NSCAssert1 ([theBundle load],
GSGuiLocalizedString _(@"Can't load object file from backend at path %@"),
(@"Can't load object file from backend at path %@", nil),
path); path);
/* Now extract the GSBackend class from the loaded bundle. */ /* Now extract the GSBackend class from the loaded bundle. */
backend = [theBundle classNamed: @"GSBackend"]; backend = [theBundle classNamed: @"GSBackend"];
NSCAssert1(backend != Nil, NSCAssert1 (backend != Nil,
GSGuiLocalizedString _(@"Backend at path %@ doesn't contain the GSBackend class"),
(@"Backend at path %@ doesn't contain the GSBackend class",
nil),
path); path);
[backend initializeBackend]; [backend initializeBackend];
} }
@ -224,8 +214,7 @@ initialize_gnustep_backend(void)
/* GSBackend will be in a separate library, so use the runtime /* GSBackend will be in a separate library, so use the runtime
to find the class and avoid an unresolved reference problem */ to find the class and avoid an unresolved reference problem */
backend = [[NSBundle gnustepBundle] classNamed: @"GSBackend"]; backend = [[NSBundle gnustepBundle] classNamed: @"GSBackend"];
NSCAssert(backend, GSGuiLocalizedString (@"Can't find backend context", NSCAssert (backend, _(@"Can't find backend context");
nil));
[backend initializeBackend]; [backend initializeBackend];
#endif #endif
} }
@ -603,9 +592,7 @@ static NSCell* tileCell = nil;
* initialization code behaves always in the same way for this class * initialization code behaves always in the same way for this class
* and for subclasses. * and for subclasses.
*/ */
NSAssert (NSApp == nil, NSAssert (NSApp == nil, _(@"[NSApplication -init] called more than once"));
GSGuiLocalizedString
(@"[NSApplication -init] called more than once", nil));
{ {
GSDisplayServer *srv; GSDisplayServer *srv;
/* Initialization must be enclosed in an autorelease pool. */ /* Initialization must be enclosed in an autorelease pool. */
@ -696,8 +683,7 @@ static NSCell* tileCell = nil;
{ {
if ([NSBundle loadNibNamed: mainModelFile owner: self] == NO) if ([NSBundle loadNibNamed: mainModelFile owner: self] == NO)
{ {
NSLog (GSGuiLocalizedString (@"Cannot load the main model file '%@'", NSLog (_(@"Cannot load the main model file '%@'"), mainModelFile);
nil), mainModelFile);
} }
} }
@ -823,9 +809,8 @@ static NSCell* tileCell = nil;
object: workspace object: workspace
userInfo: userInfo]; userInfo: userInfo];
NS_HANDLER NS_HANDLER
NSLog(GSGuiLocalizedString (@"Problem during launch app notification: %@", NSLog (_(@"Problem during launch app notification: %@"),
nil), [localException reason]);
[localException reason]);
[localException raise]; [localException raise];
NS_ENDHANDLER NS_ENDHANDLER
} }
@ -1937,8 +1922,8 @@ delegate.
if (_infoPanel == nil) if (_infoPanel == nil)
_infoPanel = [[GSInfoPanel alloc] initWithDictionary: dictionary]; _infoPanel = [[GSInfoPanel alloc] initWithDictionary: dictionary];
[_infoPanel setTitle: GSGuiLocalizedString (@"Info", [_infoPanel setTitle: NSLocalizedString (@"Info",
@"Title of the Info Panel")]; @"Title of the Info Panel")];
[_infoPanel orderFront: self]; [_infoPanel orderFront: self];
} }
@ -2309,7 +2294,7 @@ delegate.
- (void) reportException: (NSException *)anException - (void) reportException: (NSException *)anException
{ {
if (anException) if (anException)
NSLog(GSGuiLocalizedString (@"reported exception - %@", nil), anException); NSLog (_(@"reported exception - %@"), anException);
} }
/* /*
@ -2326,8 +2311,7 @@ delegate.
else else
{ {
shouldTerminate = [[NSDocumentController sharedDocumentController] shouldTerminate = [[NSDocumentController sharedDocumentController]
reviewUnsavedDocumentsWithAlertTitle: reviewUnsavedDocumentsWithAlertTitle: _(@"Quit")
GSGuiLocalizedString (@"Quit", nil)
cancellable:YES]; cancellable:YES];
} }