sbrl / Pepperminty-Wiki

A wiki in a box
https://peppermint.mooncarrot.space/
Mozilla Public License 2.0
183 stars 22 forks source link

Superdupermega project: i18n for other languages support #216

Open finkiki opened 3 years ago

finkiki commented 3 years ago

I like using Pepperminty but I would prefer get the UI in my own language as the content of my wiki will not be available in english.

Sadly, I cannot help with the code but I can help with the translation (french).

What do you think ?

sbrl commented 3 years ago

Heya! I knew it was only a matter of time before someone opened this issue.

I'd love to add support for this! However it requires going through every possible message in the Pepperminty Wiki codebase and replacing it with a reference to a separate translations file, which will be an enormous pain and take many hours to complete - with not a single line of code left untouched.

Despite this, it is something I would like to move towards eventually. To do this though, we need to also keep the goal in mind. What translation tools are most effective and accessible for potential translators? If we can start by identifying some tools we'd like to use, then we can work backwards and identify the processes and file formats we need work on to make happen.

finkiki commented 3 years ago

I already help several project to get french translation. Usually, I translate one file containing the whole strings directly on github, in a branch I own then make a PR.

sbrl commented 3 years ago

Ah, I see. That could work. If we have, say, a JSON file or something that contains the translations, would that work? It would mean that we'd have to parse that file on every page load unless we can find some way of persisting it in memory.

sbrl commented 2 years ago

Thinking further about this, you can already change the navigation bar text manually by editing peppermint.json. This issue is specifically relating to the other parts of the UI - eg the help & error messages, and the stuff around the edges.