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

Instruction for adding as program in GoldenDict #3

Open
ghost opened this issue Dec 16, 2019 · 4 comments
Open

Instruction for adding as program in GoldenDict #3

ghost opened this issue Dec 16, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 16, 2019

  1. Install latest GoldenDict - https://github.com/goldendict/goldendict/wiki
  2. Download GT-bash-client master branch as ZIP and unzip translate.sh file into any regular folder (I would recommend to use default GoldenDict dictionaries folder);
  3. Launch GoldenDict;
  4. Go to menu "Edit > Dictionaries...";
  5. On "Dictionaries" window go to tab "Sources > Program" and click Add... button;
  6. In new program entry row set:
Enabled Type Name Command line Icon
☑ (check it for enable) Plain Text GT: source lng > target lng (or name it as you wish) bash <path_to>/translate.sh <source_lng> <new_lng> %GDWORD% (add link to any icon, otherwise it would be shown as "gear" icon)
  1. Click Apply and then OK buttons;
  2. Now input words or text string you wish to translate into word input field and hit Enter key on your keyboard (until Enter not pressed GoldenDict will not execute programs);
  3. That is all!

pic.1

If you need few directions (ja > en and en > fr, etc.) just repeat steps above and add few program entries with custom <source_lng> <new_lng> arguments.

Also, now you could use "Scan Popup" function to translate in any external program (web browser, text editor, book reader, etc) — just select word/text string and hit CTRL+C+C shortcut (or set custom hotkey shortcut in GoldenDict preferences).

pic.2

@ghost
Copy link
Author

ghost commented Jan 13, 2020

NOTE: Seems like GoldenDict from-time-to-time can't use bash command if Shell-file path directed to "hidden" folder (with "dot" character in folder name: `../.goldendict/)

  • Wrong: /user/<username>/.goldendict/dicts/translate.sh

To avoid this always place translate.sh only in "visible" folders (without "dots" in folder names)

  • Good: /user/<username>/dotfiles/translate.sh

@darlopvil
Copy link

Sorry if this could be a stupid question but, is this an only linux compatible program? I use Windows and It doesn't work.
This is my actual configuration:
image

@OPHoperHPO
Copy link
Owner

OPHoperHPO commented Dec 25, 2020

Sorry if this could be a stupid question but, is this an only linux compatible program?

@darlopvil, Yes.

@ghost
Copy link
Author

ghost commented Dec 25, 2020

Sorry if this could be a stupid question but, is this an only linux compatible program?

Shell/*.sh-version is Linux-only (until someone would rewrite it to Batch/*.bat).

Alternatively try Python/*.py version which is cross-platform (requires additionally install Python runtime):

FTR, I would try create FAQ on using various solutions on the next Wiki-page:

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

No branches or pull requests

2 participants