SaneEconomy icon indicating copy to clipboard operation
SaneEconomy copied to clipboard

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

Open TrademarkTM opened this issue 8 years ago • 23 comments

http://prntscr.com/e1yjzf

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

TrademarkTM avatar Jan 29 '17 20:01 TrademarkTM

Can I see your config file for Sane Eco?

bindingflare avatar Feb 11 '17 19:02 bindingflare

I have the same problem

This is my config: config

ElMarquezMMR avatar Feb 13 '17 21:02 ElMarquezMMR

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 avatar Feb 14 '17 06:02 AppleDash

Any luck?

AppleDash avatar Feb 20 '17 21:02 AppleDash

@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

MrPowerGamerBR avatar Jun 10 '17 18:06 MrPowerGamerBR

@MrPowerGamerBR This will break peoples' setups.

AppleDash avatar Jun 10 '17 20:06 AppleDash

@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" [email protected] 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 .

MrPowerGamerBR avatar Jun 10 '17 20:06 MrPowerGamerBR

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

smmmadden avatar Jun 10 '17 21:06 smmmadden

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.

AppleDash avatar Jun 14 '17 23:06 AppleDash

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

KlenerTeufel96 avatar Jun 26 '17 23:06 KlenerTeufel96

There is a workaround in this thread :(

AppleDash avatar Jun 27 '17 15:06 AppleDash

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.

AppleDash avatar Jul 16 '17 03:07 AppleDash

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

Shamilius avatar Aug 18 '17 11:08 Shamilius

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

Malachiel87 avatar Aug 31 '17 20:08 Malachiel87

Weird.

AppleDash avatar Nov 09 '17 01:11 AppleDash

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

dustinduse avatar Nov 09 '17 06:11 dustinduse

money are lost

Malachiel87 avatar Nov 09 '17 07:11 Malachiel87

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

R3duct1on avatar Nov 11 '17 17:11 R3duct1on

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

ghost avatar Dec 07 '17 00:12 ghost

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

Subtrahero avatar Jan 10 '18 22:01 Subtrahero

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

Ogaix avatar Jun 29 '18 22:06 Ogaix

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

AppleDash avatar Oct 05 '18 08:10 AppleDash

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.

Gasur avatar Mar 24 '20 01:03 Gasur