extensions icon indicating copy to clipboard operation
extensions copied to clipboard

firestore-translate-text enhancement ideas

Open huangjeff5 opened this issue 3 years ago • 0 comments

[READ] Step 1: Are you in the right place?

Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to Firebase support directly.

[REQUIRED] Step 2: Extension name

This feature request is for extension: _ (storage-resize-images, firestore-send-email, etc) firestore-translate-text

What feature would you like to see?

Describe the feature you would like to add, or how you'd like to see the extension change.

Developer's email:
Subject: Firestore Translate Text Extension - Conditional translations & dynamic language

I am trying to use firebase/[email protected] - the Firebase extension for GCloud Translate API. I am missing 2 things, I'll fill in a request but in case there is some workaround, going to ask here first:

USE CASE: Clients type information in the app. Certain fields need translations, but translations are conditional upon two factors.

User has enabled/disabled translations. (How to ignore translations if user hasn't enabled translations?) The supported languages as per user. (I didn't find a way to pass dynamic array of languages, they need to be set up at installation step) In my case, I will have a user document under users collection where storing preferences like languages: [en, es, fr, de] and isTranslationEnabled: true and those can be used by the listener somehow to either trigger or not, and to use the langs.

EXTRA: Is possible to translate the already existing content? instead of going one by one to update -> triggers the translation

Btw, this is a great extension that works fantastic, I am just missing those features to fulfill my requirements, it doesn't mean it doesn't yours. By other hand, I think this features might be commonly used/needed among others. Thanks Firebase Team!

I have opened a question in SO just in case I missed something: https://stackoverflow.com/questions/72868772/firestore-translate-text-extension-conditional-translations-dynamic-language

It sounds like we need two features here:

  1. A mechanism for developer's to specify at the user-level whether a document should be translated or not. Possibly this could be allowing the user to specify a Firestore collection used to store user configuration?
  2. Backfill script to translate existing documents.

huangjeff5 avatar Jul 13 '22 21:07 huangjeff5