Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
schriftgestalt committed Oct 9, 2017
1 parent 9253adb commit fa6e84a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ - (BOOL)_writeFileToPath:(NSString *)targetPath fromObject:(BLFileObject *)objec

if (![fileManager fileExistsAtPath: referencePath]) {
// Copy original if no reference version available
NSString *originalPath = [BLPathCreator replaceLanguage:language inPath:targetPath withLanguage:referencePath bundle:[object bundleObject]];
NSString *originalPath = [BLPathCreator replaceLanguage:language inPath:targetPath withLanguage:@"en" bundle:[object bundleObject]];
[fileManager copyItemAtPath:originalPath toPath:referencePath error:NULL];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ + (NSLocale *)localeForLanguage:(NSString *)language

// Try to find a match
identifier = [NSLocale canonicalLocaleIdentifierFromString: language];

if ([identifier length] > 10) {
return nil;
}
if (!identifier
|| [identifier rangeOfString: @" "].location != NSNotFound
|| [identifier rangeOfString: @"("].location != NSNotFound) {
Expand Down Expand Up @@ -129,9 +131,9 @@ + (NSLocale *)localeForLanguage:(NSString *)language
[__languageTranslatorCache setObject:locale forKey:language];
if (identifier)
[__languageTranslatorCache setObject:locale forKey:identifier];
if ([enLocale displayNameForKey:NSLocaleIdentifier value:identifier])
if ([enLocale displayNameForKey:NSLocaleIdentifier value:identifier]) {
[__languageTranslatorCache setObject:locale forKey:[enLocale displayNameForKey:NSLocaleIdentifier value:identifier]];
}
return locale;
}

Expand Down
2 changes: 1 addition & 1 deletion Localizer/Source/Main Classes/Document.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ - (void)windowControllerDidLoadNib:(NSWindowController *)aController
NSRect frame = content.view.frame;
frame.size.height += 1;
content.view.frame = frame;
[content.view setBorderType: NSNoBorder];
//[content.view setBorderType: NSNoBorder];

// set double action
[content.contentView setDoubleAction: @selector(openSeparateEditor:)];
Expand Down

0 comments on commit fa6e84a

Please sign in to comment.