ios: translations (#1411)

This commit is contained in:
Evgeny Poberezkin 2022-11-25 13:50:26 +00:00 committed by GitHub
parent 789c54bd5f
commit 18b772a80b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 381 additions and 213 deletions

View file

@ -17,7 +17,7 @@ enum DatabaseEncryptionAlert: Identifiable {
case changeDatabaseKey
case databaseEncrypted
case currentPassphraseError
case error(title: LocalizedStringKey, error: String = "")
case error(title: LocalizedStringKey, error: LocalizedStringKey = "")
var id: String {
switch self {
@ -155,7 +155,7 @@ struct DatabaseEncryptionView: View {
if case .chatCmdError(.errorDatabase(.errorExport(.errorNotADatabase))) = error as? ChatResponse {
await operationEnded(.currentPassphraseError)
} else {
await operationEnded(.error(title: "Error encrypting database", error: responseError(error)))
await operationEnded(.error(title: "Error encrypting database", error: "\(responseError(error))"))
}
}
}
@ -232,7 +232,7 @@ struct DatabaseEncryptionView: View {
message: Text("Please enter correct current passphrase.")
)
case let .error(title, error):
return Alert(title: Text(title), message: Text("\(error)"))
return Alert(title: Text(title), message: Text(error))
}
}