Skip to content

fix(i18n): populate broken en.json locale fallback - #1228

Open
coopdogGGs wants to merge 1 commit into
louis-e:mainfrom
coopdogGGs:fix/en-locale-json
Open

fix(i18n): populate broken en.json locale fallback#1228
coopdogGGs wants to merge 1 commit into
louis-e:mainfrom
coopdogGGs:fix/en-locale-json

Conversation

@coopdogGGs

Copy link
Copy Markdown

The generic en locale file (src/gui/locales/en.json) contained the literal text en-US.json instead of JSON. On startup it is loaded via include_str! and parsed as JSON, so any user on the generic en locale hit an invalid-JSON parse, and the locales_match_en_us_keys unit test failed (en.json is invalid JSON: expected value at line 1 column 1).

This populates en.json with the English strings (mirroring en-US.json) and adds a short comment in gui.rs documenting that the en fallback must stay in sync with en-US.json.

Verification: cargo test -> 361 passed, 0 failed (previously 1 failed).

The generic 'en' locale file contained the literal text 'en-US.json' instead of JSON, so it failed to parse and broke the locales_match_en_us_keys test. Populate it with the English strings (mirroring en-US) and document the intent in gui.rs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants