gecolay/GMusic

Github Code outdated?

Opened this issue · 0 comments

Hey, I wanted to make a contribution concerning MiniMessage and some advanced localization features. I was half through the process when I noticed that the downloadable jar file contains much more locales than the github repo version.
Are you generally interested in a contribution and if so, how can I get the latest version of the plugin.

The contribution would add support for TinyTranslations, which adds a variety of features to your messages and also handles the generation/loading/updating of translation files for you.
It uses MiniMessage syntax <red><hover:...>red text</red>, but also adds a new placeholder syntax ({placeholder} and {choice ? true : false}). And most importantly, it separates styling from the actual translation. So your translation would have entries like these

prefix: "GMusic"
reload: "<prefix>Plugin successfully reloaded."
reload_fail: "<prefix_negative>An error ocured while reloading plugin: <brighter>{exception}</brighter>"
no_perm: "<prefix_negative>{msg:global:no_perm}"

and a separate style sheet declares what <prefix> and other style tags actually look like.
For example:

# primary means the main color of server/plugin
# slot means the tag content <prefix>slot</prefix>
prefix: "<gray>[<primary>{msg:prefix}</primary>]</gray> <text>{slot}</text>"
text: "<green>{slot}</green>"

There are also global styles, so if you don't provide any styles at all, it will not look weird but use the server colors automatically, which is a feature that is not exactly what plugin developers seem to like, but for administrators this is a huge time saver!