SpongePowered / Ore

Repository software for Sponge plugins and Forge mods
https://ore.spongepowered.org/
MIT License
79 stars 25 forks source link

Long term localization #544

Open parlough opened 6 years ago

parlough commented 6 years ago

Messages are now located in a configuration file, but we have not done much to utilize this to my knowledge. Sponge has quite a large international community with speakers of many languages as is seen by the Docs, and I think localization is quite important for the success, as full adoption, of Ore. You often see people asking to re-post projects on websites like mcbbs or similar, and people should feel comfortable on our own websites.

The requirements for this I suppose would be something along the lines of(feel free to edit):


Katrix commented 6 years ago

To fill in more info here, most stuff in Ore should already be easily localizable using the messages file. https://github.com/SpongePowered/Ore/blob/master/conf/messages

One thing that is currently missing are cases where we fall back to the default language. Cases where we don't have a language availible from a request. Stuff like emails and notifications for example.

Katrix commented 6 years ago

So, after looking a bit more into this I can share what I have found.

First of, to make it possible to use another language, a few steps need to be followed. First the language code has to be added to the configuration value play.i18n.langs. Next a file containing the strings need to be created called messages.<language code> in the conf directory.

Messages are curly brace formatted, not percentage formatted (My {0} is {1}).

Technically a lot of stuff should be ready just from that, but most likely a lot of things don't work nicely with that.

At the moment we also use the default language in many cases. I've already begun fixing that. Note that we need an additional setting in auth (that's where all the other account settings are) for the user language.

ryantheleach commented 6 years ago

@Katrix @phase Linked PR says that it 'partially resolves' this issue.

What remains?

Katrix commented 6 years ago

It doesn't solve the two lower points. Different home pages for plugins for different versions, and storing translation files on Ore. Both are IMO a bit lower priority than making most other parts of Ore localizable.

Katrix commented 5 years ago

Moving this to 2.0 as the low effort stuff of this has been implemented, and we'd probably need 2.0 wikis for the other stuff