Closed dbnicholson closed 1 year ago
Looking at this, it seems the following steps are needed:
.po
to .mo
compilation and JSON file generation using kolibri-tools csvToJSON.js
There’s some nice documentation of how Kolibri is localised here: https://kolibri-dev.readthedocs.io/en/develop/i18n.html. It would make sense to largely mirror that (in terms of build target names, obviously as well as using kolibri-tools).
Here’s an example of a translation being updated in Kolibri: https://github.com/learningequality/kolibri/pull/10635/files
That all makes sense to me, thanks for looking into it.
PR ready for some initial glancing at here: https://github.com/endlessm/kolibri-explore-plugin/pull/766, but only if you’re bored. It’s not ready for proper review yet.
A companion issue now exists with the full set of strings for translation, so we can get started on translations: https://github.com/endlessm/kolibri-explore-plugin/issues/765
I’ve filed an issue against kolibri-tools about pyproject.toml
support, because currently the tooling only supports setup.cfg
. https://github.com/learningequality/kolibri/issues/11146
For my notes, here are some of the other Kolibri plugin projects which I’ve looked at for inspiration:
In #765, Joana found that there are a number of untranslatable strings in the welcome-screen
package. I’ve filed #770 about that.
I put together a rough (rubbish) Spanish translation today in order to test the frontend translation functions, and have a result!
That didn’t actually need any frontend changes to start using the JSON files containing the translations. As long as the JSON file is named correctly, Kolibri’s webpack bundle hook will pick it up via its well-known name and inject it into the frontend.
I’ve added a fixup commit to explain that in the docs.
As can be seen from the screenshot, there are still some English strings on the main page. That is separate from #765 as this isn’t the welcome screen. I’ll look into making sure they’re translated tomorrow, and then this issue should be ready for review and merging.
As can be seen from the screenshot, there are still some English strings on the main page. That is separate from #765 as this isn’t the welcome screen. I’ll look into making sure they’re translated tomorrow, and then this issue should be ready for review and merging.
⇒ #771, #772, #773
We want the frontend components to be localized to Spanish. For now we'll use in house translation, but it might be nice to wire up Transifex.