Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation #5

Open
marktnoonan opened this issue Mar 10, 2018 · 0 comments
Open

Translation #5

marktnoonan opened this issue Mar 10, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@marktnoonan
Copy link
Owner

Here's one set of guidelines for how translation could work in the project

  • Translation is only available when a live transcript is public, and happens on the Observe.html page but never the main live transcript. That should always be in the speaker's language, because:
  • Translations will happen at the level of lines themselves, that Yandex has some context for how to translate each word. Edits to the original transcript should cause the entire line containing that word to be retranslated on the observer's page.
  • When translation is turned on, we need to add the credit "Powered by Yandex.Translate" on the screen, per these guidelines: https://tech.yandex.com/translate/doc/dg/concepts/design-requirements-docpage/
  • This will create a lot of API calls to Yandex, and maybe when a line has been translated, we should cache it in the database until some word within it is edited and then cache the new translation. But this would possibly create an even greater impact in terms of firebase calls because we'd have to increase the nesting to provide multiple languages at the "line" level... so it is too soon to worry about this.

The UI things we need for translation on the observe.html page would be:

  1. Dropdown listing all languages supported by Yandex
  2. "Translate" toggle.

The JS functionality we need is:

  1. Track what target language is selected.
  2. Track the source language. This is not currently declared on the main input page, but should be. Web Speech Recognition API just needs to be told what language it is listening to, and it will do so. So we have to gather, and store that info. Or Yandex can guess.
  3. Track whether we are currently translating or not.
  4. If we are translating, grab incoming lines from the DB and make the API call to Yandex for each line.
  5. Insert the results from the Yandex call into the same span elements we are using for snippets when not translating.
  6. If translation is turned off, skip all the yandex stuff, but do not go back and update content that was already translated. New stuff just gets handled as normal.

This seems like a good starting point.

@marktnoonan marktnoonan added the enhancement New feature or request label Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant