From 7b2ffd4372883d9a6fa23ed4d181c09c5cb921e4 Mon Sep 17 00:00:00 2001 From: jakob Date: Fri, 20 Mar 2009 17:54:04 +0000 Subject: - changed the status message after executing a custom query to read "1 row affected" / "6 rows affected" rather than "1 row(s) affected" --- Source/CustomQuery.m | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index 94ec6cba..a955bec3 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -346,18 +346,34 @@ sets the tableView columns corresponding to the mysql-result // Set up the status string if ( totalQueriesRun > 1 ) { - [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%i total row(s) affected, by %i queries taking %@", @"text showing how many rows have been affected by multiple queries"), - totalAffectedRows, - totalQueriesRun, - [NSString stringForTimeInterval:executionTime] - ]]; + if (totalAffectedRows==1) { + [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"1 row affected in total, by %i queries taking %@", @"text showing one row has been affected by multiple queries"), + totalQueriesRun, + [NSString stringForTimeInterval:executionTime] + ]]; + + } else { + [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%i rows affected in total, by %i queries taking %@", @"text showing how many rows have been affected by multiple queries"), + totalAffectedRows, + totalQueriesRun, + [NSString stringForTimeInterval:executionTime] + ]]; + + } } else { - [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%i row(s) affected, taking %@", @"text showing how many rows have been affected by a single query"), - totalAffectedRows, - [NSString stringForTimeInterval:executionTime] - ]]; - } - + if (totalAffectedRows==1) { + [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"1 row affected, taking %@", @"text showing one row has been affected by a single query"), + [NSString stringForTimeInterval:executionTime] + ]]; + } else { + [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%i rows affected, taking %@", @"text showing how many rows have been affected by a single query"), + totalAffectedRows, + [NSString stringForTimeInterval:executionTime] + ]]; + + } + } + if ( !theResult || ![theResult numOfRows] ) { //no rows in result //free tableView -- cgit v1.2.3