diff options
author | dmoagx <post@wickenrode.com> | 2010-09-26 23:55:32 +0000 |
---|---|---|
committer | dmoagx <post@wickenrode.com> | 2010-09-26 23:55:32 +0000 |
commit | 37fadd868cd6bc80cafac2645d33a69e38d6741b (patch) | |
tree | ad8eeffe8c9b5ce6fc421dd95524285c7265dd0e /Source | |
parent | 2281746fdc1f1a2ff93fc28fc0182614445d5938 (diff) | |
download | sequelpro-37fadd868cd6bc80cafac2645d33a69e38d6741b.tar.gz sequelpro-37fadd868cd6bc80cafac2645d33a69e38d6741b.tar.bz2 sequelpro-37fadd868cd6bc80cafac2645d33a69e38d6741b.zip |
* One label was too short in Content Filter Manager
* Changed some NSLocalizedString() comments to be more descriptive - keep in mind that the comment is the only thing that can provide context here.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPContentFilterManager.m | 23 | ||||
-rw-r--r-- | Source/SPDataImport.m | 10 | ||||
-rw-r--r-- | Source/SPNavigatorController.m | 24 | ||||
-rw-r--r-- | Source/SPPreferenceController.m | 24 |
4 files changed, 42 insertions, 39 deletions
diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m index a3f95fa2..8d1c0713 100644 --- a/Source/SPContentFilterManager.m +++ b/Source/SPContentFilterManager.m @@ -31,9 +31,10 @@ #import "SPConstants.h" #import "SPConnectionController.h" -#define SP_MULTIPLE_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[multiple selection]", @"[multiple selection]") -#define SP_NO_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[no selection]", @"[no selection]") -#define SP_NAME_REQUIRED_PLACEHOLDER_STRING NSLocalizedString(@"[name required]", @"[name required]") +#define SP_MULTIPLE_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[multiple selection]", @"displayed when multiple content filters are selected in ContentFilterManager") +#define SP_NO_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[no selection]", @"displayed if there is no content filter selected in ContentFilterManager") +#define SP_NAME_REQUIRED_PLACEHOLDER_STRING NSLocalizedString(@"[name required]", @"displayed when new content filter has empty Name field (ContentFilterManager)") +#define SP_FILE_PARSER_ERROR_TITLE_STRING NSLocalizedString(@"Error while reading data file", @"File with content filters could not be parsed - message title (ContentFilterManager)") @interface SPContentFilterManager (PrivateAPI) @@ -136,7 +137,7 @@ [removeButton setEnabled:([contentFilterTableView numberOfSelectedRows] > 0)]; // Set column header - [[[contentFilterTableView tableColumnWithIdentifier:@"MenuLabel"] headerCell] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"‘%@’ Fields Content Filters", @"content filter for field type ‘%@’"), filterType]]; + [[[contentFilterTableView tableColumnWithIdentifier:@"MenuLabel"] headerCell] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"‘%@’ Fields Content Filters", @"table column header. Read: 'Showing all content filters for fields of type %@' (ContentFilterManager)"), filterType]]; // Set the button delegate [splitViewButtonBar setSplitViewDelegate:self]; @@ -725,14 +726,14 @@ [numberOfArgsLabel setHidden:(![[contentFilterTextView string] length])]; NSUInteger numOfArgs = [[[contentFilterTextView string] componentsMatchedByRegex:@"(?<!\\\\)(\\$\\{.*?\\})"] count]; - [numberOfArgsLabel setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Number of arguments: %lu", @"Number of arguments: %lu"), (unsigned long)numOfArgs]]; + [numberOfArgsLabel setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Number of arguments: %lu", @"Argument count (ContentFilterManager)"), (unsigned long)numOfArgs]]; [contentFilterConjunctionTextField setHidden:(numOfArgs < 2)]; [contentFilterConjunctionLabel setHidden:(numOfArgs < 2)]; if(numOfArgs > 2) { [resultingClauseLabel setStringValue:NSLocalizedString(@"Error", @"error")]; - [resultingClauseContentLabel setStringValue:NSLocalizedString(@"Maximum number of arguments is 2!", @"Maximum number of arguments is 2!")]; + [resultingClauseContentLabel setStringValue:NSLocalizedString(@"Maximum number of arguments is 2!", @"Shown when user inserts too many arguments (ContentFilterManager)")]; } else { [resultingClauseLabel setStringValue:@"SELECT * FROM <table> WHERE"]; NSMutableString *c = [[NSMutableString alloc] init]; @@ -836,11 +837,11 @@ mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&convError] retain]; if(!spf || readError != nil || [convError length] || !(format == NSPropertyListXMLFormat_v1_0 || format == NSPropertyListBinaryFormat_v1_0)) { - NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading data file", @"error while reading data file")] + NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:SP_FILE_PARSER_ERROR_TITLE_STRING] defaultButton:NSLocalizedString(@"OK", @"OK button") alternateButton:nil otherButton:nil - informativeTextWithFormat:NSLocalizedString(@"File couldn't be read.", @"error while reading data file")]; + informativeTextWithFormat:NSLocalizedString(@"File couldn't be read.", @"file with content filters could not be parsed - message text (ContentFilterManager)")]; [alert setAlertStyle:NSCriticalAlertStyle]; [alert runModal]; @@ -864,11 +865,11 @@ [contentFilterTableView reloadData]; [spf release]; } else { - NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading data file", @"error while reading data file")] + NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:SP_FILE_PARSER_ERROR_TITLE_STRING] defaultButton:NSLocalizedString(@"OK", @"OK button") alternateButton:nil otherButton:nil - informativeTextWithFormat:NSLocalizedString(@"No content filters found.", @"error that no content filters found")]; + informativeTextWithFormat:NSLocalizedString(@"No content filters found.", @"No content filters were found in file to import (ContentFilterManager)")]; [alert setAlertStyle:NSInformationalAlertStyle]; [alert runModal]; @@ -916,7 +917,7 @@ errorDescription:&err]; if(err != nil) { - NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while converting content filter data", @"error while converting content filter data")] + NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while converting content filter data", @"Content filters could not be converted to plist upon export - message title (ContentFilterManager)")] defaultButton:NSLocalizedString(@"OK", @"OK button") alternateButton:nil otherButton:nil diff --git a/Source/SPDataImport.m b/Source/SPDataImport.m index 11113a58..f0d1a853 100644 --- a/Source/SPDataImport.m +++ b/Source/SPDataImport.m @@ -45,6 +45,8 @@ #import "SPEncodingPopupAccessory.h" #import <UniversalDetector/UniversalDetector.h> +#define SP_FILE_READ_ERROR_STRING NSLocalizedString(@"File read error", @"File read error title (Import Dialog)") + @interface SPDataImport (PrivateAPI) - (void) _importBackgroundProcess:(NSString *)filename; @@ -436,7 +438,7 @@ [mySQLConnection queryString:[NSString stringWithFormat:@"SET NAMES '%@'", connectionEncodingToRestore]]; } [self closeAndStopProgressSheet]; - SPBeginAlertSheet(NSLocalizedString(@"File read error", @"File read error title"), + SPBeginAlertSheet(SP_FILE_READ_ERROR_STRING, NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"An error occurred when reading the file.\n\nOnly %ld queries were executed.\n\n(%@)", @"SQL read error, including detail from system"), (long)queriesPerformed, [exception reason]]); @@ -486,7 +488,7 @@ } else { displayEncoding = [NSString localizedNameOfStringEncoding:sqlEncoding]; } - SPBeginAlertSheet(NSLocalizedString(@"File read error", @"File read error title"), + SPBeginAlertSheet(SP_FILE_READ_ERROR_STRING, NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"An error occurred when reading the file, as it could not be read in the encoding you selected (%@).\n\nOnly %ld queries were executed.", @"SQL encoding read error"), displayEncoding, (long)queriesPerformed]); @@ -763,7 +765,7 @@ // Report file read errors, and bail @catch (NSException *exception) { [self closeAndStopProgressSheet]; - SPBeginAlertSheet(NSLocalizedString(@"File read error", @"File read error title"), + SPBeginAlertSheet(SP_FILE_READ_ERROR_STRING, NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"An error occurred when reading the file.\n\nOnly %ld rows were imported.\n\n(%@)", @"CSV read error, including detail string from system"), (long)rowsImported, [exception reason]]); @@ -812,7 +814,7 @@ } else { displayEncoding = [NSString localizedNameOfStringEncoding:csvEncoding]; } - SPBeginAlertSheet(NSLocalizedString(@"File read error", @"File read error title"), + SPBeginAlertSheet(SP_FILE_READ_ERROR_STRING, NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"An error occurred when reading the file, as it could not be read using the encoding you selected (%@).\n\nOnly %ld rows were imported.", @"CSV encoding read error"), displayEncoding, (long)rowsImported]); diff --git a/Source/SPNavigatorController.m b/Source/SPNavigatorController.m index 76d77e7e..ec42b092 100644 --- a/Source/SPNavigatorController.m +++ b/Source/SPNavigatorController.m @@ -1196,23 +1196,23 @@ static NSComparisonResult compareStrings(NSString *s1, NSString *s2, void* conte if(type == 0 || type == 1) // TABLE / VIEW switch(index) { case 0: - return NSLocalizedString(@"Type", @"type label"); + return NSLocalizedString(@"Type", @"type label (Navigator)"); case 1: - return NSLocalizedString(@"Default", @"default label"); + return NSLocalizedString(@"Default", @"default label (Navigator)"); case 2: - return NSLocalizedString(@"Is Nullable", @"is nullable label"); + return NSLocalizedString(@"Is Nullable", @"is nullable label (Navigator)"); case 3: - return NSLocalizedString(@"Encoding", @"encoding label"); + return NSLocalizedString(@"Encoding", @"encoding label (Navigator)"); case 4: - return NSLocalizedString(@"Collation", @"collation label"); + return NSLocalizedString(@"Collation", @"collation label (Navigator)"); case 5: - return NSLocalizedString(@"Key", @"key label"); + return NSLocalizedString(@"Key", @"key label (Navigator)"); case 6: - return NSLocalizedString(@"Extra", @"extra label"); + return NSLocalizedString(@"Extra", @"extra label (Navigator)"); case 7: - return NSLocalizedString(@"Privileges", @"privileges label"); + return NSLocalizedString(@"Privileges", @"privileges label (Navigator)"); case 8: - return NSLocalizedString(@"Comment", @"comment label"); + return NSLocalizedString(@"Comment", @"comment label (Navigator)"); } if(type == 2) // PROCEDURE @@ -1224,20 +1224,20 @@ static NSComparisonResult compareStrings(NSString *s1, NSString *s2, void* conte case 2: return @"Is Deterministic"; case 3: - return NSLocalizedString(@"Execution Privilege", @"execution privilege label"); + return NSLocalizedString(@"Execution Privilege", @"execution privilege label (Navigator)"); case 4: return @"Definer"; } if(type == 3) // FUNCTION switch(index) { case 0: - return NSLocalizedString(@"Return Type", @"return type label"); + return NSLocalizedString(@"Return Type", @"return type label (Navigator)"); case 1: return @"SQL Data Access"; case 2: return @"Is Deterministic"; case 3: - return NSLocalizedString(@"Execution Privilege", @"execution privilege label"); + return NSLocalizedString(@"Execution Privilege", @"execution privilege label (Navigator)"); case 4: return @"Definer"; } diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index 932bed9c..838d48e5 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -140,17 +140,17 @@ nil ] retain]; editorNameForColors = [[NSArray arrayWithObjects: - NSLocalizedString(@"Text",@"text label for color table"), - NSLocalizedString(@"Background",@"background label for color table"), - NSLocalizedString(@"Caret",@"caret label for color table"), - NSLocalizedString(@"Comment",@"comment label"), - NSLocalizedString(@"Keyword",@"keyword label for color table"), - NSLocalizedString(@"Numeric",@"numeric label for color table"), - NSLocalizedString(@"Quote",@"quote label for color table"), - NSLocalizedString(@"Backtick Quote",@"backtick quote label for color table"), - NSLocalizedString(@"Variable",@"variable label for color table"), - NSLocalizedString(@"Query Background",@"query background label for color table"), - NSLocalizedString(@"Selection",@"selection label for color table"), + NSLocalizedString(@"Text",@"text label for color table (Prefs > Editor)"), + NSLocalizedString(@"Background",@"background label for color table (Prefs > Editor)"), + NSLocalizedString(@"Caret",@"caret label for color table (Prefs > Editor)"), + NSLocalizedString(@"Comment",@"comment label for color table (Prefs > Editor)"), + NSLocalizedString(@"Keyword",@"keyword label for color table (Prefs > Editor)"), + NSLocalizedString(@"Numeric",@"numeric label for color table (Prefs > Editor)"), + NSLocalizedString(@"Quote",@"quote label for color table (Prefs > Editor)"), + NSLocalizedString(@"Backtick Quote",@"backtick quote label for color table (Prefs > Editor)"), + NSLocalizedString(@"Variable",@"variable label for color table (Prefs > Editor)"), + NSLocalizedString(@"Query Background",@"query background label for color table (Prefs > Editor)"), + NSLocalizedString(@"Selection",@"selection label for color table (Prefs > Editor)"), nil ] retain]; @@ -1620,7 +1620,7 @@ [themeSelectionMenu removeAllItems]; [themeSelectionMenu setAutoenablesItems:YES]; [themeSelectionMenu setShowsStateColumn:YES]; - [themeSelectionMenu addItemWithTitle:NSLocalizedString(@"Default", @"default label") action:@selector(setDefaultColors:) keyEquivalent:@""]; + [themeSelectionMenu addItemWithTitle:NSLocalizedString(@"Default", @"Name of 'Default' color theme (Prefs > Editor)") action:@selector(setDefaultColors:) keyEquivalent:@""]; [themeSelectionMenu addItem:[NSMenuItem separatorItem]]; NSArray *foundThemes = [self getAvailableThemes]; |