extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[firestore-translate-text] Source text is translated from Latin and not English

Open amin79 opened this issue 1 year ago • 2 comments

  • Extension name: _ [firestore-translate-text]
  • Extension version: _ 0.1.16
  • Configuration values (redact info where appropriate):
    • _
    • _

[REQUIRED] Step 3: Describe the problem

Some texts are translated automatically from Latin which are not in my language's list.

For example I have this text which is the name of some cities and location: ASPENDOS & PERGE & SIDE. This text would be translated from Latin to English as "GET UP & GO ON & SIT"!! If the source language be any other language expect Latin, the translation would be ok. But it would be translated automatically from Latin. How can I prevent it?

Steps to reproduce:

What happened? How can we make the problem occur? This could be a description, log/console output, etc.

Expected result
Actual result

amin79 avatar May 19 '24 10:05 amin79

Thanks for reporting your issue, @amin79. I would need more information to understand the problem, could you please provide your full configuration? alongside an example of a document with input & output texts.

From what I can understand, are you referring to text romanization?

pr-Mais avatar May 27 '24 09:05 pr-Mais

@pr-Mais Hello. There is nothing special in the configurations. Everything works as expected. But, just in this example, I have a text which includes the name of some cities (In English): "ASPENDOS & PERGE & SIDE" When I save it, since these are some meaningful words in Latin, it would be translated to "GET UP & GO ON & SIT"!

Since I don't have Latin in my target languages list, I don't expect it to be transited to Latin. I like it to remain as it is because these are some NAMES.

amin79 avatar Jun 03 '24 09:06 amin79

@amin79 It would be helpful to see your configuration regardless, to help us reproduce the issue and resolve it.

Can you provide the configuration, and the exact phrase (if possible) containing these city names, which has been mistranslated?

Since I don't have Latin in my target languages list, I don't expect it to be transited to Latin. I like it to remain as it is because these are some NAMES.

Sorry, do you mean translated from latin here? What is your target language? Target language is a key bit of information here that would help us reproduce and resolve.

cabljac avatar Nov 28 '24 10:11 cabljac

I can confirm this is an issue/edge case with the translation API, which is out of scope for us to fix in the extension.

We could potentially add a workaround - the extension could accept an escape token for users to manually tag proper nouns.

I am going to close this issue for now, if such a feature would be helpful to you then feel free to open a fresh issue, or reply to this thread and I can open one for you.

curl -X POST \
  -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
  -H "Content-Type: application/json" \
  -H "X-Goog-User-Project: <PROJECT_ID>" \
  -d '{
    "q": "ASPENDOS & PERGE & SIDE",
    "target": "es",
    "source": "en"
  }' \
  "https://translation.googleapis.com/language/translate/v2"
Image

cabljac avatar Jan 06 '25 11:01 cabljac

Hi @amin79

This PR https://github.com/firebase/extensions/pull/2254 resolves this issue by introducing V3 translation with glossaries.

It still has to pass through the review process but it should be released with the next version of the extension. Remember that Glossaries are case sensitive and that you need a source language to use them and to have the translation hub enabled in your project. This will make sure that whatever words you want (within the languages specified in the glossary) are translated (or not) in the appropriate manner.

Links and Resources

Let me know if you have any more doubts.

Thank you for submitting the feature request.

Cheers! Gustavo ;)

Gustolandia avatar Jan 14 '25 02:01 Gustolandia