Issue 411
[zxing.git] / iphone / Classes / EmailAction.m
index 4f023d2..2f4fb01 100644 (file)
@@ -4,7 +4,7 @@
 //
 //  Created by Christian Brunschen on 28/05/2008.
 /*
- * Copyright 2008 Google Inc.
+ * Copyright 2008 ZXing authors
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -37,31 +37,31 @@ static NSURL *MailtoURL(NSString *to, NSString *sub, NSString *body) {
   return [NSURL URLWithString:result];
 }
 
-- initWithRecipient:(NSString *)rec subject:(NSString *)subject body:(NSString *)body {
+- (id)initWithRecipient:(NSString *)rec subject:(NSString *)subject body:(NSString *)body {
   if ((self = [super initWithURL:MailtoURL(rec, subject, body)]) != nil) {
     self.recipient = rec;
   }
   return self;
 }
 
-+ actionWithRecipient:(NSString *)recipient subject:(NSString *)subject body:(NSString *)body {
++ (id)actionWithRecipient:(NSString *)recipient subject:(NSString *)subject body:(NSString *)body {
   return [[[self alloc] initWithRecipient:recipient subject:subject body:body] autorelease];
 }
 
 - (NSString *)title {
-  return [NSString stringWithFormat:@"Email %@", self.recipient];
+  return [NSString localizedStringWithFormat:NSLocalizedString(@"EmailAction action title", @"Email %@"), self.recipient];
 }
 
 - (NSString *)alertTitle {
-  return @"Compose Email";
+  return NSLocalizedString(@"EmailAction alert title", @"Compose Email");
 }
 
 - (NSString *)alertMessage {
-  return [NSString stringWithFormat:@"Compose Email to %@?", self.recipient];
+  return [NSString localizedStringWithFormat:NSLocalizedString(@"EmailAction alert message", @"Compose Email to %@?"), self.recipient];
 }
 
 - (NSString *)alertButtonTitle {
-  return @"Compose";
+  return NSLocalizedString(@"EmailAction alert button title", @"Compose");
 }