Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Code outdated? #2

Open
CubBossa opened this issue Jan 8, 2024 · 0 comments
Open

Github Code outdated? #2

CubBossa opened this issue Jan 8, 2024 · 0 comments

Comments

@CubBossa
Copy link

CubBossa commented Jan 8, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant