Changeset 3718

Show
Ignore:
Timestamp:
09/11/07 22:10:21 (1 year ago)
Author:
rinoa
Message:

Fixes strings that were supposed to be localized. Adding patch submitted in #1084 by redgecko.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Controllers/JVChatController.m

    r3598 r3718  
    603603                                        NSMutableDictionary *context = [NSMutableDictionary dictionary]; 
    604604                                        [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"]; 
    606606                                        [context setObject:[NSImage imageNamed:@"Keychain"] forKey:@"image"]; 
    607607                                        [[JVNotificationController defaultController] performNotification:@"JVNickNameIdentifiedWithServer" withContextInfo:context]; 
  • trunk/Controllers/JVChatViewCriterionController.m

    r3418 r3718  
    329329        [self view]; 
    330330        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]]; 
    332332        } else if( [self format] == JVChatViewBooleanCriterionFormat ) { 
    333333                return [booleanKindButton titleOfSelectedItem]; 
    334334        } 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]]; 
    336336        } else return [super description]; 
    337337} 
  • trunk/Controllers/JVChatWindowController.m

    r3628 r3718  
    628628- (BOOL) windowShouldClose:(id) sender { 
    629629        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 ) 
    631631                return YES; 
    632632        return NO; 
  • trunk/Controllers/JVTranscriptCriterionController.m

    r3418 r3718  
    464464        [self view]; 
    465465        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]]; 
    469469        } else if( [self format] == JVTranscriptBooleanCriterionFormat ) { 
    470470                return [booleanKindButton titleOfSelectedItem]; 
    471471        } 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]]; 
    473473        } else return [super description]; 
    474474} 
  • trunk/Controllers/MVApplicationController.m

    r3615 r3718  
    441441        if( ! [[[JVChatController defaultController] chatViewControllersKindOfClass:[JVDirectChatPanel class]] count] ) 
    442442                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 ) 
    444444                return NSTerminateCancel; 
    445445        return NSTerminateNow; 
  • trunk/Controllers/MVConnectionsController.m

    r3717 r3718  
    101101        [favoritesMenu addItem:menuItem]; 
    102102 
    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]; 
    104104        [menuItem setEnabled:NO]; 
    105105        [menuItem setTag:10]; 
     
    15081508                        case MVChatPacketSizeError: 
    15091509                                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 ) 
    15111511                                                [connection connect]; 
    15121512                                } 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 ) 
    15141514                                                [connection connect]; 
    15151515                                } 
     
    15231523                        case MVChatSocketError: 
    15241524                        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 ) 
    15261526                                        [connection connect]; 
    15271527                                break; 
     
    18121812        switch( [[dict objectForKey:@"publicKeyType"] unsignedLongValue] ) { 
    18131813                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" )]; 
    18161816                        break; 
    18171817                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" )]; 
    18201820                        break; 
    18211821        } 
     
    19281928 
    19291929        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] ); 
    19311931} 
    19321932 
  • trunk/Controllers/MVFileTransferController.m

    r3505 r3718  
    244244 
    245245        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" ) ); 
    247247                return; 
    248248        } 
     
    730730                                resumePossible = NO; 
    731731                                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] ); 
    734734 
    735735                if( result == NSCancelButton ) { 
  • trunk/Panels/JVChatTranscriptBrowserPanel.m

    r3418 r3718  
    3737        } 
    3838 
    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" )]; 
    4242} 
    4343 
  • trunk/Panels/JVDirectChatPanel.m

    r3694 r3718  
    19881988        } 
    19891989 
    1990         if( ! name ) name = @"unknown"
     1990        if( ! name ) name = NSLocalizedString( @"unknown", "unknown name for script event" )
    19911991        if( ! [name isKindOfClass:[NSString class]] ) { 
    19921992                name = [[NSScriptCoercionHandler sharedCoercionHandler] coerceValue:name toClass:[NSString class]]; 
  • trunk/Panels/JVSmartTranscriptPanel.m

    r3470 r3718  
    106106 
    107107- (NSString *) title { 
    108         return ( [_title length] ? _title : @"Smart Transcript" ); 
     108        return ( [_title length] ? _title : NSLocalizedString( @"Smart Transcript", "default smart transcript name" ) ); 
    109109} 
    110110 
  • trunk/Preferences/JVAppearancePreferences.m

    r3615 r3718  
    598598- (id) tableView:(NSTableView *) view objectValueForTableColumn:(NSTableColumn *) column row:(int) row { 
    599599        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" )
    601601        } else if( [[column identifier] isEqualToString:@"value"] ) { 
    602602                NSDictionary *info = [_styleOptions objectAtIndex:row]; 
     
    722722                } else if( [[options objectForKey:@"type"] isEqualToString:@"list"] ) { 
    723723                        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                        } 
    724730                        [cell setControlSize:NSSmallControlSize]; 
    725731                        [cell setFont:[NSFont menuFontOfSize:[NSFont smallSystemFontSize]]]; 
    726                         [cell addItemsWithTitles:[options objectForKey:@"options"]]; 
     732                        [cell addItemsWithTitles:localizedOptions]; 
    727733                        [options setObject:cell forKey:@"cell"]; 
    728734                        return cell; 
  • trunk/Preferences/JVInterfacePreferences.m

    r3460 r3718  
    146146 
    147147        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" )]; 
    150150                [title appendString:[rule description]]; 
    151151                first = NO; 
  • trunk/Preferences/JVNotificationPreferences.m

    r3614 r3718  
    9191        while( ( info = [enumerator nextObject] ) ) { 
    9292                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]; 
    9494                        [menuItem setRepresentedObject:[info objectForKey:@"identifier"]]; 
    9595                        [availableEvents addItem:menuItem];