Please also be more specific as to what is not working. Does the translation button not show? Does clicking on that button not show anything?
I click on the button and always ship
Uncaught TypeError: Discourse.ajax is not a function Url: https://yoursite.com/assets/application-bdb7649e2f0e55308f43209ddfc7ca3274a8c13fe15479dfc74dfddc09d280b8.js Line: 69 Column: 24057 Window TypeError: Discourse.ajax is not a function at o (https://yoursite.com/assets/application-bdb7649e2f0e55308f43209ddfc7ca3274a8c13fe15479dfc74dfddc09d280b8.js:69:24057) at t.translate (https://yoursite.com/assets/application-bdb7649e2f0e55308f43209ddfc7ca3274a8c13fe15479dfc74dfddc09d280b8.js:69:25859) at https://yoursite.com/assets/application-bdb7649e2f0e55308f43209ddfc7ca3274a8c13fe15479dfc74dfddc09d280b8.js:65:5579 at t.value (https://yoursite.com/assets/application-bdb7649e2f0e55308f43209ddfc7ca3274a8c13fe15479dfc74dfddc09d280b8.js:65:5201) at t.value (https://yoursite.com/assets/application-bdb7649e2f0e55308f43209ddfc7ca3274a8c13fe15479dfc74dfddc09d280b8.js:65:5503) at t.click (https://yoursite.com/assets/application-bdb7649e2f0e55308f43209ddfc7ca3274a8c13fe15479dfc74dfddc09d280b8.js:62:13020) at https://yoursite.com/assets/application-bdb7649e2f0e55308f43209ddfc7ca3274a8c13fe15479dfc74dfddc09d280b8.js:63:778 at https://yoursite.com/assets/application-bdb7649e2f0e55308f43209ddfc7ca3274a8c13fe15479dfc74dfddc09d280b8.js:62:31362 at t.value (https://yoursite.com/assets/application-bdb7649e2f0e55308f43209ddfc7ca3274a8c13fe15479dfc74dfddc09d280b8.js:65:5201) at a (https://yoursite.com/assets/application-bdb7649e2f0e55308f43209ddfc7ca3274a8c13fe15479dfc74dfddc09d280b8.js:62:31329)
Discourse.Ajax has been officially deprecated.
Thank you @gdpelican!
Data Explorer Plugin
Excellent all works
Some important points to improve in this Great translator plugin functionality:
The header of the post could be included to the translation (could be a question in the header and we are translating only the answer!. In this case could make no sense).
If you insert any English letter to the foreign language (for example: if the user is using English UI, and the translated language could be Arabic, Persian or Chinese), the translation functionality is disabled automatically! Sometimes, inside the foreign language text/characters, could be some Latin/English characters inserted to mention a name or Brand etc… In this case we are loosing the translation functionality! [We need to allow that translation]
I know that it is in your plans to add Google translator too. That would be great, since sometimes the translation could make no sense, at least we could use the other alternative engine which could be better for that moment of subject/post/language. But then, it would be required by your design that the user would be able to switch between Google/Microsoft engines from the translation buttons (or to have one button as it is now and add an option link to the other engine when you putting the message “Translated by Microsoft. < Choose Google >” and vice versa. And for sure at the plugin settings, we should be able to put our credentials keys of both engines (Microsoft & Google) at the same time.
If there is any way to make the user able to select the desired translation language of his choice, this could help a lot. Some people know more than one language, and if the translation made no sense (because of the translation engines aren’t that perfect always), then he/she could try other languages. Also another use of it, if you are using Discourse let’s say in English UI and your English not that perfect, then translating that text to the default language is not so helpful at that moment.
I hope these notes would make sense to you and you would be able to find a time for them. I’m already appreciating what you’ve already done and shared with us
I just noticed that if you have only picture in the post its recognized as foreign language and the translate icon is showing up. (For sure when you click it, its saying that couldn’t translate this language. I think its trying to translate the link itself)
can we have this for titles of topics on home page ?
which means? will this stop working?
Yes I think it will stop working unless the plugin gets updated and you move your billing/credentials over to Azure Portal. Essentially they’re moving Translator from Azure DataMarket to Azure Portal.
Aside from having to move billing info, they mention having only one auth key instead of two:
The single Azure key is used to request an Azure token for the Microsoft Translator service.
I assume there will have to be changes to how the plugin accesses the API.
thanks! will it still be free or will it be paid? if paid, how does it compare to google translate or other service if we have any options?
2 million will still be free. I can’t speak to using Google.
I did try to use the fork that enables Google as an API. However, I think the templating it (and the main plugin) use have not been updated for 1.7+, judging from the error I received.
The plugin needs to be both updated for Azure Portal and 1.7+.
@jgujgu thanks for clarifying and doing this legwork for us. I’d like to hope this official plugin will be updated before March to work with the new Azure portal and 1.7+ at least. @tgxworld may we hope?
This is done. All you have to do to migrate is to follow the instructions in the first post which I’ve updated.
That probably means that the translator is unable to detect the language and thus will not be able to translate it. Maybe if you provide me with the string that you’re trying to translate so that I can prove my hypothesis?
I just merged in a PR from @aryanraj which adds Google Translate support to the plugin.
Will be updating the README and add more test coverage tomorrow.
Thank you @aryanraj
Actually It’s been so long when I posted that. During this I’d faced a lot of compatibility problems because of plugins I was using, so I’d get fed up and disabled most of them including the Translator++.
But for test, you could choose any none Latin language (let’s say Arabic) text and see that is the translation is working. Then insert some where in the text a Latin word (for ex. Discourse or BMW as a brand) then the translator is ignoring all the translation. Instead, the Translator had to place the word “Discourse” or “BMW” as it is in the translated text.
I understand that there are probably problems with it, but the burden of proof is really on you to outline a bug. It’s more expedient to you and the maintainer of any open source project if you concretely lay out exactly the course of action you took, text snippets, screenshots, and everything included.
It looks like part of moving translator onto Azure was to change the authentification method. They now provide two keys
rather than client ID and client secret as shown in the plugin interface:
Do the two keys just correspond to client ID and secret or how do I set this up?
Looks like there is some convention applied to generate the filter when you click on settings via the plugin page. Just search for
azure_subscription_key and the site setting will show.