You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 24, 2025. It is now read-only.
* Work on CSV import.
* Begin using the vault to import items.
* Continue fleshing out import.
* Add basic CSV parsing tests.
* Test some of the CSV importing functionality.
* More UI work for the CSV import feature.
* Add a login summary object.
* Fix an issue with merge conflict resolution.
* Show a summary view when completing the import.
* Import an array of summary objects.
* Show a count of the import summary stats.
* Use an enum to report the result of data import.
* Rework the file store to support full URLs.
* Update the login exporter to use FileStore.
* Add mocks for testing the export feature.
* Update BrowserServicesKit.
* Fix some issues with CSV parsing.
* Move strings to a localized text file.
* Fix another localized string.
* Parse an optional title when importing.
* Add the title to the summary if it's present.
* Export the title as the first column in each row.
* Remove BrowserImportViewController, that's for the next PR.
* Ignore header rows if they're found.
* Remove a local BSK reference.
* Move the Import/Export options to the File menu.
* Tweak import UI.
* Copy Brindy's approach for the @testable issue.
* Add pixels for import/export.
* Present an alert if password export fails.
* Infer the position of the columns.
* Normalize the header values when inferring positions.
* Allow exporting credentials with blank fields.
* Hide the cancel button in the success state.
* Fix an incorrect bool value.
* Update the CSV header text.
* Add titles to the exported CSV.
Copy file name to clipboardExpand all lines: DuckDuckGo/Common/Localizables/UserText.swift
+19
Original file line number
Diff line number
Diff line change
@@ -147,4 +147,23 @@ struct UserText {
147
147
returnString(format: localized, version, build)
148
148
}
149
149
150
+
// MARK: - Login Import & Export
151
+
152
+
staticletimportLoginsCSV=NSLocalizedString("import.logins.csv.title", value:"CSV Logins File", comment:"Title text for the CSV importer")
153
+
154
+
staticletcsvImportDescription=NSLocalizedString("import.logins.csv.description", value:"The CSV importer will try to match column headers to their position.\nIf there is no header, it supports two formats:\n\n1. URL, Username, Password\n2. Title, URL, Username, Password", comment:"Description text for the CSV importer")
155
+
staticletimportLoginsSelectCSVFile=NSLocalizedString("import.logins.select-csv-file", value:"Select CSV File", comment:"Button text for selecting a CSV file")
156
+
staticletimportLoginsSelectAnotherFile=NSLocalizedString("import.logins.select-another-file", value:"Select Another File", comment:"Button text for selecting another file")
157
+
staticletimportLoginsFailedToReadCSVFile=NSLocalizedString("import.logins.failed-to-read-file", value:"Failed to get CSV file URL", comment:"Error text when importing a CSV file")
// Licensed under the Apache License, Version 2.0 (the "License");
7
+
// you may not use this file except in compliance with the License.
8
+
// You may obtain a copy of the License at
9
+
//
10
+
// http://www.apache.org/licenses/LICENSE-2.0
11
+
//
12
+
// Unless required by applicable law or agreed to in writing, software
13
+
// distributed under the License is distributed on an "AS IS" BASIS,
14
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+
// See the License for the specific language governing permissions and
16
+
// limitations under the License.
17
+
//
18
+
19
+
import Foundation
20
+
21
+
enumDataImport{
22
+
23
+
// Third-party browser support will be added later.
24
+
enumSource:CaseIterable{
25
+
case csv
26
+
27
+
varimportSourceName:String{
28
+
switchself{
29
+
case.csv:
30
+
returnUserText.importLoginsCSV
31
+
}
32
+
}
33
+
}
34
+
35
+
// Different data types (e.g. bookmarks) will be added later.
36
+
enumDataType{
37
+
case logins
38
+
}
39
+
40
+
enumSummary:Equatable{
41
+
case logins(successfulImports:[String], duplicateImports:[String], failedImports:[String])
42
+
}
43
+
44
+
}
45
+
46
+
enumDataImportError:Error{
47
+
48
+
case cannotReadFile
49
+
case cannotAccessSecureVault
50
+
51
+
}
52
+
53
+
/// Represents an object able to import data from an outside source. The outside source may be capable of importing multiple types of data.
54
+
/// For instance, a browser data importer may be able to import logins and bookmarks.
55
+
protocolDataImporter{
56
+
57
+
/// Performs a quick check to determine if the data is able to be imported. It does not guarantee that the import will succeed.
58
+
/// For example, a CSV importer will return true if the URL it has been created with is a CSV file, but does not check whether the CSV data matches the expected format.
0 commit comments