Skip to content

Commit

Permalink
Fixed strings
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchiles committed Aug 3, 2015
1 parent 22f5f9e commit e688844
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 4 deletions.
Binary file modified ChatSecure/Base.lproj/Localizable.strings
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ - (id)init {

- (void) setupVersionLabel {
self.versionLabel = [[UILabel alloc] init];
NSString *version = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"CFBundleShortVersionString"];
NSString *version = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"CFBundleName"];
self.versionLabel.text = [NSString stringWithFormat:@"%@ %@", VERSION_STRING, version];
self.versionLabel.textAlignment = NSTextAlignmentCenter;
self.versionLabel.frame = CGRectMake(0, 0, self.view.frame.size.width, 30);
Expand Down
11 changes: 8 additions & 3 deletions ChatSecure/Classes/View Controllers/OTRInviteViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#import <MessageUI/MessageUI.h>
#import "OTRAccount.h"
#import "NSURL+ChatSecure.h"
#import "Strings.h"

static CGFloat const kOTRInvitePadding = 10;

Expand All @@ -30,6 +31,8 @@ - (instancetype)init
if (self = [super init]) {
_titleImageView = [[UIImageView alloc] initForAutoLayout];
_subtitleLabel = [[UILabel alloc] initForAutoLayout];
_subtitleLabel.numberOfLines = 0;
_subtitleLabel.textColor = [UIColor whiteColor];
}
return self;
}
Expand All @@ -50,11 +53,11 @@ - (void)viewDidLoad
NSMutableArray *shareButtons = [[NSMutableArray alloc] initWithCapacity:3];

if ([MFMessageComposeViewController canSendText]) {
[shareButtons addObject:[self shareButtonWithIcon:FAEnvelope title:@"Invite SMS" action:@selector(shareSMSPressed:)]];
[shareButtons addObject:[self shareButtonWithIcon:FAEnvelope title:INVITE_SMS_STRING action:@selector(shareSMSPressed:)]];
}

[shareButtons addObject:[self shareButtonWithIcon:FAGlobe title:@"Share Invite Link" action:@selector(linkShareButtonPressed:)]];
[shareButtons addObject:[self shareButtonWithIcon:FACamera title:@"Scan QR" action:@selector(qrButtonPressed:)]];
[shareButtons addObject:[self shareButtonWithIcon:FAGlobe title:INVITE_LINK_STRING action:@selector(linkShareButtonPressed:)]];
[shareButtons addObject:[self shareButtonWithIcon:FACamera title:SCAN_QR_STRING action:@selector(qrButtonPressed:)]];


self.shareButtons = shareButtons;
Expand Down Expand Up @@ -101,6 +104,8 @@ - (void)setAccount:(OTRAccount *)account
{
if(![account isEqual:_account]) {
_account = account;

self.subtitleLabel.text = [NSString stringWithFormat:@"%@ %@\n%@",ONBOARDING_SUCCESS_STRING,[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"] ,self.account.username];
}
}

Expand Down
4 changes: 4 additions & 0 deletions ChatSecure/Strings/Strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#define errSSLDecryptionFailString [OTRLanguageManager translatedString: @"Decryption failure"]
#define CONNECT_EXISTING_STRING [OTRLanguageManager translatedString: @"Connect to Existing Account"]
#define GITHUB_STRING [OTRLanguageManager translatedString: @"GitHub"]
#define ONBOARDING_SUCCESS_STRING [OTRLanguageManager translatedString: @"You're ready to"]
#define OPEN_IN_FACEBOOK_STRING [OTRLanguageManager translatedString: @"Open in Facebook"]
#define errSSLHostNameMismatchString [OTRLanguageManager translatedString: @"Peer host name mismatch"]
#define CONVERSATION_SECURE_WARNING_STRING [OTRLanguageManager translatedString: @"This chat is secured"]
Expand Down Expand Up @@ -169,6 +170,7 @@
#define NEW_STRING [OTRLanguageManager translatedString: @"New"]
#define errSSLPeerUnexpectedMsgString [OTRLanguageManager translatedString: @"Unexpected message received"]
#define DELETE_CONVERSATIONS_ON_DISCONNECT_DESCRIPTION_STRING [OTRLanguageManager translatedString: @"Delete chats on disconnect"]
#define INVITE_SMS_STRING [OTRLanguageManager translatedString: @"Invite SMS"]
#define CHATS_STRING [OTRLanguageManager translatedString: @"Chats"]
#define HELP_TRANSLATE_STRING [OTRLanguageManager translatedString: @"Help Translate"]
#define NOT_VERIFIED_STRING [OTRLanguageManager translatedString: @"Not Verified"]
Expand Down Expand Up @@ -210,11 +212,13 @@
#define ABOUT_STRING [OTRLanguageManager translatedString: @"About"]
#define REQUIRED_STRING [OTRLanguageManager translatedString: @"Required"]
#define INVALID_EMAIL_DETAIL_STRING [OTRLanguageManager translatedString: @"Please choose a valid email address"]
#define INVITE_LINK_STRING [OTRLanguageManager translatedString: @"Share Invite Link"]
#define YOUR_FINGERPRINT_STRING [OTRLanguageManager translatedString: @"Fingerprint for you"]
#define COMPOSE_STRING [OTRLanguageManager translatedString: @"Compose"]
#define FORGOT_PASSPHRASE_STRING [OTRLanguageManager translatedString: @"Forgot Passphrase?"]
#define NEXT_STRING [OTRLanguageManager translatedString: @"Next"]
#define DUPLICATE_ACCOUNT_STRING [OTRLanguageManager translatedString: @"Duplicate account"]
#define SCAN_QR_STRING [OTRLanguageManager translatedString: @"Scan QR"]
#define BASIC_STRING [OTRLanguageManager translatedString: @"Basic"]
#define LANGUAGE_STRING [OTRLanguageManager translatedString: @"Language"]
#define errSSLUnknownRootCertString [OTRLanguageManager translatedString: @"Valid cert chain, untrusted root"]
Expand Down
16 changes: 16 additions & 0 deletions ChatSecure/Strings/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -978,5 +978,21 @@
"CUSTOM_STRING" : {
"comment": "Place holder label for custom domains",
"string": "Custom"
},
"ONBOARDING_SUCCESS_STRING": {
"comment": "String used when onboarding works",
"string": "You're ready to"
},
"INVITE_SMS_STRING": {
"comment": "Label for inviting friends via sms",
"string": "Invite SMS"
},
"INVITE_LINK_STRING": {
"comment": "Label for inviting friends via URL",
"string": "Share Invite Link"
},
"SCAN_QR_STRING": {
"comment": "Label for sharing via QR Code",
"string": "Scan QR"
}
}

0 comments on commit e688844

Please sign in to comment.