Jump to content

Google Translate (working) workflow requested


Recommended Posts

Hi, just finding my way around the brilliant Alfred. A little disappointed to find that the Google Translate workflow doesn't work, leading to a 404 error notice, and the 'script' is not editable.

 

Does anyhow have a custom Google Translate workflow that would, say, copy the contents of the clip board into the 'From' box on Google's Translate page, presuming that the target language is going to be English? I'd be most grateful if you could share it!

 

Many thanks.

Link to comment

@peegeebee If by workflow, you're referring to the default web search for Google Translate, the URL structure was changed by Google a couple of days ago.

 

If you update to the Alfred 4.3.2 pre-release (by going to the Update tab, choosing "pre-releases" from the dropdown menu at the bottom and updating), you'll see that this URL has already been updated to reflect Google's change :)

 

Cheers,
Vero

Link to comment

Hi Vero,

 

Is there an estimated date to launch this update?

 

On 2/8/2021 at 7:48 AM, Vero said:

@peegeebee If by workflow, you're referring to the default web search for Google Translate, the URL structure was changed by Google a couple of days ago.

 

If you update to the Alfred 4.3.2 pre-release (by going to the Update tab, choosing "pre-releases" from the dropdown menu at the bottom and updating), you'll see that this URL has already been updated to reflect Google's change :)

 

Cheers,
Vero

 

Link to comment
  • 2 weeks later...

@Bi1l Could you please share a link to the exact workflow you're referring to? The earlier posts in the thread refer to Alfred's built-in Google Translate feature.

 

Once the workflow is set up, which looks to be what you did in your first screenshot, using the workflow will depend on the keywords - which can be found in the workflow's preferences.

 

Cheers,
Vero

Link to comment

 hope i did it right  

 

image.png.af2c4cad7de0bc1f6129a42b3ecd41ae.png

image.png.38915805191d49c40049cacbeb64e1c2.png

image.png.d3d2de4fe8c3dcc53e651e5bacfb333b.png

[15:00:21.643] Google Translate[Script Filter] Queuing argument 'apple'
[15:00:24.540] Google Translate[Script Filter] Script with argv 'apple' finished
[15:00:24.545] ERROR: Google Translate[Script Filter] Code 1: {
	"items": [
		{
			"title": "алим",
			"subtitle": "Detected the input language is English, not one of your configuration."
		}
	]
}
{
	"items": [
		{
			"title": "HTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=mn&ie=UTF-8&idx=0&total=1&textlen=4&q=%D0%B0%D0%BB%D0%B8%D0%BC&tk=913782.913782\n    at /Users/bill/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A2EFD2ED-16C5-4DD1-AEB6-D7E6F950B925/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=mn&ie=UTF-8&idx=0&total=1&textlen=4&q=%D0%B0%D0%BB%D0%B8%D0%BC&tk=913782.913782\n    at /Users/bill/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A2EFD2ED-16C5-4DD1-AEB6-D7E6F950B925/node_modules/got/index.js:123:13\n```\n\n-\nGoogle Translate 2.0.9\nAlfred 4.3.2\ndarwin 20.4.0",
				"largetype": "HTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=mn&ie=UTF-8&idx=0&total=1&textlen=4&q=%D0%B0%D0%BB%D0%B8%D0%BC&tk=913782.913782\n    at /Users/bill/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A2EFD2ED-16C5-4DD1-AEB6-D7E6F950B925/node_modules/got/index.js:123:13"
			},
			"icon": {
				"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
			}
		}
	]
}
[15:00:24.549] ERROR: Google Translate[Script Filter] JSON error: Garbage at end. in JSON:
{
	"items": [
		{
			"title": "алим",
			"subtitle": "Detected the input language is English, not one of your configuration."
		}
	]
}
{
	"items": [
		{
			"title": "HTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=mn&ie=UTF-8&idx=0&total=1&textlen=4&q=%D0%B0%D0%BB%D0%B8%D0%BC&tk=913782.913782\n    at /Users/bill/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A2EFD2ED-16C5-4DD1-AEB6-D7E6F950B925/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=mn&ie=UTF-8&idx=0&total=1&textlen=4&q=%D0%B0%D0%BB%D0%B8%D0%BC&tk=913782.913782\n    at /Users/bill/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A2EFD2ED-16C5-4DD1-AEB6-D7E6F950B925/node_modules/got/index.js:123:13\n```\n\n-\nGoogle Translate 2.0.9\nAlfred 4.3.2\ndarwin 20.4.0",
				"largetype": "HTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=mn&ie=UTF-8&idx=0&total=1&textlen=4&q=%D0%B0%D0%BB%D0%B8%D0%BC&tk=913782.913782\n    at /Users/bill/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A2EFD2ED-16C5-4DD1-AEB6-D7E6F950B925/node_modules/got/index.js:123:13"
			},
			"icon": {
				"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
			}
		}
	]
}

 

 

CN>EN

image.png.1065c494d17884ed3b9da0822f1aa624.png

image.png.6346521e330db04b15affa56b7501852.png

[15:11:39.848] Google Translate[Script Filter] Queuing argument '苹果'
[15:11:43.160] Google Translate[Script Filter] Script with argv '苹果' finished
[15:11:43.164] Google Translate[Script Filter] {
	"items": [
		{
			"title": "apple",
			"subtitle": "Detected the input language is Chinese Simplified, not one of your configuration."
		}
	]
}

 

Link to comment
  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...