Issue #1 is a bit complicated since the input is a bit noisy. This is not related to the use of glossaries but to the '1 , 5
', as sending the request without glossary
es: "usando 1 , 5 temp"
Results in "using 1.5 temp"
So the main problem is determining what "1 , 5"
gets translated into.
As Adam pointed out. I think even human translators wouldn't be sure how to parse that. However, if you want to keep the "1 , 5"
as it is in the original text you can try wrapping it around "notranslate" spans. This will ensure that any text within the "notranslate" spans is kept as is (https://cloud.google.com/translate/troubleshooting
As an example, this is a request using the "notranslate" with a glossary that translates es:"temp"->en:"tmp".
I set up a translation request with the following attributes:
contents: 'usando <span class="notranslate">1 , 5</span> temp',
And got "using <span class="notranslate">1 , 5</span> tmp" as a result.
As for issue#2, I tried replicating the request with a glossary that translates es:"temp"->en:"tmp" but got a different result:
contents: '*2 temp en el primer temp, 1 temp en los sig'
And got "* 2 tmp in the first tmp, 1 tmp in the next" as a result.
Could you provide more details on the request for issue #2 so we can replicate it?
The things that would be helpful are whether you are using a custom model, the default (nmt) model or the base (pbmt) model for translation and what client library you are using to send requests.