Browse Source

use strings from android

B. Petersen 2 năm trước cách đây
mục cha
commit
8f5b2bd62c

+ 3 - 3
deltachat-ios/Controller/AccountSetup/WelcomeViewController.swift

@@ -395,8 +395,8 @@ extension WelcomeViewController: QrCodeReaderDelegate {
 
     private func confirmSetupNewDevice(qrCode: String) {
         triggerLocalNetworkPrivacyAlert()
-        let alert = UIAlertController(title: String.localized("add_another_device"),
-                                      message: String.localized("scan_other_device_explain"),
+        let alert = UIAlertController(title: String.localized("multidevice_receiver_title"),
+                                      message: String.localized("multidevice_receiver_scanning_ask"),
                                       preferredStyle: .alert)
         alert.addAction(UIAlertAction(
              title: String.localized("ok"),
@@ -405,7 +405,7 @@ extension WelcomeViewController: QrCodeReaderDelegate {
                  guard let self = self else { return }
                  self.dismissQRReader()
                  self.addProgressHudBackupListener(importByFile: false)
-                 self.showProgressAlert(title: String.localized("add_another_device"), dcContext: self.dcContext)
+                 self.showProgressAlert(title: String.localized("multidevice_receiver_title"), dcContext: self.dcContext)
                  self.dcAccounts.stopIo()
                  DispatchQueue.global(qos: .userInitiated).async { [weak self] in
                      guard let self = self else { return }

+ 11 - 11
deltachat-ios/Controller/BackupTransferViewController.swift

@@ -25,7 +25,7 @@ class BackupTransferViewController: UIViewController {
         let view = UIImageView()
         view.contentMode = .scaleAspectFit
         view.translatesAutoresizingMaskIntoConstraints = false
-        view.accessibilityHint = String.localized("scan_to_transfer")
+        view.accessibilityHint = String.localized("multidevice_qr_subtitle") // TODO: add name
         return view
     }()
 
@@ -52,7 +52,7 @@ class BackupTransferViewController: UIViewController {
         super.init(nibName: nil, bundle: nil)
         hidesBottomBarWhenPushed = true
         setupSubviews()
-        title = String.localized("add_another_device")
+        title = String.localized("multidevice_title")
         navigationItem.leftBarButtonItem = cancelButton
     }
 
@@ -112,24 +112,24 @@ class BackupTransferViewController: UIViewController {
                     self.showLastErrorAlert("Error")
                     hideQrCode = true
                 } else if permille <= 100 {
-                    statusLineText = "Exporting database..."
+                    statusLineText = String.localized("exporting_account")
                 } else if permille <= 300 {
-                    statusLineText = "Creating collection..."
+                    statusLineText = String.localized("preparing_account")
                 } else if permille <= 350 {
-                    statusLineText = "Collection created."
+                    statusLineText = String.localized("account_prepared")
                 } else if permille <= 400 {
-                    statusLineText = "Waiting for receiver..."
+                    statusLineText = String.localized("waiting_for_receiver")
                 } else if permille <= 450 {
-                    statusLineText = "Receiver connected..."
+                    statusLineText = String.localized("receiver_connected")
                     hideQrCode = true
                 } else if permille < 1000 {
                     let percent = (permille-450)/5
-                    statusLineText = "Transfer... \(percent)%"
+                    statusLineText = String.localized("transferring") + " \(percent)%"
                     hideQrCode = true
                 } else if permille == 1000 {
                     self.transferState = TranferState.success
                     self.navigationItem.leftBarButtonItem = nil // "Cancel" no longer fits as things are done
-                    statusLineText = "Done."
+                    statusLineText = String.localized("done")
                     hideQrCode = true
                 }
 
@@ -182,7 +182,7 @@ class BackupTransferViewController: UIViewController {
             lastError = "<last error not set>"
         }
         let error = errorContext + " (" + lastError + ")"
-        let alert = UIAlertController(title: String.localized("Add Another Account"), message: error, preferredStyle: .alert)
+        let alert = UIAlertController(title: String.localized("multidevice_title"), message: error, preferredStyle: .alert)
         alert.addAction(UIAlertAction(title: String.localized("ok"), style: .default, handler: nil))
         navigationController?.present(alert, animated: true, completion: nil)
     }
@@ -193,7 +193,7 @@ class BackupTransferViewController: UIViewController {
         case .error, .success:
             self.navigationController?.popViewController(animated: true)
         case .unknown:
-            let alert = UIAlertController(title: nil, message: "Abort transfer?", preferredStyle: .alert)
+            let alert = UIAlertController(title: nil, message: String.localized("multidevice_abort"), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: String.localized("ok"), style: .default, handler: { _ in
                 self.navigationController?.popViewController(animated: true)
             }))

+ 1 - 1
deltachat-ios/Controller/Settings/SettingsViewController.swift

@@ -69,7 +69,7 @@ internal final class SettingsViewController: UITableViewController {
     private lazy var addAnotherDeviceCell: UITableViewCell = {
         let cell = UITableViewCell(style: .default, reuseIdentifier: nil)
         cell.tag = CellTags.addAnotherDevice.rawValue
-        cell.textLabel?.text = String.localized("add_another_device")
+        cell.textLabel?.text = String.localized("multidevice_title")
         if #available(iOS 16.0, *) {
             cell.imageView?.image = UIImage(systemName: "macbook.and.iphone") // added in ios16
         }

+ 0 - 3
deltachat-ios/en.lproj/Localizable.strings

@@ -992,6 +992,3 @@
 "add_encrypted_account" = "Add encrypted account";
 "backup_successful" = "Backup successful";
 "backup_successful_explain_ios" = "You can find the backup in the \"Delta Chat\" folder using the \"Files\" app.\n\nMove the backup out of this folder to keep it when deleting Delta Chat.";
-"add_another_device" = "Add Another Device";
-"add_another_device_explain" = "Add another device for this account";
-"scan_other_device_explain" = "Copy the account from the other device to this device? The original device is not changed.";

+ 0 - 3
scripts/untranslated.xml

@@ -7,7 +7,4 @@
     <string name="add_encrypted_account">Add encrypted account</string>
     <string name="backup_successful">Backup successful</string>
     <string name="backup_successful_explain_ios">You can find the backup in the \"Delta Chat\" folder using the \"Files\" app.\n\nMove the backup out of this folder to keep it when deleting Delta Chat.</string>
-    <string name="add_another_device">Add Another Device</string>
-    <string name="add_another_device_explain">Add another device for this account</string>
-    <string name="scan_other_device_explain">Copy the account from the other device to this device? The original device is not changed.</string>
 </resources>