diff --git a/File Provider Extension/FileProviderEnumerator.swift b/File Provider Extension/FileProviderEnumerator.swift index 671091d1ab..0b3a92aadb 100644 --- a/File Provider Extension/FileProviderEnumerator.swift +++ b/File Provider Extension/FileProviderEnumerator.swift @@ -40,7 +40,7 @@ class FileProviderEnumerator: NSObject, NSFileProviderEnumerator { serverUrl = NCUtilityFileSystem().getHomeServer(session: fileProviderData.shared.session) } else { if let metadata = providerUtility.getTableMetadataFromItemIdentifier(enumeratedItemIdentifier), - let directorySource = self.database.getTableDirectory(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", metadata.account, metadata.serverUrl)) { + let directorySource = self.database.getTableDirectory(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@ AND NOT (status IN %@)", metadata.account, metadata.serverUrl, NCGlobal.shared.metadataStatusHideInFileExtension)) { serverUrl = directorySource.serverUrl + "/" + metadata.fileName } @@ -158,7 +158,7 @@ class FileProviderEnumerator: NSObject, NSFileProviderEnumerator { } func fetchItemsForPage(serverUrl: String, pageNumber: Int, completionHandler: @escaping (_ metadatas: Results?) -> Void) { - let predicate = NSPredicate(format: "account == %@ AND serverUrl == %@", fileProviderData.shared.session.account, serverUrl) + let predicate = NSPredicate(format: "account == %@ AND serverUrl == %@ AND NOT (status IN %@)", fileProviderData.shared.session.account, serverUrl, NCGlobal.shared.metadataStatusHideInFileExtension) if pageNumber == 1 { NextcloudKit.shared.readFileOrFolder(serverUrlFileName: serverUrl, depth: "1", showHiddenFiles: NCKeychain().showHiddenFiles, account: fileProviderData.shared.session.account) { _, files, _, error in diff --git a/Nextcloud.xcodeproj/project.pbxproj b/Nextcloud.xcodeproj/project.pbxproj index 1d5b85e9d5..424115483c 100644 --- a/Nextcloud.xcodeproj/project.pbxproj +++ b/Nextcloud.xcodeproj/project.pbxproj @@ -148,6 +148,13 @@ F37208C62BAB63F0006B5430 /* LRUCache in Frameworks */ = {isa = PBXBuildFile; productRef = F37208C52BAB63F0006B5430 /* LRUCache */; }; F37208C82BAB63F1006B5430 /* KeychainAccess in Frameworks */ = {isa = PBXBuildFile; productRef = F37208C72BAB63F1006B5430 /* KeychainAccess */; }; F38F71252B6BBDC300473CDC /* NCCollectionViewCommonSelectTabBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38F71242B6BBDC300473CDC /* NCCollectionViewCommonSelectTabBar.swift */; }; + F39170A92CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39170A82CB8201B006127BC /* FileAutoRenamer+Extensions.swift */; }; + F39170AA2CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39170A82CB8201B006127BC /* FileAutoRenamer+Extensions.swift */; }; + F39170AB2CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39170A82CB8201B006127BC /* FileAutoRenamer+Extensions.swift */; }; + F39170AC2CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39170A82CB8201B006127BC /* FileAutoRenamer+Extensions.swift */; }; + F39170AD2CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39170A82CB8201B006127BC /* FileAutoRenamer+Extensions.swift */; }; + F39170AE2CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39170A82CB8201B006127BC /* FileAutoRenamer+Extensions.swift */; }; + F39170AF2CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39170A82CB8201B006127BC /* FileAutoRenamer+Extensions.swift */; }; F39298972A3B12CB00509762 /* BaseNCMoreCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39298962A3B12CB00509762 /* BaseNCMoreCell.swift */; }; F3953BD72A6E87E000EE03F9 /* BaseIntegrationXCTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3953BD62A6E87E000EE03F9 /* BaseIntegrationXCTestCase.swift */; }; F3A047972BD2668800658E7B /* NCAssistantEmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3A0478F2BD2668800658E7B /* NCAssistantEmptyView.swift */; }; @@ -1204,6 +1211,7 @@ F37208742BAB4AB0006B5430 /* TestConstants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestConstants.swift; sourceTree = ""; }; F37208772BAB4B5D006B5430 /* BaseXCTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseXCTestCase.swift; sourceTree = ""; }; F38F71242B6BBDC300473CDC /* NCCollectionViewCommonSelectTabBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCCollectionViewCommonSelectTabBar.swift; sourceTree = ""; }; + F39170A82CB8201B006127BC /* FileAutoRenamer+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FileAutoRenamer+Extensions.swift"; sourceTree = ""; }; F39298962A3B12CB00509762 /* BaseNCMoreCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseNCMoreCell.swift; sourceTree = ""; }; F3953BD62A6E87E000EE03F9 /* BaseIntegrationXCTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseIntegrationXCTestCase.swift; sourceTree = ""; }; F3998E192B4879B2007CA5DE /* CoreAudioTypes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudioTypes.framework; path = System/Library/Frameworks/CoreAudioTypes.framework; sourceTree = SDKROOT; }; @@ -2849,6 +2857,7 @@ F7245923289BB50B00474787 /* ThreadSafeDictionary.swift */, F33EE6F12BF4C9B200CA1A51 /* PKCS12.swift */, F33918C32C7CD8F2002D9AA1 /* FileNameValidator+Extensions.swift */, + F39170A82CB8201B006127BC /* FileAutoRenamer+Extensions.swift */, ); path = Utility; sourceTree = ""; @@ -4017,6 +4026,7 @@ files = ( F73EF7BD2B0224AB0087E6E9 /* NCManageDatabase+ExternalSites.swift in Sources */, F71433E72C778FFB00E20B5A /* NotificationCenter+MainThread.swift in Sources */, + F39170AA2CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */, F73EF7C52B02250B0087E6E9 /* NCManageDatabase+GPS.swift in Sources */, 2C1D5D7923E2DE9100334ABB /* NCBrand.swift in Sources */, F770768A263A8A2500A1BA94 /* NCUtilityFileSystem.swift in Sources */, @@ -4151,6 +4161,7 @@ F757CC8729E7F88B00F31428 /* NCManageDatabase+Groupfolders.swift in Sources */, F33EE6F72BF4C9B200CA1A51 /* PKCS12.swift in Sources */, F7B769AD2B7A0B2000C1AAEB /* NCManageDatabase+Metadata+Session.swift in Sources */, + F39170AC2CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */, F73EF7BC2B0224AB0087E6E9 /* NCManageDatabase+ExternalSites.swift in Sources */, F724377E2C10B92300C7C68D /* NCPermissions.swift in Sources */, F73EF7B42B0224350087E6E9 /* NCManageDatabase+DirectEditing.swift in Sources */, @@ -4232,6 +4243,7 @@ F7BD71E62636EAFC00643C34 /* NCNetworkingE2EE.swift in Sources */, F7F878AF1FB9E3B900599E4F /* NCEndToEndMetadata.swift in Sources */, F7327E3B2B73B8D600A462C7 /* Array+Extension.swift in Sources */, + F39170AF2CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */, F799DF832C4B7DCC003410B5 /* NCSectionFooter.swift in Sources */, AF22B218277D196700DAB0CC /* NCShareExtension+Files.swift in Sources */, F799DF862C4B7E56003410B5 /* NCSectionHeader.swift in Sources */, @@ -4306,6 +4318,7 @@ F73EF7D02B0225BA0087E6E9 /* NCManageDatabase+Tag.swift in Sources */, F783030228B4C4B800B84583 /* NCUtility.swift in Sources */, F711D63128F44801003F43C8 /* IntentHandler.swift in Sources */, + F39170AE2CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */, F76DEE9728F808AF0041B1C9 /* LockscreenData.swift in Sources */, F72EA95A28B7BD0D00C88F0C /* FilesWidgetView.swift in Sources */, F768823C2C0DD231001CF441 /* NCKeychain.swift in Sources */, @@ -4449,6 +4462,7 @@ F7BFFD2C2C8854690029A201 /* NCHud.swift in Sources */, F771E3F820E239B500AFB62D /* FileProviderExtension+Thumbnail.swift in Sources */, F76882392C0DD230001CF441 /* NCKeychain.swift in Sources */, + F39170AB2CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */, F343A4BF2A1E734600DDA874 /* Optional+Extension.swift in Sources */, AF4BF62027562B3F0081CEEF /* NCManageDatabase+Activity.swift in Sources */, F73ADD2226554FD10069EA0D /* NCContentPresenter.swift in Sources */, @@ -4467,6 +4481,7 @@ F7E7AEA72BA32D0000512E52 /* NCCollectionViewUnifiedSearch.swift in Sources */, F73EF7A72B0223900087E6E9 /* NCManageDatabase+Comments.swift in Sources */, F33918C42C7CD8F2002D9AA1 /* FileNameValidator+Extensions.swift in Sources */, + F39170AD2CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */, F799DF882C4B83CC003410B5 /* NCCollectionViewCommon+EasyTipView.swift in Sources */, F7AE00F8230E81CB007ACF8A /* NCBrowserWeb.swift in Sources */, F77DD6A82C5CC093009448FB /* NCSession.swift in Sources */, @@ -4770,6 +4785,7 @@ F7C9B91F2B582F550064EA91 /* NCManageDatabase+SecurityGuard.swift in Sources */, F75DD767290ABB25002EB562 /* Intent.intentdefinition in Sources */, F72437812C10B92500C7C68D /* NCPermissions.swift in Sources */, + F39170A92CB82024006127BC /* FileAutoRenamer+Extensions.swift in Sources */, F749B64C297B0CBB00087535 /* NCManageDatabase+Share.swift in Sources */, F7A8D73F28F181EF008BBE1C /* NCGlobal.swift in Sources */, F74B6D972A7E239A00F03C5F /* NCManageDatabase+Chunk.swift in Sources */, @@ -5682,7 +5698,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = NKUJUXUJ3B; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -5709,7 +5725,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 6.1.3; + MARKETING_VERSION = 6.1.4; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-v"; OTHER_LDFLAGS = ""; @@ -5748,7 +5764,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = NKUJUXUJ3B; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -5772,7 +5788,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 6.1.3; + MARKETING_VERSION = 6.1.4; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-v"; OTHER_LDFLAGS = ""; @@ -6047,7 +6063,7 @@ repositoryURL = "https://github.com/nextcloud/NextcloudKit"; requirement = { kind = exactVersion; - version = 5.0.0; + version = 5.0.1; }; }; F788ECC5263AAAF900ADC67F /* XCRemoteSwiftPackageReference "MarkdownKit" */ = { diff --git a/Share/NCShareCell.swift b/Share/NCShareCell.swift index 047652f93e..ba27c71da8 100644 --- a/Share/NCShareCell.swift +++ b/Share/NCShareCell.swift @@ -27,7 +27,8 @@ import NextcloudKit protocol NCShareCellDelegate: AnyObject { var uploadStarted: Bool { get } func removeFile(named fileName: String) - func renameFile(named fileName: String, account: String) + func showRenameFileDialog(named fileName: String, account: String) + func renameFile(oldName: String, newName: String, account: String) } class NCShareCell: UITableViewCell { @@ -71,7 +72,7 @@ class NCShareCell: UITableViewCell { let alertController = UIAlertController(title: "", message: fileName, preferredStyle: .alert) alertController.addAction(UIAlertAction(title: NSLocalizedString("_rename_file_", comment: ""), style: .default) { _ in - self.delegate?.renameFile(named: self.fileName, account: self.account) + self.delegate?.showRenameFileDialog(named: self.fileName, account: self.account) }) alertController.addAction(UIAlertAction(title: NSLocalizedString("_remove_file_", comment: ""), style: .default) { _ in diff --git a/Share/NCShareExtension+DataSource.swift b/Share/NCShareExtension+DataSource.swift index ae9e84f5bc..c54965087b 100644 --- a/Share/NCShareExtension+DataSource.swift +++ b/Share/NCShareExtension+DataSource.swift @@ -176,7 +176,7 @@ extension NCShareExtension: UITableViewDelegate { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { guard !uploadStarted else { return } let fileName = filesName[indexPath.row] - renameFile(named: fileName, account: session.account) + showRenameFileDialog(named: fileName, account: session.account) } } diff --git a/Share/NCShareExtension+NCAccountRequestDelegate.swift b/Share/NCShareExtension+NCAccountRequestDelegate.swift index a64f425b12..c6633c5df6 100644 --- a/Share/NCShareExtension+NCAccountRequestDelegate.swift +++ b/Share/NCShareExtension+NCAccountRequestDelegate.swift @@ -111,21 +111,25 @@ extension NCShareExtension: NCCreateFormUploadConflictDelegate { } extension NCShareExtension: NCShareCellDelegate { - func renameFile(named fileName: String, account: String) { + func showRenameFileDialog(named fileName: String, account: String) { let alert = UIAlertController.renameFile(fileName: fileName, account: account) { [self] newFileName in - guard let fileIx = self.filesName.firstIndex(of: fileName), - !self.filesName.contains(newFileName), - utilityFileSystem.moveFile(atPath: (NSTemporaryDirectory() + fileName), toPath: (NSTemporaryDirectory() + newFileName)) else { - return showAlert(title: "_single_file_conflict_title_", description: "'\(fileName)' -> '\(newFileName)'") - } - - filesName[fileIx] = newFileName - tableView.reloadData() + renameFile(oldName: fileName, newName: newFileName, account: account) } present(alert, animated: true) } + func renameFile(oldName: String, newName: String, account: String) { + guard let fileIx = self.filesName.firstIndex(of: oldName), + !self.filesName.contains(newName), + utilityFileSystem.moveFile(atPath: (NSTemporaryDirectory() + oldName), toPath: (NSTemporaryDirectory() + newName)) else { + return showAlert(title: "_single_file_conflict_title_", description: "'\(oldName)' -> '\(newName)'") + } + + filesName[fileIx] = newName + tableView.reloadData() + } + func removeFile(named fileName: String) { guard let index = self.filesName.firstIndex(of: fileName) else { return showAlert(title: "_file_not_found_", description: fileName) diff --git a/Share/NCShareExtension.swift b/Share/NCShareExtension.swift index 05ac2e6bb2..a767d97a13 100644 --- a/Share/NCShareExtension.swift +++ b/Share/NCShareExtension.swift @@ -285,17 +285,41 @@ extension NCShareExtension { guard !filesName.isEmpty else { return showAlert(description: "_files_no_files_") } counterUploaded = 0 - uploadStarted = true uploadErrors = [] + var dismissAfterUpload = true var conflicts: [tableMetadata] = [] - for fileName in filesName { - if let fileNameError = FileNameValidator.shared.checkFileName(fileName, account: session.account) { - present(UIAlertController.warning(message: "\(fileNameError.errorDescription) \(NSLocalizedString("_please_rename_file_", comment: ""))"), animated: true) + var invalidNameIndexes: [Int] = [] + + for (index, fileName) in filesName.enumerated() { + let newFileName = FileAutoRenamer.shared.rename(fileName, account: session.account) + + if fileName != newFileName { + renameFile(oldName: fileName, newName: newFileName, account: session.account) + } + + if let fileNameError = FileNameValidator.shared.checkFileName(newFileName, account: session.account) { + if filesName.count == 1 { + showRenameFileDialog(named: fileName, account: account) + return + } else { + present(UIAlertController.warning(message: "\(fileNameError.errorDescription) \(NSLocalizedString("_please_rename_file_", comment: ""))") { + self.extensionContext?.completeRequest(returningItems: self.extensionContext?.inputItems, completionHandler: nil) + }, animated: true) + + invalidNameIndexes.append(index) + dismissAfterUpload = false + continue + } - continue } + } + + for index in invalidNameIndexes.reversed() { + filesName.remove(at: index) + } + for fileName in filesName { let ocId = NSUUID().uuidString let toPath = utilityFileSystem.getDirectoryProviderStorageOcId(ocId, fileNameView: fileName) guard utilityFileSystem.copyFile(atPath: (NSTemporaryDirectory() + fileName), toPath: toPath) else { continue } @@ -320,6 +344,8 @@ extension NCShareExtension { } } + tableView.reloadData() + if !conflicts.isEmpty { guard let conflict = UIStoryboard(name: "NCCreateFormUploadConflict", bundle: nil).instantiateInitialViewController() as? NCCreateFormUploadConflict else { return } @@ -330,13 +356,14 @@ extension NCShareExtension { conflict.delegate = self self.present(conflict, animated: true, completion: nil) } else { - upload() + uploadStarted = true + upload(dismissAfterUpload: dismissAfterUpload) } } - func upload() { + func upload(dismissAfterUpload: Bool = true) { guard uploadStarted else { return } - guard uploadMetadata.count > counterUploaded else { return DispatchQueue.main.async { self.finishedUploading() } } + guard uploadMetadata.count > counterUploaded else { return DispatchQueue.main.async { self.finishedUploading(dismissAfterUpload: dismissAfterUpload) } } let metadata = uploadMetadata[counterUploaded] let results = NextcloudKit.shared.nkCommonInstance.getInternalType(fileName: metadata.fileNameView, mimeType: metadata.contentType, directory: false, account: session.account) @@ -374,7 +401,7 @@ extension NCShareExtension { } } - func finishedUploading() { + func finishedUploading(dismissAfterUpload: Bool = true) { uploadStarted = false if !uploadErrors.isEmpty { let fileList = "- " + uploadErrors.map({ $0.fileName }).joined(separator: "\n - ") diff --git a/iOSClient/Data/NCManageDatabase+Metadata.swift b/iOSClient/Data/NCManageDatabase+Metadata.swift index 3daeabbf47..bda2165a99 100644 --- a/iOSClient/Data/NCManageDatabase+Metadata.swift +++ b/iOSClient/Data/NCManageDatabase+Metadata.swift @@ -253,6 +253,10 @@ extension tableMetadata { status == NCGlobal.shared.metadataStatusWaitUpload || status == NCGlobal.shared.metadataStatusUploading } + var isDirectory: Bool { + directory + } + @objc var isDirectoryE2EE: Bool { let session = NCSession.Session(account: account, urlBase: urlBase, user: user, userId: userId) return NCUtilityFileSystem().isDirectoryE2EE(session: session, serverUrl: serverUrl) diff --git a/iOSClient/Extensions/UIAlertController+Extension.swift b/iOSClient/Extensions/UIAlertController+Extension.swift index d6b7efd5c1..a8841023fa 100644 --- a/iOSClient/Extensions/UIAlertController+Extension.swift +++ b/iOSClient/Extensions/UIAlertController+Extension.swift @@ -39,6 +39,9 @@ extension UIAlertController { let okAction = UIAlertAction(title: NSLocalizedString("_save_", comment: ""), style: .default, handler: { _ in guard let fileNameFolder = alertController.textFields?.first?.text else { return } if markE2ee { + if NCNetworking.shared.isOffline { + return NCContentPresenter().showInfo(error: NKError(errorCode: NCGlobal.shared.errorInternalError, errorDescription: "_offline_not_allowed_")) + } Task { let createFolderResults = await NCNetworking.shared.createFolder(serverUrlFileName: serverUrl + "/" + fileNameFolder, account: session.account) if createFolderResults.error == .success { @@ -51,17 +54,28 @@ extension UIAlertController { } } } else if isDirectoryEncrypted { + if NCNetworking.shared.isOffline { + return NCContentPresenter().showInfo(error: NKError(errorCode: NCGlobal.shared.errorInternalError, errorDescription: "_offline_not_allowed_")) + } + #if !EXTENSION Task { await NCNetworkingE2EECreateFolder().createFolder(fileName: fileNameFolder, serverUrl: serverUrl, withPush: true, sceneIdentifier: sceneIdentifier, session: session) } + #endif } else { - NCNetworking.shared.createFolder(fileName: fileNameFolder, serverUrl: serverUrl, overwrite: false, withPush: true, sceneIdentifier: sceneIdentifier, session: session) { error in - if let completion = completion { - DispatchQueue.main.async { completion(error) } - } else if error != .success { - NCContentPresenter().showError(error: error) - } // else: successful, no action - } + let metadataForCreateFolder = NCManageDatabase.shared.createMetadata(fileName: fileNameFolder, + fileNameView: fileNameFolder, + ocId: NSUUID().uuidString, + serverUrl: serverUrl, + url: "", + contentType: "httpd/unix-directory", + directory: true, + session: session, + sceneIdentifier: sceneIdentifier) + metadataForCreateFolder.status = NCGlobal.shared.metadataStatusWaitCreateFolder + metadataForCreateFolder.sessionDate = Date() + NCManageDatabase.shared.addMetadata(metadataForCreateFolder) + NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterCreateFolder, userInfo: ["ocId": metadataForCreateFolder.ocId, "serverUrl": metadataForCreateFolder.serverUrl, "account": metadataForCreateFolder.account, "withPush": true, "sceneIdentifier": sceneIdentifier as Any]) } }) @@ -81,9 +95,28 @@ extension UIAlertController { guard let text = alertController.textFields?.first?.text else { return } let folderName = text.trimmingCharacters(in: .whitespaces) + let newExtension = text.fileExtension + let isFileHidden = FileNameValidator.shared.isFileHidden(text) let textCheck = FileNameValidator.shared.checkFileName(folderName, account: session.account) - okAction.isEnabled = textCheck?.error == nil && !folderName.isEmpty - alertController.message = textCheck?.error.localizedDescription + + okAction.isEnabled = !text.isEmpty && textCheck?.error == nil + + var message = "" + var messageColor = UIColor.label + + if let errorMessage = textCheck?.error.localizedDescription { + message = errorMessage + messageColor = .red + } else if isFileHidden { + message = NSLocalizedString("hidden_file_name_warning", comment: "") + } + + let attributedString = NSAttributedString(string: message, attributes: [ + NSAttributedString.Key.font: UIFont.systemFont(ofSize: 14), + NSAttributedString.Key.foregroundColor: messageColor + ]) + + alertController.setValue(attributedString, forKey: "attributedMessage") } alertController.addAction(cancelAction) @@ -146,8 +179,8 @@ extension UIAlertController { return alertController } - static func renameFile(fileName: String, account: String, completion: @escaping (_ newFileName: String) -> Void) -> UIAlertController { - let alertController = UIAlertController(title: NSLocalizedString("_rename_", comment: ""), message: nil, preferredStyle: .alert) + static func renameFile(fileName: String, isDirectory: Bool = false, account: String, completion: @escaping (_ newFileName: String) -> Void) -> UIAlertController { + let alertController = UIAlertController(title: NSLocalizedString(isDirectory ? "_rename_folder_" : "_rename_file_", comment: ""), message: nil, preferredStyle: .alert) let okAction = UIAlertAction(title: NSLocalizedString("_save_", comment: ""), style: .default, handler: { _ in guard let newFileName = alertController.textFields?.first?.text else { return } @@ -164,6 +197,19 @@ extension UIAlertController { textField.autocapitalizationType = .words } + let oldExtension = fileName.fileExtension + + let text = alertController.textFields?.first?.text ?? "" + let textCheck = FileNameValidator.shared.checkFileName(text, account: account) + var message = textCheck?.error.localizedDescription ?? "" + var messageColor = UIColor.red + + let attributedString = NSAttributedString(string: message, attributes: [ + NSAttributedString.Key.font: UIFont.systemFont(ofSize: 14), + NSAttributedString.Key.foregroundColor: messageColor + ]) + alertController.setValue(attributedString, forKey: "attributedMessage") + // only allow saving if folder name exists NotificationCenter.default.addObserver( forName: UITextField.textDidBeginEditingNotification, @@ -182,10 +228,31 @@ extension UIAlertController { object: alertController.textFields?.first, queue: .main) { _ in guard let text = alertController.textFields?.first?.text else { return } + let newExtension = text.fileExtension let textCheck = FileNameValidator.shared.checkFileName(text, account: account) - okAction.isEnabled = textCheck?.error == nil && !text.isEmpty - alertController.message = textCheck?.error.localizedDescription + let isFileHidden = FileNameValidator.shared.isFileHidden(text) + + okAction.isEnabled = !text.isEmpty && textCheck?.error == nil + + message = "" + messageColor = UIColor.label + + if let errorMessage = textCheck?.error.localizedDescription { + message = errorMessage + messageColor = .red + } else if isFileHidden { + message = NSLocalizedString("hidden_file_name_warning", comment: "") + } else if newExtension != oldExtension { + message = NSLocalizedString("_file_name_new_extension_", comment: "") + } + + + let attributedString = NSAttributedString(string: message, attributes: [ + NSAttributedString.Key.font: UIFont.systemFont(ofSize: 14), + NSAttributedString.Key.foregroundColor: messageColor + ]) + alertController.setValue(attributedString, forKey: "attributedMessage") } alertController.addAction(cancelAction) @@ -193,12 +260,8 @@ extension UIAlertController { return alertController } - static func renameFile(metadata: tableMetadata) -> UIAlertController { - let alertController = UIAlertController(title: NSLocalizedString("_rename_", comment: ""), message: nil, preferredStyle: .alert) - - let okAction = UIAlertAction(title: NSLocalizedString("_save_", comment: ""), style: .default, handler: { _ in - guard let fileNameNew = alertController.textFields?.first?.text else { return } - + static func renameFile(metadata: tableMetadata, completion: @escaping (_ newFileName: String) -> Void = { _ in }) -> UIAlertController { + renameFile(fileName: metadata.fileNameView, isDirectory: metadata.isDirectory, account: metadata.account) { fileNameNew in // verify if already exists if NCManageDatabase.shared.getMetadata(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@ AND fileName == %@", metadata.account, metadata.serverUrl, fileNameNew)) != nil { NCContentPresenter().showError(error: NKError(errorCode: 0, errorDescription: "_rename_already_exists_")) @@ -208,50 +271,15 @@ extension UIAlertController { NCNetworking.shared.renameMetadata(metadata, fileNameNew: fileNameNew) NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterReloadDataSource, userInfo: ["serverUrl": metadata.serverUrl]) - }) - - // text field is initially empty, no action - okAction.isEnabled = false - let cancelAction = UIAlertAction(title: NSLocalizedString("_cancel_", comment: ""), style: .cancel) - alertController.addTextField { textField in - textField.text = metadata.fileNameView - textField.autocapitalizationType = .words + completion(fileNameNew) } - - // only allow saving if folder name exists - NotificationCenter.default.addObserver( - forName: UITextField.textDidBeginEditingNotification, - object: alertController.textFields?.first, - queue: .main) { _ in - guard let textField = alertController.textFields?.first else { return } - - if let start = textField.position(from: textField.beginningOfDocument, offset: 0), - let end = textField.position(from: start, offset: textField.text?.withRemovedFileExtension.count ?? 0) { - textField.selectedTextRange = textField.textRange(from: start, to: end) - } - } - - NotificationCenter.default.addObserver( - forName: UITextField.textDidChangeNotification, - object: alertController.textFields?.first, - queue: .main) { _ in - guard let text = alertController.textFields?.first?.text else { return } - - let textCheck = FileNameValidator.shared.checkFileName(text, account: NCManageDatabase.shared.getActiveTableAccount()?.account) - okAction.isEnabled = textCheck?.error == nil && !text.isEmpty - alertController.message = textCheck?.error.localizedDescription - } - - alertController.addAction(cancelAction) - alertController.addAction(okAction) - return alertController } - static func warning(title: String? = nil, message: String? = nil) -> UIAlertController { + static func warning(title: String? = nil, message: String? = nil, completion: @escaping () -> Void = {}) -> UIAlertController { let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) - let okAction = UIAlertAction(title: NSLocalizedString("_ok_", comment: ""), style: .default) + let okAction = UIAlertAction(title: NSLocalizedString("_ok_", comment: ""), style: .default) { _ in completion() } alertController.addAction(okAction) diff --git a/iOSClient/Main/Collection Common/NCCollectionViewCommon+MediaLayout.swift b/iOSClient/Main/Collection Common/NCCollectionViewCommon+MediaLayout.swift index ac95c0893e..c45bf1ba11 100644 --- a/iOSClient/Main/Collection Common/NCCollectionViewCommon+MediaLayout.swift +++ b/iOSClient/Main/Collection Common/NCCollectionViewCommon+MediaLayout.swift @@ -74,9 +74,14 @@ extension NCCollectionViewCommon: NCMediaLayoutDelegate { if metadata.imageSize != CGSize.zero { return metadata.imageSize - } else { - return CGSize(width: collectionView.frame.width / CGFloat(columnCount), height: collectionView.frame.width / CGFloat(columnCount)) + } else if metadata.classFile == NKCommon.TypeClassFile.document.rawValue { + let ext = NCGlobal.shared.getSizeExtension(column: self.numberOfColumns) + if let image = self.utility.getImage(ocId: metadata.ocId, etag: metadata.etag, ext: ext) { + return image.size + } } + + return CGSize(width: collectionView.frame.width / CGFloat(columnCount), height: collectionView.frame.width / CGFloat(columnCount)) } } } diff --git a/iOSClient/Main/Collection Common/NCCollectionViewCommon+SelectTabBar.swift b/iOSClient/Main/Collection Common/NCCollectionViewCommon+SelectTabBar.swift index 019c3ce4fc..d08f494692 100644 --- a/iOSClient/Main/Collection Common/NCCollectionViewCommon+SelectTabBar.swift +++ b/iOSClient/Main/Collection Common/NCCollectionViewCommon+SelectTabBar.swift @@ -33,7 +33,7 @@ extension NCCollectionViewCommon: NCCollectionViewCommonSelectTabBarDelegate { fileSelect = self.dataSource.getMetadatas().compactMap({ $0.ocId }) } tabBarSelect.update(fileSelect: fileSelect, metadatas: getSelectedMetadatas(), userId: session.userId) - self.reloadDataSource() + self.collectionView.reloadData() } func delete() { @@ -135,6 +135,6 @@ extension NCCollectionViewCommon: NCCollectionViewCommonSelectTabBarDelegate { navigationController?.interactivePopGestureRecognizer?.isEnabled = !editMode navigationItem.hidesBackButton = editMode searchController(enabled: !editMode) - self.reloadDataSource() + self.collectionView.reloadData() } } diff --git a/iOSClient/Main/NCDragDrop.swift b/iOSClient/Main/NCDragDrop.swift index 65e0c0e229..16cb5263ff 100644 --- a/iOSClient/Main/NCDragDrop.swift +++ b/iOSClient/Main/NCDragDrop.swift @@ -88,6 +88,30 @@ class NCDragDrop: NSObject { } } + var invalidNameIndexes: [Int] = [] + let session = NCSession.shared.getSession(controller: controller) + + for (index, metadata) in metadatas.enumerated() { + if let fileNameError = FileNameValidator.shared.checkFileName(metadata.fileName, account: session.account) { + if metadatas.count == 1 { + let alert = UIAlertController.renameFile(metadata: metadata) { newFileName in + metadatas[index].fileName = newFileName + metadatas[index].fileNameView = newFileName + } + + controller?.present(alert, animated: true) + return nil + } else { + controller?.present(UIAlertController.warning(message: "\(fileNameError.errorDescription) \(NSLocalizedString("_please_rename_file_", comment: ""))"), animated: true) + invalidNameIndexes.append(index) + } + } + } + + for index in invalidNameIndexes.reversed() { + metadatas.remove(at: index) + } + if metadatas.isEmpty { return nil } else { @@ -101,8 +125,15 @@ class NCDragDrop: NSObject { Task { let ocId = NSUUID().uuidString let session = NCSession.shared.getSession(controller: controller) - let fileName = await NCNetworking.shared.createFileName(fileNameBase: url.lastPathComponent, account: session.account, serverUrl: serverUrl) - let fileNamePath = utilityFileSystem.getDirectoryProviderStorageOcId(ocId, fileNameView: fileName) + let newFileName = FileAutoRenamer.shared.rename(url.lastPathComponent, account: session.account) + let fileNamePath = utilityFileSystem.getDirectoryProviderStorageOcId(ocId, fileNameView: newFileName) + + if let fileNameError = FileNameValidator.shared.checkFileName(newFileName, account: session.account) { + await controller?.present(UIAlertController.warning(message: "\(fileNameError.errorDescription) \(NSLocalizedString("_please_rename_file_", comment: ""))"), animated: true) + return + } + + let fileName = await NCNetworking.shared.createFileName(fileNameBase: newFileName, account: session.account, serverUrl: serverUrl) try data.write(to: URL(fileURLWithPath: fileNamePath)) diff --git a/iOSClient/Main/NCPickerViewController.swift b/iOSClient/Main/NCPickerViewController.swift index 8c413db174..42f806ab28 100644 --- a/iOSClient/Main/NCPickerViewController.swift +++ b/iOSClient/Main/NCPickerViewController.swift @@ -135,9 +135,9 @@ class NCDocumentPickerViewController: NSObject, UIDocumentPickerDelegate { func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) { let session = NCSession.shared.getSession(controller: self.controller) if isViewerMedia, - let urlIn = urls.first, - let url = self.copySecurityScopedResource(url: urlIn, urlOut: FileManager.default.temporaryDirectory.appendingPathComponent(urlIn.lastPathComponent)), - let viewController = self.viewController { + let urlIn = urls.first, + let url = self.copySecurityScopedResource(url: urlIn, urlOut: FileManager.default.temporaryDirectory.appendingPathComponent(urlIn.lastPathComponent)), + let viewController = self.viewController { let ocId = NSUUID().uuidString let fileName = url.lastPathComponent let metadata = database.createMetadata(fileName: fileName, @@ -154,7 +154,7 @@ class NCDocumentPickerViewController: NSObject, UIDocumentPickerDelegate { } if let fileNameError = FileNameValidator.shared.checkFileName(metadata.fileNameView, account: self.controller.account) { - controller.present(UIAlertController.warning(message: "\(fileNameError.errorDescription) \(NSLocalizedString("_please_rename_file_", comment: ""))"), animated: true) + self.controller.present(UIAlertController.warning(message: "\(fileNameError.errorDescription) \(NSLocalizedString("_please_rename_file_", comment: ""))"), animated: true) } else { database.addMetadata(metadata) NCViewer().view(viewController: viewController, metadata: metadata) @@ -167,15 +167,16 @@ class NCDocumentPickerViewController: NSObject, UIDocumentPickerDelegate { for urlIn in urls { let ocId = NSUUID().uuidString - let fileName = urlIn.lastPathComponent - let toPath = utilityFileSystem.getDirectoryProviderStorageOcId(ocId, fileNameView: fileName) + let newFileName = FileAutoRenamer.shared.rename(fileName, account: session.account) + + let toPath = utilityFileSystem.getDirectoryProviderStorageOcId(ocId, fileNameView: newFileName) let urlOut = URL(fileURLWithPath: toPath) guard self.copySecurityScopedResource(url: urlIn, urlOut: urlOut) != nil else { continue } - let metadataForUpload = database.createMetadata(fileName: fileName, - fileNameView: fileName, + let metadataForUpload = database.createMetadata(fileName: newFileName, + fileNameView: newFileName, ocId: ocId, serverUrl: serverUrl, url: "", @@ -183,11 +184,6 @@ class NCDocumentPickerViewController: NSObject, UIDocumentPickerDelegate { session: session, sceneIdentifier: self.controller.sceneIdentifier) - if let fileNameError = FileNameValidator.shared.checkFileName(metadataForUpload.fileNameView, account: self.controller.account) { - controller.present(UIAlertController.warning(message: "\(fileNameError.errorDescription) \(NSLocalizedString("_please_rename_file_", comment: ""))"), animated: true) - continue - } - metadataForUpload.session = NCNetworking.shared.sessionUploadBackground metadataForUpload.sessionSelector = NCGlobal.shared.selectorUploadFile metadataForUpload.size = utilityFileSystem.getFileSize(filePath: toPath) @@ -201,6 +197,31 @@ class NCDocumentPickerViewController: NSObject, UIDocumentPickerDelegate { } } + var invalidNameIndexes: [Int] = [] + + for (index, metadata) in metadatas.enumerated() { + if let fileNameError = FileNameValidator.shared.checkFileName(metadata.fileName, account: session.account) { + if metadatas.count == 1 { + let alert = UIAlertController.renameFile(fileName: metadata.fileName, account: session.account) { newFileName in + metadatas[index].fileName = newFileName + metadatas[index].fileNameView = newFileName + + NCNetworkingProcess.shared.createProcessUploads(metadatas: metadatas) + } + + self.controller.present(alert, animated: true) + return + } else { + self.controller.present(UIAlertController.warning(message: "\(fileNameError.errorDescription) \(NSLocalizedString("_please_rename_file_", comment: ""))"), animated: true) + invalidNameIndexes.append(index) + } + } + } + + for index in invalidNameIndexes.reversed() { + metadatas.remove(at: index) + } + NCNetworkingProcess.shared.createProcessUploads(metadatas: metadatas) if !metadatasInConflict.isEmpty { diff --git a/iOSClient/NCGlobal.swift b/iOSClient/NCGlobal.swift index 67e1a3474e..ab0f5beff8 100644 --- a/iOSClient/NCGlobal.swift +++ b/iOSClient/NCGlobal.swift @@ -281,6 +281,7 @@ class NCGlobal: NSObject { let metadataStatusInTransfer = [-1, -2, 1, 2] let metadataStatusFileDown = [-1, -2, -3] let metadataStatusHideInView = [1, 2, 3, 11] + let metadataStatusHideInFileExtension = [1, 2, 3, 10, 11] let metadataStatusObserve = [-1, 1, 10, 11, 12, 13, 14, 15] let metadataStatusWaitWebDav = [10, 11, 12, 13, 14, 15] diff --git a/iOSClient/Scan document/NCUploadScanDocument.swift b/iOSClient/Scan document/NCUploadScanDocument.swift index 8ca8d9fa72..450d1e53a1 100644 --- a/iOSClient/Scan document/NCUploadScanDocument.swift +++ b/iOSClient/Scan document/NCUploadScanDocument.swift @@ -382,7 +382,6 @@ struct UploadScanDocumentView: View { footer = fileNameError.errorDescription } else { footer = "" - } } } diff --git a/iOSClient/Supporting Files/af.lproj/Localizable.strings b/iOSClient/Supporting Files/af.lproj/Localizable.strings index 147b45a457..0b6fcd22dc 100644 Binary files a/iOSClient/Supporting Files/af.lproj/Localizable.strings and b/iOSClient/Supporting Files/af.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/an.lproj/Localizable.strings b/iOSClient/Supporting Files/an.lproj/Localizable.strings index a2332e26f3..eedbce6983 100644 Binary files a/iOSClient/Supporting Files/an.lproj/Localizable.strings and b/iOSClient/Supporting Files/an.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ar.lproj/Localizable.strings b/iOSClient/Supporting Files/ar.lproj/Localizable.strings index 0928c85ad1..1e355dbefe 100644 Binary files a/iOSClient/Supporting Files/ar.lproj/Localizable.strings and b/iOSClient/Supporting Files/ar.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ast.lproj/Localizable.strings b/iOSClient/Supporting Files/ast.lproj/Localizable.strings index 1e70f63612..bb504b44e5 100644 Binary files a/iOSClient/Supporting Files/ast.lproj/Localizable.strings and b/iOSClient/Supporting Files/ast.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/az.lproj/Localizable.strings b/iOSClient/Supporting Files/az.lproj/Localizable.strings index 48d8e55938..b1fd764de3 100644 Binary files a/iOSClient/Supporting Files/az.lproj/Localizable.strings and b/iOSClient/Supporting Files/az.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/be.lproj/Localizable.strings b/iOSClient/Supporting Files/be.lproj/Localizable.strings index 2239e6a719..b5f1743694 100644 Binary files a/iOSClient/Supporting Files/be.lproj/Localizable.strings and b/iOSClient/Supporting Files/be.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings b/iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings index 926d182ada..f9ebaae2d3 100644 Binary files a/iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings and b/iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings b/iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings index ea4f86d284..2d142b085c 100644 Binary files a/iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings and b/iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/br.lproj/Localizable.strings b/iOSClient/Supporting Files/br.lproj/Localizable.strings index e6b3ee1520..fc2a85fe81 100644 Binary files a/iOSClient/Supporting Files/br.lproj/Localizable.strings and b/iOSClient/Supporting Files/br.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/bs.lproj/Localizable.strings b/iOSClient/Supporting Files/bs.lproj/Localizable.strings index 2514445d4c..f562aed1e8 100644 Binary files a/iOSClient/Supporting Files/bs.lproj/Localizable.strings and b/iOSClient/Supporting Files/bs.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ca.lproj/Localizable.strings b/iOSClient/Supporting Files/ca.lproj/Localizable.strings index d65366793b..0103e0060f 100644 Binary files a/iOSClient/Supporting Files/ca.lproj/Localizable.strings and b/iOSClient/Supporting Files/ca.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings b/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings index 507a106340..e7d9dbe321 100644 Binary files a/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings and b/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings b/iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings index 8ba84887d8..0d3142f539 100644 Binary files a/iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings and b/iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/da.lproj/Localizable.strings b/iOSClient/Supporting Files/da.lproj/Localizable.strings index 4bc841d4b8..14e56db3dd 100644 Binary files a/iOSClient/Supporting Files/da.lproj/Localizable.strings and b/iOSClient/Supporting Files/da.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/de.lproj/Localizable.strings b/iOSClient/Supporting Files/de.lproj/Localizable.strings index 4872099d80..9f4ff2f219 100644 Binary files a/iOSClient/Supporting Files/de.lproj/Localizable.strings and b/iOSClient/Supporting Files/de.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/el.lproj/Localizable.strings b/iOSClient/Supporting Files/el.lproj/Localizable.strings index 1375b5917d..351b6b200b 100644 Binary files a/iOSClient/Supporting Files/el.lproj/Localizable.strings and b/iOSClient/Supporting Files/el.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings b/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings index 0ae7ecd682..9801a363f3 100644 Binary files a/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings and b/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/en.lproj/Localizable.strings b/iOSClient/Supporting Files/en.lproj/Localizable.strings index 3a2a9014e7..93796e43e0 100644 --- a/iOSClient/Supporting Files/en.lproj/Localizable.strings +++ b/iOSClient/Supporting Files/en.lproj/Localizable.strings @@ -1123,4 +1123,6 @@ "_file_name_validator_error_forbidden_file_extension_" = "\".%@\" is a forbidden file extension."; "_file_name_validator_error_invalid_character_" = "Name contains an invalid character: \"%@\"."; "_file_name_validator_error_space_" = "Name must not contain spaces at the beginning or end."; -"_please_rename_file_" = "Please rename the file or folder."; +"_file_name_new_extension_" = "Changing the extension might cause this file to open in a different application."; +"_please_rename_file_" = "Please rename the file or folder."; +"hidden_file_name_warning" = "Name will result in a hidden file."; diff --git a/iOSClient/Supporting Files/eo.lproj/Localizable.strings b/iOSClient/Supporting Files/eo.lproj/Localizable.strings index 9377dfcd5a..657404da85 100644 Binary files a/iOSClient/Supporting Files/eo.lproj/Localizable.strings and b/iOSClient/Supporting Files/eo.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-419.lproj/Localizable.strings b/iOSClient/Supporting Files/es-419.lproj/Localizable.strings index a6af023e8e..6e557657ec 100644 Binary files a/iOSClient/Supporting Files/es-419.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-419.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings b/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings index 578ec094a9..930bf97d30 100644 Binary files a/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings b/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings index a2da31f1ee..1275e0694d 100644 Binary files a/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings b/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings index bd510611db..8f1c81e944 100644 Binary files a/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings b/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings index fb08b39936..12acda45d1 100644 Binary files a/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings b/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings index 30a67790a9..6298db4119 100644 Binary files a/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings b/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings index 178405e621..dfdbeea8a6 100644 Binary files a/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings b/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings index 1d2aa1bf23..b455c4ce18 100644 Binary files a/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings b/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings index a36a234d36..acc7eb2d89 100644 Binary files a/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings b/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings index a7558c4641..1abbdb5776 100644 Binary files a/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings b/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings index 147bcb0e5d..2e7104be24 100644 Binary files a/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings index 4afdca086e..c57dd0d5b5 100644 Binary files a/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings index bca66c5962..8a5b3fa9a2 100644 Binary files a/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings index 6fc6b9173d..da5ea06e79 100644 Binary files a/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings index a6a333bfba..bad6d8fd92 100644 Binary files a/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings b/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings index 1355244a55..51fd913ccf 100644 Binary files a/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings b/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings index 01d363cb81..12cb8ecdda 100644 Binary files a/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es.lproj/Localizable.strings b/iOSClient/Supporting Files/es.lproj/Localizable.strings index 31eef28fbd..72bcdce5e8 100644 Binary files a/iOSClient/Supporting Files/es.lproj/Localizable.strings and b/iOSClient/Supporting Files/es.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/et_EE.lproj/Localizable.strings b/iOSClient/Supporting Files/et_EE.lproj/Localizable.strings index 39a7efeffd..fb14b16572 100644 Binary files a/iOSClient/Supporting Files/et_EE.lproj/Localizable.strings and b/iOSClient/Supporting Files/et_EE.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/eu.lproj/Localizable.strings b/iOSClient/Supporting Files/eu.lproj/Localizable.strings index 3b7d6f81a0..8ec62917e8 100644 Binary files a/iOSClient/Supporting Files/eu.lproj/Localizable.strings and b/iOSClient/Supporting Files/eu.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/fa.lproj/Localizable.strings b/iOSClient/Supporting Files/fa.lproj/Localizable.strings index 6b9aae2b08..05d33fb6a0 100644 Binary files a/iOSClient/Supporting Files/fa.lproj/Localizable.strings and b/iOSClient/Supporting Files/fa.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings b/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings index fd5d3499af..e747cbd49c 100644 Binary files a/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings and b/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/fo.lproj/Localizable.strings b/iOSClient/Supporting Files/fo.lproj/Localizable.strings index 72413d0ba7..6a9f58f87f 100644 Binary files a/iOSClient/Supporting Files/fo.lproj/Localizable.strings and b/iOSClient/Supporting Files/fo.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/fr.lproj/Localizable.strings b/iOSClient/Supporting Files/fr.lproj/Localizable.strings index cd6d6f6350..a33266810e 100644 Binary files a/iOSClient/Supporting Files/fr.lproj/Localizable.strings and b/iOSClient/Supporting Files/fr.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ga.lproj/Localizable.strings b/iOSClient/Supporting Files/ga.lproj/Localizable.strings index 33a7974d56..47745b13a6 100644 Binary files a/iOSClient/Supporting Files/ga.lproj/Localizable.strings and b/iOSClient/Supporting Files/ga.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/gd.lproj/Localizable.strings b/iOSClient/Supporting Files/gd.lproj/Localizable.strings index fdeb6d11a5..ca11b90f40 100644 Binary files a/iOSClient/Supporting Files/gd.lproj/Localizable.strings and b/iOSClient/Supporting Files/gd.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/gl.lproj/Localizable.strings b/iOSClient/Supporting Files/gl.lproj/Localizable.strings index 153b488785..49fa12bef3 100644 Binary files a/iOSClient/Supporting Files/gl.lproj/Localizable.strings and b/iOSClient/Supporting Files/gl.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/he.lproj/Localizable.strings b/iOSClient/Supporting Files/he.lproj/Localizable.strings index cdd3168a1c..a5299003b2 100644 Binary files a/iOSClient/Supporting Files/he.lproj/Localizable.strings and b/iOSClient/Supporting Files/he.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/hi_IN.lproj/Localizable.strings b/iOSClient/Supporting Files/hi_IN.lproj/Localizable.strings index ac4dbaf021..28d37dd0d6 100644 Binary files a/iOSClient/Supporting Files/hi_IN.lproj/Localizable.strings and b/iOSClient/Supporting Files/hi_IN.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/hr.lproj/Localizable.strings b/iOSClient/Supporting Files/hr.lproj/Localizable.strings index f66c339b7a..95bf5c462d 100644 Binary files a/iOSClient/Supporting Files/hr.lproj/Localizable.strings and b/iOSClient/Supporting Files/hr.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/hsb.lproj/Localizable.strings b/iOSClient/Supporting Files/hsb.lproj/Localizable.strings index 44f1ae7083..fbf2a7ac72 100644 Binary files a/iOSClient/Supporting Files/hsb.lproj/Localizable.strings and b/iOSClient/Supporting Files/hsb.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/hu.lproj/Localizable.strings b/iOSClient/Supporting Files/hu.lproj/Localizable.strings index d6c07ab8f2..838092469a 100644 Binary files a/iOSClient/Supporting Files/hu.lproj/Localizable.strings and b/iOSClient/Supporting Files/hu.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/hy.lproj/Localizable.strings b/iOSClient/Supporting Files/hy.lproj/Localizable.strings index b2811b1bee..d1891290ab 100644 Binary files a/iOSClient/Supporting Files/hy.lproj/Localizable.strings and b/iOSClient/Supporting Files/hy.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ia.lproj/Localizable.strings b/iOSClient/Supporting Files/ia.lproj/Localizable.strings index a734f9217a..ffd75e71dd 100644 Binary files a/iOSClient/Supporting Files/ia.lproj/Localizable.strings and b/iOSClient/Supporting Files/ia.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/id.lproj/Localizable.strings b/iOSClient/Supporting Files/id.lproj/Localizable.strings index b390f881e8..7697e8917e 100644 Binary files a/iOSClient/Supporting Files/id.lproj/Localizable.strings and b/iOSClient/Supporting Files/id.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ig.lproj/Localizable.strings b/iOSClient/Supporting Files/ig.lproj/Localizable.strings index fc6a18670a..fa743d2234 100644 Binary files a/iOSClient/Supporting Files/ig.lproj/Localizable.strings and b/iOSClient/Supporting Files/ig.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/is.lproj/Localizable.strings b/iOSClient/Supporting Files/is.lproj/Localizable.strings index 0a6ed8079f..0e5aebe7e1 100644 Binary files a/iOSClient/Supporting Files/is.lproj/Localizable.strings and b/iOSClient/Supporting Files/is.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/it.lproj/Localizable.strings b/iOSClient/Supporting Files/it.lproj/Localizable.strings index f89e9fdeb3..93a3f4f350 100644 Binary files a/iOSClient/Supporting Files/it.lproj/Localizable.strings and b/iOSClient/Supporting Files/it.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings b/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings index ae9814e375..799a2e7926 100644 Binary files a/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings and b/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings b/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings index 0314075cab..ee17a1643f 100644 Binary files a/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings and b/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ka.lproj/Localizable.strings b/iOSClient/Supporting Files/ka.lproj/Localizable.strings index fabc368b7c..a9c34e2df0 100644 Binary files a/iOSClient/Supporting Files/ka.lproj/Localizable.strings and b/iOSClient/Supporting Files/ka.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/kab.lproj/Localizable.strings b/iOSClient/Supporting Files/kab.lproj/Localizable.strings index 83eea6b796..20bd753e08 100644 Binary files a/iOSClient/Supporting Files/kab.lproj/Localizable.strings and b/iOSClient/Supporting Files/kab.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/km.lproj/Localizable.strings b/iOSClient/Supporting Files/km.lproj/Localizable.strings index a39006ba8a..fb5bb867c8 100644 Binary files a/iOSClient/Supporting Files/km.lproj/Localizable.strings and b/iOSClient/Supporting Files/km.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/kn.lproj/Localizable.strings b/iOSClient/Supporting Files/kn.lproj/Localizable.strings index 2512a21a3e..bd6c1d57d7 100644 Binary files a/iOSClient/Supporting Files/kn.lproj/Localizable.strings and b/iOSClient/Supporting Files/kn.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ko.lproj/Localizable.strings b/iOSClient/Supporting Files/ko.lproj/Localizable.strings index c29ff67c8c..48050a97e8 100644 Binary files a/iOSClient/Supporting Files/ko.lproj/Localizable.strings and b/iOSClient/Supporting Files/ko.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/la.lproj/Localizable.strings b/iOSClient/Supporting Files/la.lproj/Localizable.strings index e4b1b24a00..cda698459d 100644 Binary files a/iOSClient/Supporting Files/la.lproj/Localizable.strings and b/iOSClient/Supporting Files/la.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/lb.lproj/Localizable.strings b/iOSClient/Supporting Files/lb.lproj/Localizable.strings index d4d01da2b6..9731595159 100644 Binary files a/iOSClient/Supporting Files/lb.lproj/Localizable.strings and b/iOSClient/Supporting Files/lb.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/lo.lproj/Localizable.strings b/iOSClient/Supporting Files/lo.lproj/Localizable.strings index de1a756dae..fd2bca83f3 100644 Binary files a/iOSClient/Supporting Files/lo.lproj/Localizable.strings and b/iOSClient/Supporting Files/lo.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings b/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings index e7b8af2b03..1dd12cde11 100644 Binary files a/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings and b/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/lv.lproj/InfoPlist.strings b/iOSClient/Supporting Files/lv.lproj/InfoPlist.strings index 6a26379f17..2a9c001c6e 100644 Binary files a/iOSClient/Supporting Files/lv.lproj/InfoPlist.strings and b/iOSClient/Supporting Files/lv.lproj/InfoPlist.strings differ diff --git a/iOSClient/Supporting Files/lv.lproj/Localizable.strings b/iOSClient/Supporting Files/lv.lproj/Localizable.strings index 10d4322a8c..3b9f3e6d00 100644 Binary files a/iOSClient/Supporting Files/lv.lproj/Localizable.strings and b/iOSClient/Supporting Files/lv.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/mk.lproj/Localizable.strings b/iOSClient/Supporting Files/mk.lproj/Localizable.strings index 544ef95735..56a08bb2ef 100644 Binary files a/iOSClient/Supporting Files/mk.lproj/Localizable.strings and b/iOSClient/Supporting Files/mk.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/mn.lproj/Localizable.strings b/iOSClient/Supporting Files/mn.lproj/Localizable.strings index a1b1c4114c..2cdd7ad044 100644 Binary files a/iOSClient/Supporting Files/mn.lproj/Localizable.strings and b/iOSClient/Supporting Files/mn.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/mr.lproj/Localizable.strings b/iOSClient/Supporting Files/mr.lproj/Localizable.strings index fb365981eb..0098eb8a1d 100644 Binary files a/iOSClient/Supporting Files/mr.lproj/Localizable.strings and b/iOSClient/Supporting Files/mr.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ms_MY.lproj/Localizable.strings b/iOSClient/Supporting Files/ms_MY.lproj/Localizable.strings index 588afaf953..c55bbf3c71 100644 Binary files a/iOSClient/Supporting Files/ms_MY.lproj/Localizable.strings and b/iOSClient/Supporting Files/ms_MY.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/my.lproj/Localizable.strings b/iOSClient/Supporting Files/my.lproj/Localizable.strings index 76642e4501..58b3ee0e9d 100644 Binary files a/iOSClient/Supporting Files/my.lproj/Localizable.strings and b/iOSClient/Supporting Files/my.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings b/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings index 4140f2af78..767c3cde1b 100644 Binary files a/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings and b/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ne.lproj/Localizable.strings b/iOSClient/Supporting Files/ne.lproj/Localizable.strings index ea7940f5cc..05c2793d2b 100644 Binary files a/iOSClient/Supporting Files/ne.lproj/Localizable.strings and b/iOSClient/Supporting Files/ne.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/nl.lproj/Localizable.strings b/iOSClient/Supporting Files/nl.lproj/Localizable.strings index 865ae9859c..89c14bad35 100644 Binary files a/iOSClient/Supporting Files/nl.lproj/Localizable.strings and b/iOSClient/Supporting Files/nl.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings b/iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings index 43a4f6b2db..baddc66e35 100644 Binary files a/iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings and b/iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/oc.lproj/Localizable.strings b/iOSClient/Supporting Files/oc.lproj/Localizable.strings index 1c20fe7d1d..64fa2bc7cf 100644 Binary files a/iOSClient/Supporting Files/oc.lproj/Localizable.strings and b/iOSClient/Supporting Files/oc.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/pl.lproj/Localizable.strings b/iOSClient/Supporting Files/pl.lproj/Localizable.strings index ac5a09c081..4991b261b4 100644 Binary files a/iOSClient/Supporting Files/pl.lproj/Localizable.strings and b/iOSClient/Supporting Files/pl.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ps.lproj/Localizable.strings b/iOSClient/Supporting Files/ps.lproj/Localizable.strings index 2bb2692793..aa8205fd9f 100644 Binary files a/iOSClient/Supporting Files/ps.lproj/Localizable.strings and b/iOSClient/Supporting Files/ps.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings b/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings index c5cea76ec4..346f27a05b 100644 Binary files a/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings and b/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings b/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings index ab8bf1bb09..1bdc1f0383 100644 Binary files a/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings and b/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ro.lproj/Localizable.strings b/iOSClient/Supporting Files/ro.lproj/Localizable.strings index 838a41ab55..1ad555e8a6 100644 Binary files a/iOSClient/Supporting Files/ro.lproj/Localizable.strings and b/iOSClient/Supporting Files/ro.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ru.lproj/Localizable.strings b/iOSClient/Supporting Files/ru.lproj/Localizable.strings index 17183198f2..1016050d55 100644 Binary files a/iOSClient/Supporting Files/ru.lproj/Localizable.strings and b/iOSClient/Supporting Files/ru.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sc.lproj/Localizable.strings b/iOSClient/Supporting Files/sc.lproj/Localizable.strings index 2a002e38bd..94480d4322 100644 Binary files a/iOSClient/Supporting Files/sc.lproj/Localizable.strings and b/iOSClient/Supporting Files/sc.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/si.lproj/Localizable.strings b/iOSClient/Supporting Files/si.lproj/Localizable.strings index cbe5a1b4de..1887237c8e 100644 Binary files a/iOSClient/Supporting Files/si.lproj/Localizable.strings and b/iOSClient/Supporting Files/si.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings b/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings index 0e3d04173b..921b2aa124 100644 Binary files a/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings and b/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sl.lproj/Localizable.strings b/iOSClient/Supporting Files/sl.lproj/Localizable.strings index f20c574daf..7a352ff00c 100644 Binary files a/iOSClient/Supporting Files/sl.lproj/Localizable.strings and b/iOSClient/Supporting Files/sl.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sq.lproj/Localizable.strings b/iOSClient/Supporting Files/sq.lproj/Localizable.strings index 07d962b3ac..6dd618eec8 100644 Binary files a/iOSClient/Supporting Files/sq.lproj/Localizable.strings and b/iOSClient/Supporting Files/sq.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sr.lproj/Localizable.strings b/iOSClient/Supporting Files/sr.lproj/Localizable.strings index 1f118ac29c..2dd64e6679 100644 Binary files a/iOSClient/Supporting Files/sr.lproj/Localizable.strings and b/iOSClient/Supporting Files/sr.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings b/iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings index 1e623e1d3e..59d7650d7c 100644 Binary files a/iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings and b/iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sv.lproj/Localizable.strings b/iOSClient/Supporting Files/sv.lproj/Localizable.strings index 47562072bb..ff4796cb7b 100644 Binary files a/iOSClient/Supporting Files/sv.lproj/Localizable.strings and b/iOSClient/Supporting Files/sv.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sw.lproj/Localizable.strings b/iOSClient/Supporting Files/sw.lproj/Localizable.strings index ac4dbaf021..28d37dd0d6 100644 Binary files a/iOSClient/Supporting Files/sw.lproj/Localizable.strings and b/iOSClient/Supporting Files/sw.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ta.lproj/Localizable.strings b/iOSClient/Supporting Files/ta.lproj/Localizable.strings index 9bb7b3b339..7ecce4a7c4 100644 Binary files a/iOSClient/Supporting Files/ta.lproj/Localizable.strings and b/iOSClient/Supporting Files/ta.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/th_TH.lproj/Localizable.strings b/iOSClient/Supporting Files/th_TH.lproj/Localizable.strings index 8fa3d99f63..e1dbbbe62a 100644 Binary files a/iOSClient/Supporting Files/th_TH.lproj/Localizable.strings and b/iOSClient/Supporting Files/th_TH.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/tk.lproj/Localizable.strings b/iOSClient/Supporting Files/tk.lproj/Localizable.strings index 7248501819..e14a69057c 100644 Binary files a/iOSClient/Supporting Files/tk.lproj/Localizable.strings and b/iOSClient/Supporting Files/tk.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/tr.lproj/Localizable.strings b/iOSClient/Supporting Files/tr.lproj/Localizable.strings index 40c53d5290..ced848d9a8 100644 Binary files a/iOSClient/Supporting Files/tr.lproj/Localizable.strings and b/iOSClient/Supporting Files/tr.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ug.lproj/InfoPlist.strings b/iOSClient/Supporting Files/ug.lproj/InfoPlist.strings index 6a26379f17..2c2bb056e7 100644 Binary files a/iOSClient/Supporting Files/ug.lproj/InfoPlist.strings and b/iOSClient/Supporting Files/ug.lproj/InfoPlist.strings differ diff --git a/iOSClient/Supporting Files/ug.lproj/Localizable.strings b/iOSClient/Supporting Files/ug.lproj/Localizable.strings index 87f64bc8df..b7b9182e03 100644 Binary files a/iOSClient/Supporting Files/ug.lproj/Localizable.strings and b/iOSClient/Supporting Files/ug.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/uk.lproj/Localizable.strings b/iOSClient/Supporting Files/uk.lproj/Localizable.strings index 7c4215d813..84ebd016b0 100644 Binary files a/iOSClient/Supporting Files/uk.lproj/Localizable.strings and b/iOSClient/Supporting Files/uk.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ur_PK.lproj/Localizable.strings b/iOSClient/Supporting Files/ur_PK.lproj/Localizable.strings index 56765571c6..784d10eb91 100644 Binary files a/iOSClient/Supporting Files/ur_PK.lproj/Localizable.strings and b/iOSClient/Supporting Files/ur_PK.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/uz.lproj/Localizable.strings b/iOSClient/Supporting Files/uz.lproj/Localizable.strings index ac4dbaf021..28d37dd0d6 100644 Binary files a/iOSClient/Supporting Files/uz.lproj/Localizable.strings and b/iOSClient/Supporting Files/uz.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/vi.lproj/Localizable.strings b/iOSClient/Supporting Files/vi.lproj/Localizable.strings index bac583f79c..fbe0c62be7 100644 Binary files a/iOSClient/Supporting Files/vi.lproj/Localizable.strings and b/iOSClient/Supporting Files/vi.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings b/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings index 8a089f39dd..5949795c13 100644 Binary files a/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings and b/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings b/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings index 7920eaabf5..827764f4e5 100644 Binary files a/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings and b/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings b/iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings index 92880bea91..7998572123 100644 Binary files a/iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings and b/iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/zu_ZA.lproj/Localizable.strings b/iOSClient/Supporting Files/zu_ZA.lproj/Localizable.strings index ac4dbaf021..28d37dd0d6 100644 Binary files a/iOSClient/Supporting Files/zu_ZA.lproj/Localizable.strings and b/iOSClient/Supporting Files/zu_ZA.lproj/Localizable.strings differ diff --git a/iOSClient/Utility/FileAutoRenamer+Extensions.swift b/iOSClient/Utility/FileAutoRenamer+Extensions.swift new file mode 100644 index 0000000000..a0c6dc0b70 --- /dev/null +++ b/iOSClient/Utility/FileAutoRenamer+Extensions.swift @@ -0,0 +1,21 @@ +// +// FileAutoRenamer+Extensions.swift +// Nextcloud +// +// Created by Milen Pivchev on 10.10.24. +// Copyright © 2024 Marino Faggiana. All rights reserved. +// + +import NextcloudKit + +extension FileAutoRenamer { + private func setup(account: String?) { + let capabilities = NCCapabilities.shared.getCapabilities(account: account) + FileAutoRenamer.shared.setup(forbiddenFileNameCharacters: capabilities.capabilityForbiddenFileNameCharacters, forbiddenFileNameExtensions: capabilities.capabilityForbiddenFileNameExtensions) + } + + func rename(_ filename: String, isFolderPath: Bool = false, account: String?) -> String { + setup(account: account) + return FileAutoRenamer.shared.rename(filename: filename, isFolderPath: isFolderPath) + } +} diff --git a/iOSClient/Utility/FileNameValidator+Extensions.swift b/iOSClient/Utility/FileNameValidator+Extensions.swift index 0de7a271e7..166bf157b9 100644 --- a/iOSClient/Utility/FileNameValidator+Extensions.swift +++ b/iOSClient/Utility/FileNameValidator+Extensions.swift @@ -6,9 +6,7 @@ // Copyright © 2024 Marino Faggiana. All rights reserved. // -import Foundation import NextcloudKit -import UIKit extension FileNameValidator { private func setup(account: String?) {