feat: add message translation support

- Introduced translation functionality in chat screen, allowing users to translate messages before sending.
- Added MessageTranslationButton to the input bar for enabling/disabling translation.
- Implemented translation service to handle incoming and outgoing text translations using llama models.
- Enhanced message storage to include original and translated text, language codes, and translation status.
- Created UI components for displaying translated messages and managing translation options.
- Added translation model management, including downloading and storing models locally.
- Updated app settings to manage translation preferences and model selections.
This commit is contained in:
zjs81
2026-04-02 19:09:17 -07:00
parent 82adbd761b
commit 9bf649e2c6
57 changed files with 4879 additions and 184 deletions
+45 -3
View File
@@ -2007,6 +2007,34 @@
"radioStats_stripWaiting": "Radio-statistieken ophalen…",
"radioStats_settingsTile": "Statistieken over radio",
"radioStats_settingsSubtitle": "Ruimtelijke ruis, RSSI, SNR en beschikbare tijd",
"@translation_downloadFailed": {
"placeholders": {
"error": {
"type": "String"
}
}
},
"translation_enableSubtitle": "Vertaal inkomende berichten en maak het mogelijk om berichten vooraf te vertalen.",
"translation_enableTitle": "Activeer vertaling",
"translation_title": "Vertaling",
"translation_composerTitle": "Vertaal voor verzending",
"translation_composerSubtitle": "Stelt de standaardstatus van het pictogram voor de vertaling van de componist in.",
"translation_useAppLanguage": "Gebruik de taal van de app",
"translation_targetLanguage": "Doeltaal",
"translation_downloadedModelLabel": "Gedownloade model",
"translation_presetModelLabel": "Voorgeprogrammeerd Hugging Face-model",
"translation_manualUrlLabel": "URL van de handleiding",
"translation_downloadModel": "Download het model",
"translation_downloading": "Downloaden...",
"translation_working": "Werken...",
"translation_mergingChunks": "Het samenvoegen van de gedownloade stukken tot één eindbestand...",
"translation_stop": "Stoppen",
"translation_downloadedModels": "Gedownloade modellen",
"translation_deleteModel": "Model verwijderen",
"translation_modelDownloaded": "Vertalingmodel gedownload.",
"translation_downloadStopped": "Download is afgebroken.",
"translation_downloadFailed": "Download mislukt: {error}",
"translation_enterUrlFirst": "Voer eerst een URL van een model in.",
"@scanner_linuxPairingPinPrompt": {
"placeholders": {
"deviceName": {
@@ -2014,8 +2042,22 @@
}
}
},
"scanner_linuxPairingPinTitle": "PIN voor Bluetooth-koppeling",
"scanner_linuxPairingHidePin": "Verberg PIN",
"scanner_linuxPairingPinPrompt": "Voer het pincode-in voor {deviceName} in (laat dit leeg als er geen is).",
"scanner_linuxPairingShowPin": "Toon PIN",
"scanner_linuxPairingHidePin": "PIN verbergen",
"scanner_linuxPairingPinPrompt": "Voer PIN in voor {deviceName} (laat leeg als er geen is).",
"scanner_linuxPairingPinTitle": "BluetoothkoppelingsPIN"
"@translation_translateTo": {
"placeholders": {
"language": {
"type": "String"
}
}
},
"translation_composerDisabledHint": "Stuur berichten in de oorspronkelijke, getypte taal.",
"translation_translateBeforeSending": "Vertaal voor verzending",
"translation_composerEnabledHint": "De berichten worden vertaald voordat ze verzonden worden.",
"translation_messageTranslation": "Berichtvertaling",
"translation_translationOptions": "Opties voor vertaling",
"translation_systemLanguage": "Taal van het systeem",
"translation_translateTo": "Vertalen naar {language}"
}