AppleDash / SaneEconomy

Finally, a sane economy plugin for Bukkit.
https://www.spigotmc.org/resources/saneeconomy-simple-but-featureful-economy.26223/
GNU General Public License v3.0
19 stars 24 forks source link

The money reduces if it goes above $1,000. #34

Open TrademarkTM opened 7 years ago

TrademarkTM commented 7 years ago

http://prntscr.com/e1yjzf

Everytime I earn more than $1,000, my money becomes something like a few cents, like in the print above ^^

bindingflare commented 7 years ago

Can I see your config file for Sane Eco?

ElMarquezMMR commented 7 years ago

I have the same problem

This is my config: config

AppleDash commented 7 years ago

This is a known issue with Spanish-speaking locales. You can try running java with the -Duser.country=US -Duser.language=en parameters as a temporary workaround.

AppleDash commented 7 years ago

Any luck?

MrPowerGamerBR commented 7 years ago

@AppleDash why not set the default Java locale to EN_US when the plugin starts?

http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#setDefault%28java.util.Locale%29

AppleDash commented 7 years ago

@MrPowerGamerBR This will break peoples' setups.

MrPowerGamerBR commented 7 years ago

@AppleDash well, you could change the locale only when needed and then revert the change after you don't need anymore, but I guess that would be a very big workaround.

Em 10 de jun de 2017 17:16, "AppleDash" notifications@github.com escreveu:

@MrPowerGamerBR https://github.com/mrpowergamerbr This will break peoples' setups.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AppleDash/SaneEconomy/issues/34#issuecomment-307587818, or mute the thread https://github.com/notifications/unsubscribe-auth/AJDnJ5yVd1E-2LYCS1o7u76jtrla01u4ks5sCvmSgaJpZM4Lw5-X .

smmmadden commented 7 years ago

Defaulting the plugin to one locale is fine if all the players are in that local. That's up to @AppleDash if he wants to use his locale or one of most of his customers.

This is something best handled in a messages_xx.yml file which dictate which locale to use. This is pretty standard across most plugins I've been reviewing. If the server is using an economy system the economy system could provide locale details for the monetary aspect of that, but the locale file is also used for language translations for in-game personalization to its players world-wide. Just my 2-cents. :-)

AppleDash commented 7 years ago

I'm going to look harder at this issue when I have a moment, it's a bit of a strange one and I'm not 100% sure why it happens.

KlenerTeufel96 commented 7 years ago

I have the same Problem ... Is there already a solution? Our server location is Germany ..

AppleDash commented 7 years ago

There is a workaround in this thread :(

AppleDash commented 7 years ago

Try latest version with locale-override config option set to true. This still needs fixing, but at least it is a workaround that doesn't require editing your Java arguments.

Shamilius commented 7 years ago

I have same error if currency.grouping-separator is '.' or ' ' (not default ',')

Malachiel87 commented 7 years ago

Same issue here.... @AppleDash i tried that option, is still broken

AppleDash commented 6 years ago

Weird.

dustinduse commented 6 years ago

Is the issue just in the formatting? or is the money really lost? I havn't looked over the code.

Malachiel87 commented 6 years ago

money are lost

R3duct1on commented 6 years ago

Workaround for my German Server locale is to change the grouping-separator from ',' to '.' like it shoud be in Europe currency formating. maybe u using some predefined currency var format in Java?
USA 100,100,100.00 EU 100.100.100.00

ghost commented 6 years ago

@AppleDash you are using DecimalFormat in mathematical operation. I removed it and added DecimalFormat to messages only and it works normal.

Subtrahero commented 6 years ago

It is the grouping seperator who is causing the problem. I just set grouping to 0 and grouping-separator to ''

Ogaix commented 6 years ago

I've tryed all thoose thinds, but anything runs. I love the plugin, could someone plz help? (I'm trying to translate the messages into spanish) -Sorry if english is not so correct, I'm Spanish :D

AppleDash commented 6 years ago

It continues to be an issue :( I need to debug this more heavily soon.

Gasur commented 4 years ago

This is not only an issue with Spanish locales, but (also?) an issue if you have opposite grouping (thousand) and decimal separators. In half of the world the grouping separator is a dot (.) and the decimal separator is a comma (,). Swapping those around, incorrectly makes the plugin thing that the thousand separator is instead a decimal - probably needs to convert it before parsing it, so that Java can understand it. This can be done with DecimalFormat library or something along those lines.