diff --git a/DuckDuckGo/Common/Localizables/UserText.swift b/DuckDuckGo/Common/Localizables/UserText.swift index 93db84e23c..1905a1e3cc 100644 --- a/DuckDuckGo/Common/Localizables/UserText.swift +++ b/DuckDuckGo/Common/Localizables/UserText.swift @@ -553,8 +553,8 @@ struct UserText { // MARK: - Login Import & Export - static let importLoginsCSV = NSLocalizedString("import.logins.csv.title", value: "CSV Passwords File", comment: "Title text for the CSV importer") - static let importBookmarksHTML = NSLocalizedString("import.bookmarks.html.title", value: "HTML Bookmarks File", comment: "Title text for the HTML Bookmarks importer") + static let importLoginsCSV = NSLocalizedString("import.logins.csv.title", value: "CSV Passwords File (for other browsers)", comment: "Title text for the CSV importer") + static let importBookmarksHTML = NSLocalizedString("import.bookmarks.html.title", value: "HTML Bookmarks File (for other browsers)", comment: "Title text for the HTML Bookmarks importer") static let importBookmarksSelectHTMLFile = NSLocalizedString("import.bookmarks.select-html-file", value: "Select Bookmarks HTML File…", comment: "Button text for selecting HTML Bookmarks file") static let importLoginsSelectCSVFile = NSLocalizedString("import.logins.select-csv-file", value: "Select Passwords CSV File…", comment: "Button text for selecting a CSV file") static func importLoginsSelectCSVFile(from source: DataImport.Source) -> String { @@ -564,7 +564,9 @@ struct UserText { static let importLoginsPasswords = NSLocalizedString("import.logins.passwords", value: "Passwords", comment: "Title text for the Passwords import option") static let initiateImport = NSLocalizedString("import.data.initiate", value: "Import", comment: "Button text for importing data") - static let skipImportFormat = NSLocalizedString("import.data.skip.format", value: "Skip %@", comment: "Button text to skip a kind of imported data (Bookmarks or Passwords - %@)") + static let skipBookmarksImport = NSLocalizedString("import.data.skip.bookmarks", value: "Skip bookmarks", comment: "Button text to skip bookmarks manual import") + static let skipPasswordsImport = NSLocalizedString("import.data.skip.passwords", value: "Skip passwords", comment: "Button text to skip bookmarks manual import") + static let skip = NSLocalizedString("import.data.skip", value: "Skip", comment: "Button text to skip an import step") static let done = NSLocalizedString("import.data.done", value: "Done", comment: "Button text for finishing the data import") static let manualImport = NSLocalizedString("import.data.manual", value: "Manual import…", comment: "Button text for initiating manual data import using a HTML or CSV file when automatic import has failed") diff --git a/DuckDuckGo/DataImport/View/DataImportErrorView.swift b/DuckDuckGo/DataImport/View/DataImportErrorView.swift index b730d4483b..f28f36d08c 100644 --- a/DuckDuckGo/DataImport/View/DataImportErrorView.swift +++ b/DuckDuckGo/DataImport/View/DataImportErrorView.swift @@ -26,9 +26,15 @@ struct DataImportErrorView: View { var body: some View { VStack(alignment: .leading, spacing: 8) { - Text("We were unable to import \(dataType.displayName) directly from \(source.importSourceName).", - comment: "Message when data import fails from a browser. %1$@ - Bookmarks or Passwords; %2$@ - a browser name") - .bold() + switch dataType { + case .bookmarks: + Text("We were unable to import bookmarks directly from \(source.importSourceName).", + comment: "Message when data import fails from a browser. %@ - a browser name") + .bold() + case .passwords: + Text("We were unable to import passwords directly from \(source.importSourceName).", + comment: "Message when data import fails from a browser. %@ - a browser name") + } Text("Let’s try doing it manually. It won’t take long.", comment: "Suggestion to switch to a Manual File Data Import when data import fails.") diff --git a/DuckDuckGo/DataImport/View/DataImportNoDataView.swift b/DuckDuckGo/DataImport/View/DataImportNoDataView.swift index e694842e22..84fb50a583 100644 --- a/DuckDuckGo/DataImport/View/DataImportNoDataView.swift +++ b/DuckDuckGo/DataImport/View/DataImportNoDataView.swift @@ -26,11 +26,21 @@ struct DataImportNoDataView: View { var body: some View { VStack(alignment: .leading, spacing: 8) { - Text("We couldn‘t find any \(dataType.displayName)…", comment: "Data import error message: Bookmarks or Passwords (%@) weren‘t found.") - .bold() + switch dataType { + case .bookmarks: + Text("We couldn‘t find any bookmarks.", comment: "Data import error message: Bookmarks weren‘t found.") + .bold() - Text("You could try importing \(dataType.displayName) manually.", - comment: "Data import error subtitle: suggestion to import Bookmarks or Passwords (%@) manually by selecting a CSV or HTML file.") + Text("Try importing bookmarks manually instead.", + comment: "Data import error subtitle: suggestion to import Bookmarks manually by selecting a CSV or HTML file.") + + case .passwords: + Text("We couldn‘t find any passwords.", comment: "Data import error message: Passwords weren‘t found.") + .bold() + + Text("Try importing passwords manually instead.", + comment: "Data import error subtitle: suggestion to import Passwords manually by selecting a CSV or HTML file.") + } } } diff --git a/DuckDuckGo/DataImport/View/DataImportSummaryView.swift b/DuckDuckGo/DataImport/View/DataImportSummaryView.swift index 08e19b02e7..6ed0efab7c 100644 --- a/DuckDuckGo/DataImport/View/DataImportSummaryView.swift +++ b/DuckDuckGo/DataImport/View/DataImportSummaryView.swift @@ -88,7 +88,7 @@ struct DataImportSummaryView: View { case (.passwords, .failure): HStack { failureImage() - Text("Passwords import failed.", + Text("Password import failed.", comment: "Data import summary message of failed passwords import.") } @@ -103,7 +103,7 @@ struct DataImportSummaryView: View { if summary.failed > 0 { HStack { failureImage() - Text("Passwords import failed: ", + Text("Password import failed: ", comment: "Data import summary format of how many passwords (%lld) failed to import.") + Text(" " as String) + Text(String(summary.failed)).bold() diff --git a/DuckDuckGo/DataImport/View/DataImportTypePicker.swift b/DuckDuckGo/DataImport/View/DataImportTypePicker.swift index 8c872af0f9..db6c2c9dd9 100644 --- a/DuckDuckGo/DataImport/View/DataImportTypePicker.swift +++ b/DuckDuckGo/DataImport/View/DataImportTypePicker.swift @@ -48,9 +48,10 @@ struct DataImportTypePicker: View { .disabled(!viewModel.importSource.supportedDataTypes.contains(dataType)) // subtitle - if !viewModel.importSource.supportedDataTypes.contains(dataType) { - Text("\(viewModel.importSource.importSourceName) does not support storing \(dataType.displayName)", - comment: "Data Import disabled checkbox message about a browser (%1$@) not supporting storing a data type (%2$@ - Bookmarks or Passwords)") + if case .passwords = dataType, + !viewModel.importSource.supportedDataTypes.contains(.passwords) { + Text("\(viewModel.importSource.importSourceName) does not support storing passwords", + comment: "Data Import disabled checkbox message about a browser (%@) not supporting storing passwords") .foregroundColor(Color(.disabledControlTextColor)) } } diff --git a/DuckDuckGo/DataImport/View/DataImportView.swift b/DuckDuckGo/DataImport/View/DataImportView.swift index f83b844038..45682a2981 100644 --- a/DuckDuckGo/DataImport/View/DataImportView.swift +++ b/DuckDuckGo/DataImport/View/DataImportView.swift @@ -90,7 +90,9 @@ struct DataImportView: View { } #endif } - .font(.custom("SF Pro Text", size: 13)) + .font(Font(NSFont(name: "SF Pro Text", size: 13) + // fallback when SF Pro Text is missing + ?? NSFont.systemFont(ofSize: 13) as CTFont)) .frame(width: 512) .fixedSize() } @@ -103,7 +105,7 @@ struct DataImportView: View { // browser to import data from picker popup if case .feedback = model.screen {} else { - DataImportSourcePicker(selectedSource: model.importSource) { importSource in + DataImportSourcePicker(importSources: model.availableImportSources, selectedSource: model.importSource) { importSource in model.update(with: importSource) } .disabled(model.isImportSourcePickerDisabled) @@ -242,7 +244,11 @@ struct DataImportView: View { .padding(.leading, 20) Spacer() if case .normal = NSApp.runType { - Button("⛌" as String) { debugViewDisabled.toggle() } + Button { + debugViewDisabled.toggle() + } label: { + Image(.closeLarge) + } .buttonStyle(.borderless) .padding(.trailing, 20) } @@ -353,7 +359,14 @@ extension DataImportViewModel.ButtonType { case .initiateImport: UserText.initiateImport case .skip: - String(format: UserText.skipImportFormat, dataType?.displayName ?? "") + switch dataType { + case .bookmarks: + UserText.skipBookmarksImport + case .passwords: + UserText.skipPasswordsImport + case nil: + UserText.skip + } case .cancel: UserText.cancel case .back: diff --git a/DuckDuckGo/DataImport/View/FileImportView.swift b/DuckDuckGo/DataImport/View/FileImportView.swift index a529a7a8b5..150f5df20f 100644 --- a/DuckDuckGo/DataImport/View/FileImportView.swift +++ b/DuckDuckGo/DataImport/View/FileImportView.swift @@ -30,7 +30,7 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo %d Open **%s** %d In a fresh tab, click %@ then **Google Password Manager → Settings** %d Find “Export Passwords” and click **Download File** - %d Save the passwords file someplace you can find it (e.g. Desktop) + %d Save the passwords file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Passwords as CSV from Google Chrome browser. @@ -50,7 +50,7 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo %d Click %@ to open the application menu then click **Password Manager** %d Click %@ **at the top left** of the Password Manager and select **Settings** %d Find “Export Passwords” and click **Download File** - %d Save the passwords file someplace you can find it (e.g. Desktop) + %d Save the passwords file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Passwords as CSV from Brave browser. @@ -71,7 +71,7 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo %d Open **%s** %d In a fresh tab, click %@ then **Password Manager → Settings** %d Find “Export Passwords” and click **Download File** - %d Save the passwords file someplace you can find it (e.g. Desktop) + %d Save the passwords file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Passwords as CSV from Chromium-based browsers. @@ -88,9 +88,9 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo case (.coccoc, .passwords): NSLocalizedString("import.csv.instructions.coccoc", value: """ %d Open **%s** - %d Type “_coccoc://settings/passwords_” into the Address field + %d Type “_coccoc://settings/passwords_” into the Address bar %d Click %@ (on the right from _Saved Passwords_) and select **Export passwords** - %d Save the passwords file someplace you can find it (e.g. Desktop) + %d Save the passwords file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Passwords as CSV from Chromium-based browsers. @@ -110,7 +110,7 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo %d Use the Menu Bar to select **View → Show Password Manager** %d Select **Settings** %d Find “Export Passwords” and click **Download File** - %d Save the passwords file someplace you can find it (e.g. Desktop) + %d Save the passwords file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Passwords as CSV from Chromium-based browsers. @@ -125,7 +125,7 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo case (.vivaldi, .passwords): NSLocalizedString("import.csv.instructions.vivaldi", value: """ %d Open **%s** - %d Type “_chrome://settings/passwords_” into the Address field + %d Type “_chrome://settings/passwords_” into the Address bar %d Click %@ (on the right from _Saved Passwords_) and select **Export passwords** %d Save the file someplace you can find it (e.g., Desktop) %d %@ @@ -146,7 +146,7 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo %d Open **%s** %d Use the Menu Bar to select **View → Show Password Manager** %d Click %@ (on the right from _Saved Passwords_) and select **Export passwords** - %d Save the passwords file someplace you can find it (e.g. Desktop) + %d Save the passwords file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Passwords as CSV from Chromium-based browsers. @@ -166,7 +166,7 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo %d Click %@ to open the application menu then click **Passwords and cards** %d Click %@ then **Export passwords** %d Choose **To a text file (not secure)** and click **Export** - %d Save the passwords file someplace you can find it (e.g. Desktop) + %d Save the passwords file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Passwords as CSV from Yandex Browser. @@ -278,7 +278,7 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo NSLocalizedString("import.csv.instructions.safari", value: """ %d Open **Safari** %d Select **File → Export → Passwords** - %d Save the passwords file someplace you can find it (e.g. Desktop) + %d Save the passwords file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Passwords as CSV from Safari. @@ -292,7 +292,7 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo NSLocalizedString("import.html.instructions.safari", value: """ %d Open **Safari** %d Select **File → Export → Bookmarks** - %d Save the passwords file someplace you can find it (e.g. Desktop) + %d Save the passwords file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Bookmarks exported as HTML from Safari. @@ -307,7 +307,7 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo %d Open **%s** %d Click %@ to open the application menu then click **Passwords** %d Click %@ then **Export Logins…** - %d Save the passwords file someplace you can find it (e.g. Desktop) + %d Save the passwords file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Passwords as CSV from Firefox. @@ -347,7 +347,7 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo %d Select **File → Export** from the Menu Bar and choose the account you want to export %d Enter your 1Password account password %d Select the File Format: **CSV (Logins and Passwords only)** - %d Click Export Data and save the file someplace you can find it (e.g. Desktop) + %d Click Export Data and save the file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Passwords as CSV from 1Password 8. @@ -361,11 +361,11 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo case (.onePassword7, .passwords): NSLocalizedString("import.csv.instructions.onePassword7", value: """ %d Open and unlock **%s** - %d Select the vault you want to Export (You cannot export from “All Vaults.”) + %d Select the vault you want to export (you can only export one vault at a time) %d Select **File → Export → All Items** from the Menu Bar %d Enter your 1Password master or account password %d Select the File Format: **iCloud Keychain (.csv)** - %d Save the passwords file someplace you can find it (e.g. Desktop) + %d Save the passwords file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Passwords as CSV from 1Password 7. @@ -381,8 +381,8 @@ func fileImportInstructionsBuilder(source: DataImport.Source, dataType: DataImpo %d Open and unlock **%s** %d Select **File → Export vault** from the Menu Bar %d Select the File Format: **.csv** - %d Enter your Bitwarden Master password - %d Click %@ and save the file someplace you can find it (e.g. Desktop) + %d Enter your Bitwarden master password + %d Click %@ and save the file someplace you can find it (e.g., Desktop) %d %@ """, comment: """ Instructions to import Passwords as CSV from Bitwarden. @@ -485,9 +485,18 @@ struct FileImportView: View { if [.onePassword7, .onePassword8].contains(source) { HStack { Image(.info) - Text(""" - You can find your version by selecting **\(source.importSourceName) → About \(source.importSourceName)** from the Menu Bar - """, comment: "Instructions how to find an installed 1Password password manager app version. %1$@, %2$@ - app name (1Password)") + // markdown not supported on macOS 11 + InstructionsView { + NSLocalizedString("import.onePassword.app.version.info", value: """ + You can find your version by selecting **%s → About %s** from the Menu Bar. + """, comment: """ + Instructions how to find an installed 1Password password manager app version. + %1$s, %2$s - app name (1Password) + """) + source.importSourceName + source.importSourceName + } + Spacer() } .padding(EdgeInsets(top: 8, leading: 8, bottom: 8, trailing: 8)) @@ -819,7 +828,7 @@ struct CircleNumberView: View { #Preview { HStack { - FileImportView(source: .yandex, dataType: .passwords, isButtonDisabled: false) + FileImportView(source: .onePassword8, dataType: .passwords, isButtonDisabled: false) .padding() .frame(width: 512 - 20) } diff --git a/DuckDuckGo/Localizable.xcstrings b/DuckDuckGo/Localizable.xcstrings index d6c9aa0557..f11b306d95 100644 --- a/DuckDuckGo/Localizable.xcstrings +++ b/DuckDuckGo/Localizable.xcstrings @@ -34,16 +34,8 @@ "**%lld** tracking attempts blocked" : { }, - "%@ does not support storing %@" : { - "comment" : "Data Import disabled checkbox message about a browser (%1$@) not supporting storing a data type (%2$@ - Bookmarks or Passwords)", - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ does not support storing %2$@" - } - } - } + "%@ does not support storing passwords" : { + "comment" : "Data Import disabled checkbox message about a browser (%@) not supporting storing passwords" }, "%lld" : { @@ -3429,7 +3421,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "HTML Bookmarks File" + "value" : "HTML Bookmarks File (for other browsers)" } } } @@ -3525,7 +3517,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open and unlock **%2$s**\n%3$d Select **File → Export vault** from the Menu Bar\n%4$d Select the File Format: **.csv**\n%5$d Enter your Bitwarden Master password\n%6$d Click %7$@ and save the file someplace you can find it (e.g. Desktop)\n%8$d %9$@" + "value" : "%1$d Open and unlock **%2$s**\n%3$d Select **File → Export vault** from the Menu Bar\n%4$d Select the File Format: **.csv**\n%5$d Enter your Bitwarden master password\n%6$d Click %7$@ and save the file someplace you can find it (e.g., Desktop)\n%8$d %9$@" } } } @@ -3537,7 +3529,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open **%2$s**\n%3$d Click %4$@ to open the application menu then click **Password Manager**\n%5$d Click %6$@ **at the top left** of the Password Manager and select **Settings**\n%7$d Find “Export Passwords” and click **Download File**\n%8$d Save the passwords file someplace you can find it (e.g. Desktop)\n%9$d %10$@" + "value" : "%1$d Open **%2$s**\n%3$d Click %4$@ to open the application menu then click **Password Manager**\n%5$d Click %6$@ **at the top left** of the Password Manager and select **Settings**\n%7$d Find “Export Passwords” and click **Download File**\n%8$d Save the passwords file someplace you can find it (e.g., Desktop)\n%9$d %10$@" } } } @@ -3549,7 +3541,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open **%2$s**\n%3$d In a fresh tab, click %4$@ then **Google Password Manager → Settings**\n%5$d Find “Export Passwords” and click **Download File**\n%6$d Save the passwords file someplace you can find it (e.g. Desktop)\n%7$d %8$@" + "value" : "%1$d Open **%2$s**\n%3$d In a fresh tab, click %4$@ then **Google Password Manager → Settings**\n%5$d Find “Export Passwords” and click **Download File**\n%6$d Save the passwords file someplace you can find it (e.g., Desktop)\n%7$d %8$@" } } } @@ -3561,7 +3553,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open **%2$s**\n%3$d In a fresh tab, click %4$@ then **Password Manager → Settings**\n%5$d Find “Export Passwords” and click **Download File**\n%6$d Save the passwords file someplace you can find it (e.g. Desktop)\n%7$d %8$@" + "value" : "%1$d Open **%2$s**\n%3$d In a fresh tab, click %4$@ then **Password Manager → Settings**\n%5$d Find “Export Passwords” and click **Download File**\n%6$d Save the passwords file someplace you can find it (e.g., Desktop)\n%7$d %8$@" } } } @@ -3573,7 +3565,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open **%2$s**\n%3$d Type “_coccoc://settings/passwords_” into the Address field\n%4$d Click %5$@ (on the right from _Saved Passwords_) and select **Export passwords**\n%6$d Save the passwords file someplace you can find it (e.g. Desktop)\n%7$d %8$@" + "value" : "%1$d Open **%2$s**\n%3$d Type “_coccoc://settings/passwords_” into the Address bar\n%4$d Click %5$@ (on the right from _Saved Passwords_) and select **Export passwords**\n%6$d Save the passwords file someplace you can find it (e.g., Desktop)\n%7$d %8$@" } } } @@ -3585,7 +3577,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open **%2$s**\n%3$d Click %4$@ to open the application menu then click **Passwords**\n%5$d Click %6$@ then **Export Logins…**\n%7$d Save the passwords file someplace you can find it (e.g. Desktop)\n%8$d %9$@" + "value" : "%1$d Open **%2$s**\n%3$d Click %4$@ to open the application menu then click **Passwords**\n%5$d Click %6$@ then **Export Logins…**\n%7$d Save the passwords file someplace you can find it (e.g., Desktop)\n%8$d %9$@" } } } @@ -3621,7 +3613,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open and unlock **%2$s**\n%3$d Select the vault you want to Export (You cannot export from “All Vaults.”)\n%4$d Select **File → Export → All Items** from the Menu Bar\n%5$d Enter your 1Password master or account password\n%6$d Select the File Format: **iCloud Keychain (.csv)**\n%7$d Save the passwords file someplace you can find it (e.g. Desktop)\n%8$d %9$@" + "value" : "%1$d Open and unlock **%2$s**\n%3$d Select the vault you want to export (you can only export one vault at a time)\n%4$d Select **File → Export → All Items** from the Menu Bar\n%5$d Enter your 1Password master or account password\n%6$d Select the File Format: **iCloud Keychain (.csv)**\n%7$d Save the passwords file someplace you can find it (e.g., Desktop)\n%8$d %9$@" } } } @@ -3633,7 +3625,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open and unlock **%2$s**\n%3$d Select **File → Export** from the Menu Bar and choose the account you want to export\n%4$d Enter your 1Password account password\n%5$d Select the File Format: **CSV (Logins and Passwords only)**\n%6$d Click Export Data and save the file someplace you can find it (e.g. Desktop)\n%7$d %8$@" + "value" : "%1$d Open and unlock **%2$s**\n%3$d Select **File → Export** from the Menu Bar and choose the account you want to export\n%4$d Enter your 1Password account password\n%5$d Select the File Format: **CSV (Logins and Passwords only)**\n%6$d Click Export Data and save the file someplace you can find it (e.g., Desktop)\n%7$d %8$@" } } } @@ -3645,7 +3637,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open **%2$s**\n%3$d Use the Menu Bar to select **View → Show Password Manager**\n%4$d Select **Settings**\n%5$d Find “Export Passwords” and click **Download File**\n%6$d Save the passwords file someplace you can find it (e.g. Desktop)\n%7$d %8$@" + "value" : "%1$d Open **%2$s**\n%3$d Use the Menu Bar to select **View → Show Password Manager**\n%4$d Select **Settings**\n%5$d Find “Export Passwords” and click **Download File**\n%6$d Save the passwords file someplace you can find it (e.g., Desktop)\n%7$d %8$@" } } } @@ -3657,7 +3649,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open **%2$s**\n%3$d Use the Menu Bar to select **View → Show Password Manager**\n%4$d Click %5$@ (on the right from _Saved Passwords_) and select **Export passwords**\n%6$d Save the passwords file someplace you can find it (e.g. Desktop)\n%7$d %8$@" + "value" : "%1$d Open **%2$s**\n%3$d Use the Menu Bar to select **View → Show Password Manager**\n%4$d Click %5$@ (on the right from _Saved Passwords_) and select **Export passwords**\n%6$d Save the passwords file someplace you can find it (e.g., Desktop)\n%7$d %8$@" } } } @@ -3669,7 +3661,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open **Safari**\n%2$d Select **File → Export → Passwords**\n%3$d Save the passwords file someplace you can find it (e.g. Desktop)\n%4$d %5$@" + "value" : "%1$d Open **Safari**\n%2$d Select **File → Export → Passwords**\n%3$d Save the passwords file someplace you can find it (e.g., Desktop)\n%4$d %5$@" } } } @@ -3681,7 +3673,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open **%2$s**\n%3$d Type “_chrome://settings/passwords_” into the Address field\n%4$d Click %5$@ (on the right from _Saved Passwords_) and select **Export passwords**\n%6$d Save the file someplace you can find it (e.g., Desktop)\n%7$d %8$@" + "value" : "%1$d Open **%2$s**\n%3$d Type “_chrome://settings/passwords_” into the Address bar\n%4$d Click %5$@ (on the right from _Saved Passwords_) and select **Export passwords**\n%6$d Save the file someplace you can find it (e.g., Desktop)\n%7$d %8$@" } } } @@ -3693,7 +3685,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open **%2$s**\n%3$d Click %4$@ to open the application menu then click **Passwords and cards**\n%5$d Click %6$@ then **Export passwords**\n%7$d Choose **To a text file (not secure)** and click **Export**\n%8$d Save the passwords file someplace you can find it (e.g. Desktop)\n%9$d %10$@" + "value" : "%1$d Open **%2$s**\n%3$d Click %4$@ to open the application menu then click **Passwords and cards**\n%5$d Click %6$@ then **Export passwords**\n%7$d Choose **To a text file (not secure)** and click **Export**\n%8$d Save the passwords file someplace you can find it (e.g., Desktop)\n%9$d %10$@" } } } @@ -3782,14 +3774,38 @@ } } }, - "import.data.skip.format" : { - "comment" : "Button text to skip a kind of imported data (Bookmarks or Passwords - %@)", + "import.data.skip" : { + "comment" : "Button text to skip an import step", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Skip" + } + } + } + }, + "import.data.skip.bookmarks" : { + "comment" : "Button text to skip bookmarks manual import", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Skip bookmarks" + } + } + } + }, + "import.data.skip.passwords" : { + "comment" : "Button text to skip bookmarks manual import", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "Skip %@" + "value" : "Skip passwords" } } } @@ -3861,7 +3877,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "%1$d Open **Safari**\n%2$d Select **File → Export → Bookmarks**\n%3$d Save the passwords file someplace you can find it (e.g. Desktop)\n%4$d %5$@" + "value" : "%1$d Open **Safari**\n%2$d Select **File → Export → Bookmarks**\n%3$d Save the passwords file someplace you can find it (e.g., Desktop)\n%4$d %5$@" } } } @@ -3897,7 +3913,7 @@ "en" : { "stringUnit" : { "state" : "new", - "value" : "CSV Passwords File" + "value" : "CSV Passwords File (for other browsers)" } } } @@ -3938,6 +3954,18 @@ } } }, + "import.onePassword.app.version.info" : { + "comment" : "Instructions how to find an installed 1Password password manager app version.\n%1$s, %2$s - app name (1Password)", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "You can find your version by selecting **%1$s → About %2$s** from the Menu Bar." + } + } + } + }, "import.passwords.indefinite.progress.text" : { "comment" : "Operation progress info message about indefinite number of passwords being imported", "extractionState" : "extracted_with_value", @@ -5890,6 +5918,12 @@ "Password import complete. You can now delete the saved passwords file." : { "comment" : "message about Passwords Data Import completion" }, + "Password import failed: " : { + "comment" : "Data import summary format of how many passwords (%lld) failed to import." + }, + "Password import failed." : { + "comment" : "Data import summary message of failed passwords import." + }, "password.manager" : { "comment" : "Section header", "extractionState" : "extracted_with_value", @@ -5902,12 +5936,6 @@ } } }, - "Passwords import failed: " : { - "comment" : "Data import summary format of how many passwords (%lld) failed to import." - }, - "Passwords import failed." : { - "comment" : "Data import summary message of failed passwords import." - }, "Passwords:" : { "comment" : "Data import summary format of how many passwords (%lld) were successfully imported." }, @@ -8524,6 +8552,12 @@ "Transformations" : { "comment" : "Main Menu Edit item" }, + "Try importing bookmarks manually instead." : { + "comment" : "Data import error subtitle: suggestion to import Bookmarks manually by selecting a CSV or HTML file." + }, + "Try importing passwords manually instead." : { + "comment" : "Data import error subtitle: suggestion to import Passwords manually by selecting a CSV or HTML file." + }, "Undo" : { "comment" : "Main Menu Edit item" }, @@ -8973,19 +9007,17 @@ } } }, - "We couldn‘t find any %@…" : { - "comment" : "Data import error message: Bookmarks or Passwords (%@) weren‘t found." + "We couldn‘t find any bookmarks." : { + "comment" : "Data import error message: Bookmarks weren‘t found." }, - "We were unable to import %@ directly from %@." : { - "comment" : "Message when data import fails from a browser. %1$@ - Bookmarks or Passwords; %2$@ - a browser name", - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "new", - "value" : "We were unable to import %1$@ directly from %2$@." - } - } - } + "We couldn‘t find any passwords." : { + "comment" : "Data import error message: Passwords weren‘t found." + }, + "We were unable to import bookmarks directly from %@." : { + "comment" : "Message when data import fails from a browser. %@ - a browser name" + }, + "We were unable to import passwords directly from %@." : { + "comment" : "Message when data import fails from a browser. %@ - a browser name" }, "web.tracking.protection.explenation" : { "comment" : "feature explanation in settings", @@ -9014,12 +9046,6 @@ "Window" : { "comment" : "Main Menu " }, - "You can find your version by selecting **%@ → About 1Password** from the Menu Bar" : { - - }, - "You could try importing %@ manually." : { - "comment" : "Data import error subtitle: suggestion to import Bookmarks or Passwords (%@) manually by selecting a CSV or HTML file." - }, "You must be eligible to use this service." : { }, diff --git a/UnitTests/DataImport/InstructionsFormatParserTests.swift b/UnitTests/DataImport/InstructionsFormatParserTests.swift index 7ea0c24e0c..2b0bc5ca62 100644 --- a/UnitTests/DataImport/InstructionsFormatParserTests.swift +++ b/UnitTests/DataImport/InstructionsFormatParserTests.swift @@ -105,7 +105,7 @@ final class InstructionsFormatParserTests: XCTestCase { %d Open **%s** %d In a fresh tab, click %@ then **Google __Password__ Manager → Settings ** %d Find “Export _Passwords_” and click **Download File** - %d __Save the* passwords **file** someplace__ you can_find it (e.g. Desktop) + %d __Save the* passwords **file** someplace__ you can_find it (e.g., Desktop) %d %@ """ let parsed = try InstructionsFormatParser().parse(format: format) @@ -113,7 +113,7 @@ final class InstructionsFormatParserTests: XCTestCase { XCTAssertEqual(parsed[safe: 0], [.number(argIndex: 1), .text("Open "), .string(argIndex: 2, bold: true)]) XCTAssertEqual(parsed[safe: 1], [.number(argIndex: 3), .text("In a fresh tab, click "), .object(argIndex: 4), .text(" then "), .text("Google ", bold: true), .text("Password", bold: true, italic: true), .text(" Manager → Settings ", bold: true)]) XCTAssertEqual(parsed[safe: 2], [.number(argIndex: 5), .text("Find “Export "), .text("Passwords", italic: true), .text("” and click "), .text("Download File", bold: true)]) - XCTAssertEqual(parsed[safe: 3], [.number(argIndex: 6), .text("Save the* passwords ", italic: true), .text("file", bold: true, italic: true), .text(" someplace", italic: true), .text(" you can_find it (e.g. Desktop)")]) + XCTAssertEqual(parsed[safe: 3], [.number(argIndex: 6), .text("Save the* passwords ", italic: true), .text("file", bold: true, italic: true), .text(" someplace", italic: true), .text(" you can_find it (e.g., Desktop)")]) XCTAssertEqual(parsed[safe: 4], [.number(argIndex: 7), .object(argIndex: 8)]) XCTAssertNil(parsed[safe: 5]) }