Skip to content
TheChatArchiveThe Chat Archive
Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)Hugging Face OpenAssistant Conversations (oasst2)

I had a idea for a Chrome-Extension that would translate the contents of a Webpage 100…

In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
  1. User

    I had a idea for a Chrome-Extension that would translate the contents of a Webpage 100 times (variable by a slider) and finally translate it back to the original Language for some funny outcomes (like with the "Bad Translator" google docs addon but instead of having to manually paste text there i could just translate the whole webpage and make it look funny) but the problem is, that I would need a expensive api key. I, however, noticed that when you "google" google translate, then you can translate for free, so my idea would be to just feed the websites text into that thing the ammount of times that were specified. How would i do that automatically?

  2. Assistant

    If you're planning to publish the extension, it's best not to abuse Google's services like that, as it's very likely that they'll take it down from their store. You should instead use a cheaper alternative, such as LibreTranslate hosted on a cheap Hetzner server. (LibreTranslate isn't as good at translation as Google's services, which in your case should be a positive!) However, if you don't plan on sharing the extension publicly and don't mind potentially being ratelimited, a good place to start is to look at your browser's network monitor (available in the "Inspect Element" panel) while using the translator. You could also study the code of open-source alternative frontends, such as Lingva Translate.

  3. User

    Since im not planning on publishing the extension because of what you mentioned above, I would still like to do it that way since it just basically automates a translation of a Website in a funny way which is a service Google already offers, just the boring way ;)

  4. Assistant

    There are several ways to automatically feed text into Google Translate using a Chrome extension. One way is to use the Web Scraping technique to extract the text from the webpage, then use the JavaScript fetch() function or a library such as axios to send a request to the Google Translate website with the extracted text as the input. You can then use the returned translation as the input for the next translation iteration, until the specified number of translations is reached. Finally, you can use JavaScript to modify the webpage's DOM and replace the original text with the final translation.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.