Sfoglia il codice sorgente

Merge pull request #216 from deltachat/tweak-strings

prefer existing strings
cyBerta 5 anni fa
parent
commit
807acd5384

+ 1 - 1
deltachat-ios/Controller/ContactDetailViewController.swift

@@ -59,7 +59,7 @@ class ContactDetailViewController: UITableViewController {
         navigationItem.rightBarButtonItem = UIBarButtonItem(
             title: String.localized("global_menu_edit_desktop"),
             style: .plain, target: self, action: #selector(editButtonPressed))
-        self.title = String.localized("contact_detail_title_desktop")
+        self.title = String.localized("tab_contact")
     }
 
     override func viewWillAppear(_ animated: Bool) {

+ 1 - 1
deltachat-ios/Controller/ContactListController.swift

@@ -228,7 +228,7 @@ extension ContactListController: ContactListDelegate {
             message: String.localized("import_contacts_message"),
             preferredStyle: .alert
         )
-        alert.addAction(UIAlertAction(title: String.localized("open_settings"), style: .default) { _ in
+        alert.addAction(UIAlertAction(title: String.localized("menu_settings"), style: .default) { _ in
             UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)
         })
         alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel) { _ in

+ 1 - 1
deltachat-ios/Controller/GroupChatDetailViewController.swift

@@ -58,7 +58,7 @@ class GroupChatDetailViewController: UIViewController {
 
     override func viewDidLoad() {
         super.viewDidLoad()
-        title = String.localized("group_info")
+        title = String.localized("tab_group")
         chatDetailTable.delegate = self
         chatDetailTable.dataSource = self
         navigationItem.rightBarButtonItem = editBarButtonItem

+ 2 - 2
deltachat-ios/Controller/NewChatViewController.swift

@@ -9,7 +9,7 @@ class NewChatViewController: UITableViewController {
         let searchController = UISearchController(searchResultsController: nil)
         searchController.searchResultsUpdater = self
         searchController.obscuresBackgroundDuringPresentation = false
-        searchController.searchBar.placeholder = String.localized("search_contact")
+        searchController.searchBar.placeholder = String.localized("search")
         return searchController
     }()
 
@@ -358,7 +358,7 @@ extension NewChatViewController: ContactListDelegate {
             message: String.localized("import_contacts_message"),
             preferredStyle: .alert
         )
-        alert.addAction(UIAlertAction(title: String.localized("open_settings"), style: .default) { _ in
+        alert.addAction(UIAlertAction(title: String.localized("menu_settings"), style: .default) { _ in
             UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)
         })
         alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel) { _ in

+ 1 - 1
deltachat-ios/Controller/NewProfileViewController.swift

@@ -82,7 +82,7 @@ class NewProfileViewController: UIViewController, QrCodeReaderDelegate {
 
     override func viewDidLoad() {
         super.viewDidLoad()
-        title = String.localized("my_profile")
+        title = String.localized("pref_profile_info_headline")
         qrCodeReaderController.delegate = self
         self.edgesForExtendedLayout = []
 

+ 1 - 1
deltachat-ios/Controller/ProfileViewController.swift

@@ -37,7 +37,7 @@ class ProfileViewController: UITableViewController {
 
     override func viewDidLoad() {
         super.viewDidLoad()
-        title = String.localized("my_profile")
+        title = String.localized("pref_profile_info_headline")
     }
 
     override func viewWillAppear(_: Bool) {

+ 2 - 2
deltachat-ios/Controller/SettingsController.swift

@@ -149,7 +149,7 @@ internal final class SettingsViewController: QuickTableViewController {
             Section(
                 title: String.localized("pref_backup"),
                 rows: [
-                    TapActionRow(text: String.localized("create_backup"), action: { [weak self] in self?.createBackup($0) }),
+                    TapActionRow(text: String.localized("export_backup_desktop"), action: { [weak self] in self?.createBackup($0) }),
                 ],
                 footer: String.localized("pref_backup_explain")
             ),
@@ -198,7 +198,7 @@ internal final class SettingsViewController: QuickTableViewController {
         let documents = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)
         if !documents.isEmpty {
             logger.info("create backup in \(documents)")
-            hudHandler.showHud(String.localized("creating_backup"))
+            hudHandler.showHud(String.localized("one_moment"))
             DispatchQueue.main.async {
                 dc_imex(mailboxPointer, DC_IMEX_EXPORT_BACKUP, documents[0], nil)
             }

+ 4 - 4
deltachat-ios/Coordinator/AppCoordinator.swift

@@ -37,11 +37,11 @@ class AppCoordinator: NSObject, Coordinator {
     }()
 
     private lazy var mailboxController: UIViewController = {
-        let controller = MailboxViewController(dcContext: dcContext, chatId: Int(DC_CHAT_ID_DEADDROP), title: String.localized("mailbox"))
+        let controller = MailboxViewController(dcContext: dcContext, chatId: Int(DC_CHAT_ID_DEADDROP), title: String.localized("menu_deaddrop"))
         controller.disableWriting = true
         let nav = DcNavigationController(rootViewController: controller)
         let settingsImage = UIImage(named: "message")
-        nav.tabBarItem = UITabBarItem(title: String.localized("mailbox"), image: settingsImage, tag: 1)
+        nav.tabBarItem = UITabBarItem(title: String.localized("menu_deaddrop"), image: settingsImage, tag: 1)
         let coordinator = MailboxCoordinator(dcContext: dcContext, navigationController: nav)
         self.childCoordinators.append(coordinator)
         controller.coordinator = coordinator
@@ -52,7 +52,7 @@ class AppCoordinator: NSObject, Coordinator {
         let controller = NewProfileViewController(dcContext: dcContext)
         let nav = DcNavigationController(rootViewController: controller)
         let settingsImage = UIImage(named: "report_card")
-        nav.tabBarItem = UITabBarItem(title: String.localized("my_profile"), image: settingsImage, tag: 2)
+        nav.tabBarItem = UITabBarItem(title: String.localized("pref_profile_info_headline"), image: settingsImage, tag: 2)
         let coordinator = ProfileCoordinator(navigationController: nav)
         self.childCoordinators.append(coordinator)
         controller.coordinator = coordinator
@@ -542,7 +542,7 @@ class ChatViewCoordinator: NSObject, Coordinator {
     private func presentVideoLibrary() {
         if UIImagePickerController.isSourceTypeAvailable(.photoLibrary) {
             let videoPicker = UIImagePickerController()
-            videoPicker.title = String.localized("videos")
+            videoPicker.title = String.localized("video")
             videoPicker.delegate = self
             videoPicker.sourceType = .photoLibrary
             videoPicker.mediaTypes = [kUTTypeMovie as String, kUTTypeVideo as String]

+ 1 - 1
deltachat-ios/Handler/HudHandler.swift

@@ -50,7 +50,7 @@ class HudHandler {
             DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(500)) {
                 UIView.animate(
                     withDuration: 0.1, animations: {
-                        hud.textLabel.text = String.localized("success")
+                        hud.textLabel.text = String.localized("done")
                         hud.detailTextLabel.text = nil
                         hud.indicatorView = JGProgressHUDSuccessIndicatorView()
                     }

+ 1 - 1
deltachat-ios/View/ProgressHud.swift

@@ -23,7 +23,7 @@ class ProgressHud {
         DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(500)) {
             UIView.animate(
                 withDuration: 0.1, animations: {
-                    self.hud.textLabel.text = message ?? String.localized("success")
+                    self.hud.textLabel.text = message ?? String.localized("done")
                     self.hud.indicatorView = JGProgressHUDSuccessIndicatorView()
                 }
             )

+ 2 - 2
deltachat-ios/View/TextFieldCell.swift

@@ -87,14 +87,14 @@ class TextFieldCell: UITableViewCell {
     }
 
     static func makePasswordCell(delegate _: UITextFieldDelegate? = nil) -> TextFieldCell {
-        let cell = TextFieldCell(description: String.localized("password"), placeholder: String.localized("imap_password"))
+        let cell = TextFieldCell(description: String.localized("password"), placeholder: String.localized("password"))
         cell.textField.textContentType = UITextContentType.password
         cell.textField.isSecureTextEntry = true
         return cell
     }
 
     static func makeNameCell(delegate: UITextFieldDelegate? = nil) -> TextFieldCell {
-        let cell = TextFieldCell(description: String.localized("name_desktop"), placeholder: String.localized("contact_nickname"))
+        let cell = TextFieldCell(description: String.localized("name_desktop"), placeholder: String.localized("name_desktop"))
         cell.textField.autocapitalizationType = .words
         cell.textField.autocorrectionType = .no
         // .namePhonePad doesn't support autocapitalization

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

@@ -626,37 +626,23 @@
 "language_uk" = "Ukrainian";
 "language_zh_CN" = "Chinese";
 
-
-"email" = "Email";
-"contact_nickname" = "new contacts nickname";
-"imap_password" = "your IMAP password";
-"success" = "Success";
-"videos" = "Videos";
 "hide" = "Hide";
 "login_error_title" = "Unable to login!";
 "start_chat" = "Start Chat";
 "dismiss" = "Dismiss";
 "photo" = "Photo";
-"search_contact" = "Search Contact";
 "import_contacts" = "Import Device Contacts";
 "import_contacts_message" = "To chat with contacts from your device open the settings menu and enable the Contacts option";
 "synchronizing_account" = "Synchronizing Account";
 "invalid_qr_code" = "Invalid group QR Code";
-"open_settings" = "Open Settings";
-"my_profile" = "My Profile";
 "no_account_setup" = "No Account set up";
-"create_backup" = "Create backup";
 "delete_account" = "Delete Account";
 "delete_account_message" = "Are you sure you wante to delete your account data?";
 "danger" = "Danger";
-"creating_backup" = "Creating Backup";
-"group_info" = "Group Info";
 "next" = "Next";
 "reset" = "Reset";
-"your_status" = "Your Status";
 "edit_contact" = "Edit contact";
 "custom_port" = "Custom Port";
 "automatic" = "Automatic";
 "complete" = "Complete";
-"mailbox" = "Mailbox";
 "info" = "Info";

+ 0 - 13
tools/untranslated.xml

@@ -2,38 +2,25 @@
 <resources>
 
     <!-- iOS specific untranslated strings -->
-    <string name="email">Email</string>
-    <string name="contact_nickname">new contacts nickname</string>
-    <string name="imap_password">your IMAP password</string>
-    <string name="success">Success</string>
-    <string name="videos">Videos</string>
     <string name="hide">Hide</string>
     <string name="login_error_title">Unable to login!</string>
     <string name="start_chat">Start Chat</string>
     <string name="dismiss">Dismiss</string>
     <string name="photo">Photo</string>
-    <string name="search_contact">Search Contact</string>
     <string name="import_contacts">Import Device Contacts</string>
     <string name="import_contacts_message">To chat with contacts from your device open the settings menu and enable the Contacts option</string>
     <string name="synchronizing_account">Synchronizing Account</string>
     <string name="invalid_qr_code">Invalid group QR Code</string>
-    <string name="open_settings">Open Settings</string>
-    <string name="my_profile">My Profile</string>
     <string name="no_account_setup">No Account set up</string>
-    <string name="create_backup">Create backup</string>
     <string name="delete_account">Delete Account</string>
     <string name="delete_account_message">Are you sure you wante to delete your account data?</string>
     <string name="danger">Danger</string>
-    <string name="creating_backup">Creating Backup</string>
-    <string name="group_info">Group Info</string>
     <string name="next">Next</string>
     <string name="reset">Reset</string>
-    <string name="your_status">Your Status</string>
     <string name="edit_contact">Edit contact</string>
     <string name="custom_port">Custom Port</string>
     <string name="automatic">Automatic</string>
     <string name="complete">Complete</string>
-    <string name="mailbox">Mailbox</string>
     <string name="info">Info</string>
     <!-- info plist keys need to pre prefixed with INFOPLIST., spaces need to be replaced with dots and dashes need to replaced with underscores -->
     <string name="INFOPLIST.Privacy._.Camera.Usage.Description">Allowing access to the camera lets you take photos and videos.</string>