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

Decimal separator in items/containers.json breaks on my locale #44803

Closed
marningmol opened this issue Oct 11, 2020 · 1 comment
Closed

Decimal separator in items/containers.json breaks on my locale #44803

marningmol opened this issue Oct 11, 2020 · 1 comment
Labels
<Bug> This needs to be fixed Translation I18n

Comments

@marningmol
Copy link
Contributor

Starting or loading a game fails with a JSON error. Having had a similar issue #44608 a few days ago, I've taken the liberty to assume I know whats going on. The thousand separator in line 1637 and 1655 is parsed incorrectly due to locale issues.

Changing "max_contains_volume" from "1.25 L" to "1250 ml" on lines 1637 and 1655 in data/items/containers.json fixes the issues on my system.

Steps To Reproduce

  1. Start / load a game on a system with incompatible locale.
  2. While loading JSON files, the game will error complaining about "invalid quantity unit".

Expected behavior

A systems locale should not affect the functionality of the game.

Versions and configuration

OS: Linux
    OS Version: Distributor ID: Ubuntu; Description: Ubuntu 18.04.4 LTS; Release: 18.04; Codename: bionic;
Game Version: 0.E-6769-g7c94b126f8 [64-bit]
Graphics Version: Tiles
Game Language: System language []
Mods loaded: [
Dark Days Ahead [dda],
]

Additional context

ERROR : src/main_menu.cpp:861 [bool main_menu::new_character_tab()] Error: Json error: data/mods//dda/../../json/items/containers.json:1â637:75: invalid quantity string: unknown unit

"to_hit": -2,
"material": [ "plastic" ],
"pocket_data": [ { "pocket_type": "CONTAINER", "max_contains_volume": "
                                                                      ^
                                                                       1.25 L", "max_contains_weight": "3 kg", "moves": 400 } ],
@marningmol marningmol changed the title Decimal separator in items/containers.json breaks on locale Decimal separator in items/containers.json breaks on my locale Oct 11, 2020
@Pupsi-Mupsi
Copy link
Contributor

Thanks. Has already been fixed by @Fris0uman in #44798.

@anothersimulacrum anothersimulacrum added <Bug> This needs to be fixed Translation I18n labels Nov 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Translation I18n
Projects
None yet
Development

No branches or pull requests

4 participants