Check if StorageInputType needs to be in TranslationSource or in DocumentTranslationInput
See original GitHub issueThe 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:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 asFile
.Case 3: Source: File Target: File Status: Succeeds only if the
StorageType
is specified asFile
. 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: InvalidTargetDocumentAccessLevelCase 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 toTranslationSource
. I had to specify the type only if the source wasFile
. 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.It’s true now that
source
andtarget
can have differentstorageInput
. But I don’t get why should we move the property toTranslationSource
, shouldn’t the target have aStorageType
too?