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

<reset> formatting in /balance #5682

Open
ItsSynchro opened this issue Feb 18, 2024 · 6 comments
Open

<reset> formatting in /balance #5682

ItsSynchro opened this issue Feb 18, 2024 · 6 comments
Labels
type: problem Problems that are not strictly bugs.

Comments

@ItsSynchro
Copy link

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

image

@ItsSynchro ItsSynchro added the bug: unconfirmed Potential bugs that need replicating to verify. label Feb 18, 2024
@JRoy
Copy link
Member

JRoy commented Feb 19, 2024

Issue with a custom locale, can't replicate with default locale.

@JRoy JRoy closed this as completed Feb 19, 2024
@ItsSynchro
Copy link
Author

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

@pop4959
Copy link
Member

pop4959 commented Feb 25, 2024

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).

@ItsSynchro
Copy link
Author

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
image

@Evidentsinger14
Copy link
Member

image

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?

@Evidentsinger14 Evidentsinger14 added bug: confirmed Confirmed bugs in EssentialsX. and removed bug: unconfirmed Potential bugs that need replicating to verify. labels Feb 25, 2024
@pop4959
Copy link
Member

pop4959 commented Mar 11, 2024

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?

@pop4959 pop4959 added type: problem Problems that are not strictly bugs. and removed bug: confirmed Confirmed bugs in EssentialsX. labels Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: problem Problems that are not strictly bugs.
Projects
None yet
Development

No branches or pull requests

4 participants