Google Translator Service

MacOS has very handy shortcut ⌃⌘D to look up translations in the built-in dictionary. Unfortunately this does not always help if the word in question is either not in English or the definition is equally puzzling.

Automator to the rescue

Combining sources like this question in apple.stackexchange and this blog post in blog.fosketts I created an Automator Service that takes selected text from any application and then opens Google Translate with Auto->ET translation of the selection. Also added a shortcut for it: ⌃⇧⌘D

The AppleScript

Open Automator and create a New > Service, then search for Run AppleScript and drop that into the workflow. Then paste in this AppleScript from below.

on run {input, parameters}
	set phrase to input as string
	set myBrowser to "Google Chrome"
	set toLang to "et"

	tell application myBrowser
		open location "https://translate.google.com/#auto/" & toLang & "/" & phrase
	end tell
end run

Change myBrowser to your preferred browser and also toLang to desired destination language and then save the service. I chose name Translate to Estonian for obvious reasons.

The global shortcut

img-alternative-text

Next open System Preferences > Keyboard > Shortcuts and scroll down to your new service. Then add a convinient shortcut. I chose ⌃⇧⌘D because that is similar to the official Look up shortcut.

Now go forth and translate! 🖖

MTS to MP4 converter

Following my previous post about iMovie and MTS I always had random trouble with my converter failing/hanging with some  MTS files. And when repeated for the same file – no problems. This way I couldn’t just set the converter to work with tens of files and go for a coffee – I always had to look for hangs and stop the process only to restart it again.

And after I had problems with QuickTime refusing to open the new .mov files and iMovie having no sound, I thought it to be prime time to revisit the script.
Read More »