z411 / trackma

Open multi-site list manager for Unix-like systems. (ex-wMAL)
https://z411.github.io/trackma
GNU General Public License v3.0
775 stars 81 forks source link

Score is corrupted on systems with locale that uses comma as "floating point" delimeter #734

Open v-fox opened 6 months ago

v-fox commented 6 months ago

Some languages, like Russian, use comma instead of point, so trackma automatically substitutes points with commas in score field, only to complain with invalid score error. You can force it to take the score by manually putting point instead but then it immediately reverts it.

The correct way would be to take both and transparently convert to what remote server expects. A workaround would be to always force point on all locales.

FichteFoll commented 5 months ago

Which UI are you using (and what's your exact locale output)?

v-fox commented 5 months ago

You can force it to take the score by manually putting point instead but then it immediately reverts it.

I misremembered how workaround works. What you actually have to do is to force it to give Score is already at <X> message after which it does not check the input and lets you put whatever you want.

Which UI are you using (and what's your exact locale output)?

I used Qt and now migrated to GTK one due to system transition to Qt6, to drop fat PyQt5 dependency. Both are affected.

% locale
LANG=en_DK.UTF-8
LC_CTYPE=ru_RU.UTF-8
LC_NUMERIC=ru_RU.UTF-8
LC_TIME=ru_RU.UTF-8
LC_COLLATE=ru_RU.UTF-8
LC_MONETARY=ru_RU.UTF-8
LC_MESSAGES=en_GB.UTF-8
LC_PAPER=ru_RU.UTF-8
LC_NAME=ru_RU.UTF-8
LC_ADDRESS=ru_RU.UTF-8
LC_TELEPHONE=ru_RU.UTF-8
LC_MEASUREMENT=ru_RU.UTF-8
LC_IDENTIFICATION=ru_RU.UTF-8
LC_ALL=

Strangely, KDE/Plasma still forces Russian in apps by default, despite LANG and LC_MESSAGES.