shell icon indicating copy to clipboard operation
shell copied to clipboard

feat: add translate module

Open Cleboost opened this issue 1 year ago • 4 comments

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.qml that 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

Cleboost avatar Sep 20 '25 21:09 Cleboost

Is this integration installed manually?

RENBOWS avatar Sep 27 '25 14:09 RENBOWS

its a PR, so it has a fork. Clone the repo and do the manual build (see instructions in the README)

Markus328 avatar Sep 27 '25 15:09 Markus328

w

PolarT-py avatar Oct 15 '25 02:10 PolarT-py

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

MHanak1 avatar Oct 16 '25 10:10 MHanak1