Code Monkey home page Code Monkey logo

Comments (42)

bpierre avatar bpierre commented on May 18, 2024

Same here, it looks like Google really wants to close any remote access to the Google Translate service. Maybe it’s time to switch to Bing, as suggested in #4.

from gtranslate.

xael-fry avatar xael-fry commented on May 18, 2024

I manually call the url, and i get a Captcha, when filling it, I finally get the correct result.
I will try to have a deeper look.

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

Yes same for me, and after some time, I need to fill the captcha again… I will have a look this week-end, I also have started a rewrite (not the API part though) to make it restartless and compatible with multiprocess tabs.

from gtranslate.

rodolfobandeira avatar rodolfobandeira commented on May 18, 2024

Hi guys!
translate-shell fixed their problem. I believe if we verify their last commits we can found the solution to fix it to gTranslate.

https://github.com/soimort/translate-shell

from gtranslate.

pautomas avatar pautomas commented on May 18, 2024

@bpierre woah! you're still mantaining it. Thanks a lot!

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

@pautomas I am trying to! Thanks to you! I am still using it every day after all these years 🙏

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

@rodolfobandeira Thanks, I will try to reproduce the request they are doing.

from gtranslate.

pedro22 avatar pedro22 commented on May 18, 2024

Strange if I check a longer text, eg: "Hi guys!
translate-shell Their fixed the problem. I believe if the verify Their last commits we can found the solution to fix it is gTranslate" is gTranslate every time it works well, but I'll skip this the text "Hi guys!" It appears "service unavailable"

Regards.

from gtranslate.

IGZrobertogonzalez avatar IGZrobertogonzalez commented on May 18, 2024

Maybe this link can help: https://support.google.com/websearch/answer/86640?hl=en

from gtranslate.

pedro22 avatar pedro22 commented on May 18, 2024

Captcha typed, but it does not help - beyond that as I wrote earlier gTranslate long sentences translators and short no.

from gtranslate.

rodolfobandeira avatar rodolfobandeira commented on May 18, 2024

Nice shot @pedro22 ! Long sentences works.. the short ones or single words are failing.

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

I pushed a rewrite in this branch, using Jetpack (Addons SDK) instead of XUL (Legacy Extensions): https://github.com/bpierre/gtranslate/tree/jetpack

It’s not usable yet.

The basic features are working though, including the Google Translate request. I now have to implement the language selection, test a lot, and I will publish a release as soon as possible.

from gtranslate.

elemoine avatar elemoine commented on May 18, 2024

Very cool @bpierre. Thanks for that!

from gtranslate.

rodolfobandeira avatar rodolfobandeira commented on May 18, 2024

Hi @bpierre ! Thanks for the update! I just don't get it how to update my firefox extension with that one you created using Jetpack.

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

Hi @rodolfobandeira, I will publish a .xpi as soon as it’s usable.

If you want to launch it yourself in the meantime, you have to install jpm and Firefox Nightly, then run this command in the addon directory:

$ make run

You can also build it yourself:

$ jpm xpi

from gtranslate.

achernyakevich-tch avatar achernyakevich-tch commented on May 18, 2024

I have slightly played with trying to translate different length phrases. It really looks that Google blocks almost everything that is short enough. I could detect that sentences longer than 139 symbols are translated without problems. :)

So I can suspect that Google just introduced restriction for their translation API usage trying to minimize number of calls for short phrases. Maybe we need to search for other API method for shorter sentences or find the way to assure Google that we are not spammers trying to overload its service.

from gtranslate.

ahmadramadan avatar ahmadramadan commented on May 18, 2024

I can't live without this plugin :(

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

@achernyakevich Are you talking about the stable version, or the one from the jetpack branch?

@ahmadramadan Same for me! I am very busy these days, but it’s on the top of my priority list. You can follow the progress here: #24

from gtranslate.

pedro22 avatar pedro22 commented on May 18, 2024

@bpierre Can create a firefox plugin to as beta, let people test and any errors will be reported.

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

@pedro22

Yes, I will drop a .xpi here as soon as possible, but for now it’s still too much broken and I need to fix these two points:

  • The language menu is not finished
  • The performances of the language menu generation are bad at the moment (if your computer is not fast enough, you have a delay before the context menu is displayed). I suspect the context-menu module from the Addons SDK, which is much slower than pure XUL, but I am trying to isolate the problem.

from gtranslate.

mote0230 avatar mote0230 commented on May 18, 2024

Hi everyone, with the power of regexes I was able to fix the old version, mostly. Only thing still broken that I see is newlines and other stuff like that, it displays as \n.
You can download the xpi here: {aff87fa2-a58e-4edd-b852-0a20203c1e17}.xpi http://a.pomf.se/agntdb.xpi

Or edit the file yourself, see http://pastebin.com/GRAYnVvj the translationRequest and getGoogleUrl

from gtranslate.

achernyakevich-tch avatar achernyakevich-tch commented on May 18, 2024

@bpierre I checked for stable version 0.9 available from Mozilla Addons search.

from gtranslate.

mote0230 avatar mote0230 commented on May 18, 2024

I spent some more time, fixed the issue with the newlines. Tried a lot to add new languages but couldn't get it to work. @bpierre feel free to use this as a temporary upgrade so people stop giving 2 star reviews.
http://a.pomf.se/gxfldu.xpi

