Discourse-Translator++

official
multi-lingual

(Christoph) #150

I think it’s not broken, just very confusing, to put it mildly:

https://translatorbusiness.uservoice.com/forums/553099-microsoft-translator-on-azure-customer-question-fo/suggestions/18587362-free-trial-expired-how-do-i-keep-the-free-2m-char

If I understand it correctly, the thing is that free tier is not the same as free trial. Once your free trial for Azure expires, you cannot get another free trial. So you have to chose the Pay-as-you-go plan to use the free tier of the Translator API. :dizzy_face:


(Christoph) #151

Where you able to identify any problems?


(Alan Tan) #152

Thank you for letting me know about this otherwise there is zero indication on the portal to let me know that I had to upgrade my plan.

Just tested it and it is working fine for me.

Are you on the Docker based install? Is Sidekiq running?


(Christoph) #153

Yes, docker based install according to the 30 minutes install guide. /sidekiq is showing me that stuff is going on. I supposed that means sidekiq is running?


(Alan Tan) #154

In your rails console can you try running

DiscourseTranslator::Microsoft.translate(Post.last)


(Christoph) #155

Here is what it gives me:

So what does this mean?


(Alan Tan) #156

It means that your Azure subscription setting is correct.

On whichever topic that the icon isn’t appearing for, can you append at .json endpoint to the URL? After which, look for the can_translate attribute to see if it returns true or false


(Christoph) #157

I have no idea why, but the icon is now showing. Something must have been stuck and got unstuck when I updated or rebuilt (though I don’t think I did any rebuild in the past few weeks).


(Christoph) #158

Feature suggestion: Could we have a separate setting for the language a user would like in posts? In other words: if that is set to a different locale than the interface language, the plugin would use that local.

Benefit: this would allow people who use the English UI because their native language is not supported (or who are comfortable with an English UI but not fluent enough to understand more elaborate posts in English) to have posts translated into their native language while keeping English (or whichever language they prefer) in their discourse UI.


(misterdude) #159

I’m also having trouble with this. I have tried putting jut the KEY 1 in the azure subscription key field but also get the 401 error. I also tried the subscription key in this field and then putting the key1 and key 2 in the client id and client secret to no avail. Am I missing something here?


(Tobias Eigen) #160

@tgxworld I think folks are getting confused by the instructions in the OP around signing up for microsoft azure and locating the key. I suggested a fix.


(misterdude) #161

Yeah, the verbiage does not seem to match up to whats on the Azure portal.

So what are the correct keys or codes to enter in these fields?

  1. translator client id
  2. translator client secret
  3. azure subscription key

(Christoph) #162

This should answer those questions, no?


(misterdude) #163

Yeah, I tried that. Maybe I’ll rebuild as one of the other users tried; the little globe isn’t showing up.


(Christoph) #164

I think I was the other user but the thing is that I’m not even sure I actually rebuilt. But even if I did, I suppose it would be a bug since you’re not supposed to have to rebuild. So it’s good, in a way that you apparently are experiencing the same issues. Curious to see if a rebuild will solve it. But before you rebuild, make sure you are looking at a post in a different language than your ui language!


(misterdude) #165

I did check that. I’ll report back after the rebuild. Thank you.


(Alan Tan) #166

Already fixed but I just didn’t want to merge it in right before the weekend.


(misterdude) #167

I put key 1 in the azure subscription field, rebuilt, and it worked.

Thanks.


(Tobias Eigen) #168

I just fell prey to the “free trial” issue myself and had to upgrade to the “pay as you go” level to get it working again. Looks like Microsoft somehow changed the way the levels of service are presented on their interface. I am just about 100% certain that I had already chosen the “pay as you go” level when I signed up originally.

Now it’s working again, but I am confused by the Microsoft Azure interface and not quite certain that I won’t start getting charged. Has anyone else been charged already when they expected Microsoft’s translation service to continue to be free for minimal use? Is there a way to stop it from working when the number of queries reaches the limit and Microsoft will start charging?

Here are some related screenshots. Good job @tgxworld on displaying a proper error message which helped me alot. :wink:


(Christoph) #169

Microsoft is really not making any effort to make Azure intuitively accessible. Never seen anything like it. And Azure customer “service” completely ignores you even when you’re on the full trial (and you’d think they might want to impress you) and the Translator help desk ignores you for a month and the replies something like “I’m assuming you solved this issue so I’m closing the ticket”.

I have not reached the 2m character limit yet but neither do I believe I will be charged. As I understand it, there is still a free tier (not the same as free trial) and because things are not confusing enough on Azure, they make you sign up for the Pay-as-you-go plan in orfer to access the free tier. But according to this page you will not be charged as long as you don’t upgrade from the free tier (S0) to the S1 tier (which they also call pay-as-you-go, just in case someone was starting to make sense of things): thid is what it says:

What happens if I exceed the transaction limit on my Free tier for Text Analytics?
Usage is throttled if the transaction limit is reached on the Free tier. Customers cannot accrue overages on the free tier.

Of course, there is still a chance that this information is wrong, in spite (or because) of the page being managed by Microsoft, but that is as much sense as I can make of it at thi point.