Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google-translate--search-tkk: Search failed: ",tkk:'" #2

Closed
hongyi-zhao opened this issue Jul 26, 2021 · 6 comments
Closed

google-translate--search-tkk: Search failed: ",tkk:'" #2

hongyi-zhao opened this issue Jul 26, 2021 · 6 comments
Labels

Comments

@hongyi-zhao
Copy link

On Ubuntu 20.04, I try to use this package with the following configuration:

(use-package define-it
  :config
  (setq ; Output with buffer.
        ;define-it-output-choice 'view 
        ; Output with tooltip.
        define-it-output-choice 'pop   
        ; Auto detect language.
        google-translate-default-source-language "auto" 
        ; Set your target language.
        google-translate-default-target-language "cn"))

But when I issue the command M-x define-it-at-point RET, the errors are triggered like the following:

image

Any hints for solving this problem?

Regards,
HY

@jcs090218
Copy link
Member

This is an upstream issue from google-translate, current workaround atykhonov/google-translate#52 (comment).

@hongyi-zhao
Copy link
Author

Thank you for directing me to the upstream bug. Base on my tires, the above comment is invalid now, and the vaild one is this comment.

@jcs090218
Copy link
Member

Thanks! Did not know it has changed! 👍

@jcs090218 jcs090218 pinned this issue Jul 26, 2021
@hongyi-zhao
Copy link
Author

hongyi-zhao commented Jul 26, 2021

However, a more general approach should rely on the real-time generated tokens to use the Google Translate API, for example, through the following tools:

https://github.com/kyai/google-translate-tk
https://www.npmjs.com/package/google-translate-tk

The above tools are implemented with golang and javascript respectively, which I'm not familiar with. So I can't immediately give a try on them. Another one which is implemented in python:

https://github.com/ssut/py-googletrans/blob/master/googletrans/gtoken.py

@jcs090218
Copy link
Member

However, a more general approach should rely on real-time generated tokens to use the Google Translate API, for example, through the following tools:

The goal of this project is to use a third party package written in Elisp due to the complexity and portability. Of course, we can implement that to this project but this requires some work and yet I do not have plan in a near future.

On the other hand, I would accept PRs if you are motivate on this enhancement. 👍

@jcs090218
Copy link
Member

I am going to close this issue due to the issue is from the upstream.

I have pinned this issue for people may have the same question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants