Add Localization

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@16786 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fabien Vallon 2003-05-24 12:40:54 +00:00
parent d1f357a5bf
commit 3df86b7e01
7 changed files with 113 additions and 104 deletions

View file

@ -1,3 +1,12 @@
2003-05-24 Fabien Vallon <fabien@tuxfamily.org>
* Gorm.m : Add Localization
* GormDocument.m : Ditto
* GormFilesOwner.m : Ditto
* GormInspectorsManager.m : Ditto
* GormObjectInspector.m : Ditto
* GormPalettesManager.m : Ditto
2003-05-24 Fabien Vallon <fabien@tuxfamily.org>
* Gorm.m : refactored newApplication, newEmpty, newPalettes,newInspector.

18
Gorm.m
View file

@ -588,8 +588,8 @@ static NSButtonType _buttonTypeForObject( id button )
if (edited == YES)
{
int result;
result = NSRunAlertPanel(NULL, @"There are edited windows",
@"Review Unsaved", @"Quit Anyway", @"Cancel");
result = NSRunAlertPanel(NULL, _(@"There are edited windows"),
_(@"Review Unsaved"),_( @"Quit Anyway"), _(@"Cancel"));
if (result == NSAlertDefaultReturn)
{
enumerator = [ documents objectEnumerator];
@ -707,12 +707,12 @@ static NSButtonType _buttonTypeForObject( id button )
object:nil];
if ( [guideLineMenuItem tag] == 0 )
{
[guideLineMenuItem setTitle:@"Enable GuideLine"];
[guideLineMenuItem setTitle:_(@"Enable GuideLine")];
[guideLineMenuItem setTag:1];
}
else if ( [guideLineMenuItem tag] == 1)
{
[guideLineMenuItem setTitle:@"Disable GuideLine"];
[guideLineMenuItem setTitle:_(@"Disable GuideLine")];
[guideLineMenuItem setTag:0];
}
@ -1328,7 +1328,7 @@ static NSButtonType _buttonTypeForObject( id button )
id o = [s objectAtIndex: 0];
NSString *n;
p = NSGetAlertPanel(@"Set Name", @"Name: ", @"OK", @"Cancel", nil);
p = NSGetAlertPanel(_(@"Set Name"), _(@"Name: "), _(@"OK"), _(@"Cancel"), nil);
t = [[NSTextField alloc] initWithFrame: NSMakeRect(60,46,240,20)];
[[p contentView] addSubview: t];
[p makeFirstResponder: t];
@ -1441,8 +1441,8 @@ static NSButtonType _buttonTypeForObject( id button )
{
NSMenu *testMenu;
testMenu = [[NSMenu alloc] initWithTitle: @"Test"];
[testMenu addItemWithTitle: @"Quit"
testMenu = [[NSMenu alloc] initWithTitle: _(@"Test")];
[testMenu addItemWithTitle: _(@"Quit")
action: @selector(deferredEndTesting:)
keyEquivalent: @"q"];
[self setMainMenu: testMenu];
@ -1453,14 +1453,14 @@ static NSButtonType _buttonTypeForObject( id button )
NSMenu *testMenu = [self mainMenu];
id item;
item = [testMenu itemWithTitle: @"Quit"];
item = [testMenu itemWithTitle: _(@"Quit")];
if (item != nil)
{
[item setAction: @selector(deferredEndTesting:)];
}
else
{
[testMenu addItemWithTitle: @"Quit"
[testMenu addItemWithTitle: _(@"Quit")
action: @selector(deferredEndTesting:)
keyEquivalent: @"q"];
}

View file

@ -911,11 +911,11 @@ static NSImage *classesImage = nil;
else
{
NSString *message = [NSString stringWithFormat:
@"The class %@ already exists. Replace it?", className];
int alert = NSRunAlertPanel(@"Problem adding class from header",
_(@"The class %@ already exists. Replace it?"), className];
int alert = NSRunAlertPanel(_(@"Problem adding class from header"),
message,
@"Yes",
@"No",
_(@"Yes"),
_(@"No"),
nil);
if (alert == NSAlertDefaultReturn)
@ -928,8 +928,8 @@ static NSImage *classesImage = nil;
if (!result)
{
NSString *message = [NSString stringWithFormat:
@"Could not replace class %@.", className];
NSRunAlertPanel(@"Problem adding class from header",
_(@"Could not replace class %@."), className];
NSRunAlertPanel(_(@"Problem adding class from header"),
message,
nil,
nil,
@ -1041,8 +1041,8 @@ static NSImage *classesImage = nil;
else
{
NSString *message = [NSString stringWithFormat:
@"The class %@ has subclasses which must be removed", anitem];
NSRunAlertPanel(@"Problem removing class",
_(@"The class %@ has subclasses which must be removed"), anitem];
NSRunAlertPanel(_(@"Problem removing class"),
message,
nil, nil, nil);
}
@ -1091,7 +1091,7 @@ static NSImage *classesImage = nil;
sp = [NSSavePanel savePanel];
[sp setRequiredFileType: @"m"];
[sp setTitle: @"Save source file as..."];
[sp setTitle: _(@"Save source file as...")];
if (documentPath == nil)
{
result = [sp runModalForDirectory: NSHomeDirectory()
@ -1110,7 +1110,7 @@ static NSImage *classesImage = nil;
NSString *headerName;
[sp setRequiredFileType: @"h"];
[sp setTitle: @"Save header file as..."];
[sp setTitle: _(@"Save header file as...")];
result = [sp runModalForDirectory:
[sourceName stringByDeletingLastPathComponent]
file:
@ -1125,8 +1125,8 @@ static NSImage *classesImage = nil;
withName: sourceName
and: headerName])
{
NSRunAlertPanel(@"Alert",
@"Could not create the class's file",
NSRunAlertPanel(_(@"Alert"),
_(@"Could not create the class's file"),
nil, nil, nil);
}
@ -1512,7 +1512,7 @@ static NSImage *classesImage = nil;
backing: NSBackingStoreRetained
defer: NO];
[window setMinSize: [window frame].size];
[window setTitle: @"UNTITLED"];
[window setTitle: _(@"UNTITLED")];
[window setDelegate: self];
@ -1554,7 +1554,7 @@ static NSImage *classesImage = nil;
cell = [selectionView cellAtRow: 0 column: 0];
[cell setTag: 0];
[cell setImage: image];
[cell setTitle: @"Objects"];
[cell setTitle: _(@"Objects")];
[cell setBordered: NO];
[cell setAlignment: NSCenterTextAlignment];
[cell setImagePosition: NSImageAbove];
@ -1566,7 +1566,7 @@ static NSImage *classesImage = nil;
cell = [selectionView cellAtRow: 0 column: 1];
[cell setTag: 1];
[cell setImage: image];
[cell setTitle: @"Images"];
[cell setTitle: _(@"Images")];
[cell setBordered: NO];
[cell setAlignment: NSCenterTextAlignment];
[cell setImagePosition: NSImageAbove];
@ -1578,7 +1578,7 @@ static NSImage *classesImage = nil;
cell = [selectionView cellAtRow: 0 column: 2];
[cell setTag: 2];
[cell setImage: image];
[cell setTitle: @"Sounds"];
[cell setTitle: _(@"Sounds")];
[cell setBordered: NO];
[cell setAlignment: NSCenterTextAlignment];
[cell setImagePosition: NSImageAbove];
@ -1590,7 +1590,7 @@ static NSImage *classesImage = nil;
cell = [selectionView cellAtRow: 0 column: 3];
[cell setTag: 3];
[cell setImage: image];
[cell setTitle: @"Classes"];
[cell setTitle: _(@"Classes")];
[cell setBordered: NO];
[cell setAlignment: NSCenterTextAlignment];
[cell setImagePosition: NSImageAbove];
@ -1686,7 +1686,7 @@ static NSImage *classesImage = nil;
RELEASE(classesView);
tableColumn = [[NSTableColumn alloc] initWithIdentifier: @"classes"];
[[tableColumn headerCell] setStringValue: @"Classes"];
[[tableColumn headerCell] setStringValue: _(@"Classes")];
[tableColumn setMinWidth: 190];
[tableColumn setResizable: YES];
[tableColumn setEditable: YES];
@ -1695,7 +1695,7 @@ static NSImage *classesImage = nil;
RELEASE(tableColumn);
tableColumn = [[NSTableColumn alloc] initWithIdentifier: @"outlets"];
[[tableColumn headerCell] setStringValue: @"Outlet"];
[[tableColumn headerCell] setStringValue: _(@"Outlet")];
[tableColumn setWidth: 50];
[tableColumn setResizable: NO];
[tableColumn setEditable: NO];
@ -1704,7 +1704,7 @@ static NSImage *classesImage = nil;
RELEASE(tableColumn);
tableColumn = [[NSTableColumn alloc] initWithIdentifier: @"actions"];
[[tableColumn headerCell] setStringValue: @"Action"];
[[tableColumn headerCell] setStringValue: _(@"Action")];
[tableColumn setWidth: 50];
[tableColumn setResizable: NO];
[tableColumn setEditable: NO];
@ -1924,8 +1924,8 @@ static NSImage *classesImage = nil;
c = [u decodeObject];
if (c == nil || [c isKindOfClass: [GSNibContainer class]] == NO)
{
NSRunAlertPanel(NULL, @"Could not unarchive document data",
@"OK", NULL, NULL);
NSRunAlertPanel(NULL, _(@"Could not unarchive document data"),
_(@"OK"), NULL, NULL);
return nil;
}
@ -1947,9 +1947,9 @@ static NSImage *classesImage = nil;
s = [s stringByAppendingPathExtension: @"classes"];
if (![classManager loadCustomClasses: s])
{
NSRunAlertPanel(NULL, @"Could not open the associated classes file.\n"
@"You won't be able to edit connections on custom classes",
@"OK", NULL, NULL);
NSRunAlertPanel(NULL, _(@"Could not open the associated classes file.\n"
@"You won't be able to edit connections on custom classes"),
_(@"OK"), NULL, NULL);
}
}
else
@ -1959,9 +1959,9 @@ static NSImage *classesImage = nil;
s = [aFile stringByAppendingPathComponent: @"data.classes"];
if (![classManager loadCustomClasses: s])
{
NSRunAlertPanel(NULL, @"Could not open the associated classes file.\n"
@"You won't be able to edit connections on custom classes",
@"OK", NULL, NULL);
NSRunAlertPanel(NULL, _(@"Could not open the associated classes file.\n"
@"You won't be able to edit connections on custom classes"),
_(@"OK"), NULL, NULL);
}
}
@ -2332,17 +2332,17 @@ static NSImage *classesImage = nil;
}
[aWindow setFrameTopLeftPoint:
NSMakePoint(220, frame.size.height-100)];
[aWindow setTitle: @"My Window"];
[aWindow setTitle: _(@"My Window")];
[self setName: @"My Window" forObject: aWindow];
[self attachObject: aWindow toParent: nil];
[self setObject: aWindow isVisibleAtLaunch: YES];
RELEASE(aWindow);
[aMenu setTitle: @"Main Menu"];
[aMenu addItemWithTitle: @"Hide"
[aMenu setTitle: _(@"Main Menu")];
[aMenu addItemWithTitle: _(@"Hide")
action: @selector(hide:)
keyEquivalent: @"h"];
[aMenu addItemWithTitle: @"Quit"
[aMenu addItemWithTitle: _(@"Quit")
action: @selector(terminate:)
keyEquivalent: @"q"];
[self setName: @"NSMenu" forObject: aMenu];
@ -2366,7 +2366,7 @@ static NSImage *classesImage = nil;
defer: NO];
[aWindow setFrameTopLeftPoint:
NSMakePoint(220, frame.size.height-100)];
[aWindow setTitle: @"Inspector Window"];
[aWindow setTitle: _(@"Inspector Window")];
[self setName: @"InspectorWin" forObject: aWindow];
[self attachObject: aWindow toParent: nil];
RELEASE(aWindow);
@ -2383,7 +2383,7 @@ static NSImage *classesImage = nil;
defer: NO];
[aWindow setFrameTopLeftPoint:
NSMakePoint(220, frame.size.height-100)];
[aWindow setTitle: @"Palette Window"];
[aWindow setTitle: _(@"Palette Window")];
[self setName: @"PaletteWin" forObject: aWindow];
[self attachObject: aWindow toParent: nil];
RELEASE(aWindow);
@ -2742,8 +2742,8 @@ static NSImage *classesImage = nil;
if (archiveResult == NO)
{
NSRunAlertPanel(NULL, @"Could not save document",
@"OK", NULL, NULL);
NSRunAlertPanel(NULL,_( @"Could not save document"),
_(@"OK"), NULL, NULL);
}
else
{
@ -2920,14 +2920,14 @@ static NSImage *classesImage = nil;
if (documentPath == nil)
{
msg = @"Document 'UNTITLED' has been modified";
msg = _(@"Document 'UNTITLED' has been modified");
}
else
{
msg = [NSString stringWithFormat: @"Document '%@' has been modified",
msg = [NSString stringWithFormat: _(@"Document '%@' has been modified"),
[documentPath lastPathComponent]];
}
result = NSRunAlertPanel(NULL, msg, @"Save", @"Don't Save", @"Cancel");
result = NSRunAlertPanel(NULL, msg, _(@"Save"), _(@"Don't Save"), _(@"Cancel"));
if (result == NSAlertDefaultReturn)
{
@ -3042,8 +3042,8 @@ static NSImage *classesImage = nil;
title = [NSString stringWithFormat:
@"Modifying %@",(action==YES?@"Action":@"Outlet")];
msg = [NSString stringWithFormat:
@"This will break all connections to '%@'. Continue?", name];
retval = NSRunAlertPanel(title, msg,@"OK",@"Cancel", nil, nil);
_(@"This will break all connections to '%@'. Continue?"), name];
retval = NSRunAlertPanel(title, msg,_(@"OK"),_(@"Cancel"), nil, nil);
if (retval == NSAlertDefaultReturn)
{
@ -3068,14 +3068,14 @@ static NSImage *classesImage = nil;
id<IBConnectors> c = nil;
BOOL removed = YES;
int retval = -1;
NSString *title = [NSString stringWithFormat: @"Modifying Class"];
NSString *title = [NSString stringWithFormat: _(@"Modifying Class")];
NSString *msg;
msg = [NSString stringWithFormat: @"This will break all connections to "
@"actions/outlets to instances of class '%@'. Continue?", className];
msg = [NSString stringWithFormat: _(@"This will break all connections to "
@"actions/outlets to instances of class '%@'. Continue?"), className];
// ask the user if he/she wants to continue...
retval = NSRunAlertPanel(title, msg,@"OK",@"Cancel", nil, nil);
retval = NSRunAlertPanel(title, msg,_(@"OK"),_(@"Cancel"), nil, nil);
if (retval == NSAlertDefaultReturn)
{
removed = YES;
@ -3109,13 +3109,13 @@ static NSImage *classesImage = nil;
id<IBConnectors> c = nil;
BOOL removed = YES;
int retval = -1;
NSString *title = [NSString stringWithFormat: @"Modifying Class"];
NSString *title = [NSString stringWithFormat: _(@"Modifying Class")];
NSString *msg = [NSString stringWithFormat:
@"Change class name '%@' to '%@'. Continue?",
_(@"Change class name '%@' to '%@'. Continue?"),
className, newName];
// ask the user if he/she wants to continue...
retval = NSRunAlertPanel(title, msg,@"OK",@"Cancel", nil, nil);
retval = NSRunAlertPanel(title, msg,_(@"OK"),_(@"Cancel"), nil, nil);
if (retval == NSAlertDefaultReturn)
{
removed = YES;
@ -3216,10 +3216,10 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
NSString *message;
message = [NSString stringWithFormat:
@"The class %@ already has an action named %@",
_(@"The class %@ already has an action named %@"),
[gov itemBeingEdited], formattedAction];
NSRunAlertPanel(@"Problem Adding Action",
NSRunAlertPanel(_(@"Problem Adding Action"),
message, nil, nil, nil);
}
@ -3248,9 +3248,9 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
NSString *message;
message = [NSString stringWithFormat:
@"The class %@ already has an outlet named %@",
_(@"The class %@ already has an outlet named %@"),
[gov itemBeingEdited], formattedOutlet];
NSRunAlertPanel(@"Problem Adding Outlet",
NSRunAlertPanel(_(@"Problem Adding Outlet"),
message, nil, nil, nil);
}

View file

@ -179,8 +179,8 @@
NSLog(@"Selected %d, %@", [browser selectedRowInColumn: 0], title);
if (hasConnections > 0 && [title isEqual: [object className]] == NO)
{
if (NSRunAlertPanel(0, @"This operation will break existing connection",
@"OK", @"Cancel", NULL) != NSAlertDefaultReturn)
if (NSRunAlertPanel(0, _(@"This operation will break existing connection"),
_(@"OK"), _(@"Cancel"), NULL) != NSAlertDefaultReturn)
{
unsigned pos = [classes indexOfObject: [object className]];

View file

@ -58,7 +58,7 @@
button = [[NSButton alloc] initWithFrame: [contents bounds]];
[button setAutoresizingMask:
NSViewHeightSizable | NSViewWidthSizable];
[button setStringValue: @"Empty Selection"];
[button setStringValue: _(@"Empty Selection")];
[button setBordered: NO];
[button setEnabled: NO];
[contents addSubview: button];
@ -98,7 +98,7 @@
button = [[NSButton alloc] initWithFrame: [contents bounds]];
[button setAutoresizingMask:
NSViewHeightSizable | NSViewWidthSizable];
[button setStringValue: @"Multiple Selection"];
[button setStringValue: _(@"Multiple Selection")];
[button setBordered: NO];
[button setEnabled: NO];
[contents addSubview: button];
@ -136,7 +136,7 @@
button = [[NSButton alloc] initWithFrame: [contents bounds]];
[button setAutoresizingMask:
NSViewHeightSizable | NSViewWidthSizable];
[button setStringValue: @"Not Applicable"];
[button setStringValue: _(@"Not Applicable")];
[button setBordered: NO];
[button setEnabled: NO];
[contents addSubview: button];
@ -215,7 +215,7 @@
styleMask: style
backing: NSBackingStoreRetained
defer: NO];
[panel setTitle: @"Inspector"];
[panel setTitle: _(@"Inspector")];
[panel setMinSize: [panel frame].size];
/*
@ -237,35 +237,35 @@
[selectionView addSubview: popup];
RELEASE(popup);
[popup addItemWithTitle: @"Attributes"];
[popup addItemWithTitle: _(@"Attributes")];
item = [popup itemAtIndex: 0];
[item setTarget: self];
[item setAction: @selector(setCurrentInspector:)];
[item setKeyEquivalent: @"1"];
[item setTag: 0];
[popup addItemWithTitle: @"Connections"];
[popup addItemWithTitle: _(@"Connections")];
item = [popup itemAtIndex: 1];
[item setTarget: self];
[item setAction: @selector(setCurrentInspector:)];
[item setKeyEquivalent: @"2"];
[item setTag: 1];
[popup addItemWithTitle: @"Size"];
[popup addItemWithTitle: _(@"Size")];
item = [popup itemAtIndex: 2];
[item setTarget: self];
[item setAction: @selector(setCurrentInspector:)];
[item setKeyEquivalent: @"3"];
[item setTag: 2];
[popup addItemWithTitle: @"Help"];
[popup addItemWithTitle: _(@"Help")];
item = [popup itemAtIndex: 3];
[item setTarget: self];
[item setAction: @selector(setCurrentInspector:)];
[item setKeyEquivalent: @"4"];
[item setTag: 3];
[popup addItemWithTitle: @"Custom Class"];
[popup addItemWithTitle: _(@"Custom Class")];
item = [popup itemAtIndex: 4];
[item setTarget: self];
[item setAction: @selector(setCurrentInspector:)];
@ -378,7 +378,7 @@
*/
if (obj == nil)
{
[panel setTitle: @"Inspector"];
[panel setTitle: _(@"Inspector")];
}
/*
else if ([obj isKindOfClass: [GormClassProxy class]])
@ -390,7 +390,7 @@
else
{
NSString *newTitle = [GormClassManager correctClassName: NSStringFromClass([obj class])];
[panel setTitle: [NSString stringWithFormat: @"%@ Inspector", newTitle]];
[panel setTitle: [NSString stringWithFormat:_(@"%@ Inspector"), newTitle]];
}
if (count == 0)
@ -547,7 +547,7 @@
if ([popup numberOfItems] < 6)
{
NSMenuItem *item;
[popup addItemWithTitle: @"Formatter"];
[popup addItemWithTitle: _(@"Formatter")];
item = [popup itemAtIndex: 5];
[item setTarget: self];
[item setAction: @selector(setCurrentInspector:)];
@ -966,14 +966,14 @@ selectCellWithString: (NSString*)title
[okButton setAutoresizingMask: NSViewMaxYMargin | NSViewMinXMargin];
[okButton setAction: @selector(ok:)];
[okButton setTarget: self];
[okButton setTitle: @"Connect"];
[okButton setTitle: _(@"Connect")];
[okButton setEnabled: NO];
revertButton = [[NSButton alloc] initWithFrame: NSMakeRect(0,0,60,20)];
[revertButton setAutoresizingMask: NSViewMaxYMargin | NSViewMinXMargin];
[revertButton setAction: @selector(revert:)];
[revertButton setTarget: self];
[revertButton setTitle: @"Revert"];
[revertButton setTitle: _(@"Revert")];
[revertButton setEnabled: NO];
}
return self;
@ -1143,11 +1143,11 @@ selectCellWithString: (NSString*)title
[okButton setEnabled: YES];
if ([connectors containsObject: currentConnector] == YES)
{
[okButton setTitle: @"Disconnect"];
[okButton setTitle: _(@"Disconnect")];
}
else
{
[okButton setTitle: @"Connect"];
[okButton setTitle: _(@"Connect")];
}
}
}

View file

@ -136,7 +136,7 @@ selectCellWithString: (NSString*)title
rect.origin.x = 20;
label = [[NSButton alloc] initWithFrame: rect];
[label setBordered: NO];
[label setTitle: @"No Type"];
[label setTitle: _(@"No Type")];
[contents addSubview: label];
RELEASE(label);
@ -151,7 +151,7 @@ selectCellWithString: (NSString*)title
[okButton setAutoresizingMask: NSViewMaxYMargin | NSViewMinXMargin];
[okButton setAction: @selector(ok:)];
[okButton setTarget: self];
[okButton setTitle: @"OK"];
[okButton setTitle: _(@"OK")];
[okButton setEnabled: NO];
revertButton = nil;
@ -166,7 +166,7 @@ selectCellWithString: (NSString*)title
if (name == nil || (pos = [sets indexOfObject: name]) == NSNotFound)
{
[label setTitle: @"No Type"];
[label setTitle: _(@"No Type")];
[value setStringValue: @""];
[okButton setEnabled: NO];
}
@ -237,9 +237,9 @@ selectCellWithString: (NSString*)title
int result;
v = [v stringByTrimmingSpaces];
result = NSRunAlertPanel(@"Settings",
[NSString stringWithFormat: @"Set object using '%@' as", v],
@"Object name", @"String", @"Class name");
result = NSRunAlertPanel(_(@"Settings"),
[NSString stringWithFormat: _(@"Set object using '%@' as"), v],
_(@"Object name"),_( @"String"), _(@"Class name"));
if (result == NSAlertAlternateReturn)
{
(*imp)(object, set, v);
@ -399,7 +399,7 @@ selectCellWithString: (NSString*)title
isString = NO;
if (name == nil || (pos = [sets indexOfObject: name]) == NSNotFound)
{
[label setTitle: @"No Type"];
[label setTitle: _(@"No Type")];
[value setStringValue: @""];
[okButton setEnabled: NO];
}
@ -479,7 +479,7 @@ selectCellWithString: (NSString*)title
}
else
{
[label setTitle: [NSString stringWithFormat: @"%@ - value unknown",
[label setTitle: [NSString stringWithFormat: _(@"%@ - value unknown"),
[types objectForKey: name]]];
[value setStringValue: @""];
[okButton setEnabled: YES];

View file

@ -171,8 +171,8 @@ static NSImage *dragImage = nil;
if (active == nil)
{
NSRunAlertPanel (NULL, @"No document is currently active",
@"OK", NULL, NULL);
NSRunAlertPanel (NULL, _(@"No document is currently active"),
_(@"OK"), NULL, NULL);
return;
}
@ -250,7 +250,7 @@ static NSImage *dragImage = nil;
styleMask: style
backing: NSBackingStoreRetained
defer: NO];
[panel setTitle: @"Palettes"];
[panel setTitle: _(@"Palettes")];
[panel setMinSize: [panel frame].size];
bundles = [NSMutableArray new];
@ -331,16 +331,16 @@ static NSImage *dragImage = nil;
bundle = [bundles objectAtIndex: col];
if ([path isEqualToString: [bundle bundlePath]] == YES)
{
NSRunAlertPanel (NULL, @"Palette has already been loaded",
@"OK", NULL, NULL);
NSRunAlertPanel (NULL, _(@"Palette has already been loaded"),
_(@"OK"), NULL, NULL);
return;
}
}
bundle = [NSBundle bundleWithPath: path];
if (bundle == nil)
{
NSRunAlertPanel(NULL, @"Could not load Palette",
@"OK", NULL, NULL);
NSRunAlertPanel(NULL, _(@"Could not load Palette"),
_(@"OK"), NULL, NULL);
return;
}
[bundles addObject: bundle];
@ -348,8 +348,8 @@ static NSImage *dragImage = nil;
path = [bundle pathForResource: @"palette" ofType: @"table"];
if (path == nil)
{
NSRunAlertPanel(NULL, @"File 'palette.table' missing",
@"OK", NULL, NULL);
NSRunAlertPanel(NULL, _(@"File 'palette.table' missing"),
_(@"OK"), NULL, NULL);
return;
}
@ -357,32 +357,32 @@ static NSImage *dragImage = nil;
propertyListFromStringsFileFormat];
if (paletteInfo == nil)
{
NSRunAlertPanel(NULL, @"Failed to load 'palette.table'",
@"OK", NULL, NULL);
NSRunAlertPanel(NULL, _(@"Failed to load 'palette.table'"),
_(@"OK"), NULL, NULL);
return;
}
className = [paletteInfo objectForKey: @"Class"];
if (className == nil)
{
NSRunAlertPanel(NULL, @"No palette class in 'palette.table'",
@"OK", NULL, NULL);
NSRunAlertPanel(NULL, _(@"No palette class in 'palette.table'"),
_(@"OK"), NULL, NULL);
return;
}
paletteClass = [bundle classNamed: className];
if (paletteClass == 0)
{
NSRunAlertPanel (NULL, @"Could not load palette class",
@"OK", NULL, NULL);
NSRunAlertPanel (NULL, _(@"Could not load palette class"),
_(@"OK"), NULL, NULL);
return;
}
palette = [paletteClass new];
if ([palette isKindOfClass: [IBPalette class]] == NO)
{
NSRunAlertPanel (NULL, @"Palette contains wrong type of class",
@"OK", NULL, NULL);
NSRunAlertPanel (NULL, _(@"Palette contains wrong type of class"),
_(@"OK"), NULL, NULL);
RELEASE(palette);
return;
}