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

Mac OS - goldendict program: Query error: The program has returned exit code 255. #352

Open
PhungXuanAnh opened this issue Jun 2, 2020 · 4 comments

Comments

@PhungXuanAnh
Copy link

PhungXuanAnh commented Jun 2, 2020

On Mac OS, when using this program on terminal it work well, but when add this program to goldendict, it show above error

Anyone know about this issue?

@JiagengDing
Copy link

I also have this problem. Have you fixed it?

@BenzLeung
Copy link

same

@IFphoenix
Copy link

I have the same problem, who can help me ORZ!!

@jinzi97
Copy link

jinzi97 commented Aug 7, 2022

I just solved this problem, and it seems work well with me.
I found my answer from this thread:
https://apple.stackexchange.com/questions/270540/translate-shell-script-not-working-within-automator

I'm not familiar with programming, so I just wrote down the solution.

I used macports to install translate-shell and gawk, and the script file is at the path of /opt/local/bin.
I used the code of which gawk to find them.

Then I changed the file of trans by vim as the thread told.

change:
gawk -f <(echo -E "$TRANS_PROGRAM") - "$@"
###### this is the last line of the trans script.
To:
/opt/local/bin/gawk -f <(echo -E "$TRANS_PROGRAM") - "$@"
###### "/opt/local/bin" is just the case for me.

Finally, I used this code in the settings of Goldendict

/opt/local/bin/trans %GDWORD%

P.S. There is no problem to add any options you want after trans.

VirtualBox_MacOS 12 4_08_08_2022_00_27_33
VirtualBox_MacOS 12 4_08_08_2022_00_28_11

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

5 participants