Various improvements

This commit is contained in:
Ilya Laktyushin
2024-10-11 18:34:44 +04:00
parent c6a8183036
commit 0eb7a9b0d4
27 changed files with 1076 additions and 327 deletions

View File

@@ -4182,12 +4182,7 @@ extension ChatControllerImpl {
guard let strongSelf = self, let peerId = strongSelf.chatLocation.peerId else {
return
}
var langCode = langCode
if langCode == "nb" {
langCode = "no"
} else if langCode == "pt-br" {
langCode = "pt"
}
let langCode = normalizeTranslationLanguage(langCode)
let _ = updateChatTranslationStateInteractively(engine: strongSelf.context.engine, peerId: peerId, { current in
return current?.withToLang(langCode).withIsEnabled(true)
}).startStandalone()