Edit: fixed a bug where sometimes text from the examples leaked through, new version http://a.pomf.se/fsyfnz.xpi

from gtranslate.

rodolfobandeira avatar rodolfobandeira commented on May 18, 2024

@mote0230
👍 👍 👍 👍 👍 👍 👍 👍 👍

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

@anon0230 Thanks for the update! Sadly it can’t be submitted to the Mozilla Addons without refactoring the code: the addon needs to be compatible with E10s (see #21), which is not the case for the current codebase.

Feel free to contribute to the jetpack branch though, the Google Translate module is in providers/google-translate.js, and it shouldn’t be too much work to add your improvements into it.

PS: In case you are not familiar with GitHub: you have to fork the project, make your modifications in your jetpack branch, then create a pull request from the jetpack branch of your repo into the jetpack branch of this repo.

from gtranslate.

def00111 avatar def00111 commented on May 18, 2024

You can use this function to get the selected text (works with e10s)

function getBrowserSelection(doc) {
  const { BrowserUtils } = doc.defaultView;

  let [element, focusedWindow] = BrowserUtils.getFocusSync(doc);
  var selection = focusedWindow.getSelection().toString();
  // try getting a selected text in text input.
  if (!selection) {
    let isOnTextInput = elem => {
      // we avoid to return a value if a selection is in password field.
      // ref. bug 565717
      return elem instanceof  Ci.nsIDOMHTMLTextAreaElement ||
             (elem instanceof  Ci.nsIDOMHTMLInputElement && elem.mozIsTextField(true));
    };

    if (isOnTextInput(element)) {
      selection = element.QueryInterface(Ci.nsIDOMNSEditableElement)
                         .editor.selection.toString();
    }
  }

  if (selection) {
    selection = selection.trim().replace(/\s+/g, " ");
  }
  return selection;
}

Note: You must pass a XULDocument to the function.

from gtranslate.

fedorvinogradov avatar fedorvinogradov commented on May 18, 2024

@mote0230 thanks a lot dude - works like a charm

from gtranslate.

MarcoSchool avatar MarcoSchool commented on May 18, 2024

Hope this solution gets updated into mozilla soon.
Great plugin by the way kudos.

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

The release is almost ready, I just need to test it more.

Please try it and tell me if you see any issue: https://github.com/bpierre/gtranslate/releases/tag/v0.10

from gtranslate.

def00111 avatar def00111 commented on May 18, 2024

Working good :)
I also like the detected lang feature :)

from gtranslate.

andrew-chiz-muzychuk avatar andrew-chiz-muzychuk commented on May 18, 2024

Still not working.
I uninstall and install it - nothing.
Win 7 64, FF 37.0.2

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

@andrew-chiz-muzychuk have you tried to install gtranslate.xpi from this page? https://github.com/bpierre/gtranslate/releases/tag/v0.10

from gtranslate.

andrew-chiz-muzychuk avatar andrew-chiz-muzychuk commented on May 18, 2024

@bpierre no, I didn't. I went to FF's Addons and install from there. And it was v 0.9. I've tried your link. It installed v 0.10, which works perfect.
Also, I like that this menu is at the very bottom. Very usfull.
Thanks a lot!

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

Great!

Also, I like that this menu is at the very bottom. Very useful.

I wasn’t sure about that… Maybe I should add an option to insert it at the top, at the bottom (as it is now), or just before the “Inspect Element”. I also need to add a separator.

Edit: #26

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

The update has been approved: https://addons.mozilla.org/firefox/addon/gtranslate/

from gtranslate.

nemesis8185 avatar nemesis8185 commented on May 18, 2024

Hello @bpierre. The new version, 0.10.1, doesn't work with Menu Editor add-on. The old GTranslate version worked fine. Please, is it possible, in some way, that GTranslate works with Menu Editor 1.2.7? I love GTranslate, but uninstalling Menu Editor, makes a chaos of all my context menus. FOr now, I'm using the temporary GTranslate that was added to this page some days ago (the temporary solution). I would really love to be able to update to GTranslate 0.10.1, as it's a great (and irreplaceable) add-on.
Thanks for your time & for this great add-on!

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

@nemesis8185 Hi, could you send me the page of the Menu Editor addon? I only find “Menu Editor II”, which is deprecated by the author. I answered here for the same issue #28 (comment)

from gtranslate.

pedro22 avatar pedro22 commented on May 18, 2024

I updated the plugin to version 0.11.0 and I have no gTranslate item on the menu, and version 0.10.1 is - can you fix it?

Win XP SP3 - Firefox 38.0.1

from gtranslate.

bpierre avatar bpierre commented on May 18, 2024

@pedro22 Could you open a new issue, and paste the results of about:support (Help => Troubleshooting Information)?

from gtranslate.

CatQuest avatar CatQuest commented on May 18, 2024

hi, "service unavailable" is back. and this time no matter how much or little text is selected, it's the same; it's completely unworking now.

has google completely shut it down? :(

from gtranslate.

IGZrobertogonzalez avatar IGZrobertogonzalez commented on May 18, 2024

@CatQuest I think it was temporary. Now it's working

from gtranslate.

farmazon3000 avatar farmazon3000 commented on May 18, 2024

new issue: #43

from gtranslate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.