Discourse Translator - Pricing and Language Coverage

I wouldn’t imagine that such a limit would be a problem for the odd post in a mixed-language thread, but I was trying to read a thread that was all in dutch (which I can’t read) and so had to click to translate each little 3-sentence post in the thread.

If there was a way to translate all posts in a thread that would cut down on the number of clicks, but maybe that would have other issues in terms of translating from many source languages to one destination in a single larger request.

I was hoping that once a post had been translated Discourse would cache the translation for some time to minimize redundant API requests. As far as I can tell every time the translate button is clicked is a new request though. Can any of the sysadmins confirm or deny this?

(trying out auto-translate)

Wie kommst Du darauf? Klar ist die Übersetzung ein eigener Aufruf von Deinem Browser aus gesehen, aber zu Discourse.

Edit: Diesen Absatz habe ich später hinzugefügt nachdem ich den Text einmal habe automatisch übersetzen lassen. Mal sehen ob es entsprechend neu übersetzt wird.

I clicked the translate button quickly on three different posts in order to trigger the rate limit message. Then in a separate tab clicked the translate button on the same three posts. I figure if the translations are getting cached then the rate limit message wouldn’t show up since a live API call to Bing translate would not be needed. The rate limit message does show up on the same posts so I’m assuming they aren’t getting cached. However, it’s easily possibly that things are working differently behind the scenes than how I’m imagining and the rate limit is simply tied to the button click regardless of any caching that may or may not be happening.

1 Like

Hm, clever. So either the caching doesn’t work, or the rate limiting is checked before it is checked whether a post is already cached.

Okay, it looks like the rate limiting is checked first, here:

And the check whether the translated text has already been saved to the database is done after that, here:

I guess a good solution would be to move the “checking whether something is in cache” logic out of the DiscourseTranslator::Base.from_custom_fields method and into DiscourseTranslator::TranslatorController.translate so the order of rate-limiting and cache-checking can be switched.

However, I won’t create a PR because I don’t know Ruby at all. Maybe someone with at least some basic knowledge in Ruby could get this done.

3 Likes

I have tried the translator on several posts and believe this is a good step forward in removing language barriers. Not yet a fully automated system but easy to handle and delivering reasonable translations. A bit stiff here and there but you can always get the point, at least for those languages I tried. As long as everyone contributing to a thread puts a little effort into correct wording this should do quite well.

For me this is a must in a forum which claims internationality … at the end of the day it’s a question of the price of course …

I have noticed the globe icon under my own post … finally I am able to translate my own message into my native language … this is the first time I really understand what I have been posting … I love it … :crazy_face:

The limit is 3 translations a minute. There is a tiny cost associated with each translation (to use the Azure Translate API). If 3 per minute is too low for general usage then I’m ok with increasing it a little.

I clicked the World icon below my English post. At first, result seems fine, except… when there are words, that have several meanings. I have seen this before, the translation engine then sometimes selects the wrong branch, making the output mostly indecipherable.

But yes, this, the extra click and expanding space, looks a practical way to deal with stray foreign language posts in threads/topics.

5 posts were merged into an existing topic: Translator plugin icon

13 posts were split to a new topic: Translator plugin icon

Playing with the translation function - is my observation correct that the button translates the content of posts nicely (provided you find it), but there is no way to get translate the title of a post? Or rather the titles e.g. in a category listing?

Yes, that’s correct. It is indeed one of two features that are most sorely missed with the discourse translator plugin. If anyone is fluent in Ruby (script language in which Discourse and plugins are written) and would like to work on that, they do accept PRs:

  1. Translating topic titles is very important to make topics in other language discoverable in the first place. For this reason, I think topic tiles should actually always be automatically translated (or at least there should be an admin setting for that).
  2. As far as I know, translated texts are not integrated in search. Again, this would be very important for discoverability.

In the end, for a really seamless experience, it would be ideal if all texts not in a list of preferred languages were always automatically translated and the :globe_with_meridians: button would just lead to the original text. This is how e.g. Google does it for reviews (on Google Maps, Google Play, …). Now, this would (potentially) drive up the costs somewhat, but if a self-hosted LibreTranslate is used, it wouldn’t be that much of an issue.

Risking this to get flagged: I support the spending of money on machine translations: The entertainment value is there, they been good for several laughs already! (Previously, having my own English posts translated, made me think, is my English really so bad? While that may be true, now I think, when it really fails, it fails so glaringly obvious, that nobody has a chance to not notice, so it should not do much harm, after all.)

PS: Perhaps On-topic: I rather have the globe show the translation, not the native language, at least when the original post is in a language, that I can read (acc. to set preferences). Not sure though, if I actually want to read titles in unfamiliar languages or scripts translated. Those mostly would be local concerns? In case they cover worldwide concerns, there sure is someone from the local community, who can word subject matter in English? That is, in case they really want that outreach?

Edit to add: With General Help questions, as they likely are in global space from the start, I can see the bonus, of getting the list of titles pre-translated. So a feature for certain categories only.

1 Like

Update on pricing for the first 30 days of usage:

We are well within the free tier pricing level.

354,460 characters translated in last 30 days which is only 17% of the free 2 million character tier allowance.

5 Likes

It seems that if the language configured in my settings isn’t supported (Galician), I get a “500 error” when clicking the globe icon. It would be nice to get a proper informational message instead, because it made me think for days that the translation feature was not working :sweat_smile:

1 Like

Given that the issue tracker is disabled on the code repo (GitHub - discourse/discourse-translator), the best place to post issue reports is here:

1 Like

I can only comment on the ones that I’ve used - Google and Bing, and to a lesser extent DeepL. I use Google a lot when I’m looking at e.g. changeset discussion comments, and as the built-in translation engine on other platforms. I use Bing both directly and as the built-in translation engine here. Google definitely outperforms Bing in my experience - it’s better at idioms that aren’t simply the sum of their constituent words. DeepL is excellent between English and German (it spots issues due to German word order and subclauses that confuse other translators). The last time I used it a lot I found it significantly worse than either Google or Bing when going from English to a non-German language - the results almost gave the impression that they had gone through German on the way (not quite “English as she is spoke” but not great). As a caveat it’s a while since I’ve used DeepL much, so maybe it’s improved.

Just FYI I updated the graphics in the thread starter for LibreTranslate and DeepL, both of them added a few languages.

To add to Andy’s comment, I think I also didn’t try out DeepL in earnest in any other language than German <=> English.

1 Like