Shortcuts for Text Translation

Earlier this year I posted an Automator workflow that sent text to Google Translate. As I mentioned then, I work for a company with global offices and I have to make quick translations often. I used the workflow regularly. It rarely fails and has saved me a considerable amount of time. I can also translate text on my iOS devices but it requires more steps. I’m now running Apple Silicon Macs exclusively and macOS Monterrey includes the shortcuts app. It was relatively simple to build a translation shortcut that is cross platform.

Translate Shortcut

The shortcut is fairly basic. It only uses built-in commands.

  1. Take selected text as input. Make it available in Share Sheet (iOS) and Quick Actions (macOS available in Services menu).
  2. Save the text to a variable.
  3. Use the built-in Microsoft translation function.
  4. Save the translated text to a variable.
  5. Save the translated text in the clipboard for later use if needed.
  6. Output the original text and the translated text.

Translated Text Example

I created a generic version that allows for a choice of translated language and a version for quick translation to English and German. These are my most frequently used languages.

Services Menu

Thanks to the cross platform support this is now also readily available on iOS in the share sheet which eliminates several steps and app changes.

Share Sheet

I Love You for What You Are

by Carl Sandburg

“I love you for what you are, but I love you yet more for what you are going to be.

“I love you not so much for your realities as for your ideals. I pray for your desires that they may be great, rather than for your satisfactions, which may be so hazardously little.

“A satisfied flower is one whose petals are about to fall. The most beautiful rose is one hardly more than a bud wherein the pangs and ecstasies of desire are working for a larger and finer growth.

“Not always shall you be what you are now.

“You are going forward toward something great. I am on the way with you and therefore I love you.”

My girlfriend shared this with me the other day. This is a poem about love and love is about growth. Love makes imperfect things perfect. Love takes small things and makes them great. Love accepts today but embraces tomorrow. I’m thankful tonight. I am loved, not always because of who I am, but because of who I can be.

I promise to post about Iceland babe. I made some progress tonight.

September 21st One Day Late

Demi Adejuyigbe has been making videos to the famous Earth, Wind & Fire song September since 2015. This year’s is the last and is spectacular. He asks for a donation to one of three charities. They are all good choices. Donations are accepted here. I would suggest The West Fund to help women facing assaults on their reporductive rights in Texas.

Trailer 1 for The Matrix Resurrections

I absolutely love The Matrix. I’m not a fan of the sequels. I wasn’t sure if I would watch the newest installment, let alone eagerly anticipate it, but here I am giddy and exited.

Norm MacDonald, The Comedian’s Comedian

Last night as I was scrolling Twitter I learned that Norm MacDonald had died after a private 9 year battle with cancer. I’ve always enjoyed Norm’s comedy. I loved his deadpan delivery and the way that he seemed to care more about the craft of telling a good joke than the result. A lot has been written about Norm chasing the perfect joke. I think it was clearly evident every time he was on stage that he was a craftsman and completely dedicated to the craft. I’m thankful that we live in the time of YouTube and other media so that we can remember him and the great laughs that he brought for so many years.

In his book Based on a True Story: A Memoir, Norm wrote,

It can be difficult to define yourself by something that happened so long ago and is gone forever. It’s like a fellow at the end of the bar telling no one in particular about the silver medal he won in high school track, the one he still wears around his neck. The only thing an old man can tell a young man is that it goes fast, real fast, and if you’re not careful it’s too late. Of course, the young man will never understand this truth. . . . But it is impossible for me to be bitter. I’ve been lucky.

We should all feel so blessed.

Pretty Errors

I ran across a nice python package recently. Pretty_Errors formats python exception messages so that they are more legible. Installing it universally also enables the package to make syntax errors more legible. This is one of those packages that I wish I had years ago and I will automatically install for every project going forward.

python -m pip install pretty_errors
python -m pretty_errors 

Running these commands will install the package and then add it to your python startup procedure. If it is not setup universally then it must be imported into each project import pretty_errors. I prefer the universal method.

Webmention Playground

I need a place to test webmentions without spamming anyone. I created this post for that purpose. If you need an endpoint to test against you can use this page also.

Making Traditional French Butter

This video tickles all my fancies. We see chemistry and physics, craftsmanship, passion, mechanics, and a sheer love of work and life. Someone could make a full documentary a la “Jiro Dreams of Sushi” here and I would gladly watch it.

From the always excellent blog FYFD.