FlineDev / RemafoX

Report issues, request features or ask for help for the ReMafoX app here.
30 stars 1 forks source link

[Bug] [Code: PRAxMMMC] Machine translation authorization error #51

Closed nickfedoroff closed 2 years ago

nickfedoroff commented 2 years ago

Steps to Reproduce:

  1. On Machine Translation tab, add Microsoft Translator API Key in Setup API Keys
  2. On Machine Translation Tab, click "Start Batch Translation"

Expected Behavior:

Machine translation completes without error.

Current Behavior:

Error popup appears with message about 401 error from translation service. See screenshot.

Screen Shot 2022-10-16 at 10 58 34 PM

Environment

PRAxMMMC

Show environment details - App Version: 1.0.3 (Build 52) - System Version: 12.6 (Build 21G115) - System CPU: Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz - Tier: Pro
LiviuJianu commented 2 years ago

A dropdown for selecting the region on where Microsoft Translation is deployed needs to be added. When sending the same request using an HTTP Client, but adding the header parameter: Ocp-Apim-Subscription-Region: eastus it works.

Jeehut commented 2 years ago

@nickfedoroff Thank you for reporting this and thank you @LiviuJianu for providing additional context.

I will make sure to check this quickly and push an update with a fix (e.g. options for choosing the region as suggested).

Jeehut commented 2 years ago

@nickfedoroff @LiviuJianu I just implemented a text field for providing a region, it will be released very soon as part of version 1.0.4.

Please note that I opted against providing a dropdown with a limited list, even though this might seem convenient. The reason for that is that neither could I find any documentation of the full list of available regions anywhere in the related Azure API documentation, nor do I see any reason why users should need to wait for me to push an update of the app with an updated list of regions when the list changed even if I figured the full list out myself.

Unlike the list of supported languages per service, there's no need to do any kind of mapping here, so I felt providing a text field is not only the easiest but also the best option here.

Jeehut commented 2 years ago

I just submitted version 1.0.4 for App Review, the update with the fix for this should be available within 24 hours. 🎉