feat: add translate module
This pull request adds a new Google Translate integration to the launcher, allowing users to translate text directly from the launcher UI. The changes introduce a new translate command, user interface components for language selection and translation, and a service for performing translations using Google Translate. The implementation includes error handling, persistent language preferences, and clipboard integration.
Translate feature integration:
- Added a new "Translate" command to the launcher configuration, making translation available as a launcher action (
config/LauncherConfig.qml). - Implemented a new singleton service
Translator.qmlthat handles language selection, translation requests to Google Translate, persistent language preferences, and error handling (modules/launcher/services/Translator.qml).
Launcher UI and workflow changes:
- Updated the launcher action parsing logic to recognize and route translate commands, including language selection and translation states (
modules/launcher/AppList.qml). - Added new UI states and list item delegates for language selection (
LanguageItem.qml) and translation display/interaction (TranslateItem.qml), including real-time feedback and clipboard copy functionality (modules/launcher/AppList.qml,modules/launcher/items/LanguageItem.qml,modules/launcher/items/TranslateItem.qml). [1] [2] [3] [4]
Launcher command handling:
- Modified launcher content handling to ensure that the new translate command is correctly triggered and processed alongside existing commands (
modules/launcher/Content.qml).
https://github.com/user-attachments/assets/0b58532e-2b28-47d2-8271-0584959e2230
Is this integration installed manually?
its a PR, so it has a fork. Clone the repo and do the manual build (see instructions in the README)
w
I'm not sure if an integration with a google service like that is a good idea, it should at least be opt-in, or support different translation backends