Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quick-translate Package to translate between many languages using translate-shell #97

Merged
merged 23 commits into from
Jun 11, 2024

Conversation

p0ly60n
Copy link
Contributor

@p0ly60n p0ly60n commented Feb 19, 2024

This expansion uses the translate-shell CLI-tool to do in-line translations from and to many languages. The default source and target languages of the user can be defined within defaultlang.yml as this file serves as the global variable definition of them

Copy link
Collaborator

@smeech smeech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A fairly straightforward package.
Makes use of an external command, trans, available from GitHub. I'm not in a position to verify its safety. This is called by two type: shell cmd:s.

Linux & macOS users need to be advised in README.md to change the two shell: wsl lines to shell: bash, and this could be facilitated by setting a global variable in defaultlang.yml, e.g.:

  - name: shell
    type: echo
    params:
      echo: bash # or wsl  

and changing the lines in package.yml to shell: "{{shell}}", so that defaultlang.yml is the only file needing editing by users.

Probably safe to merge.

Edit: Ignore most of my comments above - @p0ly60n has pointed out (and I have checked) that if WSL isn't present then Linux & macOS will use the default shell automatically, so Espanso will effectively ignore the line.

@smeech smeech merged commit febcf94 into espanso:main Jun 11, 2024
1 check passed
@smeech
Copy link
Collaborator

smeech commented Jun 11, 2024

Merging this.
No security concerns beyond the use of an external package, which appears very stable with no security concerns in its own Issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants