Skip to content

Commit

Permalink
Improved localization (it's a bit complicated because of the color-hi…
Browse files Browse the repository at this point in the history
…ghlight in the verification window)
  • Loading branch information
the-kenny committed Jun 23, 2011
1 parent fd86848 commit 871c88d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Binary file modified Resources/en.lproj/Localizable.strings
Binary file not shown.
7 changes: 5 additions & 2 deletions Source/FileVerificationController.m
Expand Up @@ -127,12 +127,15 @@ - (void)startVerification:(void(^)(NSArray*))callback {
if(sigs != nil) {
if(sigs.count == 0) {
id verificationResult = nil; //NSString or NSAttributedString
verificationResult = NSLocalizedString(@"Verification FAILED: No signatures found",
NSString* failedString = NSLocalizedString(@"FAILED", @"'FAILED' translated. Needed to colorize the in the results window");
verificationResult = NSLocalizedString(@"Verification %@: No signatures found",
@"verification window no signatures result");
verificationResult = [NSString stringWithFormat:verificationResult,
failedString];

NSColor* bgColor = [NSColor colorWithCalibratedRed:0.8 green:0.0 blue:0.0 alpha:0.7];

NSRange range = [verificationResult rangeOfString:@"FAILED"];
NSRange range = [verificationResult rangeOfString:failedString];
verificationResult = [[NSMutableAttributedString alloc]
initWithString:verificationResult];

Expand Down
5 changes: 4 additions & 1 deletion Source/GPGServices.m
Expand Up @@ -517,7 +517,10 @@ -(void)verifyTextString:(NSString *)inputString
if(GPGErrorCodeFromError([sig status])==GPGErrorNoError) {
[self displaySignatureVerificationForSig:sig];
} else {
[self displayOperationFailedNotificationWithTitle:NSLocalizedString(@"Verification FAILED.", @"operation failed title")
NSString* failedString = NSLocalizedString(@"FAILED", @"'FAILED' translated. Needed to colorize the in the results window");
NSString* title = [NSString stringWithFormat:NSLocalizedString(@"Verification %@.", @"operation failed title"),
failedString];
[self displayOperationFailedNotificationWithTitle:title
message:GPGErrorDescription([sig status])];
}
}
Expand Down

0 comments on commit 871c88d

Please sign in to comment.