<reset> formatting in /balance
ItsSynchro opened this issue · 6 comments
Type of bug
Other unexpected behaviour
/ess dump all
output
https://essentialsx.net/dump.html?id=fe78c48c6b4d4235bb4fa929bbfe3084
Error log (if applicable)
No response
Bug description
When using /balance and or /balance , is set at the end, even in placeholders.
Steps to reproduce
Update to EssentialsX-2.21.0-dev+42-8a57856
Use /balance
Expected behaviour
not be present
Actual behaviour
Issue with a custom locale, can't replicate with default locale.
Sorry, but what can be wrong with the locale? It automatically updated after switching versions to the latest dev.
https://paste.gg/p/anonymous/f18b1ab72f4e4a638ee2ad1274aba8af
Issue with a custom locale, can't replicate with default locale.
Sorry, but what can be wrong with the locale? It automatically updated after switching versions to the latest dev. https://paste.gg/p/anonymous/f18b1ab72f4e4a638ee2ad1274aba8af
Try re-upgrading your custom locale using https://github.com/EssentialsX/Essentials/actions/runs/8036810195 and see if that works. You will have to have a copy of the server from before the upgrade (or set the essentials upgrade to false in the file and place everything back in exactly the right place).
Issue with a custom locale, can't replicate with default locale.
Sorry, but what can be wrong with the locale? It automatically updated after switching versions to the latest dev. https://paste.gg/p/anonymous/f18b1ab72f4e4a638ee2ad1274aba8af
Try re-upgrading your custom locale using https://github.com/EssentialsX/Essentials/actions/runs/8036810195 and see if that works. You will have to have a copy of the server from before the upgrade (or set the essentials upgrade to false in the file and place everything back in exactly the right place).
Is there a default messages_en.properties I can download? Even after following the steps of https://essentialsx.net/wiki/Locale.html with that jar, the file doesn't generate anything. It remains an empty messages_en.properties
balance=<green>♦ <white>Your balance is\: <green>{0}
balanceOther=<green>♦ <white>Balance of {0}<white>\:<green> {1}<reset>
currency={0}{1}<reset>
Can confirm this happens on the latest dev build, and there's nothing wrong with the locale entry itself.
Do you need to have these resets in here though? what exactly happened before where they had to be added?
This seems like a tricky one to fix. I'm not even sure if this should be considered a bug or not. There are several places where it would be nice for currency
to support MiniMessage, but then there are places where it cannot (such as for passing to Vault, which must be a plain string).
Trivially, if you do not need to use MiniMessage in currency
(which most likely you do not), a good solution would be to not use the reset tag in the translation.
In other words, you can fix your messages by changing currency
to the following:
currency={0}{1}
As for "fixing" this, it might make more sense to have two versions of the currency placeholder, one that allows MiniMessage and the other plain version to pass along to econ plugins, etc? Thoughts?