From ea668f03441df57d64a0b46911408edde8f8fd9d Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Fri, 7 May 2021 11:05:16 +1000 Subject: [PATCH] Use newly translated strings --- Session/Conversations/Input View/InputTextView.swift | 4 ++-- Session/Conversations/Input View/InputView.swift | 2 +- .../Input View/VoiceMessageRecordingView.swift | 2 +- .../Settings/OWSConversationSettingsViewController.m | 2 +- Session/Conversations/Views & Modals/BlockedModal.swift | 6 +++--- .../Views & Modals/DownloadAttachmentModal.swift | 6 +++--- .../Conversations/Views & Modals/LinkPreviewModal.swift | 6 +++--- Session/Conversations/Views & Modals/URLModal.swift | 6 +++--- Session/DMs/NewDMVC.swift | 4 ++-- Session/Home/HomeVC.swift | 4 ++-- Session/Meta/Translations/en.lproj/Localizable.strings | 2 ++ Session/Onboarding/LinkDeviceVC.swift | 8 ++++---- Session/Onboarding/PNModeVC.swift | 6 +++--- Session/Onboarding/RegisterVC.swift | 2 +- Session/Onboarding/SeedVC.swift | 2 +- Session/Open Groups/JoinOpenGroupVC.swift | 2 +- Session/Settings/NotificationSettingsViewController.m | 2 +- Session/Settings/SettingsVC.swift | 6 +++--- 18 files changed, 37 insertions(+), 35 deletions(-) diff --git a/Session/Conversations/Input View/InputTextView.swift b/Session/Conversations/Input View/InputTextView.swift index 276072e69..1c8fb3595 100644 --- a/Session/Conversations/Input View/InputTextView.swift +++ b/Session/Conversations/Input View/InputTextView.swift @@ -9,7 +9,7 @@ public final class InputTextView : UITextView, UITextViewDelegate { // MARK: UI Components private lazy var placeholderLabel: UILabel = { let result = UILabel() - result.text = "Message" + result.text = NSLocalizedString("vc_conversation_input_prompt", comment: "") result.font = .systemFont(ofSize: Values.mediumFontSize) result.textColor = Colors.text.withAlphaComponent(Values.mediumOpacity) return result @@ -74,7 +74,7 @@ public final class InputTextView : UITextView, UITextViewDelegate { } // MARK: Delegate -protocol InputTextViewDelegate : class { +protocol InputTextViewDelegate : AnyObject { func inputTextViewDidChangeSize(_ inputTextView: InputTextView) func inputTextViewDidChangeContent(_ inputTextView: InputTextView) diff --git a/Session/Conversations/Input View/InputView.swift b/Session/Conversations/Input View/InputView.swift index 798c4a22e..057e215d6 100644 --- a/Session/Conversations/Input View/InputView.swift +++ b/Session/Conversations/Input View/InputView.swift @@ -341,7 +341,7 @@ final class InputView : UIView, InputViewButtonDelegate, InputTextViewDelegate, } // MARK: Delegate -protocol InputViewDelegate : class, ExpandingAttachmentsButtonDelegate, VoiceMessageRecordingViewDelegate { +protocol InputViewDelegate : AnyObject, ExpandingAttachmentsButtonDelegate, VoiceMessageRecordingViewDelegate { func showLinkPreviewSuggestionModal() func handleSendButtonTapped() diff --git a/Session/Conversations/Input View/VoiceMessageRecordingView.swift b/Session/Conversations/Input View/VoiceMessageRecordingView.swift index c6b54accb..8bf858b83 100644 --- a/Session/Conversations/Input View/VoiceMessageRecordingView.swift +++ b/Session/Conversations/Input View/VoiceMessageRecordingView.swift @@ -61,7 +61,7 @@ final class VoiceMessageRecordingView : UIView { private lazy var slideToCancelLabel: UILabel = { let result = UILabel() - result.text = "Slide to cancel" + result.text = NSLocalizedString("vc_conversation_voice_message_cancel_message", comment: "") result.font = .systemFont(ofSize: Values.smallFontSize) result.textColor = Colors.text.withAlphaComponent(Values.mediumOpacity) return result diff --git a/Session/Conversations/Settings/OWSConversationSettingsViewController.m b/Session/Conversations/Settings/OWSConversationSettingsViewController.m index 22ae752fc..016da8c74 100644 --- a/Session/Conversations/Settings/OWSConversationSettingsViewController.m +++ b/Session/Conversations/Settings/OWSConversationSettingsViewController.m @@ -291,7 +291,7 @@ CGFloat kIconViewLength = 24; [mainSection addItem:[OWSTableItem itemWithCustomCellBlock:^{ return [weakSelf - disclosureCellWithName:@"Copy Session ID" + disclosureCellWithName:NSLocalizedString(@"vc_conversation_settings_copy_session_id_button_title", "") iconName:@"ic_copy" accessibilityIdentifier:ACCESSIBILITY_IDENTIFIER_WITH_NAME( OWSConversationSettingsViewController, @"copy_session_id")]; diff --git a/Session/Conversations/Views & Modals/BlockedModal.swift b/Session/Conversations/Views & Modals/BlockedModal.swift index 402ddc96a..c41e76632 100644 --- a/Session/Conversations/Views & Modals/BlockedModal.swift +++ b/Session/Conversations/Views & Modals/BlockedModal.swift @@ -23,13 +23,13 @@ final class BlockedModal : Modal { let titleLabel = UILabel() titleLabel.textColor = Colors.text titleLabel.font = .boldSystemFont(ofSize: Values.largeFontSize) - titleLabel.text = "Unblock \(name)?" + titleLabel.text = String(format: NSLocalizedString("modal_blocked_title", comment: ""), name) titleLabel.textAlignment = .center // Message let messageLabel = UILabel() messageLabel.textColor = Colors.text messageLabel.font = .systemFont(ofSize: Values.smallFontSize) - let message = "Are you sure you want to unblock \(name)?" + let message = String(format: NSLocalizedString("modal_blocked_explanation", comment: ""), name) let attributedMessage = NSMutableAttributedString(string: message) attributedMessage.addAttributes([ .font : UIFont.boldSystemFont(ofSize: Values.smallFontSize) ], range: (message as NSString).range(of: name)) messageLabel.attributedText = attributedMessage @@ -43,7 +43,7 @@ final class BlockedModal : Modal { unblockButton.backgroundColor = Colors.buttonBackground unblockButton.titleLabel!.font = .systemFont(ofSize: Values.smallFontSize) unblockButton.setTitleColor(Colors.text, for: UIControl.State.normal) - unblockButton.setTitle("Unblock", for: UIControl.State.normal) + unblockButton.setTitle(NSLocalizedString("modal_blocked_button_title", comment: ""), for: UIControl.State.normal) unblockButton.addTarget(self, action: #selector(unblock), for: UIControl.Event.touchUpInside) // Button stack view let buttonStackView = UIStackView(arrangedSubviews: [ cancelButton, unblockButton ]) diff --git a/Session/Conversations/Views & Modals/DownloadAttachmentModal.swift b/Session/Conversations/Views & Modals/DownloadAttachmentModal.swift index 3c7fd293d..402c32032 100644 --- a/Session/Conversations/Views & Modals/DownloadAttachmentModal.swift +++ b/Session/Conversations/Views & Modals/DownloadAttachmentModal.swift @@ -24,13 +24,13 @@ final class DownloadAttachmentModal : Modal { let titleLabel = UILabel() titleLabel.textColor = Colors.text titleLabel.font = .boldSystemFont(ofSize: Values.largeFontSize) - titleLabel.text = "Trust \(name)?" + titleLabel.text = String(format: NSLocalizedString("modal_download_attachment_title", comment: ""), name) titleLabel.textAlignment = .center // Message let messageLabel = UILabel() messageLabel.textColor = Colors.text messageLabel.font = .systemFont(ofSize: Values.smallFontSize) - let message = "Are you sure you want to download media sent by \(name)?" + let message = String(format: NSLocalizedString("modal_download_attachment_explanation", comment: ""), name) let attributedMessage = NSMutableAttributedString(string: message) attributedMessage.addAttributes([ .font : UIFont.boldSystemFont(ofSize: Values.smallFontSize) ], range: (message as NSString).range(of: name)) messageLabel.attributedText = attributedMessage @@ -44,7 +44,7 @@ final class DownloadAttachmentModal : Modal { downloadButton.backgroundColor = Colors.buttonBackground downloadButton.titleLabel!.font = .systemFont(ofSize: Values.smallFontSize) downloadButton.setTitleColor(Colors.text, for: UIControl.State.normal) - downloadButton.setTitle("Download", for: UIControl.State.normal) + downloadButton.setTitle(NSLocalizedString("modal_download_button_title", comment: ""), for: UIControl.State.normal) downloadButton.addTarget(self, action: #selector(trust), for: UIControl.Event.touchUpInside) // Button stack view let buttonStackView = UIStackView(arrangedSubviews: [ cancelButton, downloadButton ]) diff --git a/Session/Conversations/Views & Modals/LinkPreviewModal.swift b/Session/Conversations/Views & Modals/LinkPreviewModal.swift index 65948c2d1..b8bf44dd5 100644 --- a/Session/Conversations/Views & Modals/LinkPreviewModal.swift +++ b/Session/Conversations/Views & Modals/LinkPreviewModal.swift @@ -21,13 +21,13 @@ final class LinkPreviewModal : Modal { let titleLabel = UILabel() titleLabel.textColor = Colors.text titleLabel.font = .boldSystemFont(ofSize: Values.largeFontSize) - titleLabel.text = "Enable Link Previews?" + titleLabel.text = NSLocalizedString("modal_link_previews_title", comment: "") titleLabel.textAlignment = .center // Message let messageLabel = UILabel() messageLabel.textColor = Colors.text messageLabel.font = .systemFont(ofSize: Values.smallFontSize) - let message = "Enabling link previews will show previews for URLs you send and receive. This can be useful, but Session will need to contact linked websites to generate previews. You can always disable link previews in Session's settings." + let message = NSLocalizedString("modal_link_previews_explanation", comment: "") messageLabel.text = message messageLabel.numberOfLines = 0 messageLabel.lineBreakMode = .byWordWrapping @@ -39,7 +39,7 @@ final class LinkPreviewModal : Modal { enableButton.backgroundColor = Colors.buttonBackground enableButton.titleLabel!.font = .systemFont(ofSize: Values.smallFontSize) enableButton.setTitleColor(Colors.text, for: UIControl.State.normal) - enableButton.setTitle("Enable", for: UIControl.State.normal) + enableButton.setTitle(NSLocalizedString("modal_link_previews_button_title", comment: ""), for: UIControl.State.normal) enableButton.addTarget(self, action: #selector(enable), for: UIControl.Event.touchUpInside) // Button stack view let buttonStackView = UIStackView(arrangedSubviews: [ cancelButton, enableButton ]) diff --git a/Session/Conversations/Views & Modals/URLModal.swift b/Session/Conversations/Views & Modals/URLModal.swift index 2cfe2ad17..3280b01bc 100644 --- a/Session/Conversations/Views & Modals/URLModal.swift +++ b/Session/Conversations/Views & Modals/URLModal.swift @@ -21,13 +21,13 @@ final class URLModal : Modal { let titleLabel = UILabel() titleLabel.textColor = Colors.text titleLabel.font = .boldSystemFont(ofSize: Values.largeFontSize) - titleLabel.text = "Open URL?" + titleLabel.text = NSLocalizedString("modal_open_url_title", comment: "") titleLabel.textAlignment = .center // Message let messageLabel = UILabel() messageLabel.textColor = Colors.text messageLabel.font = .systemFont(ofSize: Values.smallFontSize) - let message = "Are you sure you want to open \(url.absoluteString)?" + let message = String(format: NSLocalizedString("modal_open_url_explanation", comment: ""), url.absoluteString) let attributedMessage = NSMutableAttributedString(string: message) attributedMessage.addAttributes([ .font : UIFont.boldSystemFont(ofSize: Values.smallFontSize) ], range: (message as NSString).range(of: url.absoluteString)) messageLabel.attributedText = attributedMessage @@ -41,7 +41,7 @@ final class URLModal : Modal { openButton.backgroundColor = Colors.buttonBackground openButton.titleLabel!.font = .systemFont(ofSize: Values.smallFontSize) openButton.setTitleColor(Colors.text, for: UIControl.State.normal) - openButton.setTitle("Open", for: UIControl.State.normal) + openButton.setTitle(NSLocalizedString("modal_open_url_button_title", comment: ""), for: UIControl.State.normal) openButton.addTarget(self, action: #selector(openURL), for: UIControl.Event.touchUpInside) // Button stack view let buttonStackView = UIStackView(arrangedSubviews: [ cancelButton, openButton ]) diff --git a/Session/DMs/NewDMVC.swift b/Session/DMs/NewDMVC.swift index 4e9e77f9d..426d387aa 100644 --- a/Session/DMs/NewDMVC.swift +++ b/Session/DMs/NewDMVC.swift @@ -167,7 +167,7 @@ private final class EnterPublicKeyVC : UIViewController { // MARK: Components private lazy var publicKeyTextView: TextView = { - let result = TextView(placeholder: "Enter Session ID or ONS name") + let result = TextView(placeholder: NSLocalizedString("vc_enter_public_key_text_field_hint", comment: "")) result.autocapitalizationType = .none return result }() @@ -308,7 +308,7 @@ private final class EnterPublicKeyVC : UIViewController { UIPasteboard.general.string = getUserHexEncodedPublicKey() copyButton.isUserInteractionEnabled = false UIView.transition(with: copyButton, duration: 0.25, options: .transitionCrossDissolve, animations: { - self.copyButton.setTitle("Copied", for: UIControl.State.normal) + self.copyButton.setTitle(NSLocalizedString("copied", comment: ""), for: UIControl.State.normal) }, completion: nil) Timer.scheduledTimer(timeInterval: 4, target: self, selector: #selector(enableCopyButton), userInfo: nil, repeats: false) } diff --git a/Session/Home/HomeVC.swift b/Session/Home/HomeVC.swift index 45012a7f3..151cc0e0b 100644 --- a/Session/Home/HomeVC.swift +++ b/Session/Home/HomeVC.swift @@ -89,7 +89,7 @@ final class HomeVC : BaseVC, UITableViewDataSource, UITableViewDelegate, NewConv setUpNavBarStyle() } updateNavBarButtons() - setNavBarTitle("Messages") + setNavBarTitle(NSLocalizedString("vc_home_title", comment: "")) // Recovery phrase reminder let hasViewedSeed = UserDefaults.standard[.hasViewedSeed] if !hasViewedSeed { @@ -326,7 +326,7 @@ final class HomeVC : BaseVC, UITableViewDataSource, UITableViewDelegate, NewConv let delete = UITableViewRowAction(style: .destructive, title: NSLocalizedString("TXT_DELETE_TITLE", comment: "")) { [weak self] _, _ in var message = NSLocalizedString("CONVERSATION_DELETE_CONFIRMATION_ALERT_MESSAGE", comment: "") if let thread = thread as? TSGroupThread, thread.isClosedGroup, thread.groupModel.groupAdminIds.contains(getUserHexEncodedPublicKey()) { - message = "Because you are the creator of this group it will be deleted for everyone. This cannot be undone." + message = NSLocalizedString("admin_group_leave_warning", comment: "") } let alert = UIAlertController(title: NSLocalizedString("CONVERSATION_DELETE_CONFIRMATION_ALERT_TITLE", comment: ""), message: message, preferredStyle: .alert) alert.addAction(UIAlertAction(title: NSLocalizedString("TXT_DELETE_TITLE", comment: ""), style: .destructive) { [weak self] _ in diff --git a/Session/Meta/Translations/en.lproj/Localizable.strings b/Session/Meta/Translations/en.lproj/Localizable.strings index 51cba59c8..fca861682 100644 --- a/Session/Meta/Translations/en.lproj/Localizable.strings +++ b/Session/Meta/Translations/en.lproj/Localizable.strings @@ -491,7 +491,9 @@ "vc_view_my_qr_code_explanation" = "This is your QR code. Other users can scan it to start a session with you."; // MARK: - Not Yet Translated "fast_mode_explanation" = "You’ll be notified of new messages reliably and immediately using Apple’s notification servers."; +"fast_mode" = "Fast Mode"; "slow_mode_explanation" = "Session will occasionally check for new messages in the background."; +"slow_mode" = "Slow Mode"; "vc_pn_mode_title" = "Message Notifications"; "vc_notification_settings_notification_mode_title" = "Use Fast Mode"; "vc_link_device_recovery_phrase_tab_title" = "Recovery Phrase"; diff --git a/Session/Onboarding/LinkDeviceVC.swift b/Session/Onboarding/LinkDeviceVC.swift index 53fa2c743..f88f00659 100644 --- a/Session/Onboarding/LinkDeviceVC.swift +++ b/Session/Onboarding/LinkDeviceVC.swift @@ -10,7 +10,7 @@ final class LinkDeviceVC : BaseVC, UIPageViewControllerDataSource, UIPageViewCon // MARK: Components private lazy var tabBar: TabBar = { let tabs = [ - TabBar.Tab(title: "Recovery Phrase") { [weak self] in + TabBar.Tab(title: NSLocalizedString("vc_link_device_recovery_phrase_tab_title", comment: "")) { [weak self] in guard let self = self else { return } self.pageVC.setViewControllers([ self.pages[0] ], direction: .forward, animated: false, completion: nil) }, @@ -35,7 +35,7 @@ final class LinkDeviceVC : BaseVC, UIPageViewControllerDataSource, UIPageViewCon }() private lazy var scanQRCodeWrapperVC: ScanQRCodeWrapperVC = { - let message = "Navigate to Settings → Recovery Phrase on your other device to show your QR code." + let message = NSLocalizedString("vc_link_device_scan_qr_code_explanation", comment: "") let result = ScanQRCodeWrapperVC(message: message) result.delegate = self return result @@ -163,14 +163,14 @@ private final class RecoveryPhraseVC : UIViewController { let titleLabel = UILabel() titleLabel.textColor = Colors.text titleLabel.font = .boldSystemFont(ofSize: isIPhone5OrSmaller ? Values.largeFontSize : Values.veryLargeFontSize) - titleLabel.text = "Recovery Phrase" + titleLabel.text = NSLocalizedString("vc_enter_recovery_phrase_title", comment: "") titleLabel.numberOfLines = 0 titleLabel.lineBreakMode = .byWordWrapping // Explanation label let explanationLabel = UILabel() explanationLabel.textColor = Colors.text explanationLabel.font = .systemFont(ofSize: Values.smallFontSize) - explanationLabel.text = "To link your device, enter the recovery phrase that was given to you when you signed up." + explanationLabel.text = NSLocalizedString("vc_enter_recovery_phrase_explanation", comment: "") explanationLabel.numberOfLines = 0 explanationLabel.lineBreakMode = .byWordWrapping // Spacers diff --git a/Session/Onboarding/PNModeVC.swift b/Session/Onboarding/PNModeVC.swift index 306cb45c8..474b5c975 100644 --- a/Session/Onboarding/PNModeVC.swift +++ b/Session/Onboarding/PNModeVC.swift @@ -12,14 +12,14 @@ final class PNModeVC : BaseVC, OptionViewDelegate { // MARK: Components private lazy var apnsOptionView: OptionView = { - let explanation = "You’ll be notified of new messages reliably and immediately using Apple’s notification servers." + let explanation = NSLocalizedString("fast_mode_explanation", comment: "") let result = OptionView(title: "Fast Mode", explanation: explanation, delegate: self, isRecommended: true) result.accessibilityLabel = "Fast mode option" return result }() private lazy var backgroundPollingOptionView: OptionView = { - let explanation = "Session will occasionally check for new messages in the background." + let explanation = NSLocalizedString("slow_mode_explanation", comment: "") let result = OptionView(title: "Slow Mode", explanation: explanation, delegate: self) result.accessibilityLabel = "Slow mode option" return result @@ -38,7 +38,7 @@ final class PNModeVC : BaseVC, OptionViewDelegate { let titleLabel = UILabel() titleLabel.textColor = Colors.text titleLabel.font = .boldSystemFont(ofSize: isIPhone5OrSmaller ? Values.largeFontSize : Values.veryLargeFontSize) - titleLabel.text = "Message Notifications" + titleLabel.text = NSLocalizedString("vc_pn_mode_title", comment: "") titleLabel.numberOfLines = 0 titleLabel.lineBreakMode = .byWordWrapping // Set up spacers diff --git a/Session/Onboarding/RegisterVC.swift b/Session/Onboarding/RegisterVC.swift index 88528d6b0..3aed52229 100644 --- a/Session/Onboarding/RegisterVC.swift +++ b/Session/Onboarding/RegisterVC.swift @@ -177,7 +177,7 @@ final class RegisterVC : BaseVC { UIPasteboard.general.string = x25519KeyPair.hexEncodedPublicKey copyPublicKeyButton.isUserInteractionEnabled = false UIView.transition(with: copyPublicKeyButton, duration: 0.25, options: .transitionCrossDissolve, animations: { - self.copyPublicKeyButton.setTitle("Copied", for: UIControl.State.normal) + self.copyPublicKeyButton.setTitle(NSLocalizedString("copied", comment: ""), for: UIControl.State.normal) }, completion: nil) Timer.scheduledTimer(timeInterval: 4, target: self, selector: #selector(enableCopyButton), userInfo: nil, repeats: false) } diff --git a/Session/Onboarding/SeedVC.swift b/Session/Onboarding/SeedVC.swift index 3c360316b..a80fed60d 100644 --- a/Session/Onboarding/SeedVC.swift +++ b/Session/Onboarding/SeedVC.swift @@ -177,7 +177,7 @@ final class SeedVC : BaseVC { UIPasteboard.general.string = mnemonic copyButton.isUserInteractionEnabled = false UIView.transition(with: copyButton, duration: 0.25, options: .transitionCrossDissolve, animations: { - self.copyButton.setTitle("Copied", for: UIControl.State.normal) + self.copyButton.setTitle(NSLocalizedString("copied", comment: ""), for: UIControl.State.normal) }, completion: nil) Timer.scheduledTimer(timeInterval: 4, target: self, selector: #selector(enableCopyButton), userInfo: nil, repeats: false) } diff --git a/Session/Open Groups/JoinOpenGroupVC.swift b/Session/Open Groups/JoinOpenGroupVC.swift index 767b28858..9e1ffacde 100644 --- a/Session/Open Groups/JoinOpenGroupVC.swift +++ b/Session/Open Groups/JoinOpenGroupVC.swift @@ -228,7 +228,7 @@ private final class EnterURLVC : UIViewController, UIGestureRecognizerDelegate, let suggestionGridTitleLabel = UILabel() suggestionGridTitleLabel.textColor = Colors.text suggestionGridTitleLabel.font = .boldSystemFont(ofSize: Values.largeFontSize) - suggestionGridTitleLabel.text = "Or join one of these..." + suggestionGridTitleLabel.text = NSLocalizedString("vc_join_open_group_suggestions_title", comment: "") suggestionGridTitleLabel.numberOfLines = 0 suggestionGridTitleLabel.lineBreakMode = .byWordWrapping // Next button diff --git a/Session/Settings/NotificationSettingsViewController.m b/Session/Settings/NotificationSettingsViewController.m index 0bc52b83a..b884aa121 100644 --- a/Session/Settings/NotificationSettingsViewController.m +++ b/Session/Settings/NotificationSettingsViewController.m @@ -44,7 +44,7 @@ OWSTableSection *strategySection = [OWSTableSection new]; strategySection.headerTitle = NSLocalizedString(@"preferences_notifications_strategy_category_title", @""); - [strategySection addItem:[OWSTableItem switchItemWithText:@"Use Fast Mode" + [strategySection addItem:[OWSTableItem switchItemWithText:NSLocalizedString(@"vc_notification_settings_notification_mode_title", @"") accessibilityIdentifier:ACCESSIBILITY_IDENTIFIER_WITH_NAME(self, @"push_notification_strategy") isOnBlock:^{ return [NSUserDefaults.standardUserDefaults boolForKey:@"isUsingFullAPNs"]; diff --git a/Session/Settings/SettingsVC.swift b/Session/Settings/SettingsVC.swift index af045ff6c..2418bba25 100644 --- a/Session/Settings/SettingsVC.swift +++ b/Session/Settings/SettingsVC.swift @@ -139,13 +139,13 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate { versionLabel.text = "Version \(version) (\(buildNumber))" // Invite button let inviteButton = UIButton() - inviteButton.setTitle("Invite a Friend", for: UIControl.State.normal) + inviteButton.setTitle(NSLocalizedString("vc_settings_invite_a_friend_button_title", comment: ""), for: UIControl.State.normal) inviteButton.setTitleColor(Colors.text, for: UIControl.State.normal) inviteButton.titleLabel!.font = .boldSystemFont(ofSize: Values.smallFontSize) inviteButton.addTarget(self, action: #selector(sendInvitation), for: UIControl.Event.touchUpInside) // Help translate button let helpTranslateButton = UIButton() - helpTranslateButton.setTitle("Help us Translate Session", for: UIControl.State.normal) + helpTranslateButton.setTitle(NSLocalizedString("vc_settings_help_us_translate_button_title", comment: ""), for: UIControl.State.normal) helpTranslateButton.setTitleColor(Colors.text, for: UIControl.State.normal) helpTranslateButton.titleLabel!.font = .boldSystemFont(ofSize: Values.smallFontSize) helpTranslateButton.addTarget(self, action: #selector(helpTranslate), for: UIControl.Event.touchUpInside) @@ -427,7 +427,7 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate { UIPasteboard.general.string = getUserHexEncodedPublicKey() copyButton.isUserInteractionEnabled = false UIView.transition(with: copyButton, duration: 0.25, options: .transitionCrossDissolve, animations: { - self.copyButton.setTitle("Copied", for: UIControl.State.normal) + self.copyButton.setTitle(NSLocalizedString("copied", comment: ""), for: UIControl.State.normal) }, completion: nil) Timer.scheduledTimer(timeInterval: 4, target: self, selector: #selector(enableCopyButton), userInfo: nil, repeats: false) }