Jump to content
Nikersify

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

Share this post


Link to post

Path I get:

 

Users/joellelemoan 1/System/Library/Caches

 

No Preferences in it.

 

I only get:

 

Macintosh HD/Library/Preferences/

 

I don’t know where is this file ?

com.runningwithcrayons.Alfred-Preferences-3.plist

Share this post


Link to post

@Gavzel Oh my bad, try this instead and then run the install command in a new window:

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

 

Share this post


Link to post

@Nikersify

 

Look great ! Thanks ! 😊

Except when I made  try, I got this error:

Try : "trans non from fr"

"Error : Activate this item to try again. Cmd+L to see stack trace"

 

Do I forget something ? Workflow appear in Alfred's List.

Share this post


Link to post

@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.

Share this post


Link to post
1 hour ago, Nikersify said:

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

 

And npm install -g doesn't work as non-root when you've previously run it as root.

Share this post


Link to post
5 minutes ago, Nikersify said:

@deanishe I agree!

 

Which she had already done:

 

3 hours ago, Gavzel said:

jlmretina:~ jlm$ npm i -g alfred-polyglot

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules

 

Share this post


Link to post

@Nikersify

So actually, we can't use this Workflow ? Bad luck, it's look so nice… 😕

 

Please don't fight about me and my previous problem, using "sudo" or not.
Workflow has been installed even if I can't use it really. 😀

 

I just hope than I haven't installed twice (local and global in root) ?

Share this post


Link to post

@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

Share this post


Link to post

@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 😄

Share this post


Link to post
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

Share this post


Link to post

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"

Share this post


Link to post
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.

Share this post


Link to post

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?

Share this post


Link to post
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

Share this post


Link to post

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

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...