For the locale Serbian - "sr" the automatic translation with Microsoft Translator does not work. There are no "Automatic suggestions" and the "Automatic translation" tool does not get any texts.
Platform: Linux 3.10.0-1160.90.1.el7.x86_64 (x86_64)
Weblate deploy checks
System check identified some issues:
INFOS:
?: (weblate.I021) Error collection is not set up, it is highly recommended for production use
HINT: https://docs.weblate.org/en/latest/admin/install.html#collecting-errors
System check identified 1 issue (1 silenced).
Additional context
It seems that Microsoft translator treats "sr" as "sr-Latn".
For example:
POST https://api-eur.cognitive.microsofttranslator.com/translate?api-version=3.0&from=en&to=sr
Content-Type: application/json
[{"Text":"Hello World!"}]
Describe the issue
For the locale Serbian - "sr" the automatic translation with Microsoft Translator does not work. There are no "Automatic suggestions" and the "Automatic translation" tool does not get any texts.
I already tried
Steps to reproduce the behavior
/translate/{project}/{component}/sr/?q=state:<translated
and see that no texts are suggestedExpected behavior
Automatic suggestions should be shown for Serbian.
Screenshots
No response
Exception traceback
No response
How do you run Weblate?
Docker container
Weblate versions
Weblate deploy checks
Additional context
It seems that Microsoft translator treats "sr" as "sr-Latn".
For example:
gets the answer
I think this has to be added to the
language_map
: https://github.com/WeblateOrg/weblate/blob/5674acc39e21ea092c0d2fba89569b802315595a/weblate/machinery/microsoft.py#L26