Skip to content

Commit

Permalink
Merge pull request #1234 from pjrobertson/localFix
Browse files Browse the repository at this point in the history
Fall back to the English defaultsMap file if no localisation file can be found. Fixes #1233
  • Loading branch information
skurfer committed Nov 21, 2012
2 parents 8d93c09 + a25219e commit de38fc1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Quicksilver/Code-App/QSAdvancedPrefPane.m
Expand Up @@ -42,7 +42,12 @@ - (IBAction)setValueFromMenu:(id)sender {
#endif

- (NSArray *)prefSets {
return [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"DefaultsMap" ofType:@"plist"]];
NSString *defaultsMapPath = [[NSBundle mainBundle] pathForResource:@"DefaultsMap" ofType:@"plist"];
// fall back to the English file if no localisation can be found
if (!defaultsMapPath) {
defaultsMapPath = [[NSBundle mainBundle] pathForResource:@"DefaultsMap" ofType:@"plist" inDirectory:nil forLocalization:@"en"];
}
return [NSArray arrayWithContentsOfFile:defaultsMapPath];
}

- (CGFloat) tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row {
Expand Down

0 comments on commit de38fc1

Please sign in to comment.