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

[Feature]: Auto-Translate Integration #409

Closed
EmNudge opened this issue Nov 28, 2023 · 3 comments
Closed

[Feature]: Auto-Translate Integration #409

EmNudge opened this issue Nov 28, 2023 · 3 comments

Comments

@EmNudge
Copy link
Contributor

EmNudge commented Nov 28, 2023

What problem does this feature solve?

As LLMs (such as ChatGPT) become better at translation, many teams are using them for better i18n of docs. While this has yet to be a perfect replacement for hand-written docs, it's a way to ensure they are up-to-date in a language you don't natively speak.

The downside is that this is a manual process that can often result in grammatical mistakes or overly verbose language with terms only sensible in a certain cultural context.

As LLMs improve, a lot of these problems get better, but this manual process still requires specific git updates with a very opaque system done by engineers often less proficient in the target language.

What does the proposed API look like?

This can be implemented with external plugins or right into Rspress. A plugin might give more flexibility on how the LLM text is retrieved (via OpenAI or one of many other services).

This feature proposes a button next to content with the option to "translate to X" which will show an inline translation aside the original content. This is not a replacement for full i18n, but can be a great way to supplement areas where the current translation systems are lacking.

People may want the option to make requests at runtime or pre-compiled. If we pre-compile translation assets into dist/i18n/[lang]/chunk{1, 2, 3, etc} then we may be able to make both systems work without too much change in the underlying functionality. Either the assets already exist and are requested or the plugin makes a runtime request to an API and injects the content.

@byteHulk
Copy link
Contributor

This requirement feels applicable, is it possible to make a plug-in form, provide pre-compiled, I have an open source model, can start doing it first, and then replace it with a more effective model later?

@sanyuan0704
Copy link
Collaborator

This requirement feels applicable, is it possible to make a plug-in form, provide pre-compiled, I have an open source model, can start doing it first, and then replace it with a more effective model later?

Yeah, i think we can develop a plugin to implement it

@EmNudge
Copy link
Contributor Author

EmNudge commented Dec 27, 2023

Can this issue be closed now with the creation of https://github.com/byteHulk/rspress-plugin-translate and associated docs?

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

No branches or pull requests

4 participants