AlexanderWillner / deepl-alfred-workflow2

DeepL Alfred Workflow
228 stars 8 forks source link

great! gave little tweak #1

Closed dmlh closed 5 years ago

dmlh commented 6 years ago

Thank you, this works perfectly :) It kept giving me translations into German only - but I fixed this by deleting the other languages and just leaving the ones I want (EN & ES). I rely on this workflow a lot, so happy you found a fix!

RyuX51 commented 5 years ago

It does only translates into German for me, too. The Readme says:

To activate this workflow use the default keyword dl, enter the passage you wanna get translated and end the input with .. Source and destination language will be inferred automatically.

I'm trying to figure out if there's a way to pass a parameter to the workflow to get translations into other languages, too?

AlexanderWillner commented 5 years ago

Two options that could be implemented:

  1. setting the preferred destination language in the workflow.

  2. passing the target language, for example "dl today will be nice weather > fr" or for more than one target language "dl will it rain today? > fr de".

What do you think?

dotiful commented 5 years ago

It would be useful to be able to change languages using variables, and it's pretty simple to implement

RyuX51 commented 5 years ago

@AlexanderWillner I like both ideas, this would also be consistent with m9dfukc's workflow. Personally I prefer to set the preferred destination language in the workflow. This allows me to create the workflows dlde, defr for my most commons translations. Passing the target language is also great though since it doesn't require to copy and modify the workflow for fast translations.

AlexanderWillner commented 5 years ago

Implemented it via environment variable. Please test.

AlexanderWillner commented 5 years ago

deepl-setup2

RyuX51 commented 5 years ago

I'm not so sure about the advantage of using the environment variable. In m9dfukc's workflow I could just copy the Script Filter, set the keyword to dlfr and modify the script to use $default_language = 'FR';. With the environment variable, I set the language for the whole workflow again, so I don't see the advantage here? I always have to open the workflow and change the variable there if I want to get translations for another language? Or do I miss something obvious?

Screenshot 2019-05-14 at 11 43 44
RyuX51 commented 5 years ago

However, I solved it now like this:

Screenshot 2019-05-14 at 11 52 09

I'm sure the environment variable will be of some use since user @dotiful requested it that way. Thank you for taking the time.

AlexanderWillner commented 5 years ago

Good idea. Will provide this option as well.