Open-Assistant
Open-Assistant copied to clipboard
Write a script to sync translation in EN with other locales
The script should accept an option locales params, example signature in TS
type Params = {
locales?: string[]
}
or it would be great if anyone can setup a free i18n management service, thing like https://localazy.com
Yeah, I would also prefer a TMS like pontoon or weblate. I never tried localazy, but it looks fine too. A script would be a great tool in the meantime, though. It's hard to find all missing strings just by comparing the JSONs.
Does this not already exist?
https://github.com/LAION-AI/Open-Assistant/blob/main/scripts/frontend-development/find-missing-locales.py
Does this not already exist?
https://github.com/LAION-AI/Open-Assistant/blob/main/scripts/frontend-development/find-missing-locales.py
It only allows to find untranslated words, not sync with the EN to remove staled words (words that in the other locales but get deleted in EN). We can extend to support this behavior
I would like to set up inlang for Open-Assistant by just adding an inlang.config.js
. This would give contributors and translators the ability to edit translations in a frontend and make pull requests to Open-Assistant without overhead for maintainers. It comes with default lint rules that mark missing translations or outdated references.
Here is a preview, with a sample project: https://inlang.com/editor/github.com/inlang/example
In addition, other useful tools are supported to make i18n easier like a VS Code plugin (in the next days) and a CLI.
Let me know and I'll set it up for you 🙂
@NiklasBuchfink does it compatible with next-i18next?
@notmd Yes, I have already set it up several times with i18n-next
and there will be a custom integration for i18n-next
in the future, as mentioned 👍
@notmd I'm currently building a i18n-next plugin with inlang that users from i18n-next can use the inlang IDE extension to massively speed up their workflow and use the git-based online editor. 🎉 see https://inlang.com for more
@notmd Yes, I have already set it up several times with
i18n-next
and there will be a custom integration fori18n-next
in the future, as mentioned 👍
Then please help us setup, thank you!
Looks very simple, just create a json file that defines the reference language: https://inlang.com/documentation/getting-started
After that it should be able to use it with this URL https://inlang.com/editor/github.com/LAION-AI/Open-Assistant/
Only the i18n-next plugin plugin is missing rn, right?
@stefangrotz That's right, the i18n-next plugin is currently under development. But there is also a json plugin that works for this use case. I still need to extend it a bit to support the {language}/*.json
folder structure. I`m working on that right now.
@notmd @stefangrotz It took a little longer, but the time was used to optimize everything for a project like Open-Assistant.
Now I have created the PR. Please let me know if I should change something.