Changeset 3718
- Timestamp:
- 09/11/07 22:10:21 (1 year ago)
- Files:
-
- trunk/Controllers/JVChatController.m (modified) (1 diff)
- trunk/Controllers/JVChatViewCriterionController.m (modified) (1 diff)
- trunk/Controllers/JVChatWindowController.m (modified) (1 diff)
- trunk/Controllers/JVTranscriptCriterionController.m (modified) (1 diff)
- trunk/Controllers/MVApplicationController.m (modified) (1 diff)
- trunk/Controllers/MVConnectionsController.m (modified) (5 diffs)
- trunk/Controllers/MVFileTransferController.m (modified) (2 diffs)
- trunk/Panels/JVChatTranscriptBrowserPanel.m (modified) (1 diff)
- trunk/Panels/JVDirectChatPanel.m (modified) (1 diff)
- trunk/Panels/JVSmartTranscriptPanel.m (modified) (1 diff)
- trunk/Preferences/JVAppearancePreferences.m (modified) (2 diffs)
- trunk/Preferences/JVInterfacePreferences.m (modified) (1 diff)
- trunk/Preferences/JVNotificationPreferences.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Controllers/JVChatController.m
r3598 r3718 603 603 NSMutableDictionary *context = [NSMutableDictionary dictionary]; 604 604 [context setObject:NSLocalizedString( @"You Have Been Identified", "identified bubble title" ) forKey:@"title"]; 605 [context setObject:[NSString stringWithFormat: @"%@ on %@", [messageString string], [connection server]] forKey:@"description"];605 [context setObject:[NSString stringWithFormat:NSLocalizedString( @"%@ on %@", "identified bubble message, server message and server name" ), [messageString string], [connection server]] forKey:@"description"]; 606 606 [context setObject:[NSImage imageNamed:@"Keychain"] forKey:@"image"]; 607 607 [[JVNotificationController defaultController] performNotification:@"JVNickNameIdentifiedWithServer" withContextInfo:context]; trunk/Controllers/JVChatViewCriterionController.m
r3418 r3718 329 329 [self view]; 330 330 if( [self format] == JVChatViewTextCriterionFormat ) { 331 return [NSString stringWithFormat: @"%@ %@ \"%@\"", [textKindButton titleOfSelectedItem], [textOperationButton titleOfSelectedItem], [self query]];331 return [NSString stringWithFormat:NSLocalizedString( @"%@ %@ \"%@\"", "description format for kind, operation and query, JVChatViewCriterion" ), [textKindButton titleOfSelectedItem], [textOperationButton titleOfSelectedItem], [self query]]; 332 332 } else if( [self format] == JVChatViewBooleanCriterionFormat ) { 333 333 return [booleanKindButton titleOfSelectedItem]; 334 334 } else if( [self format] == JVChatViewListCriterionFormat ) { 335 return [NSString stringWithFormat: @"%@ %@ %@", [listKindButton titleOfSelectedItem], [listOperationButton titleOfSelectedItem], [listQuery titleOfSelectedItem]];335 return [NSString stringWithFormat:NSLocalizedString( @"%@ %@ %@", "description format for kind, operation and type, JVChatViewCriterion" ), [listKindButton titleOfSelectedItem], [listOperationButton titleOfSelectedItem], [listQuery titleOfSelectedItem]]; 336 336 } else return [super description]; 337 337 } trunk/Controllers/JVChatWindowController.m
r3628 r3718 628 628 - (BOOL) windowShouldClose:(id) sender { 629 629 if( [[self chatViewControllersWithControllerClass:[JVChatRoomPanel class]] count] <= 1 ) return YES; // no rooms, close without a prompt 630 if( NSRunCriticalAlertPanelRelativeToWindow( NSLocalizedString( @"Are you sure you want to part from all chat rooms and close this window?", "are you sure you want to part all chat rooms dialog title" ), NSLocalizedString( @"You will exit all chat rooms and lose any unsaved chat transcripts. Do you want to proceed?", "confirm close of window message" ), @"Close", @"Cancel", nil, [self window] ) == NSOKButton )630 if( NSRunCriticalAlertPanelRelativeToWindow( NSLocalizedString( @"Are you sure you want to part from all chat rooms and close this window?", "are you sure you want to part all chat rooms dialog title" ), NSLocalizedString( @"You will exit all chat rooms and lose any unsaved chat transcripts. Do you want to proceed?", "confirm close of window message" ), NSLocalizedString( @"Close", "close button" ), NSLocalizedString( @"Cancel", "close button" ), nil, [self window] ) == NSOKButton ) 631 631 return YES; 632 632 return NO; trunk/Controllers/JVTranscriptCriterionController.m
r3418 r3718 464 464 [self view]; 465 465 if( [self format] == JVTranscriptTextCriterionFormat ) { 466 return [NSString stringWithFormat: @"%@ %@ \"%@\"", [textKindButton titleOfSelectedItem], [textOperationButton titleOfSelectedItem], [self query]];467 } else if( [self format] == JVTranscriptDateCriterionFormat ) { 468 return [NSString stringWithFormat: @"%@ %@ %@ %@", [dateKindButton titleOfSelectedItem], [dateOperationButton titleOfSelectedItem], [self query], [dateUnitsButton titleOfSelectedItem]];466 return [NSString stringWithFormat:NSLocalizedString( @"%@ %@ \"%@\"", "description format for kind, operation and query, JVTranscriptCriterionController" ), [textKindButton titleOfSelectedItem], [textOperationButton titleOfSelectedItem], [self query]]; 467 } else if( [self format] == JVTranscriptDateCriterionFormat ) { 468 return [NSString stringWithFormat:NSLocalizedString( @"%@ %@ %@ %@", "description format for kind, operation, query and unit, JVTranscriptCriterionController" ), [dateKindButton titleOfSelectedItem], [dateOperationButton titleOfSelectedItem], [self query], [dateUnitsButton titleOfSelectedItem]]; 469 469 } else if( [self format] == JVTranscriptBooleanCriterionFormat ) { 470 470 return [booleanKindButton titleOfSelectedItem]; 471 471 } else if( [self format] == JVTranscriptListCriterionFormat ) { 472 return [NSString stringWithFormat: @"%@ %@ %@", [listKindButton titleOfSelectedItem], [listOperationButton titleOfSelectedItem], [listQuery titleOfSelectedItem]];472 return [NSString stringWithFormat:NSLocalizedString( @"%@ %@ %@", "description format for kind, operation and type, JVTranscriptCriterionController" ), [listKindButton titleOfSelectedItem], [listOperationButton titleOfSelectedItem], [listQuery titleOfSelectedItem]]; 473 473 } else return [super description]; 474 474 } trunk/Controllers/MVApplicationController.m
r3615 r3718 441 441 if( ! [[[JVChatController defaultController] chatViewControllersKindOfClass:[JVDirectChatPanel class]] count] ) 442 442 return NSTerminateNow; // no active chats, we can just quit now 443 if( NSRunCriticalAlertPanel( NSLocalizedString( @"Are you sure you want to quit?", "are you sure you want to quit title" ), NSLocalizedString( @"Are you sure you want to quit Colloquy and disconnect from all active connections?", "are you sure you want to quit message" ), @"Quit", @"Cancel", nil ) == NSCancelButton )443 if( NSRunCriticalAlertPanel( NSLocalizedString( @"Are you sure you want to quit?", "are you sure you want to quit title" ), NSLocalizedString( @"Are you sure you want to quit Colloquy and disconnect from all active connections?", "are you sure you want to quit message" ), NSLocalizedString( @"Quit", "quit button" ), NSLocalizedString( @"Cancel", "cancel button" ), nil ) == NSCancelButton ) 444 444 return NSTerminateCancel; 445 445 return NSTerminateNow; trunk/Controllers/MVConnectionsController.m
r3717 r3718 101 101 [favoritesMenu addItem:menuItem]; 102 102 103 menuItem = [[[NSMenuItem alloc] initWithTitle: @"Add to Favorites"action:@selector( addToFavorites: ) keyEquivalent:@""] autorelease];103 menuItem = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString( @"Add to Favorites", "add to favorites contextual menu") action:@selector( addToFavorites: ) keyEquivalent:@""] autorelease]; 104 104 [menuItem setEnabled:NO]; 105 105 [menuItem setTag:10]; … … 1508 1508 case MVChatPacketSizeError: 1509 1509 if( ! [connection isConnected] ) { 1510 if( NSRunCriticalAlertPanel( NSLocalizedString( @"You have been disconnected", "title of the you have been disconnected error" ), NSLocalizedString( @"The server may have shutdown for maintenance, or the connection was broken between your computer and the server. Check your connection and try again.", "connection dropped" ), NSLocalizedString( @"Reconnect", "reconnect to server button" ), @"Cancel", nil ) == NSOKButton )1510 if( NSRunCriticalAlertPanel( NSLocalizedString( @"You have been disconnected", "title of the you have been disconnected error" ), NSLocalizedString( @"The server may have shutdown for maintenance, or the connection was broken between your computer and the server. Check your connection and try again.", "connection dropped" ), NSLocalizedString( @"Reconnect", "reconnect to server button" ), NSLocalizedString( @"Cancel", "cancel button" ), nil ) == NSOKButton ) 1511 1511 [connection connect]; 1512 1512 } else { 1513 if( NSRunCriticalAlertPanel( NSLocalizedString( @"Could not connect", "title of the could not connect error" ), NSLocalizedString( @"The server may be down for maintenance, or the connection was broken between your computer and the server. Check your connection and try again.", "connection dropped" ), NSLocalizedString( @"Retry", "retry connecting to server" ), @"Cancel", nil ) == NSOKButton )1513 if( NSRunCriticalAlertPanel( NSLocalizedString( @"Could not connect", "title of the could not connect error" ), NSLocalizedString( @"The server may be down for maintenance, or the connection was broken between your computer and the server. Check your connection and try again.", "connection dropped" ), NSLocalizedString( @"Retry", "retry connecting to server" ), NSLocalizedString( @"Cancel" "cancel buttun" ), nil ) == NSOKButton ) 1514 1514 [connection connect]; 1515 1515 } … … 1523 1523 case MVChatSocketError: 1524 1524 case MVChatDNSError: 1525 if( NSRunCriticalAlertPanel( NSLocalizedString( @"Could not connect to Chat server", "chat invalid password dialog title" ), NSLocalizedString( @"The server is disconnected or refusing connections from your computer. Make sure you are connected to the internet and have access to the server.", "chat invalid password dialog message" ), NSLocalizedString( @"Retry", "retry connecting to server" ), @"Cancel", nil ) == NSOKButton )1525 if( NSRunCriticalAlertPanel( NSLocalizedString( @"Could not connect to Chat server", "chat invalid password dialog title" ), NSLocalizedString( @"The server is disconnected or refusing connections from your computer. Make sure you are connected to the internet and have access to the server.", "chat invalid password dialog message" ), NSLocalizedString( @"Retry", "retry connecting to server" ), NSLocalizedString( @"Cancel", "cancel button" ), nil ) == NSOKButton ) 1526 1526 [connection connect]; 1527 1527 break; … … 1812 1812 switch( [[dict objectForKey:@"publicKeyType"] unsignedLongValue] ) { 1813 1813 case MVChatConnectionClientPublicKeyType: 1814 [publicKeyNameDescription setObjectValue: @"User name:"];1815 [publicKeyDescription setObjectValue: @"Please verify the users public key."];1814 [publicKeyNameDescription setObjectValue:NSLocalizedString( @"User name:", "verification target name" )]; 1815 [publicKeyDescription setObjectValue:NSLocalizedString( @"Please verify the users public key.", "message of verification for public key" )]; 1816 1816 break; 1817 1817 case MVChatConnectionServerPublicKeyType: 1818 [publicKeyNameDescription setObjectValue: @"Server name"];1819 [publicKeyDescription setObjectValue: @"Please verify the servers public key."];1818 [publicKeyNameDescription setObjectValue:NSLocalizedString( @"Server name:", "verification target name" )]; 1819 [publicKeyDescription setObjectValue:NSLocalizedString( @"Please verify the servers public key.", "message of verification for public key" )]; 1820 1820 break; 1821 1821 } … … 1928 1928 1929 1929 MVChatConnection *connection = [[_bookmarks objectAtIndex:row] objectForKey:@"connection"]; 1930 NSBeginCriticalAlertSheet( NSLocalizedString( @"Are you sure you want to delete?", "delete confirm dialog title" ), @"Cancel", @"OK", nil, [self window], self, @selector( _deleteConnectionSheetDidEnd:returnCode:contextInfo: ), NULL, NULL, NSLocalizedString( @"Are you sure you want to delete the connection for %@? Any associated Keychain passwords will also be deleted.", "confirm the delete of a connection" ), [connection server] );1930 NSBeginCriticalAlertSheet( NSLocalizedString( @"Are you sure you want to delete?", "delete confirm dialog title" ), NSLocalizedString( @"Cancel", "cancel button" ), NSLocalizedString( @"OK", "OK button" ), nil, [self window], self, @selector( _deleteConnectionSheetDidEnd:returnCode:contextInfo: ), NULL, NULL, NSLocalizedString( @"Are you sure you want to delete the connection for %@? Any associated Keychain passwords will also be deleted.", "confirm the delete of a connection" ), [connection server] ); 1931 1931 } 1932 1932 trunk/Controllers/MVFileTransferController.m
r3505 r3718 244 244 245 245 if( ! download ) { 246 NSBeginAlertSheet( @"Invalid URL", nil, nil, nil, [self window], nil, nil, nil, nil, @"The download URL is either invalid or unsupported.");246 NSBeginAlertSheet( NSLocalizedString( @"Invalid URL", "Invalid URL title" ), nil, nil, nil, [self window], nil, nil, nil, nil, NSLocalizedString( @"The download URL is either invalid or unsupported.", "Invalid URL message" ) ); 247 247 return; 248 248 } … … 730 730 resumePossible = NO; 731 731 result = NSOKButton; 732 } else result = NSRunAlertPanel( NSLocalizedString( @"Save", "save dialog title" ), NSLocalizedString( @"The file %@ in %@ already exists. Would you like to resume from where a previous transfer stopped or replace it?", "replace or resume transfer save dialog message" ), NSLocalizedString( @"Resume", "resume button name" ), ( sheet ? @"Cancel": NSLocalizedString( @"Save As...", "save as button name" ) ), NSLocalizedString( @"Replace", "replace button name" ), [[NSFileManager defaultManager] displayNameAtPath:filename], [filename stringByDeletingLastPathComponent] );733 } else if( fileExists ) result = NSRunAlertPanel( NSLocalizedString( @"Save", "save dialog title" ), NSLocalizedString( @"The file %@ in %@ already exists and can't be resumed. Replace it?", "replace transfer save dialog message" ), NSLocalizedString( @"Replace", "replace button name" ), ( sheet ? @"Cancel": NSLocalizedString( @"Save As...", "save as button name" ) ), nil, [[NSFileManager defaultManager] displayNameAtPath:filename], [filename stringByDeletingLastPathComponent] );732 } else result = NSRunAlertPanel( NSLocalizedString( @"Save", "save dialog title" ), NSLocalizedString( @"The file %@ in %@ already exists. Would you like to resume from where a previous transfer stopped or replace it?", "replace or resume transfer save dialog message" ), NSLocalizedString( @"Resume", "resume button name" ), ( sheet ? NSLocalizedString( @"Cancel", "cancel button" ) : NSLocalizedString( @"Save As...", "save as button name" ) ), NSLocalizedString( @"Replace", "replace button name" ), [[NSFileManager defaultManager] displayNameAtPath:filename], [filename stringByDeletingLastPathComponent] ); 733 } else if( fileExists ) result = NSRunAlertPanel( NSLocalizedString( @"Save", "save dialog title" ), NSLocalizedString( @"The file %@ in %@ already exists and can't be resumed. Replace it?", "replace transfer save dialog message" ), NSLocalizedString( @"Replace", "replace button name" ), ( sheet ? NSLocalizedString( @"Cancel", "cancel button" ) : NSLocalizedString( @"Save As...", "save as button name" ) ), nil, [[NSFileManager defaultManager] displayNameAtPath:filename], [filename stringByDeletingLastPathComponent] ); 734 734 735 735 if( result == NSCancelButton ) { trunk/Panels/JVChatTranscriptBrowserPanel.m
r3418 r3718 37 37 } 38 38 39 if( c > 1 ) [statusText setStringValue:[NSString stringWithFormat: @"%d logs still have to be indexed",c]];40 else if( c == 1 ) [statusText setStringValue: @"One log still has to be indexed"];41 else [statusText setStringValue: @"Indexing is complete"];39 if( c > 1 ) [statusText setStringValue:[NSString stringWithFormat:NSLocalizedString( @"%d logs still have to be indexed", "number of transcripts indexing remains message" ),c]]; 40 else if( c == 1 ) [statusText setStringValue:NSLocalizedString( @"One log still has to be indexed", "one indexing remains message" )]; 41 else [statusText setStringValue:NSLocalizedString( @"Indexing is complete", "transcripts indexing finished message" )]; 42 42 } 43 43 trunk/Panels/JVDirectChatPanel.m
r3694 r3718 1988 1988 } 1989 1989 1990 if( ! name ) name = @"unknown";1990 if( ! name ) name = NSLocalizedString( @"unknown", "unknown name for script event" ); 1991 1991 if( ! [name isKindOfClass:[NSString class]] ) { 1992 1992 name = [[NSScriptCoercionHandler sharedCoercionHandler] coerceValue:name toClass:[NSString class]]; trunk/Panels/JVSmartTranscriptPanel.m
r3470 r3718 106 106 107 107 - (NSString *) title { 108 return ( [_title length] ? _title : @"Smart Transcript");108 return ( [_title length] ? _title : NSLocalizedString( @"Smart Transcript", "default smart transcript name" ) ); 109 109 } 110 110 trunk/Preferences/JVAppearancePreferences.m
r3615 r3718 598 598 - (id) tableView:(NSTableView *) view objectValueForTableColumn:(NSTableColumn *) column row:(int) row { 599 599 if( [[column identifier] isEqualToString:@"key"] ) { 600 return [[_styleOptions objectAtIndex:row] objectForKey:@"description"];600 return NSLocalizedString( [[_styleOptions objectAtIndex:row] objectForKey:@"description"], "description of style options, appearance preferences" ); 601 601 } else if( [[column identifier] isEqualToString:@"value"] ) { 602 602 NSDictionary *info = [_styleOptions objectAtIndex:row]; … … 722 722 } else if( [[options objectForKey:@"type"] isEqualToString:@"list"] ) { 723 723 NSPopUpButtonCell *cell = [[NSPopUpButtonCell new] autorelease]; 724 NSMutableArray *localizedOptions = [NSMutableArray array]; 725 NSString *optionTitle = nil; 726 NSEnumerator *enumerator = [[options objectForKey:@"options"] objectEnumerator]; 727 while( ( optionTitle = [enumerator nextObject] ) ) { 728 [localizedOptions addObject:NSLocalizedString( optionTitle, "title of style option value" )]; 729 } 724 730 [cell setControlSize:NSSmallControlSize]; 725 731 [cell setFont:[NSFont menuFontOfSize:[NSFont smallSystemFontSize]]]; 726 [cell addItemsWithTitles: [options objectForKey:@"options"]];732 [cell addItemsWithTitles:localizedOptions]; 727 733 [options setObject:cell forKey:@"cell"]; 728 734 return cell; trunk/Preferences/JVInterfacePreferences.m
r3460 r3718 146 146 147 147 while( ( rule = [enumerator nextObject] ) ) { 148 if( ! first && operation ) [title appendString: @" and "];149 else if( ! first && ! operation ) [title appendString: @" or "];148 if( ! first && operation ) [title appendString:NSLocalizedString( @" and ", "operation label, interface preferences" )]; 149 else if( ! first && ! operation ) [title appendString:NSLocalizedString( @" or ", "operation label, interface preferences" )]; 150 150 [title appendString:[rule description]]; 151 151 first = NO; trunk/Preferences/JVNotificationPreferences.m
r3614 r3718 91 91 while( ( info = [enumerator nextObject] ) ) { 92 92 if( ! [info objectForKey:@"seperator"] ) { 93 menuItem = [[[NSMenuItem alloc] initWithTitle: [info objectForKey:@"title"]action:NULL keyEquivalent:@""] autorelease];93 menuItem = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString( [info objectForKey:@"title"], "notification event menu items, notification preferences" ) action:NULL keyEquivalent:@""] autorelease]; 94 94 [menuItem setRepresentedObject:[info objectForKey:@"identifier"]]; 95 95 [availableEvents addItem:menuItem];
