alfred-google-translate icon indicating copy to clipboard operation
alfred-google-translate copied to clipboard

Doesn't seem to work with Hebrew

Open kyrsquir opened this issue 4 years ago • 11 comments

Try it on any Hebrew word, for example "ברוך"

kyrsquir avatar Dec 09 '19 16:12 kyrsquir

please try with trc iw&en. it seems he no working again.

xfslove avatar Dec 10 '19 02:12 xfslove

Won't work for me. While it is configured to iw or he it behaves as if it encounters an error and crashes internally every time a translation is attempted. It won't show any results even when trying to translate an untranslatable special character like ✟ (which works if set to any other language).

kyrsquir avatar Dec 10 '19 19:12 kyrsquir

would you please paste the version of the node, alfred, workflow?

and if the workflow shown any errors paste the stack trace too.

xfslove avatar Dec 11 '19 01:12 xfslove

Node 12.13.0 Alfred 4.0.7 Workflow - main 2.0.8 and config 1.0.4

Also noticed that configured language doesn't matter, it crashes on Hebrew words even when other languages are set.

[06:23:54.082] ERROR: Google Translate (no Hebrew)[Script Filter] Code 1: {
	"items": [
		{
			"title": "העדפת",
			"subtitle": "Phonetic: ",
			"quicklookurl": "https://translate.google.com/#view=home&op=translate&sl=iw&tl=en&text=%D7%94%D7%A2%D7%93%D7%A4%D7%AA",
			"arg": "/var/folders/x7/kgxp3j9j5rx70lpkb0ls4jzr0000gn/T/706b175a-fb56-4246-8834-b1c35c9dbc60.mp3",
			"text": {
				"copy": "העדפת",
				"largetype": "העדפת"
			},
			"icon": {
				"path": "tts.png"
			}
		},
		{
			"title": "Preference",
			"subtitle": "Phonetic: ",
			"quicklookurl": "https://translate.google.com/#view=home&op=translate&sl=en&tl=iw&text=Preference",
			"arg": "/var/folders/x7/kgxp3j9j5rx70lpkb0ls4jzr0000gn/T/d2ff3cdc-79ed-4133-a562-a1dae8a6a75e.mp3",
			"text": {
				"copy": "Preference",
				"largetype": "Preference"
			},
			"icon": {
				"path": "tts.png"
			}
		}
	]
}
{
	"items": [
		{
			"title": "HTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=iw&ie=UTF-8&idx=0&total=1&textlen=5&q=%D7%94%D7%A2%D7%93%D7%A4%D7%AA&tk=701164.793847\n    at /usr/local/lib/node_modules/alfred-google-translate/node_modules/got/index.js:123:13\n    at processTicksAndRejections (internal/process/task_queues.js:93:5)",
			"subtitle": "Press ⌘L to see the full error and ⌘C to copy it.",
			"valid": false,
			"text": {
				"copy": "```\nHTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=iw&ie=UTF-8&idx=0&total=1&textlen=5&q=%D7%94%D7%A2%D7%93%D7%A4%D7%AA&tk=701164.793847\n    at /usr/local/lib/node_modules/alfred-google-translate/node_modules/got/index.js:123:13\n```\n\n-\nGoogle Translate (no Hebrew) 2.0.8\nAlfred 4.0.7\ndarwin 18.7.0",
				"largetype": "HTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=iw&ie=UTF-8&idx=0&total=1&textlen=5&q=%D7%94%D7%A2%D7%93%D7%A4%D7%AA&tk=701164.793847\n    at /usr/local/lib/node_modules/alfred-google-translate/node_modules/got/index.js:123:13"
			},
			"icon": {
				"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
			}
		}
	]
}
[06:23:54.087] ERROR: Google Translate (no Hebrew)[Script Filter] JSON error: Garbage at end. in JSON:
{
	"items": [
		{
			"title": "העדפת",
			"subtitle": "Phonetic: ",
			"quicklookurl": "https://translate.google.com/#view=home&op=translate&sl=iw&tl=en&text=%D7%94%D7%A2%D7%93%D7%A4%D7%AA",
			"arg": "/var/folders/x7/kgxp3j9j5rx70lpkb0ls4jzr0000gn/T/706b175a-fb56-4246-8834-b1c35c9dbc60.mp3",
			"text": {
				"copy": "העדפת",
				"largetype": "העדפת"
			},
			"icon": {
				"path": "tts.png"
			}
		},
		{
			"title": "Preference",
			"subtitle": "Phonetic: ",
			"quicklookurl": "https://translate.google.com/#view=home&op=translate&sl=en&tl=iw&text=Preference",
			"arg": "/var/folders/x7/kgxp3j9j5rx70lpkb0ls4jzr0000gn/T/d2ff3cdc-79ed-4133-a562-a1dae8a6a75e.mp3",
			"text": {
				"copy": "Preference",
				"largetype": "Preference"
			},
			"icon": {
				"path": "tts.png"
			}
		}
	]
}
{
	"items": [
		{
			"title": "HTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=iw&ie=UTF-8&idx=0&total=1&textlen=5&q=%D7%94%D7%A2%D7%93%D7%A4%D7%AA&tk=701164.793847\n    at /usr/local/lib/node_modules/alfred-google-translate/node_modules/got/index.js:123:13\n    at processTicksAndRejections (internal/process/task_queues.js:93:5)",
			"subtitle": "Press ⌘L to see the full error and ⌘C to copy it.",
			"valid": false,
			"text": {
				"copy": "```\nHTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=iw&ie=UTF-8&idx=0&total=1&textlen=5&q=%D7%94%D7%A2%D7%93%D7%A4%D7%AA&tk=701164.793847\n    at /usr/local/lib/node_modules/alfred-google-translate/node_modules/got/index.js:123:13\n```\n\n-\nGoogle Translate (no Hebrew) 2.0.8\nAlfred 4.0.7\ndarwin 18.7.0",
				"largetype": "HTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=iw&ie=UTF-8&idx=0&total=1&textlen=5&q=%D7%94%D7%A2%D7%93%D7%A4%D7%AA&tk=701164.793847\n    at /usr/local/lib/node_modules/alfred-google-translate/node_modules/got/index.js:123:13"
			},
			"icon": {
				"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
			}
		}
	]
}

kyrsquir avatar Dec 11 '19 03:12 kyrsquir

I saw that, its the tts problem. I'll take a look.

you could config the voice:none temporarily.

xfslove avatar Dec 11 '19 03:12 xfslove

That worked, thanks!

Is there a way to disable it only for Hebrew? Instant voice is one of the best features of this workflow :)

kyrsquir avatar Dec 11 '19 04:12 kyrsquir

perhaps no. sorry for that. but I'll fix this as soon as possible.

xfslove avatar Dec 11 '19 06:12 xfslove

I found that the Google not support Hebrew voice. look at this:

1

I'll find a way to give tips on workflow.

xfslove avatar Dec 12 '19 02:12 xfslove

Remark: I'm not sure which field of response body represents the voice available or not.

xfslove avatar Aug 25 '20 03:08 xfslove

there is any update?

udiNur avatar Jan 08 '21 11:01 udiNur

there is any update?

Sorry, Not yet.

xfslove avatar Jan 11 '21 01:01 xfslove