mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-23 00:40:59 +00:00
Add a setting to turn off auto detect language when posting close #1461
This commit is contained in:
parent
2850c168b0
commit
4168c64d20
22 changed files with 49 additions and 1 deletions
|
@ -38,6 +38,15 @@ struct TranslationSettingsView: View {
|
|||
.listRowBackground(theme.primaryBackgroundColor)
|
||||
}
|
||||
}
|
||||
|
||||
Section {
|
||||
Toggle(isOn: preferences.$autoDetectPostLanguage) {
|
||||
Text("settings.translation.auto-detect-post-language")
|
||||
}
|
||||
} footer: {
|
||||
Text("settings.translation.auto-detect-post-language-footer")
|
||||
}
|
||||
|
||||
}
|
||||
.navigationTitle("settings.translation.navigation-title")
|
||||
.scrollContentBackground(.hidden)
|
||||
|
|
|
@ -173,6 +173,8 @@
|
|||
"settings.general.translate" = "Translation Settings";
|
||||
"settings.translation.navigation-title" = "Translation";
|
||||
"settings.translation.always-deepl" = "Always Translate using DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API Key";
|
||||
"settings.translation.api-key-type" = "Type of the Key";
|
||||
"settings.translation.needed-message" = "This feature requires a DeepL API key";
|
||||
|
|
|
@ -167,6 +167,8 @@
|
|||
"settings.general.translate" = "Translation Settings";
|
||||
"settings.translation.navigation-title" = "Translation";
|
||||
"settings.translation.always-deepl" = "Always Translate using DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API Key";
|
||||
"settings.translation.api-key-type" = "Type of the Key";
|
||||
"settings.translation.needed-message" = "This feature requires a DeepL API key";
|
||||
|
|
|
@ -144,6 +144,8 @@
|
|||
"settings.general.translate" = "Übersetzungseinstellungen";
|
||||
"settings.translation.navigation-title" = "Übersetzung";
|
||||
"settings.translation.always-deepl" = "Immer mit DeepL übersetzen";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL-API-Schlüssel";
|
||||
"settings.translation.api-key-type" = "Typ des Schlüssels";
|
||||
"settings.translation.needed-message" = "Für diese Funktion ist ein DeepL-API-Schlüssel erforderlich.";
|
||||
|
|
|
@ -174,6 +174,8 @@
|
|||
"settings.general.translate" = "Translation Settings";
|
||||
"settings.translation.navigation-title" = "Translation";
|
||||
"settings.translation.always-deepl" = "Always Translate using DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API Key";
|
||||
"settings.translation.api-key-type" = "Type of the Key";
|
||||
"settings.translation.needed-message" = "This feature requires a DeepL API key";
|
||||
|
|
|
@ -173,6 +173,8 @@
|
|||
"settings.general.translate" = "Translation Settings";
|
||||
"settings.translation.navigation-title" = "Translation";
|
||||
"settings.translation.always-deepl" = "Always Translate using DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API Key";
|
||||
"settings.translation.api-key-type" = "Type of the Key";
|
||||
"settings.translation.needed-message" = "This feature requires a DeepL API key";
|
||||
|
|
|
@ -144,6 +144,8 @@
|
|||
"settings.general.translate" = "Ajustes de traducción";
|
||||
"settings.translation.navigation-title" = "Traducción";
|
||||
"settings.translation.always-deepl" = "Traducir siempre con DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "Clave API de DeepL";
|
||||
"settings.translation.api-key-type" = "Tipo de clave";
|
||||
"settings.translation.needed-message" = "Esta funcionalidad requiere una clave API de DeepL";
|
||||
|
|
|
@ -144,6 +144,8 @@
|
|||
"settings.general.translate" = "Itzulpenaren ezarpenak";
|
||||
"settings.translation.navigation-title" = "Itzulpenaren ezarpenak";
|
||||
"settings.translation.always-deepl" = "Itzuli beti DeepL erabiliz";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API gakoa";
|
||||
"settings.translation.api-key-type" = "Gako mota";
|
||||
"settings.translation.needed-message" = "Ezaugarri honek DeepL API gako bat behar du";
|
||||
|
|
|
@ -168,6 +168,8 @@
|
|||
"settings.general.translate" = "Translation Settings";
|
||||
"settings.translation.navigation-title" = "Translation";
|
||||
"settings.translation.always-deepl" = "Always Translate using DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API Key";
|
||||
"settings.translation.api-key-type" = "Type of the Key";
|
||||
"settings.translation.needed-message" = "This feature requires a DeepL API key";
|
||||
|
|
|
@ -143,6 +143,8 @@
|
|||
"settings.general.translate" = "Translation Settings";
|
||||
"settings.translation.navigation-title" = "Translation";
|
||||
"settings.translation.always-deepl" = "Always Translate using DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API Key";
|
||||
"settings.translation.api-key-type" = "Type of the Key";
|
||||
"settings.translation.needed-message" = "This feature requires a DeepL API key";
|
||||
|
|
|
@ -173,6 +173,8 @@
|
|||
"settings.general.translate" = "翻訳設定";
|
||||
"settings.translation.navigation-title" = "翻訳設定";
|
||||
"settings.translation.always-deepl" = "DeepLを使用して常に翻訳する";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL APIキー";
|
||||
"settings.translation.api-key-type" = "キーのタイプ";
|
||||
"settings.translation.needed-message" = "この機能には DeepL APIキーが必要です";
|
||||
|
|
|
@ -168,6 +168,8 @@
|
|||
"settings.general.translate" = "번역 설정";
|
||||
"settings.translation.navigation-title" = "번역 설정";
|
||||
"settings.translation.always-deepl" = "항상 DeepL을 통해 번역";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API 키";
|
||||
"settings.translation.api-key-type" = "API 키 종류";
|
||||
"settings.translation.needed-message" = "이 기능을 사용하려면 DeepL에서 발급받은 API 키가 있어야 합니다.";
|
||||
|
|
|
@ -173,6 +173,8 @@
|
|||
"settings.general.translate" = "Oversettelsesinnstillinger";
|
||||
"settings.translation.navigation-title" = "Oversettelse";
|
||||
"settings.translation.always-deepl" = "Oversett alltid med DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API-nøkkel";
|
||||
"settings.translation.api-key-type" = "Type nøkkel";
|
||||
"settings.translation.needed-message" = "Denne funksjonen krever en DeepL API-nøkkel";
|
||||
|
|
|
@ -144,6 +144,8 @@
|
|||
"settings.general.translate" = "Vertalingsinstellingen";
|
||||
"settings.translation.navigation-title" = "Vertaling";
|
||||
"settings.translation.always-deepl" = "Vertaal altijd met DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API-sleutel";
|
||||
"settings.translation.api-key-type" = "Sleuteltype";
|
||||
"settings.translation.needed-message" = "Deze functionaliteit vereist een DeepL API-sleutel";
|
||||
|
|
|
@ -169,6 +169,8 @@
|
|||
"settings.general.translate" = "Ustawienia tłumaczenia";
|
||||
"settings.translation.navigation-title" = "Ustawienia tłumaczenia";
|
||||
"settings.translation.always-deepl" = "Zawsze tłumacz przy pomocy DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "Klucz DeepL API";
|
||||
"settings.translation.api-key-type" = "Rodzaj klucza";
|
||||
"settings.translation.needed-message" = "Ta funkcja wymaga klucza DeepL API";
|
||||
|
|
|
@ -168,6 +168,8 @@
|
|||
"settings.general.translate" = "Ajustes de Tradução";
|
||||
"settings.translation.navigation-title" = "Tradução";
|
||||
"settings.translation.always-deepl" = "Sempre traduzir utilizando DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "Chave da API DeepL";
|
||||
"settings.translation.api-key-type" = "Tipo da chave";
|
||||
"settings.translation.needed-message" = "Esta funcionalidade requer uma chave de API DeepL";
|
||||
|
|
|
@ -168,6 +168,8 @@
|
|||
"settings.general.translate" = "Translation Settings";
|
||||
"settings.translation.navigation-title" = "Translation";
|
||||
"settings.translation.always-deepl" = "Always Translate using DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API Key";
|
||||
"settings.translation.api-key-type" = "Type of the Key";
|
||||
"settings.translation.needed-message" = "This feature requires a DeepL API key";
|
||||
|
|
|
@ -173,6 +173,8 @@
|
|||
"settings.general.translate" = "Налаштування перекладу";
|
||||
"settings.translation.navigation-title" = "Переклад";
|
||||
"settings.translation.always-deepl" = "Завжди перекладати за допомогою DeepL";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API Key";
|
||||
"settings.translation.api-key-type" = "Тип ключа";
|
||||
"settings.translation.needed-message" = "Ця функція потребує ключа DeepL API key";
|
||||
|
|
|
@ -144,6 +144,8 @@
|
|||
"settings.general.translate" = "翻译设置";
|
||||
"settings.translation.navigation-title" = "翻译设置";
|
||||
"settings.translation.always-deepl" = "总是使用 DeepL 翻译";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API 密钥";
|
||||
"settings.translation.api-key-type" = "密钥类型";
|
||||
"settings.translation.needed-message" = "该功能需要 DeepL API 密钥";
|
||||
|
|
|
@ -217,6 +217,8 @@
|
|||
"settings.general.translate" = "翻譯設定";
|
||||
"settings.translation.navigation-title" = "翻譯設定";
|
||||
"settings.translation.always-deepl" = "一概用 DeepL 翻譯";
|
||||
"settings.translation.auto-detect-post-language" = "Auto detect language";
|
||||
"settings.translation.auto-detect-post-language-footer" = "Ice Cubes will try to automatically detect the language of the post you're about to post and will suggest to update your post language if necessary.";
|
||||
"settings.translation.user-api-key" = "DeepL API Key";
|
||||
"settings.translation.api-key-type" = "Key 類型";
|
||||
"settings.translation.needed-message" = "本功能需有 DeepL API key";
|
||||
|
|
|
@ -28,6 +28,7 @@ public class UserPreferences: ObservableObject {
|
|||
@AppStorage("autoplay_video") public var autoPlayVideo = true
|
||||
@AppStorage("always_use_deepl") public var alwaysUseDeepl = false
|
||||
@AppStorage("user_deepl_api_free") public var userDeeplAPIFree = true
|
||||
@AppStorage("auto_detect_post_language") public var autoDetectPostLanguage = true
|
||||
|
||||
@AppStorage("suppress_dupe_reblogs") public var suppressDupeReblogs: Bool = false
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ public struct StatusEditorView: View {
|
|||
Button {
|
||||
Task {
|
||||
viewModel.evaluateLanguages()
|
||||
if let _ = viewModel.languageConfirmationDialogLanguages {
|
||||
if preferences.autoDetectPostLanguage, let _ = viewModel.languageConfirmationDialogLanguages {
|
||||
isLanguageConfirmPresented = true
|
||||
} else {
|
||||
await postStatus()
|
||||
|
|
Loading…
Reference in a new issue