diff options
author | Max <post@wickenrode.com> | 2015-09-29 23:53:23 +0200 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-09-30 10:45:15 +0200 |
commit | 59a344d6f0fa735bd5940cf1e36d5cc78d202477 (patch) | |
tree | 0571ff1481a35002896d3b996827190d09600123 | |
parent | fcde34d5b26f1cfe69e57b4f50e08ef462cb8d85 (diff) | |
download | sequelpro-59a344d6f0fa735bd5940cf1e36d5cc78d202477.tar.gz sequelpro-59a344d6f0fa735bd5940cf1e36d5cc78d202477.tar.bz2 sequelpro-59a344d6f0fa735bd5940cf1e36d5cc78d202477.zip |
Make some forgotten strings localizable and add debug code for an exception
-rw-r--r-- | Resources/English.lproj/GotoDatabaseDialog.strings | bin | 1294 -> 1528 bytes | |||
-rw-r--r-- | Resources/English.lproj/Localizable.strings | bin | 250498 -> 251230 bytes | |||
-rw-r--r-- | Resources/English.lproj/MainMenu.strings | bin | 49854 -> 53670 bytes | |||
-rw-r--r-- | Source/SPCustomQuery.m | 18 |
4 files changed, 11 insertions, 7 deletions
diff --git a/Resources/English.lproj/GotoDatabaseDialog.strings b/Resources/English.lproj/GotoDatabaseDialog.strings Binary files differindex bf48b104..6512a3de 100644 --- a/Resources/English.lproj/GotoDatabaseDialog.strings +++ b/Resources/English.lproj/GotoDatabaseDialog.strings diff --git a/Resources/English.lproj/Localizable.strings b/Resources/English.lproj/Localizable.strings Binary files differindex a571d298..bdeee714 100644 --- a/Resources/English.lproj/Localizable.strings +++ b/Resources/English.lproj/Localizable.strings diff --git a/Resources/English.lproj/MainMenu.strings b/Resources/English.lproj/MainMenu.strings Binary files differindex b5593a7d..b6407843 100644 --- a/Resources/English.lproj/MainMenu.strings +++ b/Resources/English.lproj/MainMenu.strings diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index c22e5b59..c344f078 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -3387,12 +3387,16 @@ [queryFavoritesButton removeItemAtIndex:[queryFavoritesButton numberOfItems]-1]; // Build document-based list - headerMenuItem = [[NSMenuItem alloc] initWithTitle: - [[[[tableDocumentInstance fileURL] absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] lastPathComponent] - action:NULL keyEquivalent:@""]; + NSString *tblDocName = [[[[tableDocumentInstance fileURL] absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] lastPathComponent]; + if(!tblDocName) { + //NSMenuItem will not accept nil as title + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"Document name conversion resulted in nil string!? tableDocumentInstance=%@ fileURL=%@",tableDocumentInstance,[tableDocumentInstance fileURL]] + userInfo:nil]; + } + headerMenuItem = [[NSMenuItem alloc] initWithTitle:tblDocName action:NULL keyEquivalent:@""]; [headerMenuItem setTag:SP_FAVORITE_HEADER_MENUITEM_TAG]; - [headerMenuItem setToolTip:[NSString stringWithFormat:@"‘%@’ based favorites", - [[[[tableDocumentInstance fileURL] absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] lastPathComponent]]]; + [headerMenuItem setToolTip:[NSString stringWithFormat:NSLocalizedString(@"‘%@’ based favorites",@"Query Favorites : List : Section Heading : current connection document : tooltip (arg is the name of the spf file)"), tblDocName]]; [headerMenuItem setIndentationLevel:0]; [menu addItem:headerMenuItem]; [headerMenuItem release]; @@ -3416,9 +3420,9 @@ } // Build global list - headerMenuItem = [[NSMenuItem alloc] initWithTitle:@"Global" action:NULL keyEquivalent:@""]; + headerMenuItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Global",@"Query Favorites : List : Section Heading : global query favorites") action:NULL keyEquivalent:@""]; [headerMenuItem setTag:SP_FAVORITE_HEADER_MENUITEM_TAG]; - [headerMenuItem setToolTip:@"Globally stored favorites"]; + [headerMenuItem setToolTip:NSLocalizedString(@"Globally stored favorites",@"Query Favorites : List : Section Heading : global : tooltip")]; [headerMenuItem setIndentationLevel:0]; [menu addItem:headerMenuItem]; [headerMenuItem release]; |