Closed zipswich closed 4 years ago
Thanks for filing the bug @zipswich, did it work with other languages you tried still? Wondering if the response from the server has changed...
@marcominerva any thoughts?
The exception says that JSON has an unexpected format. In fact, it could be caused by a change in the response from the server. Let me double check, I'll keep you informed about any progress.
It works perfectly for every other language that I have tested (cs, de, es, et, fr, it, ko, nl, pl, pt, ru, sl, uk, zh).
Thanks for looking into this. Please feel free to let me know if I can assist in any way.
The correct language code for Japanese is ja, as returned by the GetLanguageNamesAsync method:
await TranslatorService.Instance.TranslateAsync("test", "en", "ja").ConfigureAwait(true);
Thanks a lot. Very sorry for the mistake. I am really surprised. Our hardware partner requested and apparently tested the Japanese translation using "values-jp" folder in an Android app, and this is why "jp" was used.
@marcominerva Thanks so much for looking into this. @zipswich so are we all clear on this?
Yes. I am all set now. I wanted to add that the reason that I thought it worked before is that I had another app the did Japanese translation last year, but it used the retrieved language code, and I thought it was the same as "jp". May I make a suggestion: dump the response in the exception message when the json deserialization generates an exception.
Describe the bug
Unable to translate English to Japanese
Steps to Reproduce
Steps to reproduce the behavior: Run the following code:
await TranslatorService.Instance.TranslateAsync("test", "en", "jp").ConfigureAwait(true);
Exception details:
Expected behavior
The translation works
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Additional context
Add any other context about the problem here.