From 3a52073eab29afe2f005b14717c7751230bd727d Mon Sep 17 00:00:00 2001 From: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com> Date: Fri, 22 May 2020 14:17:57 -0400 Subject: [PATCH] iOS: fix translations Change-Id: I933d59474e674c652c3d23ccfb10151a2136aed3 --- .../Conversation/ConversationViewController.swift | 10 ++++------ Ring/Ring/Resources/en.lproj/Localizable.strings | 6 +++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift b/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift index c21a1eab4..182d5dcba 100644 --- a/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift +++ b/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift @@ -161,16 +161,14 @@ class ConversationViewController: UIViewController, } @objc func imageTapped() { - let alert = UIAlertController.init(title: nil, message: nil, preferredStyle: .alert) - - let pictureAction = UIAlertAction(title: "Upload photo or movie", style: UIAlertAction.Style.default) {[weak self] _ in + let pictureAction = UIAlertAction(title: L10n.Alerts.uploadPhoto, style: UIAlertAction.Style.default) {[weak self] _ in self?.checkPhotoLibraryPermission() } - let recordVideoAction = UIAlertAction(title: "Record a video message", style: UIAlertAction.Style.default) {[weak self] _ in + let recordVideoAction = UIAlertAction(title: L10n.Alerts.recordVideoMessage, style: UIAlertAction.Style.default) {[weak self] _ in if AVCaptureDevice.authorizationStatus(for: AVMediaType.audio) == AVAuthorizationStatus.authorized { if AVCaptureDevice.authorizationStatus(for: AVMediaType.video) == AVAuthorizationStatus.authorized { self?.viewModel.recordVideoFile() @@ -204,7 +202,7 @@ class ConversationViewController: UIViewController, } } - let recordAudioAction = UIAlertAction(title: "Record an audio message", style: UIAlertAction.Style.default) { [weak self] _ in + let recordAudioAction = UIAlertAction(title: L10n.Alerts.recordAudioMessage, style: UIAlertAction.Style.default) { [weak self] _ in if AVCaptureDevice.authorizationStatus(for: AVMediaType.audio) == AVAuthorizationStatus.authorized { self?.viewModel.recordAudioFile() } else { @@ -218,7 +216,7 @@ class ConversationViewController: UIViewController, } } - let documentsAction = UIAlertAction(title: "Upload file", style: UIAlertAction.Style.default) { _ in + let documentsAction = UIAlertAction(title: L10n.Alerts.uploadFile, style: UIAlertAction.Style.default) { _ in self.importDocument() } diff --git a/Ring/Ring/Resources/en.lproj/Localizable.strings b/Ring/Ring/Resources/en.lproj/Localizable.strings index 58116dbc2..8f3591f83 100644 --- a/Ring/Ring/Resources/en.lproj/Localizable.strings +++ b/Ring/Ring/Resources/en.lproj/Localizable.strings @@ -133,6 +133,10 @@ "alerts.noMediaPermissionsTitle" = "Media permission not granted"; "alerts.noLibraryPermissionsTitle" = "Access to photo library not granted"; "alerts.errorWrongCredentials" = "Cannot connect to provided account manager. Please check your credentials"; +"alerts.recordVideoMessage" = "Record a video message"; +"alerts.recordAudioMessage" = "Record an audio message"; +"alerts.uploadFile" = "Upload file"; +"alerts.uploadPhoto" = "Upload photo or movie"; //Actions "actions.blockAction" = "Block"; @@ -162,7 +166,7 @@ "accountPage.usernameNotRegistered" = "username: not registered"; "accountPage.credentialsHeader" = "Account Details"; "accountPage.enableProxy" = "Enable Proxy"; -"accountPage.blockedContacts" = "Block List"; +"accountPage.blockedContacts" = "Blocked contacts"; "accountPage.unblockContact" = "UNBLOCK"; "accountPage.proxyAddressAlert" = "Provide proxy address"; "accountPage.enableProxy" = "Enable Proxy"; -- GitLab