Skip to content

Commit 50e309b

Browse files
committed
Now that was some silly code… (part of #2811)
1 parent c83f7b1 commit 50e309b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Source/SPIndexesController.m

+4-1
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,15 @@ - (IBAction)removeIndex:(id)sender
264264
}
265265
}
266266
}
267+
268+
NSString *info = hasForeignKey ? [NSString stringWithFormat:NSLocalizedString(@"The foreign key relationship '%@' has a dependency on this index. This relationship must be removed before the index can be deleted.\n\nAre you sure you want to continue to delete the relationship and the index? This action cannot be undone.", @"delete index and foreign key informative message"), constraintName]
269+
: [NSString stringWithFormat:NSLocalizedString(@"Are you sure you want to delete the index '%@'? This action cannot be undone.", @"delete index informative message"), keyName];
267270

268271
NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Delete index '%@'?", @"delete index message"), keyName]
269272
defaultButton:NSLocalizedString(@"Delete", @"delete button")
270273
alternateButton:NSLocalizedString(@"Cancel", @"cancel button")
271274
otherButton:nil
272-
informativeTextWithFormat:hasForeignKey ? NSLocalizedString(@"The foreign key relationship '%@' has a dependency on this index. This relationship must be removed before the index can be deleted.\n\nAre you sure you want to continue to delete the relationship and the index? This action cannot be undone.", @"delete index and foreign key informative message"), constraintName : NSLocalizedString(@"Are you sure you want to delete the index '%@'? This action cannot be undone.", @"delete index informative message"), keyName];
275+
informativeTextWithFormat:@"%@", info];
273276

274277
[alert setAlertStyle:NSCriticalAlertStyle];
275278

0 commit comments

Comments
 (0)