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

Enhancement: Hotkey addition, and new line. #10

Open
arcticpinecone opened this issue May 12, 2024 · 1 comment
Open

Enhancement: Hotkey addition, and new line. #10

arcticpinecone opened this issue May 12, 2024 · 1 comment

Comments

@arcticpinecone
Copy link

Thank you for the useful Obsidian plugin! 🙏🙇‍♂️

I'd like to propose an enhancement to the translation hotkey options to improve workflows.

Currently, the plugin offers these hotkey options for translation:

  • DeepL: Translate selection
  • DeepL: Translate selection: From language to another
  • DeepL: Translate selection: to language
  • DeepL: Translate selection: To language and append to selection

Proposed Addition:

  • DeepL: Translate selection: and append to selection

This would use the To language preset from the plugin's Language settings without prompting for language selection each time, simplifying the workflow.

The existing To language and append to selection option is useful, and I suggest maintaining it, possibly with an added setting for inserting a newline automatically.

Example Use Case:
This change would facilitate language comparison in a stacked format:
"Tässä on näyteteksti kääntämiseksi haluamalleni kielelle."
"Here is a sample text to convert to my preferred language."

Currently, without a newline, the translation appends directly, making it less readable:
"Tässä on näyteteksti kääntämiseksi haluamalleni kielelle." "Here is a sample text to translate into the language of my choice."

This enhancement would greatly benefit users who frequently compare translated texts.

@arcticpinecone
Copy link
Author

Hello again!

I am a curious and driven person, so I learned how to branch some code from a fork, then had to figure out how to compile the code (I'm a Python novice), and then push this and make my first ever pull request.

In any case, putting the built main.js in the .obsidian\plugins\deepl folder allowed me to test this really easily, and I confirmed it's all functional and working. I made an additional commit to add the newline function also to the Translate selection: To language and append to selection feature.

I sincerely appreciate your plugin, and I wanted to give back with this feature. I hope you find it satisfactory.

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

No branches or pull requests

1 participant