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

Add preprocessor to use Google Translate API translate missing translations #3

Open
tony84727 opened this issue Apr 27, 2019 · 2 comments
Assignees

Comments

@tony84727
Copy link
Owner

tony84727 commented Apr 27, 2019

Draft preprocessor configuration:

// diplomat.yaml
preprocessors:
  - type: google-translate
    options:
      from: en
      to:
        - zh-TW
        - jp

The preprocessor should query API only while the translation is missing.
Get the API key by interactive mode or environment variables.

See Google Translate API doc

@tony84727
Copy link
Owner Author

Adding this as a preprocessor is a little awkward. The operation requires accessing Google Translate API. Users are charged base on the word count, and the generated translations should be saved, only get updated when the source(from translation) changed.

@tony84727 tony84727 self-assigned this May 30, 2019
@tony84727
Copy link
Owner Author

I am going to give it a try. Add a preprocessor for Google Translate, and use another file to cache result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant