Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few grammar fixes for error messages. #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion AddCollectionController.m
Expand Up @@ -40,7 +40,7 @@ - (IBAction)cancel:(id)sender {


- (IBAction)add:(id)sender { - (IBAction)add:(id)sender {
if ([ [collectionname stringValue] length] == 0) { if ([ [collectionname stringValue] length] == 0) {
NSRunAlertPanel(@"Error", @"Collection name could not be empty", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Collection name can not be empty", @"OK", nil, nil);
return; return;
} }
NSArray *keys = [[NSArray alloc] initWithObjects:@"dbname", @"collectionname", nil]; NSArray *keys = [[NSArray alloc] initWithObjects:@"dbname", @"collectionname", nil];
Expand Down
8 changes: 4 additions & 4 deletions AddConnectionController.m
Expand Up @@ -175,19 +175,19 @@ - (BOOL)validateConnection
return NO; return NO;
} }
if ([[connectionInfo objectForKey:@"alias"] length]<3) { if ([[connectionInfo objectForKey:@"alias"] length]<3) {
NSRunAlertPanel(@"Error", @"Connection name should not be less than 3 charaters", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Alias should not be less than 3 charaters", @"OK", nil, nil);
return NO; return NO;
} }
if ([connectionsArrayController checkDuplicate:[connectionInfo objectForKey:@"alias"]]) { if ([connectionsArrayController checkDuplicate:[connectionInfo objectForKey:@"alias"]]) {
NSRunAlertPanel(@"Error", @"Connection alias name has been existed!", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Alias already in use!", @"OK", nil, nil);
return NO; return NO;
} }
if ([usesshCheckBox state] == 1 && ([[connectionInfo objectForKey:@"bindaddress"] length] == 0 || [[connectionInfo objectForKey:@"sshhost"] length] == 0)) { if ([usesshCheckBox state] == 1 && ([[connectionInfo objectForKey:@"bindaddress"] length] == 0 || [[connectionInfo objectForKey:@"sshhost"] length] == 0)) {
NSRunAlertPanel(@"Error", @"Please full fill ssh information!", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Tunneling requires both Bind Address and SSH Host!", @"OK", nil, nil);
return NO; return NO;
} }
if ([usereplCheckBox state] == 1 && ([[connectionInfo objectForKey:@"servers"] length] == 0 || [[connectionInfo objectForKey:@"repl_name"] length] == 0)) { if ([usereplCheckBox state] == 1 && ([[connectionInfo objectForKey:@"servers"] length] == 0 || [[connectionInfo objectForKey:@"repl_name"] length] == 0)) {
NSRunAlertPanel(@"Error", @"Please full fill replica-set information!", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Replica Set requires both Servers and Set Name!", @"OK", nil, nil);
return NO; return NO;
} }
return YES; return YES;
Expand Down
2 changes: 1 addition & 1 deletion AddDBController.m
Expand Up @@ -51,7 +51,7 @@ - (IBAction)cancel:(id)sender {


- (IBAction)add:(id)sender { - (IBAction)add:(id)sender {
if ([ [dbname stringValue] length] == 0) { if ([ [dbname stringValue] length] == 0) {
NSRunAlertPanel(@"Error", @"Database name could not be empty", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Database name can not be empty", @"OK", nil, nil);
return; return;
} }
NSArray *keys = [[NSArray alloc] initWithObjects:@"dbname", @"user", @"password", nil]; NSArray *keys = [[NSArray alloc] initWithObjects:@"dbname", @"user", @"password", nil];
Expand Down
8 changes: 4 additions & 4 deletions EditConnectionController.m
Expand Up @@ -212,19 +212,19 @@ - (BOOL)validateConnection:(NSDictionary *)connectionInfo
return NO; return NO;
} }
if ([[connectionInfo objectForKey:@"alias"] length]<3) { if ([[connectionInfo objectForKey:@"alias"] length]<3) {
NSRunAlertPanel(@"Error", @"Connection name should not be less than 3 charaters", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Alias should not be less than 3 charaters", @"OK", nil, nil);
return NO; return NO;
} }
if (![[connectionInfo objectForKey:@"alias"] isEqualToString:connection.alias] && [connectionsArrayController checkDuplicate:[connectionInfo objectForKey:@"alias"]]) { if (![[connectionInfo objectForKey:@"alias"] isEqualToString:connection.alias] && [connectionsArrayController checkDuplicate:[connectionInfo objectForKey:@"alias"]]) {
NSRunAlertPanel(@"Error", @"Connection alias name has been existed!", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Alias already in use!", @"OK", nil, nil);
return NO; return NO;
} }
if ([usesshCheckBox state] == 1 && ([[connectionInfo objectForKey:@"bindaddress"] length] == 0 || [[connectionInfo objectForKey:@"sshhost"] length] == 0)) { if ([usesshCheckBox state] == 1 && ([[connectionInfo objectForKey:@"bindaddress"] length] == 0 || [[connectionInfo objectForKey:@"sshhost"] length] == 0)) {
NSRunAlertPanel(@"Error", @"Please full fill ssh information!", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Tunneling requires both Bind Address and SSH Host!", @"OK", nil, nil);
return NO; return NO;
} }
if ([usereplCheckBox state] == 1 && ([[connectionInfo objectForKey:@"servers"] length] == 0 || [[connectionInfo objectForKey:@"repl_name"] length] == 0)) { if ([usereplCheckBox state] == 1 && ([[connectionInfo objectForKey:@"servers"] length] == 0 || [[connectionInfo objectForKey:@"repl_name"] length] == 0)) {
NSRunAlertPanel(@"Error", @"Please full fill replica-set information!", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Replica Set requires both Servers and Set Name!", @"OK", nil, nil);
return NO; return NO;
} }
return YES; return YES;
Expand Down
2 changes: 1 addition & 1 deletion ExportWindowController.mm
Expand Up @@ -79,7 +79,7 @@ - (IBAction)export:(id)sender {
[progressIndicator setDoubleValue:0]; [progressIndicator setDoubleValue:0];
NSString *collection = [[NSString alloc] initWithString:[collectionTextField stringValue]]; NSString *collection = [[NSString alloc] initWithString:[collectionTextField stringValue]];
if (![collection isPresent]) { if (![collection isPresent]) {
NSRunAlertPanel(@"Error", @"Collection name could not be empty!", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Collection name can not be empty!", @"OK", nil, nil);
return; return;
} }
NSString *tablename = [[NSString alloc] initWithString:[tablesPopUpButton titleOfSelectedItem]]; NSString *tablename = [[NSString alloc] initWithString:[tablesPopUpButton titleOfSelectedItem]];
Expand Down
4 changes: 2 additions & 2 deletions ImportWindowController.mm
Expand Up @@ -79,11 +79,11 @@ - (IBAction)import:(id)sender {
NSString *collection = [[NSString alloc] initWithString:[collectionTextField stringValue]]; NSString *collection = [[NSString alloc] initWithString:[collectionTextField stringValue]];
int chunkSize = [chunkSizeTextField intValue]; int chunkSize = [chunkSizeTextField intValue];
if (![collection isPresent]) { if (![collection isPresent]) {
NSRunAlertPanel(@"Error", @"Collection name could not be empty!", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Collection name can not be empty!", @"OK", nil, nil);
return; return;
} }
if (chunkSize == 0) { if (chunkSize == 0) {
NSRunAlertPanel(@"Error", @"Chunk Size could not be 0!", @"OK", nil, nil); NSRunAlertPanel(@"Error", @"Chunk Size can not be 0!", @"OK", nil, nil);
return; return;
} }
NSString *tablename = [[NSString alloc] initWithString:[tablesPopUpButton titleOfSelectedItem]]; NSString *tablename = [[NSString alloc] initWithString:[tablesPopUpButton titleOfSelectedItem]];
Expand Down