microsoft / microsoft/Dynamics365-Apps-Samples

Translator region key missing

Open
#48 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
184
Forks
240
PR merge metrics
No merged PRs in 30d

Description

For the Omni-Channel realtime translation sample web resource: https://github.com/microsoft/Dynamics365-Apps-Samples/blob/master/customer-service/omnichannel/real-time-translation/webResourceV2.js

When using Bing Translator hosted in a non-US region (in my case australiaeast) you need to add an additional header for the API call to be successful.

For example:
'Ocp-Apim-Subscription-Region': 'australiaeast',

(I added this above the line for 'Ocp-Apim-Subscription-Key': C1WebResourceNamespace.bingTranslateApiClientSecret)

While not everybody might need to add this parameter, I think it'd be good to add it in and default it. Non-US users of this will need to set the value.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open customer-service/omnichannel/real-time-translation/webResourceV2.js and inspect the Bing Translator API request headers. Confirm how the sample stores configurable values, then add support for the subscription region and verify that the request works for a non-US region such as australiaeast without breaking the existing US configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.