Google Translate has trouble with this site

From time to time I find myself wanting to read a conversation in a language I don’t speak on the old forums. In these cases, I put the url into Google Translate like this:
Google Translate forum.openstreetmap.org example (original link)

This doesn’t seem to work with this site. It just shows a blank page instead of a translated version.
Google Translate community.openstreetmap.org example(original link)

I’ve tried this on several other Discourse instances as well and found the same results, so perhaps this is just a fundamental limitation of Discourse being a client rendered JavaScript application. Does anyone know if there is a way to make this work like it does on most other websites? If not, I saw there was some discussion of adding a machine translation plugin. That would serve the same purpose.

2 Likes

For info, I’m seeing axactly the same problem. An attempt to translate the Hungarian forum here into English generates a URL of

ht tps://community-openstreetmap-org.translate.goog/t/openstreetmap-hungary/722?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp

(deliberately breaking the URL to stop Discourse replacing it with a broken link)

but the resulting page is empty.

Add /print to the end of the URL, e.g.

https://community.openstreetmap.org/t/google-translate-has-trouble-with-this-site/736/print

Translates like so:

It seems it’s a google translate limitation with webapps that fetch the content via js. You can use the workaround @jleedev mentioned.

1 Like

Thanks for the workaround, @jdeeve. Rather annoying that it pops open the browser’s print dialog automatically and removes much of the formatting but it’s better than a blank page. It would be nice if there was a query string parameter that forced the server side rendering Discourse falls back to when JS is disabled and for web index crawlers. Anyway whether it’s due to a google translate limitation or a discourse limitation this is something that works well with the old forum and doesn’t with this new one. I think ensuring there is an easy way for people to get a translation should be a priority.

1 Like

That still isn’t working for me?

In the LHS of https://translate.google.ca I have https://community.openstreetmap.org/t/openstreetmap-hungary/722/2/print, and result is then https://community-openstreetmap-org.translate.goog/t/openstreetmap-hungary/722/2/print?_x_tr_sl=hu&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp which just says " Oops! That page doesn’t exist or is private.".

Need to omit the second number in the path, so https://community.openstreetmap.org/t/openstreetmap-hungary/722/print.

The site responds to Control+P by opening this for you.

1 Like

That still doesn’t work for me - that gets me https://community-openstreetmap-org.translate.goog/t/openstreetmap-hungary/722/print?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp , which shows a print preview in Hungarian.

I’m using Firefox, if thats relevant.

Oof, there are a couple annoying things happening at once:

  • The version of Firefox (Android) I was using doesn’t actually support printing, so it worked fine for me.
  • The extent to which printing blocks the page is nonstandard. (Chrome begins to print the page when asked but keeps on running scripts.) If you cancel the print preview dialog, the translation will commence.
  • Google Translate isn’t content to read the <noscript> version of a page, it insists on being clever.
  • Google Translate no longer translates web pages server side, but delivers a page that translates chunks of text as they scroll into view, so you need to scroll to the bottom of the page for the entire text to get translated.

Instead of /print you can use ?_escaped_fragment_, but this does not deliver the whole topic on a single page.

https://meta.discourse.org/t/make-discourse-play-nice-with-the-wayback-machine/34579?_escaped_fragment_&page=2https://meta-discourse-org.translate.goog/t/make-discourse-play-nice-with-the-wayback-machine/34579?_escaped_fragment_&page=2&_x_tr_sl=auto&_x_tr_tl=la&_x_tr_hl=en&_x_tr_pto=wapp

This is super annoying.

1 Like

There’s been agreement to test the installation of translator plugin to solve the issue of translating content here:

2 Likes

For completeness, omitting the second number in the URL does work in Google translate on Android, although of course the context is completely lost you have to find the bit of the thread you were trying to translate.

Another thing that works is using Google Chrome.
Google Translate is tightly integrated in that browser and it doesn’t require the print workaround. Not an ideal solution for those of us who prefer other browsers though.

I personally use the Simple Translation addon in Firefox and works great

1 Like

Thanks for the recommendation. I’ve just tried it out to see if it works better than the addon I’ve been using (To Google Translate). Unfortunately it seems like the full page translation works in the same way, and fails with client side rendering.

Is this working for you in some other way, or do you just select blocks of text to translate? Maybe that’s what you mean by “works great”. Translating post by post certainly works better than the other addon I’ve been using:

Yes, I highlight the part I want to be translated first and get the in-context translation.

1 Like

Now that the site has built-in translation button, I think we can close this request. Please comment if you think it should be still open.

Thanks!

1 Like

Thanks for creating the thread, I also facing the same issue, as google translate does not work on one site. it shows error. I will try firefox addon if it became available as a Chrome extension.

You should be able to use the built-in translate button now - the little “globe” below each post?