diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPCustomQuery.m | 6 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.m | 26 | ||||
-rw-r--r-- | Source/SPPreferenceController.m | 2 | ||||
-rw-r--r-- | Source/SPSSHTunnel.m | 2 | ||||
-rw-r--r-- | Source/SPTableData.m | 2 | ||||
-rw-r--r-- | Source/SPTableRelations.m | 4 |
6 files changed, 21 insertions, 21 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index ec5f8347..6703ea5d 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -1665,7 +1665,7 @@ NSString *tableForColumn = [columnDefinition objectForKey:@"org_table"]; if(!tableForColumn || ![tableForColumn length]) { - [errorText setStringValue:[NSString stringWithFormat:@"Couldn't identify field origin unambiguously. The column '%@' contains data from more than one table.", [columnDefinition objectForKey:@"name"]]]; + [errorText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Couldn't identify field origin unambiguously. The column '%@' contains data from more than one table.", @"Custom Query result editing error - could not identify a corresponding column"), [columnDefinition objectForKey:@"name"]]]; NSBeep(); return; } @@ -2046,9 +2046,9 @@ if(!isFieldEditable) if(numberOfPossibleUpdateRows == 0) - [errorText setStringValue:[NSString stringWithFormat:@"Field is not editable. No matching record found. Try to add the primary key field or more fields in your SELECT statement for table '%@' to identify field origin unambiguously.", tableForColumn]]; + [errorText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Field is not editable. No matching record found. Try to add the primary key field or more fields in your SELECT statement for table '%@' to identify field origin unambiguously.", @"Custom Query result editing error - could not identify original row"), tableForColumn]]; else - [errorText setStringValue:[NSString stringWithFormat:@"Field is not editable. Couldn't identify field origin unambiguously (%ld match%@).", (long)numberOfPossibleUpdateRows, (numberOfPossibleUpdateRows>1)?@"es":@""]]; + [errorText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Field is not editable. Couldn't identify field origin unambiguously (%ld match%@).", @"Custom Query result editing error - could not match row being edited uniquely"), (long)numberOfPossibleUpdateRows, (numberOfPossibleUpdateRows>1)?NSLocalizedString(@"es", @"Plural suffix for row count, eg 4 match*es*"):@""]]; } else { // no table/databse name are given diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index c2d4896c..312d20af 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -1782,7 +1782,7 @@ // Check for errors, only displaying if the connection hasn't been terminated if ([mySQLConnection queryErrored]) { if ([mySQLConnection isConnected]) { - NSRunAlertPanel(@"Error", [NSString stringWithFormat:@"An error occured while creating table syntax.\n\n: %@",[mySQLConnection getLastErrorMessage]], @"OK", nil, nil); + NSRunAlertPanel(@"Error", [NSString stringWithFormat:NSLocalizedString(@"An error occured while creating table syntax.\n\n: %@", @"Error shown when unable to show create table syntax"),[mySQLConnection getLastErrorMessage]], @"OK", nil, nil); } return; @@ -1801,7 +1801,7 @@ return; } - [createTableSyntaxTextField setStringValue:[NSString stringWithFormat:@"Create syntax for %@ '%@'", typeString, [self table]]]; + [createTableSyntaxTextField setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Create syntax for %@ '%@'", @"Create syntax label"), typeString, [self table]]]; [createTableSyntaxTextView setEditable:YES]; [createTableSyntaxTextView setString:@""]; @@ -1852,7 +1852,7 @@ // Check for errors, only displaying if the connection hasn't been terminated if ([mySQLConnection queryErrored]) { if ([mySQLConnection isConnected]) { - NSRunAlertPanel(@"Error", [NSString stringWithFormat:@"An error occured while creating table syntax.\n\n: %@",[mySQLConnection getLastErrorMessage]], @"OK", nil, nil); + NSRunAlertPanel(@"Error", [NSString stringWithFormat:NSLocalizedString(@"An error occured while creating table syntax.\n\n: %@", @"Error shown when unable to show create table syntax"),[mySQLConnection getLastErrorMessage]], @"OK", nil, nil); } return; } @@ -1934,13 +1934,13 @@ message = ([[lastresult objectForKey:@"Msg_type"] isEqualToString:@"status"]) ? NSLocalizedString(@"Check table successfully passed.",@"check table successfully passed message") : NSLocalizedString(@"Check table failed.", @"check table failed message"); - message = [NSString stringWithFormat:@"%@\n\nMySQL said: %@", message, [lastresult objectForKey:@"Msg_text"]]; + message = [NSString stringWithFormat:NSLocalizedString(@"%@\n\nMySQL said: %@", @"Error display text, showing original MySQL error"), message, [lastresult objectForKey:@"Msg_text"]]; } else if(statusOK) { message = NSLocalizedString(@"Check of all selected items successfully passed.",@"check of all selected items successfully passed message"); } if(message) { - [[NSAlert alertWithMessageText:[NSString stringWithFormat:@"Check %@", what] + [[NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Check %@", @"CHECK one or more tables - result title"), what] defaultButton:@"OK" alternateButton:nil otherButton:nil @@ -2010,13 +2010,13 @@ message = ([[lastresult objectForKey:@"Msg_type"] isEqualToString:@"status"]) ? NSLocalizedString(@"Successfully analyzed table.",@"analyze table successfully passed message") : NSLocalizedString(@"Analyze table failed.", @"analyze table failed message"); - message = [NSString stringWithFormat:@"%@\n\nMySQL said: %@", message, [lastresult objectForKey:@"Msg_text"]]; + message = [NSString stringWithFormat:NSLocalizedString(@"%@\n\nMySQL said: %@", @"Error display text, showing original MySQL error"), message, [lastresult objectForKey:@"Msg_text"]]; } else if(statusOK) { message = NSLocalizedString(@"Successfully analyzed all selected items.",@"successfully analyzed all selected items message"); } if(message) { - [[NSAlert alertWithMessageText:[NSString stringWithFormat:@"Analyze %@", what] + [[NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Analyze %@", @"ANALYZE one or more tables - result title"), what] defaultButton:@"OK" alternateButton:nil otherButton:nil @@ -2086,13 +2086,13 @@ message = ([[lastresult objectForKey:@"Msg_type"] isEqualToString:@"status"]) ? NSLocalizedString(@"Successfully optimized table.",@"optimize table successfully passed message") : NSLocalizedString(@"Optimize table failed.", @"optimize table failed message"); - message = [NSString stringWithFormat:@"%@\n\nMySQL said: %@", message, [lastresult objectForKey:@"Msg_text"]]; + message = [NSString stringWithFormat:NSLocalizedString(@"%@\n\nMySQL said: %@", @"Error display text, showing original MySQL error"), message, [lastresult objectForKey:@"Msg_text"]]; } else if(statusOK) { message = NSLocalizedString(@"Successfully optimized all selected items.",@"successfully optimized all selected items message"); } if(message) { - [[NSAlert alertWithMessageText:[NSString stringWithFormat:@"Optimize %@", what] + [[NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Optimize %@", @"OPTIMIZE one or more tables - result title"), what] defaultButton:@"OK" alternateButton:nil otherButton:nil @@ -2161,13 +2161,13 @@ message = ([[lastresult objectForKey:@"Msg_type"] isEqualToString:@"status"]) ? NSLocalizedString(@"Successfully repaired table.",@"repair table successfully passed message") : NSLocalizedString(@"Repair table failed.", @"repair table failed message"); - message = [NSString stringWithFormat:@"%@\n\nMySQL said: %@", message, [lastresult objectForKey:@"Msg_text"]]; + message = [NSString stringWithFormat:NSLocalizedString(@"%@\n\nMySQL said: %@", @"Error display text, showing original MySQL error"), message, [lastresult objectForKey:@"Msg_text"]]; } else if(statusOK) { message = NSLocalizedString(@"Successfully repaired all selected items.",@"successfully repaired all selected items message"); } if(message) { - [[NSAlert alertWithMessageText:[NSString stringWithFormat:@"Repair %@", what] + [[NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Repair %@", @"REPAIR one or more tables - result title"), what] defaultButton:@"OK" alternateButton:nil otherButton:nil @@ -2236,13 +2236,13 @@ message = ([[lastresult objectForKey:@"Msg_type"] isEqualToString:@"status"]) ? NSLocalizedString(@"Successfully flushed table.",@"flush table successfully passed message") : NSLocalizedString(@"Flush table failed.", @"flush table failed message"); - message = [NSString stringWithFormat:@"%@\n\nMySQL said: %@", message, [lastresult objectForKey:@"Msg_text"]]; + message = [NSString stringWithFormat:NSLocalizedString(@"%@\n\nMySQL said: %@", @"Error display text, showing original MySQL error"), message, [lastresult objectForKey:@"Msg_text"]]; } else if(statusOK) { message = NSLocalizedString(@"Successfully flushed all selected items.",@"successfully flushed all selected items message"); } if(message) { - [[NSAlert alertWithMessageText:[NSString stringWithFormat:@"Flush %@", what] + [[NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Flush %@", @"FLUSH one or more tables - result title"), what] defaultButton:@"OK" alternateButton:nil otherButton:nil diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index 2d798204..81fa4af8 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -418,7 +418,7 @@ [favorite setObject:favoriteid forKey:@"id"]; // Alter the name for clarity - [favorite setObject:[NSString stringWithFormat:@"%@ Copy", [favorite objectForKey:@"name"]] forKey:@"name"]; + [favorite setObject:[NSString stringWithFormat:NSLocalizedString(@"%@ Copy", @"Initial favourite name after duplicating a previous favourite"), [favorite objectForKey:@"name"]] forKey:@"name"]; // Create new keychain items if appropriate if (password && [password length]) { diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m index 0cf2a724..5cc833fd 100644 --- a/Source/SPSSHTunnel.m +++ b/Source/SPSSHTunnel.m @@ -581,7 +581,7 @@ // Work out whether a passphrase is being requested, extracting the key name NSString *keyName = [theQuery stringByMatching:@"^\\s*Enter passphrase for key \\'(.*)\\':\\s*$" capture:1L]; if (keyName) { - [sshPasswordText setStringValue:[NSString stringWithFormat:@"Enter your password for the SSH key\n\"%@\"", keyName]]; + [sshPasswordText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Enter your password for the SSH key\n\"%@\"", @"SSH key password prompt"), keyName]]; [sshPasswordKeychainCheckbox setHidden:NO]; currentKeyName = [keyName retain]; } else { diff --git a/Source/SPTableData.m b/Source/SPTableData.m index 6e169e09..8ec18cae 100644 --- a/Source/SPTableData.m +++ b/Source/SPTableData.m @@ -853,7 +853,7 @@ // If the "Engine" key is NULL, a problem occurred when retrieving the table information. if ([[status objectForKey:@"Engine"] isNSNull]) { - [status setDictionary:[NSDictionary dictionaryWithObjectsAndKeys:@"Error", @"Engine", [NSString stringWithFormat:@"An error occurred retrieving table information. MySQL said: %@", [status objectForKey:@"Comment"]], @"Comment", [tableListInstance tableName], @"Name", nil]]; + [status setDictionary:[NSDictionary dictionaryWithObjectsAndKeys:@"Error", @"Engine", [NSString stringWithFormat:NSLocalizedString(@"An error occurred retrieving table information. MySQL said: %@", @"MySQL table info retrieval error message"), [status objectForKey:@"Comment"]], @"Comment", [tableListInstance tableName], @"Name", nil]]; return FALSE; } diff --git a/Source/SPTableRelations.m b/Source/SPTableRelations.m index cca7f213..ce8b7829 100644 --- a/Source/SPTableRelations.m +++ b/Source/SPTableRelations.m @@ -166,7 +166,7 @@ - (IBAction)addRelation:(id)sender { // Set up the controls - [addRelationTableBox setTitle:[NSString stringWithFormat:@"Table: %@", [tablesListInstance tableName]]]; + [addRelationTableBox setTitle:[NSString stringWithFormat:NSLocalizedString(@"Table: %@", @"Add Relation sheet title, showing table name"), [tablesListInstance tableName]]]; [columnPopUpButton removeAllItems]; [columnPopUpButton addItemsWithTitles:[tableDataInstance columnNames]]; @@ -244,7 +244,7 @@ if (([tablesListInstance tableType] == SPTableTypeTable) && ([[engine lowercaseString] isEqualToString:@"innodb"])) { // Update the text label - [labelTextField setStringValue:[NSString stringWithFormat:@"Relations for table: %@", [tablesListInstance tableName]]]; + [labelTextField setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Relations for table: %@", @"Relations tab subtitle showing table name"), [tablesListInstance tableName]]]; [addRelationButton setEnabled:enableInteraction]; [refreshRelationsButton setEnabled:enableInteraction]; |