Skip to content

feat: libretranslate support #607

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

Merged
merged 3 commits into from
Jul 13, 2021
Merged

feat: libretranslate support #607

merged 3 commits into from
Jul 13, 2021

Conversation

farfromrefug
Copy link
Contributor

@farfromrefug farfromrefug commented Jun 28, 2021

This PR add support for LibreTranslate. Default URL is set to http://localhost:5000 and can be changed in settings.

close #503

import { Config } from '~/core'

export default class LibreTranslate extends TranslateEngine {
apiRoot = 'http://localhost:5000'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems they have the online API, shouldn't we default to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really do you have a link ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as mentioned here LibreTranslate/LibreTranslate#106 they prefer not to use the public site. as we can't have "no default" I think the current one is the best (default when you run libretranslate locally)

@antfu antfu merged commit ab3451d into lokalise:master Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] support LibreTranslate
3 participants