diff --git a/MiniScanner/Extensions/String+StringKeys.swift b/MiniScanner/Extensions/String+StringKeys.swift index 6615d5f7b2541e984afa8a52a1cfeee98daa70a3..5230e97cf2a93d367cc05bb850cca81c4009f00f 100644 --- a/MiniScanner/Extensions/String+StringKeys.swift +++ b/MiniScanner/Extensions/String+StringKeys.swift @@ -95,4 +95,9 @@ extension String { static let signMsg = "sign_msg" static let allDocument = "all_document" static let add = "add" + + static let allDocuments = "all_documents" + static let passports = "passports" + static let contracts = "contracts" + static let identifiers = "identifiers" } diff --git a/MiniScanner/Modules/Documents/Customs/CustomViews/AllFolderTableView/CustomCells/FolderCollectionViewCell.swift b/MiniScanner/Modules/Documents/Customs/CustomViews/AllFolderTableView/CustomCells/FolderCollectionViewCell.swift index 4955b5b8343363f071cb5a67dc275b9ded241949..0aa188831db01c243d0f2adfb78fcfa8bc7a3a3a 100644 --- a/MiniScanner/Modules/Documents/Customs/CustomViews/AllFolderTableView/CustomCells/FolderCollectionViewCell.swift +++ b/MiniScanner/Modules/Documents/Customs/CustomViews/AllFolderTableView/CustomCells/FolderCollectionViewCell.swift @@ -39,7 +39,24 @@ class FolderCollectionViewCell: UICollectionViewCell { func set(folder: AppConfigurator.Folder) { isFolderSelected = folder.isSelected - self.titleLabel.set(text: folder.name, color: isFolderSelected ? .white : .mainText, font: isFolderSelected ? .bold(18) : .medium(18)) + + var folderName = folder.name + let savedName = folder.savedName + + switch savedName { + case "all_documents": + folderName = .allDocuments.localized + case "passports": + folderName = .passports.localized + case "contracts": + folderName = .contracts.localized + case "identifiers": + folderName = .identifiers.localized + default: + break + } + + self.titleLabel.set(text: folderName, color: isFolderSelected ? .white : .mainText, font: isFolderSelected ? .bold(18) : .medium(18)) setSelected() } } diff --git a/MiniScanner/Supporting Files/AppDelegate.swift b/MiniScanner/Supporting Files/AppDelegate.swift index 9d38818b7ea7a03fe254dcbf2f68441732841702..34d30dfb7310638d49428ea7e961ac7b9c705107 100644 --- a/MiniScanner/Supporting Files/AppDelegate.swift +++ b/MiniScanner/Supporting Files/AppDelegate.swift @@ -95,11 +95,11 @@ struct AppConfigurator { var isSelected: Bool } - func setDefaults() { - let allDocs = AppConfigurator.Folder(name: "All Documents", savedName: "all_documents", isSelected: true) - let passports = AppConfigurator.Folder(name: "Passports", savedName: "passports", isSelected: false) - let contracts = AppConfigurator.Folder(name: "Contracts", savedName: "contracts", isSelected: false) - let identifiers = AppConfigurator.Folder(name: "Identifiers", savedName: "identifiers", isSelected: false) + func setDefaults() { + let allDocs = AppConfigurator.Folder(name: .allDocuments.localized, savedName: "all_documents", isSelected: true) + let passports = AppConfigurator.Folder(name: .passports.localized, savedName: "passports", isSelected: false) + let contracts = AppConfigurator.Folder(name: .contracts.localized, savedName: "contracts", isSelected: false) + let identifiers = AppConfigurator.Folder(name: .identifiers.localized, savedName: "identifiers", isSelected: false) let folders = [allDocs, passports, contracts, identifiers] diff --git a/MiniScanner/Supporting Files/Localization/Localizable.xcstrings b/MiniScanner/Supporting Files/Localization/Localizable.xcstrings index 610bda2eda8ce498abeb7ce34103e23c67d4f89e..663a613933d3007b577770add46cf2f29459f75d 100644 --- a/MiniScanner/Supporting Files/Localization/Localizable.xcstrings +++ b/MiniScanner/Supporting Files/Localization/Localizable.xcstrings @@ -157,6 +157,23 @@ } } }, + "all_documents" : { + "extractionState" : "manual", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "كل المستندات" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "All Documents" + } + } + } + }, "app_theme" : { "extractionState" : "manual", "localizations" : { @@ -270,6 +287,23 @@ } } }, + "contracts" : { + "extractionState" : "manual", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "العقود" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Contracts" + } + } + } + }, "copied_to_clipboard" : { "extractionState" : "manual", "localizations" : { @@ -711,6 +745,23 @@ } } }, + "identifiers" : { + "extractionState" : "manual", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "الهويات" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Identifiers" + } + } + } + }, "language" : { "extractionState" : "manual", "localizations" : { @@ -824,6 +875,23 @@ } } }, + "passports" : { + "extractionState" : "manual", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "جوازات السفر" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Passports" + } + } + } + }, "preview" : { "extractionState" : "manual", "localizations" : {