diff --git a/Scripts/unused_strings.py b/Scripts/unused_strings.py new file mode 100755 index 000000000..cff5e663c --- /dev/null +++ b/Scripts/unused_strings.py @@ -0,0 +1,41 @@ +#!/usr/bin/env sh +""" +This script can be used to grep the source to tree to see which localized strings are in use. + +author: corbett +usage: ./unused_strings.py Localizable.strings source_dir +""" +import sys +import os +import re + + +def file_match(fname, pat): + try: + f = open(fname, "rt") + except IOError: + return + + for i, line in enumerate(f): + if pat.search(line): + return True + f.close() + return False + + +def rgrep_match(dir_name, s_pat): + pat = re.compile(s_pat) + for dirpath, dirnames, filenames in os.walk(dir_name): + for fname in filenames: + fullname = os.path.join(dirpath, fname) + match=file_match(fullname, pat) + if match: + return match + return False + +if __name__ == '__main__': + for item in open(sys.argv[1]).readlines(): + grep_for=item.strip().split(' = ')[0].replace('"','') + if rgrep_match(sys.argv[2],grep_for): + print item.strip() + \ No newline at end of file diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index f1bb62487..dd94ff5da 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -486,7 +486,6 @@ FCB11D931A12A4AA002F93FB /* FullImageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FCB11D921A12A4AA002F93FB /* FullImageViewController.m */; }; FCC81A981A44558300DFEC7D /* UIDevice+TSHardwareVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = FCC81A971A44558300DFEC7D /* UIDevice+TSHardwareVersion.m */; }; FCD274E21A5AFD8000202277 /* PrivacySettingsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FCD274E11A5AFD8000202277 /* PrivacySettingsTableViewController.m */; }; - FCD274E51A5AFDB800202277 /* MediaSettingsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FCD274E41A5AFDB800202277 /* MediaSettingsTableViewController.m */; }; FCD274E81A5AFDC900202277 /* AdvancedSettingsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FCD274E71A5AFDC900202277 /* AdvancedSettingsTableViewController.m */; }; FCD274EB1A5AFDDB00202277 /* AboutTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FCD274EA1A5AFDDB00202277 /* AboutTableViewController.m */; }; FCFA64B41A24F3880007FB87 /* UIColor+OWS.m in Sources */ = {isa = PBXBuildFile; fileRef = FCFA64B31A24F3880007FB87 /* UIColor+OWS.m */; }; @@ -1167,8 +1166,6 @@ FCC81A971A44558300DFEC7D /* UIDevice+TSHardwareVersion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIDevice+TSHardwareVersion.m"; sourceTree = ""; }; FCD274E01A5AFD8000202277 /* PrivacySettingsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrivacySettingsTableViewController.h; sourceTree = ""; }; FCD274E11A5AFD8000202277 /* PrivacySettingsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PrivacySettingsTableViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - FCD274E31A5AFDB800202277 /* MediaSettingsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSettingsTableViewController.h; sourceTree = ""; }; - FCD274E41A5AFDB800202277 /* MediaSettingsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MediaSettingsTableViewController.m; sourceTree = ""; }; FCD274E61A5AFDC900202277 /* AdvancedSettingsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdvancedSettingsTableViewController.h; sourceTree = ""; }; FCD274E71A5AFDC900202277 /* AdvancedSettingsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdvancedSettingsTableViewController.m; sourceTree = ""; }; FCD274E91A5AFDDB00202277 /* AboutTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutTableViewController.h; sourceTree = ""; }; @@ -1818,7 +1815,6 @@ children = ( FCFD25791A1543D500F4C644 /* Signup */, FC3196321A08142D0094C78E /* Signals */, - FC3196331A0814360094C78E /* Contacts */, FC3196311A08141D0094C78E /* Settings */, 76EB050B18170B33006006FC /* InCallViewController.h */, 76EB050C18170B33006006FC /* InCallViewController.m */, @@ -2165,15 +2161,6 @@ path = WebSockets; sourceTree = ""; }; - B6416F56199A0478003C5699 /* en.lproj */ = { - isa = PBXGroup; - children = ( - B6416F57199A0478003C5699 /* Localizable.strings */, - ); - name = en.lproj; - path = translations/en.lproj; - sourceTree = ""; - }; B65EDA0F19E1BE2200AAA7CB /* Requests */ = { isa = PBXGroup; children = ( @@ -2361,7 +2348,7 @@ B6B6C3C419193F5B00C0B76B /* Translations */ = { isa = PBXGroup; children = ( - B6416F56199A0478003C5699 /* en.lproj */, + B6416F57199A0478003C5699 /* Localizable.strings */, ); name = Translations; sourceTree = ""; @@ -2562,8 +2549,6 @@ FC31962F1A0814130094C78E /* SettingsTableViewController.m */, FCD274E01A5AFD8000202277 /* PrivacySettingsTableViewController.h */, FCD274E11A5AFD8000202277 /* PrivacySettingsTableViewController.m */, - FCD274E31A5AFDB800202277 /* MediaSettingsTableViewController.h */, - FCD274E41A5AFDB800202277 /* MediaSettingsTableViewController.m */, FCD274E61A5AFDC900202277 /* AdvancedSettingsTableViewController.h */, FCD274E71A5AFDC900202277 /* AdvancedSettingsTableViewController.m */, FCD274E91A5AFDDB00202277 /* AboutTableViewController.h */, @@ -2600,13 +2585,6 @@ name = Signals; sourceTree = ""; }; - FC3196331A0814360094C78E /* Contacts */ = { - isa = PBXGroup; - children = ( - ); - name = Contacts; - sourceTree = ""; - }; FCFA64B11A24F29E0007FB87 /* UI Categories */ = { isa = PBXGroup; children = ( @@ -2722,47 +2700,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( - en, - fr, - "ca-ES", - "cs-CZ", - de, - "ro-RO", - nl, - "sv-SE", - an, - ar, - bg_BG, - ca, - cs, - da, - es, - eu, - fa_IR, - fa, - fi, - fil, - he, - hu, - it_IT, - ja_JP, - lv, - nb, - pl, - pt_BR, - ro, - ru, - sl, - sq, - sv_SE, - ta, - tr_TR, - uk, - zh_CN, - zh_TW.Big5, - zh_TW, - be, - el_GR, + en ); mainGroup = D221A07E169C9E5E00537ABF; productRefGroup = D221A08A169C9E5E00537ABF /* Products */; @@ -3084,7 +3022,6 @@ 76EB063218170B33006006FC /* Crc32.m in Sources */, E197B62418BBF5BB00F073E5 /* SoundPlayer.m in Sources */, E197B61018BBEC1A00F073E5 /* EncodedAudioPacket.m in Sources */, - FCD274E51A5AFDB800202277 /* MediaSettingsTableViewController.m in Sources */, 76EB063618170B33006006FC /* DataUtil.m in Sources */, E197B60C18BBEC1A00F073E5 /* AudioPacker.m in Sources */, E197B61218BBEC1A00F073E5 /* AudioStretcher.m in Sources */, @@ -3388,6 +3325,7 @@ B6416F58199A0478003C5699 /* en */, ); name = Localizable.strings; + path = translations/en.lproj; sourceTree = ""; }; /* End PBXVariantGroup section */ diff --git a/Signal/src/Storyboard/Storyboard.storyboard b/Signal/src/Storyboard/Storyboard.storyboard index 8229cf731..dde97bcd8 100755 --- a/Signal/src/Storyboard/Storyboard.storyboard +++ b/Signal/src/Storyboard/Storyboard.storyboard @@ -1,5 +1,5 @@ - + @@ -667,6 +667,66 @@ A0 09 9A FF A8 8A 09 99 + + @@ -849,66 +909,6 @@ A0 09 9A FF A8 8A 09 99 - - @@ -946,9 +946,9 @@ A0 09 9A FF A8 8A 09 99 - + @@ -977,9 +977,9 @@ A0 09 9A FF A8 8A 09 99 - + @@ -1231,6 +1231,7 @@ A0 09 9A FF A8 8A 09 99 + @@ -2078,10 +2079,12 @@ A0 09 9A FF A8 8A 09 99 + - + + @@ -2210,7 +2213,7 @@ A0 09 9A FF A8 8A 09 99 - + @@ -3033,7 +3036,8 @@ A0 09 9A FF A8 8A 09 99 - + + @@ -3705,7 +3709,9 @@ A0 09 9A FF A8 8A 09 99 + + @@ -4391,9 +4397,14 @@ A0 09 9A FF A8 8A 09 99 + + + + + @@ -4615,7 +4626,7 @@ A0 09 9A FF A8 8A 09 99 - + @@ -4837,6 +4848,7 @@ A0 09 9A FF A8 8A 09 99 + @@ -4900,8 +4912,8 @@ A0 09 9A FF A8 8A 09 99 + + - - diff --git a/Signal/src/environment/LocalizableText.h b/Signal/src/environment/LocalizableText.h index 481778d2a..3626e9d92 100644 --- a/Signal/src/environment/LocalizableText.h +++ b/Signal/src/environment/LocalizableText.h @@ -23,19 +23,6 @@ #define TXT_END_CALL_REPLACED_BY_NEXT NSLocalizedString(@"END_CALL_REPLACED_BY_NEXT", @"") #define TXT_END_CALL_MESSAGE_FROM_SERVER_PREFIX NSLocalizedString(@"END_CALL_MESSAGE_FROM_SERVER_PREFIX", @"") -#pragma mark - Menu Table Cell Titles - -#define MAIN_MENU_OPTION_RECENT_CALLS NSLocalizedString(@"MAIN_MENU_OPTION_RECENT_CALLS",@"") -#define MAIN_MENU_OPTION_FAVOURITES NSLocalizedString(@"MAIN_MENU_OPTION_FAVOURITES",@"") -#define MAIN_MENU_OPTION_CONTACTS NSLocalizedString(@"MAIN_MENU_OPTION_CONTACTS",@"") -#define MAIN_MENU_OPTION_DIALER NSLocalizedString(@"MAIN_MENU_OPTION_DIALER",@"") -#define MAIN_MENU_INVITE_CONTACTS NSLocalizedString(@"MAIN_MENU_INVITE_CONTACTS",@"") - -#define MAIN_MENU_OPTION_SETTINGS NSLocalizedString(@"MAIN_MENU_OPTION_SETTINGS",@"") -#define MAIN_MENU_OPTION_ABOUT NSLocalizedString(@"MAIN_MENU_OPTION_ABOUT",@"") -#define MAIN_MENU_OPTION_REPORT_BUG NSLocalizedString(@"MAIN_MENU_OPTION_REPORT_BUG",@"") -#define MAIN_MENU_OPTION_BLOG NSLocalizedString(@"MAIN_MENU_OPTION_BLOG",@"") - #pragma mark - View Controller Titles #define WHISPER_NAV_BAR_TITLE NSLocalizedString(@"WHISPER_NAV_BAR_TITLE", @"Title for home feed view controller") @@ -52,23 +39,6 @@ #define CONTACT_DETAIL_COMM_TYPE_INSECURE NSLocalizedString(@"CONTACT_DETAIL_COMM_TYPE_INSECURE", @"") #define CONTACT_DETAIL_COMM_TYPE_NOTES NSLocalizedString(@"CONTACT_DETAIL_COMM_TYPE_NOTES", @"") -#pragma mark - Dialer - -#define DIALER_NUMBER_1 NSLocalizedString(@"DIALER_NUMBER_1", @"") -#define DIALER_NUMBER_2 NSLocalizedString(@"DIALER_NUMBER_2", @"") -#define DIALER_NUMBER_3 NSLocalizedString(@"DIALER_NUMBER_3", @"") -#define DIALER_NUMBER_4 NSLocalizedString(@"DIALER_NUMBER_4", @"") -#define DIALER_NUMBER_5 NSLocalizedString(@"DIALER_NUMBER_5", @"") -#define DIALER_NUMBER_6 NSLocalizedString(@"DIALER_NUMBER_6", @"") -#define DIALER_NUMBER_7 NSLocalizedString(@"DIALER_NUMBER_7", @"") -#define DIALER_NUMBER_8 NSLocalizedString(@"DIALER_NUMBER_8", @"") -#define DIALER_NUMBER_9 NSLocalizedString(@"DIALER_NUMBER_9", @"") -#define DIALER_NUMBER_0 NSLocalizedString(@"DIALER_NUMBER_0", @"") -#define DIALER_NUMBER_PLUS NSLocalizedString(@"DIALER_NUMBER_PLUS", @"") -#define DIALER_NUMBER_POUND NSLocalizedString(@"DIALER_NUMBER_POUND", @"") -#define TXT_ADD_CONTACT NSLocalizedString(@"TXT_ADD_CONTACT", @"") -#define CALL_BUTTON_TITLE NSLocalizedString(@"CALL_BUTTON_TITLE", @"") - #define DIALER_CALL_BUTTON_TITLE NSLocalizedString(@"DIALER_CALL_BUTTON_TITLE", @"") #pragma mark - General Purpose diff --git a/Signal/src/environment/Release.m b/Signal/src/environment/Release.m index 5875cee31..d7686b8ca 100644 --- a/Signal/src/environment/Release.m +++ b/Signal/src/environment/Release.m @@ -49,21 +49,21 @@ static unsigned char DH3K_PRIME[]={ ErrorHandlerBlock errorNoter = ^(id error, id relatedInfo, bool causedTermination) {DDLogError(@"%@: %@, %d", error, relatedInfo, causedTermination); }; return [Environment environmentWithLogging:logging - andErrorNoter:errorNoter - andServerPort:31337 - andMasterServerHostName:@"master.whispersystems.org" - andDefaultRelayName:@"relay" - andRelayServerHostNameSuffix:@"whispersystems.org" - andCertificate:[Certificate certificateFromResourcePath:@"redphone" ofType:@"cer"] - andCurrentRegionCodeForPhoneNumbers:[(NSLocale*)NSLocale.currentLocale objectForKey:NSLocaleCountryCode] - andSupportedKeyAgreementProtocols:[self supportedKeyAgreementProtocols] - andPhoneManager:[PhoneManager phoneManagerWithErrorHandler:errorNoter] - andRecentCallManager:[RecentCallManager new] - andTestingAndLegacyOptions:@[ENVIRONMENT_LEGACY_OPTION_RTP_PADDING_BIT_IMPLIES_EXTENSION_BIT_AND_TWELVE_EXTRA_ZERO_BYTES_IN_HEADER] - andZrtpClientId:RELEASE_ZRTP_CLIENT_ID - andZrtpVersionId:RELEASE_ZRTP_VERSION_ID - andContactsManager:[ContactsManager new] - andPhoneDirectoryManager:[PhoneNumberDirectoryFilterManager new]]; + andErrorNoter:errorNoter + andServerPort:31337 + andMasterServerHostName:@"master.whispersystems.org" + andDefaultRelayName:@"relay" + andRelayServerHostNameSuffix:@"whispersystems.org" + andCertificate:[Certificate certificateFromResourcePath:@"redphone" ofType:@"cer"] + andCurrentRegionCodeForPhoneNumbers:[NSLocale.currentLocale objectForKey:NSLocaleCountryCode] + andSupportedKeyAgreementProtocols:[self supportedKeyAgreementProtocols] + andPhoneManager:[PhoneManager phoneManagerWithErrorHandler:errorNoter] + andRecentCallManager:[RecentCallManager new] + andTestingAndLegacyOptions:@[ENVIRONMENT_LEGACY_OPTION_RTP_PADDING_BIT_IMPLIES_EXTENSION_BIT_AND_TWELVE_EXTRA_ZERO_BYTES_IN_HEADER] + andZrtpClientId:RELEASE_ZRTP_CLIENT_ID + andZrtpVersionId:RELEASE_ZRTP_VERSION_ID + andContactsManager:[ContactsManager new] + andPhoneDirectoryManager:[PhoneNumberDirectoryFilterManager new]]; } +(Environment*) unitTestEnvironment:(NSArray*)testingAndLegacyOptions { @@ -73,21 +73,21 @@ static unsigned char DH3K_PRIME[]={ } return [Environment environmentWithLogging:[DiscardingLog discardingLog] - andErrorNoter:^(id error, id relatedInfo, bool causedTermination) {} - andServerPort:31337 - andMasterServerHostName:@"master.whispersystems.org" - andDefaultRelayName:@"relay" - andRelayServerHostNameSuffix:@"whispersystems.org" - andCertificate:[Certificate certificateFromResourcePath:@"redphone" ofType:@"cer"] - andCurrentRegionCodeForPhoneNumbers:@"US" - andSupportedKeyAgreementProtocols:keyAgreementProtocols - andPhoneManager:nil - andRecentCallManager:nil - andTestingAndLegacyOptions:testingAndLegacyOptions - andZrtpClientId:TESTING_ZRTP_CLIENT_ID - andZrtpVersionId:TESTING_ZRTP_VERSION_ID - andContactsManager:nil - andPhoneDirectoryManager:nil]; + andErrorNoter:^(id error, id relatedInfo, bool causedTermination) {} + andServerPort:31337 + andMasterServerHostName:@"master.whispersystems.org" + andDefaultRelayName:@"relay" + andRelayServerHostNameSuffix:@"whispersystems.org" + andCertificate:[Certificate certificateFromResourcePath:@"redphone" ofType:@"cer"] + andCurrentRegionCodeForPhoneNumbers:@"US" + andSupportedKeyAgreementProtocols:keyAgreementProtocols + andPhoneManager:nil + andRecentCallManager:nil + andTestingAndLegacyOptions:testingAndLegacyOptions + andZrtpClientId:TESTING_ZRTP_CLIENT_ID + andZrtpVersionId:TESTING_ZRTP_VERSION_ID + andContactsManager:nil + andPhoneDirectoryManager:nil]; } +(NSArray*) supportedKeyAgreementProtocols { diff --git a/Signal/src/network/PushManager.m b/Signal/src/network/PushManager.m index 898ecb6b3..2dbb92e10 100644 --- a/Signal/src/network/PushManager.m +++ b/Signal/src/network/PushManager.m @@ -201,14 +201,14 @@ - (UIUserNotificationCategory*)userNotificationsMessageCategory{ UIMutableUserNotificationAction *action_accept = [UIMutableUserNotificationAction new]; action_accept.identifier = Signal_Message_View_Identifier; - action_accept.title = NSLocalizedString(@"View", @""); + action_accept.title = NSLocalizedString(@"PUSH_MANAGER_VIEW", @""); action_accept.activationMode = UIUserNotificationActivationModeForeground; action_accept.destructive = NO; action_accept.authenticationRequired = YES; UIMutableUserNotificationAction *action_decline = [UIMutableUserNotificationAction new]; action_decline.identifier = Signal_Message_MarkAsRead_Identifier; - action_decline.title = NSLocalizedString(@"Mark as read", @""); + action_decline.title = NSLocalizedString(@"PUSH_MANAGER_MARKREAD", @""); action_decline.activationMode = UIUserNotificationActivationModeBackground; action_decline.destructive = NO; action_decline.authenticationRequired = NO; diff --git a/Signal/src/phone/signaling/number directory/PhoneNumberDirectoryFilterManager.m b/Signal/src/phone/signaling/number directory/PhoneNumberDirectoryFilterManager.m index e7c0a0e5e..ba7ac380b 100644 --- a/Signal/src/phone/signaling/number directory/PhoneNumberDirectoryFilterManager.m +++ b/Signal/src/phone/signaling/number directory/PhoneNumberDirectoryFilterManager.m @@ -83,7 +83,7 @@ [self updateTextSecureWithRedPhoneSucces:YES]; } failure:^(NSURLSessionDataTask *task, NSError *error) { DDLogError(@"Error to fetch contact interesection: %@", error.debugDescription); - NSString* desc = [NSString stringWithFormat:@"Failed to retrieve directory. Retrying in %f hours.", + NSString* desc = [NSString stringWithFormat:NSLocalizedString(@"FAILED_RETRYING_DIRECTORY_DOWNLOAD", @""), DIRECTORY_UPDATE_RETRY_PERIOD/HOUR]; Environment.errorNoter(desc, error, false); BloomFilter* filter = [phoneNumberDirectoryFilter bloomFilter]; diff --git a/Signal/src/textsecure/Messages/TSCall.m b/Signal/src/textsecure/Messages/TSCall.m index 03cfbb7a1..0c9ad271c 100644 --- a/Signal/src/textsecure/Messages/TSCall.m +++ b/Signal/src/textsecure/Messages/TSCall.m @@ -27,11 +27,11 @@ - (NSString*)description{ switch (_callType) { case RPRecentCallTypeIncoming: - return @"Incoming call"; + return NSLocalizedString(@"INCOMING_CALL", @""); case RPRecentCallTypeOutgoing: - return @"Outgoing call"; + return NSLocalizedString(@"OUTGOING_CALL", @""); case RPRecentCallTypeMissed: - return @"Missed call"; + return NSLocalizedString(@"MISSED_CALL", @""); } } diff --git a/Signal/src/textsecure/Messages/TSErrorMessage.m b/Signal/src/textsecure/Messages/TSErrorMessage.m index 602d4c7d9..04f151f75 100644 --- a/Signal/src/textsecure/Messages/TSErrorMessage.m +++ b/Signal/src/textsecure/Messages/TSErrorMessage.m @@ -31,21 +31,21 @@ - (NSString*)description{ switch (_errorType) { case TSErrorMessageNoSession: - return @"No available session for contact."; + return NSLocalizedString(@"ERROR_MESSAGE_NO_SESSION", @""); case TSErrorMessageMissingKeyId: - return @"Received a message with unknown PreKey."; + return NSLocalizedString(@"ERROR_MESSAGE_MISSING_KEY", @""); case TSErrorMessageInvalidMessage: - return @"Received a corrupted message."; + return NSLocalizedString(@"ERROR_MESSAGE_INVALID_MESSAGE", @""); case TSErrorMessageInvalidVersion: - return @"Received a message not compatible with this version."; + return NSLocalizedString(@"ERROR_MESSAGE_INVALID_VERSION", @""); case TSErrorMessageDuplicateMessage: - return @"Received a duplicated message."; + return NSLocalizedString(@"ERROR_MESSAGE_DUPLICATE_MESSAGE", @""); case TSErrorMessageInvalidKeyException: - return @"The recipient's key is not valid."; + return NSLocalizedString(@"ERROR_MESSAGE_INVALID_KEY_EXCEPTION", @""); case TSErrorMessageWrongTrustedIdentityKey: - return @"Identity key changed. Tap to verify new key."; + return NSLocalizedString(@"ERROR_MESSAGE_WRONG_TRUSTED_IDENTITY_KEY", @""); default: - return @"An unknown error occured."; + return NSLocalizedString(@"ERROR_MESSAGE_UNKNOWN_ERROR", @""); break; } } diff --git a/Signal/src/textsecure/Messages/TSMessagesManager.m b/Signal/src/textsecure/Messages/TSMessagesManager.m index f32d339a3..3f051c737 100644 --- a/Signal/src/textsecure/Messages/TSMessagesManager.m +++ b/Signal/src/textsecure/Messages/TSMessagesManager.m @@ -283,7 +283,7 @@ nameString = message.source; } - NSString* updateGroupInfo = [NSString stringWithFormat:@"%@ has left group",nameString]; + NSString* updateGroupInfo = [NSString stringWithFormat:NSLocalizedString(@"GROUP_MEMBER_LEFT", @""),nameString]; NSMutableArray *newGroupMembers = [NSMutableArray arrayWithArray:gThread.groupModel.groupMemberIds]; [newGroupMembers removeObject:message.source]; gThread.groupModel.groupMemberIds = newGroupMembers; diff --git a/Signal/src/textsecure/Storage/TSStorageManager.m b/Signal/src/textsecure/Storage/TSStorageManager.m index c181ed690..dfdb59bed 100644 --- a/Signal/src/textsecure/Storage/TSStorageManager.m +++ b/Signal/src/textsecure/Storage/TSStorageManager.m @@ -98,7 +98,7 @@ static NSString * keychainDBPassAccount = @"TSDatabasePass"; if (error || !success) { DDLogError(@"Error while removing files from backup: %@", error.description); - SignalAlertView(NSLocalizedString(@"WARNING", @""), @"DISABLING_BACKUP_FAILED"); + SignalAlertView(NSLocalizedString(@"WARNING_STRING", @""), @"DISABLING_BACKUP_FAILED"); return; } } diff --git a/Signal/src/view controllers/AboutTableViewController.m b/Signal/src/view controllers/AboutTableViewController.m index 21706dae9..5f14f6070 100644 --- a/Signal/src/view controllers/AboutTableViewController.m +++ b/Signal/src/view controllers/AboutTableViewController.m @@ -38,11 +38,11 @@ { [super loadView]; - self.title = @"About"; + self.title = NSLocalizedString(@"SETTINGS_ABOUT", @""); //Version self.versionCell = [[UITableViewCell alloc]init]; - self.versionCell.textLabel.text = @"Version"; + self.versionCell.textLabel.text = NSLocalizedString(@"SETTINGS_VERSION", @""); self.versionLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 75, 30)]; self.versionLabel.text = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; @@ -55,12 +55,12 @@ //Support self.supportCell = [[UITableViewCell alloc]init]; - self.supportCell.textLabel.text = @"Support"; + self.supportCell.textLabel.text = NSLocalizedString(@"SETTINGS_SUPPORT", @""); self.supportCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; //Footer self.footerView = [[UILabel alloc]init]; - self.footerView.text = @"Copyright Open Whisper Systems \n Licensed under the GPLv3"; + self.footerView.text = NSLocalizedString(@"SETTINGS_COPYRIGHT", @""); self.footerView.textColor = [UIColor ows_darkGrayColor]; self.footerView.font = [UIFont ows_regularFontWithSize:15.0f]; self.footerView.numberOfLines = 2; @@ -69,7 +69,7 @@ //Twitter Invite self.twitterInviteCell = [[UITableViewCell alloc]init]; - self.twitterInviteCell.textLabel.text = @"Share Install Link"; + self.twitterInviteCell.textLabel.text = NSLocalizedString(@"SETTINGS_SHARE_INSTALL", @""); UIImageView* twitterImageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"twitter_logo"]]; [twitterImageView setFrame:CGRectMake(0, 0, 34, 34)]; @@ -96,9 +96,9 @@ - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { switch (section) { - case 0: return @"Information"; - case 1: return @"Invite"; - case 2: return @"Help"; + case 0: return NSLocalizedString(@"SETTINGS_INFORMATION_HEADER", @""); + case 1: return NSLocalizedString(@"SETTINGS_INVITE_HEADER", @""); + case 2: return NSLocalizedString(@"SETTINGS_HELP_HEADER", @""); default: return nil; } @@ -147,7 +147,7 @@ SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter]; - NSString *tweetString = [NSString stringWithFormat:@"You can reach me on @whispersystems Signal, get it now."]; + NSString *tweetString = [NSString stringWithFormat:NSLocalizedString(@"SETTINGS_INVITE_TWITTER_TEXT", @"")]; [tweetSheet setInitialText:tweetString]; [tweetSheet addURL:[NSURL URLWithString:@"https://whispersystems.org/signal/install/"]]; tweetSheet.completionHandler = ^(SLComposeViewControllerResult result) { diff --git a/Signal/src/view controllers/AdvancedSettingsTableViewController.m b/Signal/src/view controllers/AdvancedSettingsTableViewController.m index 540584934..e961e85c5 100644 --- a/Signal/src/view controllers/AdvancedSettingsTableViewController.m +++ b/Signal/src/view controllers/AdvancedSettingsTableViewController.m @@ -42,11 +42,11 @@ { [super loadView]; - self.title = @"Advanced"; + self.title = NSLocalizedString(@"SETTINGS_ADVANCED_TITLE", @""); //Enable Log self.enableLogCell = [[UITableViewCell alloc]init]; - self.enableLogCell.textLabel.text = @"Enable Debug Log"; + self.enableLogCell.textLabel.text = NSLocalizedString(@"SETTINGS_ADVANCED_DEBUGLOG", @""); self.enableLogCell.userInteractionEnabled = YES; self.enableLogSwitch = [[UISwitch alloc]initWithFrame:CGRectZero]; @@ -58,7 +58,7 @@ //Send Log self.submitLogCell = [[UITableViewCell alloc]init]; - self.submitLogCell.textLabel.text = @"Submit Debug Log"; + self.submitLogCell.textLabel.text = NSLocalizedString(@"SETTINGS_ADVANCED_SUBMIT_DEBUGLOG", @""); } #pragma mark - Table view data source diff --git a/Signal/src/view controllers/CodeVerificationViewController.h b/Signal/src/view controllers/CodeVerificationViewController.h index f33604052..229d1f1d2 100644 --- a/Signal/src/view controllers/CodeVerificationViewController.h +++ b/Signal/src/view controllers/CodeVerificationViewController.h @@ -19,6 +19,7 @@ @property(nonatomic, strong) NSString* formattedPhoneNumber; +@property(nonatomic,strong) IBOutlet UILabel *headerLabel; // User action buttons @property(nonatomic, strong) IBOutlet UIButton* challengeButton; @property(nonatomic, strong) IBOutlet UIButton* sendCodeViaSMSAgainButton; @@ -27,7 +28,7 @@ @property(nonatomic, strong) IBOutlet UIActivityIndicatorView* submitCodeSpinner; @property(nonatomic, strong) IBOutlet UIActivityIndicatorView* requestCodeAgainSpinner; @property(nonatomic, strong) IBOutlet UIActivityIndicatorView* requestCallSpinner; - +@property(nonatomic, strong) IBOutlet UIButton* changeNumberButton; @property(nonatomic) IBOutlet NSLayoutConstraint *headerConstraint; // Displays phone number entered in previous step. There is a UI option (segue) which allows the user to go back and edit this. diff --git a/Signal/src/view controllers/CodeVerificationViewController.m b/Signal/src/view controllers/CodeVerificationViewController.m index 0ab80feae..5349d14ce 100644 --- a/Signal/src/view controllers/CodeVerificationViewController.m +++ b/Signal/src/view controllers/CodeVerificationViewController.m @@ -25,6 +25,13 @@ - (void)viewDidLoad { [super viewDidLoad]; [self initializeKeyboardHandlers]; + _headerLabel.text = NSLocalizedString(@"VERIFICATION_HEADER", @""); + _challengeTextField.placeholder = NSLocalizedString(@"VERIFICATION_CHALLENGE_DEFAULT_TEXT", @""); + [_challengeButton setTitle:NSLocalizedString(@"VERIFICATION_CHALLENGE_SUBMIT_CODE", @"") forState:UIControlStateNormal]; + + [_sendCodeViaSMSAgainButton setTitle:NSLocalizedString(@"VERIFICATION_CHALLENGE_SUBMIT_AGAIN", @"") forState:UIControlStateNormal]; + [_sendCodeViaVoiceButton setTitle:[@" " stringByAppendingString:NSLocalizedString(@"VERIFICATION_CHALLENGE_SEND_VIAVOICE", @"")] forState:UIControlStateNormal]; + [_changeNumberButton setTitle:[@" " stringByAppendingString:NSLocalizedString(@"VERIFICATION_CHALLENGE_CHANGE_NUMBER", @"")] forState:UIControlStateNormal]; } -(void)viewWillAppear:(BOOL)animated @@ -89,10 +96,10 @@ - (void)showAlertForError:(NSError *)error { if (error == nil) { - NSLog(@"%@: Error condition, but no NSError to display", self.class); + DDLogCError(@"%@: Error condition, but no NSError to display", self.class); return; } else if (error.localizedDescription.length == 0) { - NSLog(@"%@: Unable to display error because localizedDescription was not set: %@", self.class, error); + DDLogCError(@"%@: Unable to display error because localizedDescription was not set: %@", self.class, error); return; } diff --git a/Signal/src/view controllers/CountryCodeViewController.m b/Signal/src/view controllers/CountryCodeViewController.m index 4eb5dbc1f..71f871e93 100644 --- a/Signal/src/view controllers/CountryCodeViewController.m +++ b/Signal/src/view controllers/CountryCodeViewController.m @@ -21,6 +21,7 @@ static NSString *const kUnwindToCountryCodeWasSelectedSegue = @"UnwindToCountryC [super viewDidLoad]; [self.navigationController.navigationBar setTranslucent:NO]; _countryCodes = [PhoneNumberUtil countryCodesForSearchTerm:nil]; + self.title = NSLocalizedString(@"COUNTRYCODE_SELECT_TITLE", @""); } #pragma mark - UITableViewDelegate diff --git a/Signal/src/view controllers/FingerprintViewController.m b/Signal/src/view controllers/FingerprintViewController.m index 48e8bd3ee..37f890b93 100644 --- a/Signal/src/view controllers/FingerprintViewController.m +++ b/Signal/src/view controllers/FingerprintViewController.m @@ -45,6 +45,10 @@ static NSString* const kScanIdentityBarcodeViewSegue = @"ScanIdentityBarcodeView UILongPressGestureRecognizer *longpressToResetSession = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(shredAndDelete:)]; longpressToResetSession.minimumPressDuration = 1.0; [self.view addGestureRecognizer:longpressToResetSession]; + _infoTheirFingerprint.text = NSLocalizedString(@"FINGERPRINT_INFO_THEIRS", @""); + _infoMyFingerprint.text = NSLocalizedString(@"FINGERPRINT_INFO_YOURS", @""); + _presentationLabel.text = NSLocalizedString(@"FINGERPRINT_INFO_ABOUT", @""); + _userFingerprintTitleLabel.text = NSLocalizedString(@"FINGERPRINT_YOURS",@""); } - (void)viewWillAppear:(BOOL)animated @@ -104,14 +108,13 @@ static NSString* const kScanIdentityBarcodeViewSegue = @"ScanIdentityBarcodeView { if(!_isPresentingDialog) { _isPresentingDialog = YES; - [DJWActionSheet showInView:self.view withTitle:@"Are you sure wou want to shred the following? This action is irreversible." - cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@[@"Shred all keying material"] + [DJWActionSheet showInView:self.view withTitle:NSLocalizedString(@"FINGERPRINT_SHRED_KEYMATERIAL_CONFIRMATION", @"") cancelButtonTitle:NSLocalizedString(@"TXT_CANCEL_TITLE", @"") destructiveButtonTitle:nil otherButtonTitles:@[NSLocalizedString(@"FINGERPRINT_SHRED_KEYMATERIAL_BUTTON", @"")] tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) { _isPresentingDialog = NO; if (tappedButtonIndex == actionSheet.cancelButtonIndex) { - NSLog(@"User Cancelled"); + DDLogCDebug(@"User Cancelled"); } else if (tappedButtonIndex == actionSheet.destructiveButtonIndex) { - NSLog(@"Destructive button tapped"); + DDLogCDebug(@"Destructive button tapped"); }else { switch (tappedButtonIndex) { case 0: @@ -152,7 +155,7 @@ static NSString* const kScanIdentityBarcodeViewSegue = @"ScanIdentityBarcodeView - (IBAction)unwindIdentityVerificationCancel:(UIStoryboardSegue *)segue{ - NSLog(@"action cancelled"); + DDLogCDebug(@"action cancelled"); // Can later be used to mark identity key as verified if we want step above TOFU in UX } diff --git a/Signal/src/view controllers/FullImageViewController.m b/Signal/src/view controllers/FullImageViewController.m index a8633a999..bdb7a91a9 100644 --- a/Signal/src/view controllers/FullImageViewController.m +++ b/Signal/src/view controllers/FullImageViewController.m @@ -361,7 +361,7 @@ -(void)shareButtonTapped:(UIButton*)sender { - [DJWActionSheet showInView:self.view withTitle:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete" otherButtonTitles:@[@"Save to Camera Roll", @"Copy"] tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) { + [DJWActionSheet showInView:self.view withTitle:nil cancelButtonTitle:NSLocalizedString(@"TXT_CANCEL_TITLE", @"") destructiveButtonTitle:NSLocalizedString(@"TXT_DELETE_TITLE", @"") otherButtonTitles:@[NSLocalizedString(@"CAMERA_ROLL_SAVE_BUTTON", @""), NSLocalizedString(@"CAMERA_ROLL_COPY_BUTTON", @"")] tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) { if (tappedButtonIndex == actionSheet.cancelButtonIndex) { } else if (tappedButtonIndex == actionSheet.destructiveButtonIndex){ diff --git a/Signal/src/view controllers/InboxTableViewCell.m b/Signal/src/view controllers/InboxTableViewCell.m index e75141330..ed87db98a 100644 --- a/Signal/src/view controllers/InboxTableViewCell.m +++ b/Signal/src/view controllers/InboxTableViewCell.m @@ -49,7 +49,7 @@ if([thread isKindOfClass:[TSGroupThread class]]) { _contactPictureView.image = ((TSGroupThread*)thread).groupModel.groupImage!=nil ? ((TSGroupThread*)thread).groupModel.groupImage : [UIImage imageNamed:@"empty-group-avatar"]; if([_nameLabel.text length]==0) { - _nameLabel.text = @"New Group"; + _nameLabel.text = NSLocalizedString(@"NEW_GROUP_DEFAULT_TITLE", @""); } if(_contactPictureView.image!=nil) { [UIUtil applyRoundedBorderToImageView:&_contactPictureView]; diff --git a/Signal/src/view controllers/MediaSettingsTableViewController.h b/Signal/src/view controllers/MediaSettingsTableViewController.h deleted file mode 100644 index 4e8e8f300..000000000 --- a/Signal/src/view controllers/MediaSettingsTableViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// MediaSettingsTableViewController.h -// Signal -// -// Created by Dylan Bourgeois on 05/01/15. -// Copyright (c) 2015 Open Whisper Systems. All rights reserved. -// - -#import - -@interface MediaSettingsTableViewController : UITableViewController - -@end diff --git a/Signal/src/view controllers/MediaSettingsTableViewController.m b/Signal/src/view controllers/MediaSettingsTableViewController.m deleted file mode 100644 index 224bfe92b..000000000 --- a/Signal/src/view controllers/MediaSettingsTableViewController.m +++ /dev/null @@ -1,145 +0,0 @@ -// -// MediaSettingsTableViewController.m -// Signal -// -// Created by Dylan Bourgeois on 05/01/15. -// Copyright (c) 2015 Open Whisper Systems. All rights reserved. -// - -#import "MediaSettingsTableViewController.h" - -#import "Environment.h" -#import "PreferencesUtil.h" - -@interface MediaSettingsTableViewController () - -@property (strong, nonatomic) UITableViewCell * uncroppedQualityCell; -@property (strong, nonatomic) UITableViewCell * highQualityCell; -@property (strong, nonatomic) UITableViewCell * averageQualityCell; -@property (strong, nonatomic) UITableViewCell * lowQualityCell; - -@property (strong, nonatomic) NSIndexPath * lastIndexPath; - -@end - -@implementation MediaSettingsTableViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - [self.navigationController.navigationBar setTranslucent:NO]; - self.tableView.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero]; - [self showCheckmarkOnDefaultSetting:YES]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; -} - --(instancetype)init -{ - return [super initWithStyle:UITableViewStyleGrouped]; -} - --(void)loadView { - [super loadView]; - - self.title = @"Media"; - - //Uncropped - self.uncroppedQualityCell = [[UITableViewCell alloc]init]; - self.uncroppedQualityCell.textLabel.text = @"Uncropped"; - self.uncroppedQualityCell.selectionStyle = UITableViewCellSelectionStyleNone; - - //High - self.highQualityCell = [[UITableViewCell alloc]init]; - self.highQualityCell.textLabel.text = @"High"; - self.highQualityCell.selectionStyle = UITableViewCellSelectionStyleNone; - - //Average - self.averageQualityCell = [[UITableViewCell alloc]init]; - self.averageQualityCell.textLabel.text = @"Average"; - self.averageQualityCell.selectionStyle = UITableViewCellSelectionStyleNone; - - //Low - self.lowQualityCell = [[UITableViewCell alloc]init]; - self.lowQualityCell.textLabel.text = @"Low"; - self.lowQualityCell.selectionStyle = UITableViewCellSelectionStyleNone; - -} -#pragma mark - Table view data source - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - return 1; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return 4; -} - --(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - switch (indexPath.row) { - case 0: return self.uncroppedQualityCell; - case 1: return self.highQualityCell; - case 2: return self.averageQualityCell; - case 3: return self.lowQualityCell; - default: return nil; - } -} - -- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section -{ - return @"Image upload quality"; -} - --(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [self showCheckmarkOnDefaultSetting:NO]; - [tableView cellForRowAtIndexPath:indexPath].accessoryType = UITableViewCellAccessoryCheckmark; - [self updateSettingWithSelectedIndexPath:indexPath]; -} - --(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [tableView cellForRowAtIndexPath:indexPath].accessoryType = UITableViewCellAccessoryNone; -} - -#pragma mark - Setting - --(void)updateSettingWithSelectedIndexPath:(NSIndexPath*)indexPath -{ - switch (indexPath.row) { - case 0: - [Environment.preferences setImageUploadQuality:TSImageQualityUncropped]; - break; - case 1: - [Environment.preferences setImageUploadQuality:TSImageQualityHigh]; - break; - case 2: - [Environment.preferences setImageUploadQuality:TSImageQualityMedium]; - break; - case 3: - [Environment.preferences setImageUploadQuality:TSImageQualityLow]; - break; - default: - break; - } -} - --(NSIndexPath*)indexPathForSetting:(TSImageQuality)setting -{ - switch (setting) { - case TSImageQualityUncropped: return [NSIndexPath indexPathForRow:0 inSection:0]; - case TSImageQualityHigh: return [NSIndexPath indexPathForRow:1 inSection:0]; - case TSImageQualityMedium: return [NSIndexPath indexPathForRow:2 inSection:0]; - case TSImageQualityLow: return [NSIndexPath indexPathForRow:3 inSection:0]; - } -} - --(void)showCheckmarkOnDefaultSetting:(BOOL)show -{ - NSIndexPath * defaultIndexPath = [self indexPathForSetting:[Environment.preferences imageUploadQuality]]; - [self.tableView cellForRowAtIndexPath:defaultIndexPath].accessoryType = show ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone; -} - -@end diff --git a/Signal/src/view controllers/MessageComposeTableViewController.m b/Signal/src/view controllers/MessageComposeTableViewController.m index 93b3f4918..6cab5bc20 100644 --- a/Signal/src/view controllers/MessageComposeTableViewController.m +++ b/Signal/src/view controllers/MessageComposeTableViewController.m @@ -54,6 +54,7 @@ self.tableView.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero]; [self createLoadingAndBackgroundViews]; + self.title = NSLocalizedString(@"MESSAGE_COMPOSEVIEW_TITLE", @""); } - (void)didReceiveMemoryWarning { @@ -123,7 +124,7 @@ [loadingProgressView setFrame:CGRectMake(self.tableView.frame.size.width/2.0f-loadingProgressView.frame.size.width/2.0f, 100+110/2.0f-loadingProgressView.frame.size.height/2.0f, loadingProgressView.frame.size.width, loadingProgressView.frame.size.height)]; [loadingProgressView setHidesWhenStopped:NO]; [loadingProgressView startAnimating]; - UILabel *loadingLabel = [self createLabelWithFirstLine:@"Loading your contacts." andSecondLine:@"Sit tight."]; + UILabel *loadingLabel = [self createLabelWithFirstLine:NSLocalizedString(@"LOADING_CONTACTS_LABEL_LINE1", @"") andSecondLine:NSLocalizedString(@"LOADING_CONTACTS_LABEL_LINE2" , @"")]; [_loadingBackgroundView addSubview:loadingImageView]; [_loadingBackgroundView addSubview:loadingProgressView]; [_loadingBackgroundView addSubview:loadingLabel]; @@ -135,9 +136,9 @@ [emptyImageView setFrame:CGRectMake(self.tableView.frame.size.width/2.0f-115.0f/2.0f, 100, 115, 110)]; emptyImageView.contentMode = UIViewContentModeCenter; emptyImageView.contentMode = UIViewContentModeScaleAspectFit; - UILabel *emptyLabel = [self createLabelWithFirstLine:@"None of your contacts have Signal!" andSecondLine:@"Why don't you invite someone"]; + UILabel *emptyLabel = [self createLabelWithFirstLine:NSLocalizedString(@"EMPTY_CONTACTS_LABEL_LINE1", @"") andSecondLine:NSLocalizedString(@"EMPTY_CONTACTS_LABEL_LINE2" , @"")]; - UIButton *inviteContactButton = [self createButtonWithTitle:@"Invite contact"]; + UIButton *inviteContactButton = [self createButtonWithTitle:NSLocalizedString(@"EMPTY_CONTACTS_INVITE_BUTTON", @"")]; [inviteContactButton addTarget:self action:@selector(sendText) forControlEvents:UIControlEventTouchUpInside]; [inviteContactButton setFrame:CGRectMake(self.tableView.frame.size.width/2.0f-inviteContactButton.frame.size.width/1.5f, self.tableView.frame.size.height - 200, 100, 66)]; @@ -209,7 +210,7 @@ self.searchController.searchBar.searchBarStyle = UISearchBarStyleMinimal; self.searchController.searchBar.delegate = self; - self.searchController.searchBar.placeholder = @"Search by name or number"; + self.searchController.searchBar.placeholder = NSLocalizedString(@"SEARCH_BYNAMEORNUMBER_PLACEHOLDER_TEXT", @""); sendTextButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [sendTextButton setBackgroundColor:[UIColor ows_materialBlueColor]]; @@ -276,7 +277,7 @@ // text to a non-signal number if we have no results and a valid phone # if (searchResults.count == 0 && searchText.length > 8 && formattedNumber) { - NSString *sendTextTo = @"Send SMS to: "; + NSString *sendTextTo = NSLocalizedString(@"SEND_SMS_BUTTON", @""); sendTextTo = [sendTextTo stringByAppendingString:formattedNumber]; [sendTextButton setTitle:sendTextTo forState:UIControlStateNormal]; sendTextButton.hidden = NO; @@ -291,27 +292,27 @@ #pragma mark - Send Normal Text to Unknown Contact - (void)sendText { - NSString *confirmMessage = @"Invite a friend via insecure SMS?"; + NSString *confirmMessage = NSLocalizedString(@"SEND_SMS_CONFIRM_TITLE", @""); if([currentSearchTerm length]>0) { - confirmMessage = @"Would you like to invite the following number to Signal: "; + confirmMessage = NSLocalizedString(@"SEND_SMS_INVITE_TITLE", @""); confirmMessage = [confirmMessage stringByAppendingString:currentSearchTerm]; - confirmMessage = [confirmMessage stringByAppendingString:@"?"]; + confirmMessage = [confirmMessage stringByAppendingString:NSLocalizedString(@"QUESTIONMARK_PUNCTUATION", @"")]; } UIAlertController *alertController = [UIAlertController - alertControllerWithTitle:@"Confirm" + alertControllerWithTitle:NSLocalizedString(@"CONFIRMATION_TITLE", @"") message:confirmMessage preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *cancelAction = [UIAlertAction - actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel action") + actionWithTitle:NSLocalizedString(@"Cancel", @"") style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) { - NSLog(@"Cancel action"); + DDLogCDebug(@"Cancel action"); }]; UIAlertAction *okAction = [UIAlertAction - actionWithTitle:NSLocalizedString(@"OK", @"OK action") + actionWithTitle:NSLocalizedString(@"OK", @"") style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { [self.searchController setActive:NO]; @@ -322,11 +323,11 @@ picker.messageComposeDelegate = self; picker.recipients = [currentSearchTerm length]> 0 ? [NSArray arrayWithObject:currentSearchTerm] : nil; - picker.body = @"I'm inviting you to install Signal! Here is the link: https://itunes.apple.com/us/app/signal-private-messenger/id874139669?mt=8"; + picker.body = [NSLocalizedString(@"SMS_INVITE_BODY", @"") stringByAppendingString:@" https://itunes.apple.com/us/app/signal-private-messenger/id874139669?mt=8"]; [self presentViewController:picker animated:YES completion:[UIUtil modalCompletionBlock]]; } else { // TODO: better backup for iPods (just don't support on) - UIAlertView *notPermitted=[[UIAlertView alloc] initWithTitle:@"Alert" message:@"Your device doesn't support this feature." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; + UIAlertView *notPermitted=[[UIAlertView alloc] initWithTitle:@"" message:NSLocalizedString(@"UNSUPPORTED_FEATURE_ERROR", @"") delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", @"") otherButtonTitles:nil]; [notPermitted show]; } }]; @@ -350,15 +351,15 @@ case MessageComposeResultCancelled: break; case MessageComposeResultFailed: { - UIAlertView *warningAlert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Failed to send SMS!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; + UIAlertView *warningAlert = [[UIAlertView alloc] initWithTitle:@"" message:NSLocalizedString(@"SEND_SMS_INVITE_FAILURE", @"") delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", @"") otherButtonTitles:nil]; [warningAlert show]; break; } case MessageComposeResultSent: { [self dismissViewControllerAnimated:NO completion:^{ - NSLog(@"view controller dismissed"); + DDLogCDebug(@"view controller dismissed"); }]; - UIAlertView *successAlert = [[UIAlertView alloc] initWithTitle:@"Success" message:@"You've invited your friend to use Signal!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; + UIAlertView *successAlert = [[UIAlertView alloc] initWithTitle:@"" message:NSLocalizedString(@"SEND_SMS_INVITE_SUCCESS", @"") delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", @"") otherButtonTitles:nil]; [successAlert show]; break; } diff --git a/Signal/src/view controllers/MessagesViewController.m b/Signal/src/view controllers/MessagesViewController.m index ed15d53cd..ef7eb2655 100644 --- a/Signal/src/view controllers/MessagesViewController.m +++ b/Signal/src/view controllers/MessagesViewController.m @@ -161,7 +161,7 @@ typedef enum : NSUInteger { _toggleContactPhoneDisplay = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(toggleContactPhone)]; _toggleContactPhoneDisplay.numberOfTapsRequired = 1; - _messageButton = [UIButton ows_blueButtonWithTitle:@"Send"]; + _messageButton = [UIButton ows_blueButtonWithTitle:NSLocalizedString(@"SEND_BUTTON_TITLE", @"")]; _attachButton = [[UIButton alloc] init]; [_attachButton setFrame:CGRectMake(0, 0, JSQ_TOOLBAR_ICON_WIDTH+JSQ_IMAGE_INSET*2, JSQ_TOOLBAR_ICON_HEIGHT+JSQ_IMAGE_INSET*2)]; @@ -294,7 +294,7 @@ typedef enum : NSUInteger { UIButton* groupUpdateButton = [[UIButton alloc] initWithFrame:CGRectMake(0,0,65,24)]; - NSMutableAttributedString *updateTitle = [[NSMutableAttributedString alloc] initWithString:@"Update"]; + NSMutableAttributedString *updateTitle = [[NSMutableAttributedString alloc] initWithString:NSLocalizedString(@"UPDATE_BUTTON_TITLE", @"")]; [updateTitle setAttributes:buttonTextAttributes range:NSMakeRange(0, [updateTitle length])]; [groupUpdateButton setAttributedTitle:updateTitle forState:UIControlStateNormal]; [groupUpdateButton addTarget:self action:@selector(updateGroup) forControlEvents:UIControlEventTouchUpInside]; @@ -305,7 +305,7 @@ typedef enum : NSUInteger { groupUpdateBarButton.customView.userInteractionEnabled = YES; UIButton* groupLeaveButton = [[UIButton alloc] initWithFrame:CGRectMake(0,0,50,24)]; - NSMutableAttributedString *leaveTitle = [[NSMutableAttributedString alloc] initWithString:@"Leave"]; + NSMutableAttributedString *leaveTitle = [[NSMutableAttributedString alloc] initWithString:NSLocalizedString(@"LEAVE_BUTTON_TITLE", @"")]; [leaveTitle setAttributes:buttonTextAttributes range:NSMakeRange(0, [leaveTitle length])]; [groupLeaveButton setAttributedTitle:leaveTitle forState:UIControlStateNormal]; [groupLeaveButton addTarget:self action:@selector(leaveGroup) forControlEvents:UIControlEventTouchUpInside]; @@ -315,7 +315,7 @@ typedef enum : NSUInteger { groupLeaveBarButton.customView.userInteractionEnabled = YES; UIButton* groupMembersButton = [[UIButton alloc] initWithFrame:CGRectMake(0,0,65,24)]; - NSMutableAttributedString *membersTitle = [[NSMutableAttributedString alloc] initWithString:@"Members"]; + NSMutableAttributedString *membersTitle = [[NSMutableAttributedString alloc] initWithString:NSLocalizedString(@"MEMBERS_BUTTON_TITLE", @"")]; [membersTitle setAttributes:buttonTextAttributes range:NSMakeRange(0, [membersTitle length])]; [groupMembersButton setAttributedTitle:membersTitle forState:UIControlStateNormal]; [groupMembersButton addTarget:self action:@selector(showGroupMembers) forControlEvents:UIControlEventTouchUpInside]; @@ -345,7 +345,7 @@ typedef enum : NSUInteger { -(void) setNavigationTitle { NSString* navTitle = self.thread.name; if(isGroupConversation && [navTitle length]==0) { - navTitle = @"New Group"; + navTitle = NSLocalizedString(@"NEW_GROUP_DEFAULT_TITLE", @""); } self.navController.activeNavigationBarTitle = nil; self.title = navTitle; @@ -601,7 +601,7 @@ typedef enum : NSUInteger { return [self loadErrorMessageCellForMessage:msg atIndexPath:indexPath]; default: - NSLog(@"Something went wrong"); + DDLogCError(@"Something went wrong"); return nil; } } @@ -753,7 +753,7 @@ typedef enum : NSUInteger { _lastDeliveredMessageIndexPath = indexPath; NSTextAttachment *textAttachment = [[NSTextAttachment alloc] init]; textAttachment.bounds = CGRectMake(0, 0, 11.0f, 10.0f); - NSMutableAttributedString * attrStr = [[NSMutableAttributedString alloc]initWithString:@"Delivered"]; + NSMutableAttributedString * attrStr = [[NSMutableAttributedString alloc]initWithString:NSLocalizedString(@"DELIVERED_MESSAGE_TEXT", @"")]; [attrStr appendAttributedString:[NSAttributedString attributedStringWithAttachment:textAttachment]]; return (NSAttributedString*)attrStr; @@ -895,7 +895,7 @@ typedef enum : NSUInteger { NSError *error; _audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:attStream.mediaURL error:&error]; if (error) { - NSLog(@"error: %@", error); + DDLogCError(@"error: %@", error); } [_audioPlayer prepareToPlay]; [_audioPlayer play]; @@ -1032,9 +1032,9 @@ typedef enum : NSUInteger { - (void)handleUnsentMessageTap:(TSOutgoingMessage*)message{ [self dismissKeyBoard]; - [DJWActionSheet showInView:self.parentViewController.view withTitle:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete" otherButtonTitles:@[@"Send again"] tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) { + [DJWActionSheet showInView:self.parentViewController.view withTitle:nil cancelButtonTitle:NSLocalizedString(@"TXT_CANCEL_TITLE", @"") destructiveButtonTitle:NSLocalizedString(@"TXT_DELETE_TITLE", @"") otherButtonTitles:@[NSLocalizedString(@"SEND_AGAIN_BUTTON", @"")] tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) { if (tappedButtonIndex == actionSheet.cancelButtonIndex) { - NSLog(@"User Cancelled"); + DDLogCDebug(@"User Cancelled"); } else if (tappedButtonIndex == actionSheet.destructiveButtonIndex) { [self.editingDatabaseConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction){ [message removeWithTransaction:transaction]; @@ -1058,14 +1058,14 @@ typedef enum : NSUInteger { if ([message isKindOfClass:[TSInvalidIdentityKeyErrorMessage class]]) { TSInvalidIdentityKeyErrorMessage *errorMessage = (TSInvalidIdentityKeyErrorMessage*)message; NSString *newKeyFingerprint = [errorMessage newIdentityKey]; - NSString *messageString = [NSString stringWithFormat:@"Do you want to accept %@'s new identity key: %@", _thread.name, newKeyFingerprint]; - NSArray *actions = @[@"Accept new identity key", @"Copy new identity key to pasteboard"]; + NSString *messageString = [NSString stringWithFormat:NSLocalizedString(@"ACCEPT_IDENTITYKEY_QUESTION", @""), _thread.name, newKeyFingerprint]; + NSArray *actions = @[NSLocalizedString(@"ACCEPT_IDENTITYKEY_BUTTON", @""), NSLocalizedString(@"COPY_IDENTITYKEY_BUTTON", @"")]; [self dismissKeyBoard]; - [DJWActionSheet showInView:self.parentViewController.view withTitle:messageString cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete" otherButtonTitles:actions tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) { + [DJWActionSheet showInView:self.parentViewController.view withTitle:messageString cancelButtonTitle:NSLocalizedString(@"TXT_CANCEL_TITLE", @"") destructiveButtonTitle:NSLocalizedString(@"TXT_DELETE_TITLE", @"") otherButtonTitles:actions tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) { if (tappedButtonIndex == actionSheet.cancelButtonIndex) { - NSLog(@"User Cancelled"); + DDLogCDebug(@"User Cancelled"); } else if (tappedButtonIndex == actionSheet.destructiveButtonIndex) { [self.editingDatabaseConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction){ [message removeWithTransaction:transaction]; @@ -1506,9 +1506,9 @@ typedef enum : NSUInteger { [DJWActionSheet showInView:presenter withTitle:nil - cancelButtonTitle:@"Cancel" + cancelButtonTitle:NSLocalizedString(@"TXT_CANCEL_TITLE", @"") destructiveButtonTitle:nil - otherButtonTitles:@[@"Take Photo or Video", @" Choose from Library..."]//,@"Record audio"] + otherButtonTitles:@[NSLocalizedString(@"TAKE_MEDIA_BUTTON", @""), NSLocalizedString(@"CHOOSE_MEDIA_BUTTON", @"")]//,@"Record audio"] tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) { if (tappedButtonIndex == actionSheet.cancelButtonIndex) { DDLogVerbose(@"User Cancelled"); diff --git a/Signal/src/view controllers/NewGroupViewController.h b/Signal/src/view controllers/NewGroupViewController.h index 959a02a86..6330205cc 100644 --- a/Signal/src/view controllers/NewGroupViewController.h +++ b/Signal/src/view controllers/NewGroupViewController.h @@ -17,6 +17,7 @@ @property(nonatomic, strong) IBOutlet UITextField* nameGroupTextField; @property(nonatomic, strong) IBOutlet UIButton* groupImageButton; @property(nonatomic, strong) IBOutlet UIView* tapToDismissView; +@property(nonatomic, strong) IBOutlet UILabel *addPeopleLabel; @property(nonatomic, strong) UIImage* groupImage; @property(nonatomic, strong) TSGroupModel* groupModel; diff --git a/Signal/src/view controllers/NewGroupViewController.m b/Signal/src/view controllers/NewGroupViewController.m index c04b2c69c..55826b799 100644 --- a/Signal/src/view controllers/NewGroupViewController.m +++ b/Signal/src/view controllers/NewGroupViewController.m @@ -71,11 +71,11 @@ static NSString* const kUnwindToMessagesViewSegue = @"UnwindToMessagesViewSegue" if(_thread==nil) { self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:@"add-conversation"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStylePlain target:self action:@selector(createGroup)]; - self.navigationItem.title = @"New Group"; self.navigationItem.rightBarButtonItem.imageInsets = UIEdgeInsetsMake(0, -10, 0, 10); + self.navigationItem.title = NSLocalizedString(@"NEW_GROUP_DEFAULT_TITLE", @""); } else { - self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"Update" style:UIBarButtonItemStylePlain target:self action:@selector(updateGroup)]; + self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:NSLocalizedString(@"UPDATE_BUTTON_TITLE", @"") style:UIBarButtonItemStylePlain target:self action:@selector(updateGroup)]; self.navigationItem.title = _thread.groupModel.groupName; self.nameGroupTextField.text = _thread.groupModel.groupName; if(_thread.groupModel.groupImage!=nil) { @@ -83,7 +83,8 @@ static NSString* const kUnwindToMessagesViewSegue = @"UnwindToMessagesViewSegue" [self setupGroupImageButton:_thread.groupModel.groupImage]; } } - + _nameGroupTextField.placeholder = NSLocalizedString(@"NEW_GROUP_NAMEGROUP_REQUEST_DEFAULT", @""); + _addPeopleLabel.text = NSLocalizedString(@"NEW_GROUP_REQUEST_ADDPEOPLE", @""); } - (void)didReceiveMemoryWarning { @@ -150,14 +151,14 @@ static NSString* const kUnwindToMessagesViewSegue = @"UnwindToMessagesViewSegue" -(IBAction)addGroupPhoto:(id)sender { [self.nameGroupTextField resignFirstResponder]; - [DJWActionSheet showInView:self.parentViewController.view withTitle:nil cancelButtonTitle:@"Cancel" - destructiveButtonTitle:nil otherButtonTitles:@[@"Take a Picture",@"Choose from Library"] + [DJWActionSheet showInView:self.parentViewController.view withTitle:nil cancelButtonTitle:NSLocalizedString(@"TXT_CANCEL_TITLE", @"") + destructiveButtonTitle:nil otherButtonTitles:@[NSLocalizedString(@"TAKE_PICTURE_BUTTON", @""),NSLocalizedString(@"CHOOSE_MEDIA_BUTTON", @"")] tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) { if (tappedButtonIndex == actionSheet.cancelButtonIndex) { - NSLog(@"User Cancelled"); + DDLogCDebug(@"User Cancelled"); } else if (tappedButtonIndex == actionSheet.destructiveButtonIndex) { - NSLog(@"Destructive button tapped"); + DDLogCDebug(@"Destructive button tapped"); }else { switch (tappedButtonIndex) { case 0: diff --git a/Signal/src/view controllers/PresentIdentityQRCodeViewController.h b/Signal/src/view controllers/PresentIdentityQRCodeViewController.h index 49f7372c0..f5242d0d1 100644 --- a/Signal/src/view controllers/PresentIdentityQRCodeViewController.h +++ b/Signal/src/view controllers/PresentIdentityQRCodeViewController.h @@ -10,6 +10,7 @@ @interface PresentIdentityQRCodeViewController : UIViewController @property(nonatomic,strong) IBOutlet UIImageView* qrCodeView; +@property(nonatomic,strong) IBOutlet UILabel *yourFingerprintLabel; @property(nonatomic,strong) NSData* identityKey; @end diff --git a/Signal/src/view controllers/PresentIdentityQRCodeViewController.m b/Signal/src/view controllers/PresentIdentityQRCodeViewController.m index db31f31dd..2f89d3627 100644 --- a/Signal/src/view controllers/PresentIdentityQRCodeViewController.m +++ b/Signal/src/view controllers/PresentIdentityQRCodeViewController.m @@ -41,7 +41,7 @@ UIImage *resized = [image resizedWithQuality:kCGInterpolationNone rate:5.0]; self.qrCodeView.image = resized; - + _yourFingerprintLabel.text = NSLocalizedString(@"FINGERPRINT_YOURS",@""); CGImageRelease(cgImage); } diff --git a/Signal/src/view controllers/PrivacySettingsTableViewController.m b/Signal/src/view controllers/PrivacySettingsTableViewController.m index 4ad21369a..cb2b86836 100644 --- a/Signal/src/view controllers/PrivacySettingsTableViewController.m +++ b/Signal/src/view controllers/PrivacySettingsTableViewController.m @@ -16,8 +16,6 @@ #import "TSStorageManager+IdentityKeyStore.h" #import "UIUtil.h" -#define TAP_TO_COPYSTRING NSLocalizedString(@"Tap to copy.",nil) - @interface PrivacySettingsTableViewController () @property (nonatomic, strong) UITableViewCell * enableScreenSecurityCell; @@ -51,11 +49,11 @@ { [super loadView]; - self.title = @"Privacy"; + self.title = NSLocalizedString(@"SETTINGS_PRIVACY_TITLE", @""); //Enable Screen Security Cell self.enableScreenSecurityCell = [[UITableViewCell alloc]init]; - self.enableScreenSecurityCell.textLabel.text = @"Enable Screen Security"; + self.enableScreenSecurityCell.textLabel.text = NSLocalizedString(@"SETTINGS_SCREEN_SECURITY", @""); self.enableScreenSecuritySwitch = [[UISwitch alloc]initWithFrame:CGRectZero]; @@ -64,13 +62,13 @@ //Clear History Log Cell self.clearHistoryLogCell = [[UITableViewCell alloc]init]; - self.clearHistoryLogCell.textLabel.text = @"Clear History Logs"; + self.clearHistoryLogCell.textLabel.text = NSLocalizedString(@"SETTINGS_CLEAR_HISTORY", @""); self.clearHistoryLogCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; //Fingerprint Cell self.fingerprintCell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"Identifier"]; - self.fingerprintCell.textLabel.text = @"Fingerprint"; - self.fingerprintCell.detailTextLabel.text = TAP_TO_COPYSTRING; + self.fingerprintCell.textLabel.text = NSLocalizedString(@"SETTINGS_FINGERPRINT", @""); + self.fingerprintCell.detailTextLabel.text = NSLocalizedString(@"SETTINGS_FINGERPRINT_COPY",nil); self.fingerprintCell.detailTextLabel.textColor = [UIColor lightGrayColor]; self.fingerprintLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 150, 25)]; @@ -129,9 +127,9 @@ - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { switch (section) { - case 0: return @"Screen Security"; - case 1: return @"History Log"; - case 2: return @"Fingerprint"; + case 0: return NSLocalizedString(@"SETTINGS_SECURITY_TITLE", @""); + case 1: return NSLocalizedString(@"SETTINGS_HISTORYLOG_TITLE", @""); + case 2: return NSLocalizedString(@"SETTINGS_FINGERPRINT", @""); default: return nil; } } @@ -144,19 +142,19 @@ case 1: { [DJWActionSheet showInView:self.parentViewController.view - withTitle:@"Are you sure you want to delete all your history (messages, attachments, call history ...) ? This action cannot be reverted." - cancelButtonTitle:@"Cancel" - destructiveButtonTitle:@"I'm sure." + withTitle:NSLocalizedString(@"SETTINGS_DELETE_HISTORYLOG_CONFIRMATION", @"") + cancelButtonTitle:NSLocalizedString(@"TXT_CANCEL_TITLE", @"") + destructiveButtonTitle:NSLocalizedString(@"SETTINGS_DELETE_HISTORYLOG_CONFIRMATION_BUTTON", @"") otherButtonTitles:@[] tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) { [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; if (tappedButtonIndex == actionSheet.cancelButtonIndex) { - NSLog(@"User Cancelled"); + DDLogCDebug(@"User Cancelled"); } else if (tappedButtonIndex == actionSheet.destructiveButtonIndex){ [[TSStorageManager sharedManager] deleteThreadsAndMessages]; } else { - NSLog(@"The user tapped button at index: %li", (long)tappedButtonIndex); + DDLogCDebug(@"The user tapped button at index: %li", (long)tappedButtonIndex); } }]; @@ -170,9 +168,9 @@ //Timer to change label to copied (NSTextAttachment checkmark) if (self.copiedTimer == nil) { self.copiedTimer = [NSTimer scheduledTimerWithTimeInterval:2.0f target:self selector:@selector(endTimer:) userInfo:nil repeats:NO]; - self.fingerprintCell.detailTextLabel.text = @"Copied!"; + self.fingerprintCell.detailTextLabel.text = NSLocalizedString(@"SETTINGS_FINGERPRINT_COPY_SUCCESS", @""); } else { - self.fingerprintCell.detailTextLabel.text = TAP_TO_COPYSTRING; + self.fingerprintCell.detailTextLabel.text = NSLocalizedString(@"SETTINGS_FINGERPRINT_COPY",nil); } [[UIPasteboard generalPasteboard] setString:self.fingerprintLabel.text]; break; @@ -198,7 +196,7 @@ -(void)endTimer:(id)sender { - self.fingerprintCell.detailTextLabel.text = TAP_TO_COPYSTRING; + self.fingerprintCell.detailTextLabel.text = NSLocalizedString(@"SETTINGS_FINGERPRINT_COPY",nil); [self.copiedTimer invalidate]; self.copiedTimer = nil; } diff --git a/Signal/src/view controllers/RegistrationViewController.h b/Signal/src/view controllers/RegistrationViewController.h index 606422c50..0dc7364dc 100644 --- a/Signal/src/view controllers/RegistrationViewController.h +++ b/Signal/src/view controllers/RegistrationViewController.h @@ -18,7 +18,8 @@ //Phone number @property(nonatomic, strong) IBOutlet UITextField* phoneNumberTextField; - +@property(nonatomic, strong) IBOutlet UIButton *phoneNumberButton; +@property(nonatomic, strong) IBOutlet UILabel* titleLabel; //Button @property(nonatomic, strong) IBOutlet UIButton* sendCodeButton; diff --git a/Signal/src/view controllers/RegistrationViewController.m b/Signal/src/view controllers/RegistrationViewController.m index 5c47b9fac..3160f855f 100644 --- a/Signal/src/view controllers/RegistrationViewController.m +++ b/Signal/src/view controllers/RegistrationViewController.m @@ -44,6 +44,12 @@ static NSString *const kCodeSentSegue = @"codeSent"; _phoneNumberTextField.delegate = self; [self populateDefaultCountryNameAndCode]; [[Environment getCurrent] setSignUpFlowNavigationController:self.navigationController]; + + _titleLabel.text = NSLocalizedString(@"REGISTRATION_TITLE_LABEL", @""); + [_countryNameButton setTitle:NSLocalizedString(@"REGISTRATION_DEFAULT_COUNTRY_NAME", @"") forState:UIControlStateNormal]; + _phoneNumberTextField.placeholder = NSLocalizedString(@"REGISTRATION_ENTERNUMBER_DEFAULT_TEXT", @""); + [_phoneNumberButton setTitle:NSLocalizedString(@"REGISTRATION_PHONENUMBER_BUTTON",@"") forState:UIControlStateNormal]; + [_sendCodeButton setTitle:NSLocalizedString(@"REGISTRATION_VERIFY_DEVICE", @"") forState:UIControlStateNormal]; } -(void)viewWillAppear:(BOOL)animated{ diff --git a/Signal/src/view controllers/ScanIdentityBarcodeViewController.m b/Signal/src/view controllers/ScanIdentityBarcodeViewController.m index b05646636..fab9c7f98 100644 --- a/Signal/src/view controllers/ScanIdentityBarcodeViewController.m +++ b/Signal/src/view controllers/ScanIdentityBarcodeViewController.m @@ -18,7 +18,7 @@ - (void)viewDidLoad { [super viewDidLoad]; - self.title = @"Scan key"; + self.title = NSLocalizedString(@"SCAN_KEY", @""); self.highlightView = [[UIView alloc] init]; self.highlightView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleBottomMargin; @@ -34,7 +34,7 @@ if (self.input) { [self.session addInput:self.input]; } else { - NSLog(@"Error: %@", error); + DDLogCDebug(@"Error: %@", error); } self.output = [[AVCaptureMetadataOutput alloc] init]; @@ -76,12 +76,12 @@ NSString *dialogDescription; if([detectionData isEqualToData:self.identityKey]) { - dialogTitle = NSLocalizedString(@"Verified!", nil); - dialogDescription = NSLocalizedString(@"The scanned fingerprint matches the one on the record.", nil); + dialogTitle = NSLocalizedString(@"SCAN_KEY_VERIFIED_TITLE", @""); + dialogDescription = NSLocalizedString(@"SCAN_KEY_VERIFIED_TEXT", @""); } else { - dialogTitle = NSLocalizedString(@"Conflict!", nil); - dialogDescription = NSLocalizedString(@"The scanned fingerprint doesn't match the one on the record.", nil); + dialogTitle = NSLocalizedString(@"SCAN_KEY_CONFLICT_TITLE", @""); + dialogDescription = NSLocalizedString(@"SCAN_KEY_CONFLICT_TEXT", @""); } [self.session stopRunning]; diff --git a/Signal/src/view controllers/SettingsTableViewCell.m b/Signal/src/view controllers/SettingsTableViewCell.m index 003cf283a..da0d4aa16 100644 --- a/Signal/src/view controllers/SettingsTableViewCell.m +++ b/Signal/src/view controllers/SettingsTableViewCell.m @@ -42,6 +42,7 @@ -(void)updateImageQualityLabel { + /* this is currently unused, thus unlocalized. code should probably be excised as this will never be part of design */ switch ([Environment.preferences imageUploadQuality]) { case TSImageQualityUncropped: self.detailLabel.text = @"Full"; diff --git a/Signal/src/view controllers/SettingsTableViewController.h b/Signal/src/view controllers/SettingsTableViewController.h index 6e9a35e58..8ae66f334 100644 --- a/Signal/src/view controllers/SettingsTableViewController.h +++ b/Signal/src/view controllers/SettingsTableViewController.h @@ -14,6 +14,12 @@ @property IBOutlet UILabel *registeredNumber; @property IBOutlet UILabel *networkStatusLabel; +@property IBOutlet UILabel *networkStatusHeader; +@property IBOutlet UILabel *settingsPrivacyTitle; +@property IBOutlet UILabel *settingsAdvancedTitle; +@property IBOutlet UILabel *settingsAboutTitle; +@property IBOutlet UIButton *destroyAccountButton; + -(IBAction)unregisterUser:(id)sender; - (IBAction)unwindToUserCancelledChangeNumber:(UIStoryboardSegue *)segue; @end diff --git a/Signal/src/view controllers/SettingsTableViewController.m b/Signal/src/view controllers/SettingsTableViewController.m index b778dcece..f96336b44 100644 --- a/Signal/src/view controllers/SettingsTableViewController.m +++ b/Signal/src/view controllers/SettingsTableViewController.m @@ -34,7 +34,6 @@ #import "TSStorageManager+IdentityKeyStore.h" #import "PrivacySettingsTableViewController.h" -#import "MediaSettingsTableViewController.h" #import "AdvancedSettingsTableViewController.h" #import "AboutTableViewController.h" #import "PushManager.h" @@ -81,6 +80,13 @@ typedef enum { [self initializeObserver]; [TSSocketManager sendNotification]; + + self.title = NSLocalizedString(@"SETTINGS_NAV_BAR_TITLE",@""); + _networkStatusHeader.text = NSLocalizedString(@"NETWORK_STATUS_HEADER",@""); + _settingsPrivacyTitle.text = NSLocalizedString(@"SETTINGS_PRIVACY_TITLE",@""); + _settingsAdvancedTitle.text = NSLocalizedString(@"SETTINGS_ADVANCED_TITLE",@""); + _settingsAboutTitle.text = NSLocalizedString(@"SETTINGS_ABOUT",@""); + [_destroyAccountButton setTitle:NSLocalizedString(@"SETTINGS_DESTROY_ACCOUNT_BUTTON", @"") forState:UIControlStateNormal]; } -(void)dealloc { @@ -90,7 +96,7 @@ typedef enum { } -(void) findAndSetRegisteredName { - NSString *name = @"Registered Number:"; + NSString *name = NSLocalizedString(@"REGISTERED_NUMBER_TEXT", @""); PhoneNumber* myNumber = [PhoneNumber phoneNumberFromE164:[TSAccountManager registeredNumber]]; Contact *me = [[Environment.getCurrent contactsManager] latestContactForPhoneNumber:myNumber]; self.registeredName.text = [me fullName] ? [me fullName] : name; @@ -176,13 +182,11 @@ typedef enum { -(IBAction)unregisterUser:(id)sender { - UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Are you sure you want to destroy your account?" - message:@"This will reset the application by deleting your messages and unregister you with the server. The app will close after deletion of data." - preferredStyle:UIAlertControllerStyleAlert]; - [alertController addAction:[UIAlertAction actionWithTitle:@"Proceed" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) { + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"CONFIRM_ACCOUNT_DESTRUCTION_TITLE", @"") message:NSLocalizedString(@"CONFIRM_ACCOUNT_DESTRUCTION_TEXT", @"") preferredStyle:UIAlertControllerStyleAlert]; + [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"PROCEED_BUTTON", @"") style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) { [self proceedToUnregistration]; }]]; - [alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]]; + [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"TXT_CANCEL_TITLE", @"") style:UIAlertActionStyleCancel handler:nil]]; [self presentViewController:alertController animated:YES completion:nil]; } @@ -194,20 +198,20 @@ typedef enum { [[TSStorageManager sharedManager] wipe]; exit(0); } failure:^(NSURLSessionDataTask *task, NSError *error) { - SignalAlertView(@"Failed to unregister RedPhone component of Signal", @""); + SignalAlertView(NSLocalizedString(@"UNREGISTER_REDPHONE_FAIL", @""), @""); }]; } failure:^{ - SignalAlertView(@"Failed to unregister RedPhone component of Signal", @""); + SignalAlertView(NSLocalizedString(@"UNREGISTER_REDPHONE_FAIL", @""), @""); }]; } failure:^(NSError *error) { - SignalAlertView(@"Failed to unregister TextSecure component of Signal", @""); + SignalAlertView(NSLocalizedString(@"UNREGISTER_TEXTSECURE_FAIL", @""), @""); }]; } -(void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath { if (indexPath.section == kNetworkStatusSection) { - UIAlertView * info = [[UIAlertView alloc]initWithTitle:@"Network Status" message:@"You can check your network status by looking at the colored bar above your inbox." delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil]; + UIAlertView * info = [[UIAlertView alloc]initWithTitle:NSLocalizedString(@"NETWORK_STATUS_HEADER", @"") message:NSLocalizedString(@"NETWORK_STATUS_TEXT",@"") delegate:self cancelButtonTitle:NSLocalizedString(@"OK",@"") otherButtonTitles: nil]; [info show]; } } @@ -222,17 +226,17 @@ typedef enum { } -(void)socketDidOpen { - self.networkStatusLabel.text = @"Connected"; + self.networkStatusLabel.text = NSLocalizedString(@"NETWORK_STATUS_CONNECTED", @""); self.networkStatusLabel.textColor = [UIColor ows_greenColor]; } -(void)socketDidClose { - self.networkStatusLabel.text = @"Offline"; + self.networkStatusLabel.text = NSLocalizedString(@"NETWORK_STATUS_OFFLINE", @""); self.networkStatusLabel.textColor = [UIColor ows_redColor]; } -(void)socketIsConnecting { - self.networkStatusLabel.text = @"Connecting"; + self.networkStatusLabel.text = NSLocalizedString(@"NETWORK_STATUS_CONNECTING", @""); self.networkStatusLabel.textColor = [UIColor ows_yellowColor]; } diff --git a/Signal/src/view controllers/TSGroupModel.m b/Signal/src/view controllers/TSGroupModel.m index 99bf010f8..def8e8395 100644 --- a/Signal/src/view controllers/TSGroupModel.m +++ b/Signal/src/view controllers/TSGroupModel.m @@ -55,16 +55,16 @@ NSString * const TSAttachementGroupAvatarFileRelationshipEdge = @"TSAttachementG - (NSString*) getInfoStringAboutUpdateTo:(TSGroupModel*)newModel { NSString* updatedGroupInfoString = @""; if (self == newModel) { - return @"Group updated."; + return NSLocalizedString(@"GROUP_UPDATED", @""); } if (![_groupName isEqual:newModel.groupName]) { - updatedGroupInfoString = [updatedGroupInfoString stringByAppendingString:[NSString stringWithFormat:@"Title is now '%@'. ",newModel.groupName]]; + updatedGroupInfoString = [updatedGroupInfoString stringByAppendingString:[NSString stringWithFormat:NSLocalizedString(@"GROUP_TITLE_CHANGED", @""),newModel.groupName]]; } if(_groupImage!=nil && newModel.groupImage!=nil && !([UIImagePNGRepresentation(_groupImage) isEqualToData:UIImagePNGRepresentation(newModel.groupImage)])) { - updatedGroupInfoString = [updatedGroupInfoString stringByAppendingString:@"Avatar changed. "]; + updatedGroupInfoString = [updatedGroupInfoString stringByAppendingString:NSLocalizedString(@"GROUP_AVATAR_CHANGED", @"")]; } if([updatedGroupInfoString length]==0) { - updatedGroupInfoString = @"Group updated"; + updatedGroupInfoString = NSLocalizedString(@"GROUP_UPDATED", @""); } NSSet* oldMembers = [NSSet setWithArray:_groupMemberIds]; NSSet* newMembers = [NSSet setWithArray:newModel.groupMemberIds]; @@ -77,11 +77,11 @@ NSString * const TSAttachementGroupAvatarFileRelationshipEdge = @"TSAttachementG if([membersWhoLeft count] > 0 ) { - updatedGroupInfoString = [updatedGroupInfoString stringByAppendingString:[NSString stringWithFormat:@" %@ left the group. ",[[membersWhoLeft allObjects] componentsJoinedByString:@", "]]]; + updatedGroupInfoString = [updatedGroupInfoString stringByAppendingString:[NSString stringWithFormat:NSLocalizedString(@"GROUP_MEMBER_LEFT", @""),[[membersWhoLeft allObjects] componentsJoinedByString:@", "]]]; } if([membersWhoJoined count] > 0 ) { - updatedGroupInfoString = [updatedGroupInfoString stringByAppendingString:[NSString stringWithFormat:@" %@ joined the group. ",[[membersWhoJoined allObjects] componentsJoinedByString:@", "]]]; + updatedGroupInfoString = [updatedGroupInfoString stringByAppendingString:[NSString stringWithFormat:NSLocalizedString(@"GROUP_MEMBER_JOINED", @""),[[membersWhoJoined allObjects] componentsJoinedByString:@", "]]]; } return updatedGroupInfoString; diff --git a/Signal/src/view controllers/TSMessageAdapter.m b/Signal/src/view controllers/TSMessageAdapter.m index 51b07ad09..a118ae0de 100644 --- a/Signal/src/view controllers/TSMessageAdapter.m +++ b/Signal/src/view controllers/TSMessageAdapter.m @@ -76,7 +76,7 @@ adapter.messageType = TSIncomingMessageAdapter; } else { adapter.senderId = ME_MESSAGE_IDENTIFIER; - adapter.senderDisplayName = @"Me"; + adapter.senderDisplayName = NSLocalizedString(@"ME_STRING", @""); adapter.messageType = TSOutgoingMessageAdapter; } } else if ([thread isKindOfClass:[TSGroupThread class]]){ @@ -87,7 +87,7 @@ adapter.messageType = TSIncomingMessageAdapter; } else { adapter.senderId = ME_MESSAGE_IDENTIFIER; - adapter.senderDisplayName = @"Me"; + adapter.senderDisplayName = NSLocalizedString(@"ME_STRING", @""); adapter.messageType = TSOutgoingMessageAdapter; } } @@ -119,12 +119,12 @@ adapter.messageType = TSInfoMessageAdapter; if (pointer.isDownloading) { - adapter.messageBody = @"Attachment is downloading."; + adapter.messageBody = NSLocalizedString(@"ATTACHMENT_DOWNLOADING", nil); } else { if (pointer.hasFailed) { - adapter.messageBody = @"Attachment download failed, tap to retry."; + adapter.messageBody = NSLocalizedString(@"ATTACHMENT_QUEUED", nil); } else { - adapter.messageBody = @"New attachment queued for retrieval."; + adapter.messageBody = NSLocalizedString(@"ATTACHMENT_DOWNLOAD_FAILED", nil); } } diff --git a/Signal/src/view controllers/UITests/SignalsViewController.m b/Signal/src/view controllers/UITests/SignalsViewController.m index 11030815b..9220cac26 100644 --- a/Signal/src/view controllers/UITests/SignalsViewController.m +++ b/Signal/src/view controllers/UITests/SignalsViewController.m @@ -75,6 +75,9 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow"; [[[Environment getCurrent] contactsManager].getObservableContacts watchLatestValue:^(id latestValue) { [self.tableView reloadData]; } onThread:[NSThread mainThread] untilCancelled:nil]; + self.title = NSLocalizedString(@"CONVERSATIONS_VIEW_TITLE", @""); + + } -(void)viewWillAppear:(BOOL)animated @@ -410,22 +413,22 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow"; if(self.viewingThreadsIn == kInboxState) { if([Environment.preferences getHasSentAMessage]) { - firstLine = @"Done. Done. Done."; - secondLine = @"Tip: add a conversation as a reminder!"; + firstLine = NSLocalizedString(@"EMPTY_INBOX_FIRST_TITLE", @""); + secondLine = NSLocalizedString(@"EMPTY_INBOX_FIRST_TEXT", @""); } else { - firstLine = @"Start your first Signal conversation!"; - secondLine = @"Tap on the + button."; + firstLine = NSLocalizedString(@"EMPTY_ARCHIVE_FIRST_TITLE", @""); + secondLine = NSLocalizedString(@"EMPTY_ARCHIVE_FIRST_TEXT", @""); } } else { if([Environment.preferences getHasArchivedAMessage]) { - firstLine = @"Squeaky Freaking Clean."; - secondLine = @"None. Zero. Zilch. Nada."; + firstLine = NSLocalizedString(@"EMPTY_INBOX_TITLE", @""); + secondLine = NSLocalizedString(@"EMPTY_INBOX_TEXT", @""); } else { - firstLine = @"Clean Up Your Conversations."; - secondLine = @"You can archive inactive conversations for later from your Inbox."; + firstLine = NSLocalizedString(@"EMPTY_ARCHIVE_TITLE", @""); + secondLine = NSLocalizedString(@"EMPTY_ARCHIVE_TEXT", @""); } } NSMutableAttributedString *fullLabelString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n%@",firstLine,secondLine]]; diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index 2dd7d5714..4747425aa 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -1,11 +1,9 @@ "ACTION_REQUIRED_TITLE" = "Action Required"; "ANSWER_CALL_BUTTON_TITLE" = "Answer"; "APN" = "Incoming Call"; -"APN_Message" = "You got a new message!"; "AUDIO_PERMISSION_MESSAGE" = "Signal requires access to your microphone to work properly. You can restore the permission in the Settings app >> Privacy >> Microphone >> Signal"; "CALL_BUTTON_TITLE" = "Call"; "CHALLENGE_CODE_BUTTON_TITLE" = "VERIFY"; -"CHOOSE_COUNTRY_CODE" = "Choose Country Code"; "CONTACT_BROWSE_NAV_BAR_TITLE" = "Contacts"; "CONTACT_DETAIL_COMM_TYPE_EMAIL" = "Email"; "CONTACT_DETAIL_COMM_TYPE_INSECURE" = "Unregistered Number"; @@ -13,32 +11,7 @@ "CONTACT_DETAIL_COMM_TYPE_SECURE" = "Registered Number"; "CONTINUE_TO_WHISPER_TITLE" = "Continue to Signal"; "DATESTRING_TODAY" = "Today"; -"DIALER_CALL_BUTTON_TITLE" = "Call"; -"DIALER_LETTERS_0" = "0"; -"DIALER_LETTERS_1" = ""; -"DIALER_LETTERS_2" = "ABC"; -"DIALER_LETTERS_3" = "DEF"; -"DIALER_LETTERS_4" = "GHI"; -"DIALER_LETTERS_5" = "JKL"; -"DIALER_LETTERS_6" = "MNO"; -"DIALER_LETTERS_7" = "PQRS"; -"DIALER_LETTERS_8" = "TUV"; -"DIALER_LETTERS_9" = "WXYZ"; -"DIALER_LETTERS_POUND" = ""; -"DIALER_NUMBER_0" = "0"; -"DIALER_NUMBER_1" = "1"; -"DIALER_NUMBER_2" = "2"; -"DIALER_NUMBER_3" = "3"; -"DIALER_NUMBER_4" = "4"; -"DIALER_NUMBER_5" = "5"; -"DIALER_NUMBER_6" = "6"; -"DIALER_NUMBER_7" = "7"; -"DIALER_NUMBER_8" = "8"; -"DIALER_NUMBER_9" = "9"; -"DIALER_NUMBER_PLUS" = "+"; -"DIALER_NUMBER_POUND" = "#"; "DISABLING_BACKUP_FAILED" = "We encountered an issue while disabling the backup of your call log. Call logs might leak in your iTunes/iCloud backups."; -"ERROR_CALL_ONESELF" = "You can't call yourself."; "ERROR_WAS_DETECTED_TITLE" = "Bummer!"; "ERROR_WAS_DETECTED_SUBMIT" = "An bug was detected. Help us make Signal better by reporting this incident."; "END_CALL_BAD_INTERACTION_WITH_SERVER" = "Server Failed!"; @@ -49,7 +22,6 @@ "END_CALL_LOGIN_FAILED" = "Login failed!"; "END_CALL_MESSAGE_FROM_SERVER_PREFIX" = "Message from Server: "; "END_CALL_NO_SUCH_USER" = "Number not registered with Signal or RedPhone!"; -"END_CALL_RECIPIENT_REJECTED" = "Call Rejected."; "END_CALL_RECIPIENT_UNAVAILABLE" = "Recipient Unavailable."; "END_CALL_REJECTED_LOCAL" = "You Rejected the Call."; "END_CALL_REJECTED_REMOTE" = "Call Rejected."; @@ -77,64 +49,25 @@ "IN_CALL_TALKING" = "Secured. Active."; "IN_CALL_TERMINATED" = "Done."; "KEYPAD_NAV_BAR_TITLE" = "Keypad"; -"MAIN_MENU_INVITE_CONTACTS" = "Invite Contacts"; -"MAIN_MENU_OPTION_ABOUT" = "About"; -"MAIN_MENU_OPTION_BLOG" = "Blog"; -"MAIN_MENU_OPTION_CONTACTS" = "Contacts"; -"MAIN_MENU_OPTION_DIALER" = "Dialer"; -"MAIN_MENU_OPTION_FAVOURITES" = "Favorites"; -"MAIN_MENU_OPTION_RECENT_CALLS" = "Recents"; -"MAIN_MENU_OPTION_REPORT_BUG" = "Support"; -"MAIN_MENU_OPTION_SETTINGS" = "Settings"; -"MUTE_BUTTON_TITLE" = "Mute"; -"NOTIFICATION_TEXT" = "Some of your contacts have recently registered numbers with Signal!"; -"NO_FAVOURITES_TEXT" = "To favorite a contact, tap the star on a contact page."; "OK" = "Ok"; +"CONFIRMATION_TITLE" = "Confirm"; "PUSH_SETTINGS_MESSAGE" = "Signal requires push notification alerts and sounds to be enabled to work properly. Please change it in the Settings app >> Notification Center >> Signal."; -"QUICK_LINKS_TITLE" = "Quick Links"; -"RECENT_CALLS_SORTING_TITLE" = "Sorting Method"; "RECENT_NAV_BAR_TITLE" = "Call Log"; "REGISTER_BUTTON_TITLE" = "REGISTER"; -"REGISTER_CALL_CALLING" = "Calling"; -"REGISTER_CALL_RECALL" = "Re-Call"; "REGISTER_CC_ERR_ALERT_VIEW_MESSAGE" = "Please enter a valid country code"; "REGISTER_CC_ERR_ALERT_VIEW_TITLE" = "Country Code Error"; -"REGISTER_CHALLENGE_TEXTBLOCK_PART1" = "Let’s make sure you’re real. We've sent you a SMS with a six digit code to:"; -"REGISTER_CHALLENGE_TEXTBLOCK_PART2" = "To complete your phone number verification, please enter the code below."; -"REGISTER_CHALLENGE_VOICECALL_TEXT" = "If you are unable to receive an SMS, we will call you in"; "REGISTER_CHALLENGE_ALERT_VIEW_TITLE" = "Incorrect code"; "REGISTER_CHALLENGE_ALERT_VIEW_BODY" = "Please verify the code and try again"; -"REGISTER_CHALLENGE_UNKNOWN_ERROR"= "An unknown error occured while trying to verify you. Would you like to report it?"; -"REGISTER_ENTER_COUNTRY_CODE" = "Your number's country code"; -"REGISTER_ENTER_NUMBER" = "Your phone number"; "REGISTER_RATE_LIMITING_BODY" = "The server is currently rate-limiting signups, please try again later."; -"REGISTER_SUCCESS_TEXTBLOCK" = "Congratulations! Your registration was successful. You may start using Signal to make secure phone calls."; -"REGISTER_TEXTBLOCK" = "To get started making secure calls, please confirm your country code and enter your device's phone number."; -"REGISTER_VALIDATION_ENTER_CODE" = "Validation Code"; -"REGISTER_VALIDATION_SENT" = "We sent your validation code"; -"REGISTER_WELCOME_TEXT" = "Welcome to Signal"; "REGISTRATION_ERROR" = "Registration Error"; "REGISTRATION_BODY" = "We couldn't reach the Signal server. Please try again."; "REJECT_CALL_BUTTON_TITLE" = "Reject"; "SERVER_CODE" = "The server replied with status code: "; -"SETTINGS_CLEAR_HISTORY_LOG" = "Clear History Log"; -"SETTINGS_DISABLE_AUTOCORRECT" = "Disable Autocorrect"; -"SETTINGS_DISABLE_HISTORY_LOG" = "Disable History Log"; -"SETTINGS_HIDE_CONTACT_IMAGES" = "Hide Contact Images"; "SETTINGS_LOG_CLEAR_MESSAGE" = "Call History Cleared"; "SETTINGS_LOG_CLEAR_TITLE" = "Operation Completed"; "SETTINGS_NAV_BAR_TITLE" = "Settings"; -"SETTINGS_NOTIFICATIONS" = "Notifications"; "SETTINGS_NUMBER_PREFIX" = "Your Number:"; -"SETTINGS_PRIVACY_AND_SECURITY" = "Privacy and Security"; -"SETTINGS_RINGTONE" = "Ringtone"; -"SETTINGS_DEBUGGING" = "Debugging"; -"SETTINGS_DISABLE_LOGS" = "Disable debugging logs"; -"SETTINGS_SCREEN_SECURITY" = "Enable Screen Security"; "SETTINGS_SENDLOG" = "Submit Debug Log"; -"SETTINGS_VIBRATE_ON_RING" = "Vibrate on Ring"; -"SETTINGS_VIBRATE_ON_SILENT" = "Vibrate on Silent"; -"SPEAKER_BUTTON_TITLE" = "Speaker"; "TABLE_SECTION_TITLE_REGISTERED" = "Registered Contacts"; "TABLE_SECTION_TITLE_UNREGISTERED" = "Unregistered Contacts"; "TIMEOUT" = "Timeout"; @@ -143,5 +76,134 @@ "TXT_CANCEL_TITLE" = "Cancel"; "TXT_SEARCH_PLACEHOLDER_TEXT" = "Search"; "UNKNOWN_CONTACT_NAME" = "Unknown Caller"; -"WARNING"= "Warning"; "WHISPER_NAV_BAR_TITLE" = "Inbox"; +"SETTINGS_ABOUT" = "About"; +"SETTINGS_VERSION" = "Version"; +"SETTINGS_SUPPORT" = "Support"; +"SETTINGS_COPYRIGHT" = "Copyright Open Whisper Systems \n Licensed under the GPLv3"; +"SETTINGS_SHARE_INSTALL" = "Share Install Link"; +"SETTINGS_INFORMATION_HEADER" = "Information"; +"SETTINGS_INVITE_HEADER" = "Invite"; +"SETTINGS_HELP_HEADER" = "Help"; +"SETTINGS_INVITE_TWITTER_TEXT" = "You can reach me on @whispersystems Signal, get it now."; +"SETTINGS_ADVANCED_TITLE" = "Advanced"; +"SETTINGS_ADVANCED_DEBUGLOG"= "Enable Debug Log"; +"SETTINGS_ADVANCED_SUBMIT_DEBUGLOG" = "Submit Debug Log"; +"FINGERPRINT_SHRED_KEYMATERIAL_CONFIRMATION" = "Are you sure wou want to shred the following? This action is irreversible."; +"FINGERPRINT_SHRED_KEYMATERIAL_BUTTON" = "Shred all keying material"; +"TXT_DELETE_TITLE" = "Delete"; +"CAMERA_ROLL_SAVE_BUTTON" = "Save to Camera Roll"; +"CAMERA_ROLL_COPY_BUTTON" = "Copy"; +"NEW_GROUP_DEFAULT_TITLE" = "New Group"; +"LOADING_CONTACTS_LABEL_LINE1" = "Loading your contacts."; +"LOADING_CONTACTS_LABEL_LINE2" = "Sit tight."; +"EMPTY_CONTACTS_LABEL_LINE1" = "None of your contacts have Signal!"; +"EMPTY_CONTACTS_LABEL_LINE2" = "Why don't you invite someone"; +"EMPTY_CONTACTS_INVITE_BUTTON" = "Invite contact"; +"SEARCH_BYNAMEORNUMBER_PLACEHOLDER_TEXT" = "Search by name or number"; +"SEND_SMS_BUTTON" = "Send SMS to: "; +"SEND_SMS_CONFIRM_TITLE" = "Invite a friend via insecure SMS?"; +"SEND_SMS_INVITE_TITLE" = "Would you like to invite the following number to Signal: "; +"SEND_SMS_INVITE_SUCCESS" = "You've invited your friend to use Signal!"; +"SEND_SMS_INVITE_FAILURE" = "SMS sending failed, please try again later."; +"QUESTIONMARK_PUNCTUATION" = "?"; +"UNSUPPORTED_FEATURE_ERROR" = "Your device doesn't support this feature."; +"SMS_INVITE_BODY" = "I'm inviting you to install Signal! Here is the link:"; +"SEND_BUTTON_TITLE" = "Send"; +"UPDATE_BUTTON_TITLE" = "Update"; +"LEAVE_BUTTON_TITLE" = "Leave"; +"MEMBERS_BUTTON_TITLE" = "Members"; +"DELIVERED_MESSAGE_TEXT" = "Delivered"; +"SEND_AGAIN_BUTTON" = "Send again"; +"ACCEPT_IDENTITYKEY_QUESTION" = "Do you want to accept %@'s new identity key: %@"; +"ACCEPT_IDENTITYKEY_BUTTON" = "Accept new identity key"; +"COPY_IDENTITYKEY_BUTTON" = "Copy new identity key to pasteboard"; +"TAKE_MEDIA_BUTTON"= "Take Photo or Video"; +"TAKE_PICTURE_BUTTON"= "Take a Picture"; +"CHOOSE_MEDIA_BUTTON" = "Choose from Library..."; +"FAILED_RETRYING_DIRECTORY_DOWNLOAD" = "Failed to retrieve directory. Retrying in %f hours."; +"SETTINGS_CLEAR_HISTORY" = "Clear History Logs"; +"SETTINGS_FINGERPRINT" = "Fingerprint"; +"SETTINGS_FINGERPRINT_COPY" = "Tap to copy."; +"SETTINGS_FINGERPRINT_COPY_SUCCESS" = "Copied!"; +"SETTINGS_PRIVACY_TITLE" = "Privacy"; +"SETTINGS_SCREEN_SECURITY" = "Enable Screen Security"; +"SETTINGS_SECURITY_TITLE" = "Screen Security"; +"SETTINGS_HISTORYLOG_TITLE" = "History Log"; +"SETTINGS_DELETE_HISTORYLOG_CONFIRMATION" = "Are you sure you want to delete all your history (messages, attachments, call history ...) ? This action cannot be reverted."; +"SETTINGS_DELETE_HISTORYLOG_CONFIRMATION_BUTTON" = "I'm sure."; +"PUSH_MANAGER_VIEW" = "View"; +"PUSH_MANAGER_MARKREAD" = "Mark as read"; +"SCAN_KEY" = "Scan key"; +"SCAN_KEY_VERIFIED_TITLE" = "Verified!"; +"SCAN_KEY_VERIFIED_TEXT" = "The scanned fingerprint matches the one on the record."; +"SCAN_KEY_CONFLICT_TITLE" = "Conflict!"; +"SCAN_KEY_CONFLICT_TEXT" = "The scanned fingerprint doesn't match the one on the record."; +"REGISTERED_NUMBER_TEXT" = "Registered Number:"; +"CONFIRM_ACCOUNT_DESTRUCTION_TITLE" = "Are you sure you want to destroy your account?"; +"CONFIRM_ACCOUNT_DESTRUCTION_TEXT" = "This will reset the application by deleting your messages and unregister you with the server. The app will close after deletion of data."; +"PROCEED_BUTTON" = "Proceed"; +"UNREGISTER_REDPHONE_FAIL" = "Failed to unregister RedPhone component of Signal"; +"UNREGISTER_TEXTSECURE_FAIL" = "Failed to unregister TextSecure component of Signal"; +"NETWORK_STATUS_HEADER" = "Network Status"; +"NETWORK_STATUS_TEXT" = "You can check your network status by looking at the colored bar above your inbox."; +"NETWORK_STATUS_CONNECTED" = "Connected"; +"NETWORK_STATUS_OFFLINE" = "Offline"; +"NETWORK_STATUS_CONNECTING" = "Connecting"; +"EMPTY_INBOX_FIRST_TITLE" = "Done. Done. Done."; +"EMPTY_INBOX_FIRST_TEXT" = "Tip: add a conversation as a reminder!"; +"EMPTY_ARCHIVE_FIRST_TITLE" = "Start your first Signal conversation!"; +"EMPTY_ARCHIVE_FIRST_TEXT" = "Tap on the + button."; +"EMPTY_INBOX_TITLE" = "Squeaky Freaking Clean."; +"EMPTY_INBOX_TEXT" = "None. Zero. Zilch. Nada."; +"EMPTY_ARCHIVE_TITLE" = "Clean Up Your Conversations."; +"EMPTY_ARCHIVE_TEXT" = "You can archive inactive conversations for later from your Inbox."; +"GROUP_UPDATED" = "Group updated."; +"GROUP_TITLE_CHANGED" = "Title is now '%@'. "; +"GROUP_AVATAR_CHANGED" = "Avatar changed. "; +"GROUP_MEMBER_LEFT" = " %@ left the group. "; +"GROUP_MEMBER_JOINED" = " %@ joined the group. "; +"ME_STRING" = "Me"; +"WARNING_STRING" = "Warning"; +"ATTACHMENT_DOWNLOADING" = "Attachment is downloading"; +"ATTACHMENT_QUEUED" = "New attachment queued for retrieval."; +"ATTACHMENT_DOWNLOAD_FAILED" = "Attachment download failed, tap to retry."; +"INCOMING_CALL" = "Incoming call"; +"OUTGOING_CALL" = "Outgoing call"; +"MISSED_CALL" = "Missed call"; +"ERROR_MESSAGE_NO_SESSION" = "No available session for contact."; +"ERROR_MESSAGE_MISSING_KEY" = "Received a message with unknown PreKey."; +"ERROR_MESSAGE_INVALID_MESSAGE" = "Received a corrupted message."; +"ERROR_MESSAGE_INVALID_VERSION" = "Received a message not compatible with this version."; +"ERROR_MESSAGE_DUPLICATE_MESSAGE" = "Received a duplicated message."; +"ERROR_MESSAGE_INVALID_KEY_EXCEPTION" = "The recipient's key is not valid."; +"ERROR_MESSAGE_WRONG_TRUSTED_IDENTITY_KEY" = "Identity key changed. Tap to verify new key."; +"ERROR_MESSAGE_UNKNOWN_ERROR" = "An unknown error occured."; +"REGISTRATION_TITLE_LABEL" = "Your Phone Number"; +"REGISTRATION_DEFAULT_COUNTRY_NAME" = "Country Code"; +"REGISTRATION_PHONENUMBER_BUTTON" = "Phone Number"; +"REGISTRATION_ENTERNUMBER_DEFAULT_TEXT" = "Enter Number"; +"REGISTRATION_VERIFY_DEVICE" = "Verify This Device"; +"VERIFICATION_HEADER" = "Verify"; +"VERIFICATION_CHALLENGE_DEFAULT_TEXT" = "Verification Code"; +"VERIFICATION_CHALLENGE_SUBMIT_CODE" = "Submit Verification Code"; +"VERIFICATION_CHALLENGE_SUBMIT_AGAIN" = "Request Code Again"; +"VERIFICATION_CHALLENGE_SEND_VIAVOICE" = "Call Me Instead"; +"VERIFICATION_CHALLENGE_CHANGE_NUMBER" = "Change Number"; +"CONVERSATIONS_VIEW_TITLE" = "Conversations"; +"MESSAGE_COMPOSEVIEW_TITLE" = "New Message"; +"NEW_GROUP_NAMEGROUP_REQUEST_DEFAULT" = "Name this group chat"; +"NEW_GROUP_REQUEST_ADDPEOPLE" = "Add people"; +"FINGERPRINT_INFO_THEIRS" = "Tap to scan another user's fingerprint"; +"FINGERPRINT_INFO_YOURS" = "Tap to display your fingerprint for another user"; +"FINGERPRINT_INFO_ABOUT" = "Compare both fingerprints to verify your contact's identity and the integrity of the message."; +"FINGERPRINT_YOURS" = "Your Fingerprint"; +"COUNTRYCODE_SELECT_TITLE" = "Select Country Code"; +"SETTINGS_DESTROY_ACCOUNT_BUTTON" = "Destroy Account"; + + + + + + +