IceCubesApp/Packages/Models/Sources/Models/Translation.swift
Paul Schuetz da0b92e13d
Allow translation of an account bio/note (#1276)
The bio (note) of an account can now be translated via DeepL. If the user has
put in his own DeepL API key, that is used, otherwise, the standard one is
used. See #1267

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
2023-03-19 16:18:13 +01:00

16 lines
424 B
Swift

import Foundation
public struct Translation: Decodable {
public let content: HTMLString
public let detectedSourceLanguage: String
public let provider: String
public init(content: String, detectedSourceLanguage: String, provider: String) {
self.content = .init(stringValue: content)
self.detectedSourceLanguage = detectedSourceLanguage
self.provider = provider
}
}
extension Translation: Sendable {}