rlf / uSkyBlock

The best skyblock bukkit plugin around...
http://dev.bukkit.org/bukkit-plugins/uskyblock/
GNU General Public License v3.0
76 stars 112 forks source link

Move languages to the data folder #1233

Open fjeddy opened 5 years ago

fjeddy commented 5 years ago

Hello,

Suggest that you move the PO files to the data folder inside it's own languages folder. Instead of having them incorporated in the source files.

It's a really complicated procedure to translate the plugin, or even just change a message you don't like the form off. And by complicated, I don't mean the pull request, I mean the need to wait for a pull request to be approved, then wait for the plugin to be updated with the newly translated language, then start using it, oh, found a bug, let's start the process all over again shall we?

It really doesn't make sense to include them entirely in the source; at the very least, the plugin should support new languages, or updated languages in the data folder, where the plugin would first check for a user-specific language and if none is found, it reverts back to the one you have in the source.

Muspah commented 5 years ago

Hi,

You're one step ahead of me, I was thinking of starting with moving the PO editing to a separate place (poeditor.com e.g.), to make it easier for users to help translating, and prevent having lots of small PR's/commits to the repository fixing a single string.

It's already possible to load translations from the plugins datafolder/i18n/locale.po https://github.com/uskyblock/uSkyBlock/blob/master/po-utils/src/main/java/dk/lockfuglsang/minecraft/po/I18nUtil.java#L197

We could implement something that gives priority to those files, even if a file for the same locale is available in the plugins JAR.

fjeddy commented 4 years ago

O.o! I didn't know it supported user specific languages, that's awesome, perfect.

User locales, that take precedence over a system locale, should be merged, not just over-written. Hence, you can create a user locale in English, and only include and change the specific messages you want to formulate differently, and everything missing is gathered from the system locale. This because most people who want to change something in a system locale, likely only want to re-formulate a few messages, perhaps they only want to change the color?

Fully support PoEditor, the translation process becomes much easier for the common user; but at the same time, it also allows multiple people to work on the same translation. I can do whatever I'm bothered to do in Norwegian, and at any given time someone else can pick it up and add more strings / complete it.

Muspah commented 4 years ago

There are multiple things on my wish list regarding the language support, overriding specific strings is a good addition indeed. Another change that I'd like to make is supporting multiple languages being loaded, at least in the po-utils package. We could add functionality to let the user choose their language in the future, or even set it automatically based on their Minecraft game language.

I will look into it further tomorrow.