question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Check if StorageInputType needs to be in TranslationSource or in DocumentTranslationInput

See original GitHub issue

The reason why it is in DocumentTranslationInput is that both source and target had to have the same storageInput. I believe the service updated their behavior and this is no longer required, but need to double-check.

If it is no longer needed for a target too, we should move the DocumentTranslationInput.Storagetype property to the TranslationSource type

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ZulaMostafacommented, Aug 10, 2021

Let’s have a look into the interesting results, I’ve tested all the combinations using both Postman and the actual SDK.

Case 1: Source: Folder Target: Folder Status: Succeeds

Case 2: Source: File Target: Folder Status: Succeeds only if the StorageType is specified as File.

Case 3: Source: File Target: File Status: Succeeds only if the StorageType is specified as File. There is one more comment about this case, it works only if the target is a container with adding filename at the end of the path in the URL. If the target is a blob Postman responds with Ok status but the file never changes. and for the SDK, that was the error I got: Cannot access target document location with the current permissions. Status: 200 (OK) ErrorCode: InvalidTargetDocumentAccessLevel

Case 4: Source: Folder Target: File Status: Fails. When I use a container as the target with adding the file name at the end of the path it creates a new folder. And when i use a blob it’s just the same as the previous case.

I think we need to move StorageType property to TranslationSource. I had to specify the type only if the source was File. Regarding the permissions issue, I’m not sure if I’ve done something wrong but the permissions given to the blob was read and write.

1reaction
ZulaMostafacommented, Aug 8, 2021

It’s true now that source and target can have different storageInput. But I don’t get why should we move the property to TranslationSource, shouldn’t the target have a StorageType too?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Start translation - Azure AI services
Storage type of the input documents source string. Required for single document translation only. targets, TargetInput[], True, inputs.target ...
Read more >
Azure Cognitive Services Document Translation client ...
Check the translation status and progress of each document in the translation operation.
Read more >
Azure Document Translation client library for Python
Translate numerous, large files from an Azure Blob Storage container to a target container in your language of choice. Check the translation status...
Read more >
Translation | Django documentation
The string is later translated from a variable. Use this if you have constant strings that should be stored in the source language...
Read more >
Translate Document from One Language To Another - YouTube
Reference for the list of supported languages: https://docs.microsoft.com/en-us/azure/cognitive-services/ translator /language-support Source ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found