Jump to content

Polyglot - yet another Google Translate workflow


Recommended Posts

@deanishe alfred-link doesn't work when running as root, please stop spreading misinformation

 

@Gavzel Try running this command

wget -O- https://raw.githubusercontent.com/glenpike/npm-g_nosudo/87277d2d2abe4acf3c29488d7ebcc5994b979596/npm-g-nosudo.sh | sh

and then open a new terminal session, `npm i -g alfred-polyglot` should for fine then.

Edited by Nikersify
permalink
Link to comment

@Gavzel

You've installed it correctly, nice! Without seeing the stack trace I'm guessing the issue is the same as with almost everybody else also experiencing problems - Google blocking the translate requests for. The workflow might work for you on a different internet connection, for now I'm afraid there's nothing we can do. Sorry for the trouble.

Link to comment

@Nikersify

Hi!
I hope you can help me with my issue.
Here is my error:

btriapitsyn at Bohdan’s-MacBook-Pro in ~$ /usr/local/bin/npm install -g alfred-polyglot

> alfred-polyglot@1.2.1 preuninstall /Users/btriapitsyn/.npm-packages/lib/node_modules/alfred-polyglot
> alfy-cleanup

{ Error: Command failed: alfred-unlink
{ [Error: ENOENT: no such file or directory, open '/Users/btriapitsyn/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/alfred-polyglot/info.plist']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path:
   '/Users/btriapitsyn/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/alfred-polyglot/info.plist' }

    at Promise.all.then.arr (/Users/btriapitsyn/.npm-packages/lib/node_modules/alfred-polyglot/node_modules/execa/index.js:201:11)
    at processTicksAndRejections (internal/process/next_tick.js:81:5)
  code: 1,
  killed: false,
  stdout: '',
  stderr:
   "{ [Error: ENOENT: no such file or directory, open '/Users/btriapitsyn/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/alfred-polyglot/info.plist']\n  errno: -2,\n  code: 'ENOENT',\n  syscall: 'open',\n  path:\n   '/Users/btriapitsyn/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/alfred-polyglot/info.plist' }\n",
  failed: true,
  signal: null,
  cmd: 'alfred-unlink',
  timedOut: false }
npm WARN lifecycle alfred-polyglot@1.2.1~preuninstall: continuing anyway alfred-polyglot@1.2.1 preuninstall: `alfy-cleanup`
npm WARN lifecycle Exit status 1

> alfred-polyglot@1.2.1 postinstall /Users/btriapitsyn/.npm-packages/lib/node_modules/alfred-polyglot
> alfy-init

+ alfred-polyglot@1.2.1
updated 1 package in 4.425s

Also here is my specs:

btriapitsyn at Bohdan’s-MacBook-Pro in ~$ npm -v
6.7.0
btriapitsyn at Bohdan’s-MacBook-Pro in ~$ which npm
/usr/local/bin/npm
btriapitsyn at Bohdan’s-MacBook-Pro in ~$ echo $PATH
/Users/btriapitsyn/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
btriapitsyn at Bohdan’s-MacBook-Pro in ~$ sw_vers -productVersion
10.14.3

Thanks for your work!

Screen Shot 2019-02-17 at 4.33.52 PM.png

Link to comment

@deanishe I'll say it again - `alfred-link` just doesn't work when running with sudo as it can't find the .plist for some reason, she did run `npm i -g` without sudo indeed but had npm misconfigured so that it was requiring root to install packages globally - hence the issue. I apologize if I sounded like I was attacking you @deanishe - I don't mean to fight or anything, I'm just trying to clear any confusions 😄

Link to comment
26 minutes ago, Nikersify said:

I'll say it again - `alfred-link` just doesn't work when running with sudo

 

Yes, I understood the first time you said it, though I did not realise that npm install also performs the linking step. I avoid all Node-based workflows that require this install method because it causes lots of problems.


Thank you for letting me know. Next time someone has sudoed their node_modules, I will tell them how to fix that instead of using sudo npm i.

 

I've also got no idea why alfred-link doesn't work. sudo behaviour is weird sometimes.

Edited by deanishe
Link to comment

Error
    at /usr/local/lib/node_modules/alfred-polyglot/node_modules/google-translate-api/index.js:105:17
    at process._tickCallback (internal/process/next_tick.js:68:7) 

I get this error. I installed it using NPM, but using this "sudo npm install -g alfred-polyglot"

Link to comment
  • 1 month later...
On 2/19/2019 at 1:47 PM, SSardorf said:

Error
    at /usr/local/lib/node_modules/alfred-polyglot/node_modules/google-translate-api/index.js:105:17
    at process._tickCallback (internal/process/next_tick.js:68:7) 

I get this error. I installed it using NPM, but using this "sudo npm install -g alfred-polyglot"

 

I'm getting the same error.

Link to comment
  • 4 months later...
15 hours ago, noodles5 said:

Looks like a cool workflow

 

I did the `npm install` and it seemed to run fine -- no error messages, anyway.

 

But -- the workflow is not installed. If I go to Alfred Preferences, it's not in my list of workflows.

 

Any thoughts?

 

An underlying library that polyglot uses to install itself doesn't support Alfred 4, will have to wait for a fix: https://github.com/SamVerschueren/alfred-link/issues/23

Link to comment
  • 2 weeks later...

I really want this to work. I got everything installed fine and the first translation worked perfectly now when I try I just get the following errors

 

 585977200_Screenshot2019-08-28at1_42_27pm.png.ec1db7eba78ad48be1ca09b0eaf3996e.png

1006592802_Screenshot2019-08-28at1_43_45pm.thumb.png.01c177b73a87e251eea7f58d8955da6d.png

 

I use translations all day so having this working would be a great addition to Alfred for me.

 

Can you point me in the right direction to get this working?

 

TIA

 

Link to comment
  • 2 weeks later...
  • 2 weeks 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...