Skip to content

For new strings, in the absence of localization, the English text is sent - #77

Merged
Sellafield merged 2 commits into
developfrom
aqpanaciy-custom-dictionary
Nov 16, 2026
Merged

Sellafield merged 2 commits into
developfrom
aqpanaciy-custom-dictionary

Conversation

@aqpanaciy

Copy link
Copy Markdown
Collaborator

Compare develop with aqpanaciy-custom-dictionary

Summary

Previously, a language without a server dictionary received the full English 0.json, which could overwrite translations already built into the client. A partial server dictionary also received no English entries for new content missing from that file.

When customDictionary/base.json.template is present, the server now builds the fallback from English keys outside the client baseline, then overlays all entries from the selected server language. The selected language takes precedence, including explicit empty strings. Selecting English still returns the full server 0.json. The server prepares these dictionaries at startup for use in the existing sign-in response.

Without the template, the server logs a startup warning and uses the previous selection rules. A language with its own file receives that dictionary. Other languages receive the full English file when available.

The loader skips keys that GenXY cannot safely carry and logs the file, key, and line number. For repeated JSON keys it keeps the first value and logs a warning. If a template is present and either the template or the required English dictionary cannot be loaded, the server logs an error and disables custom dictionaries.

Related pull request

The companion OPDB PR supplies the Live 36 baseline and corrected language data. Place its base.json.template alongside the numbered dictionaries in customDictionary to enable the new behavior.

Validation

  • All 113 unit tests passed, including coverage for fallback selection, override precedence, and invalid or repeated keys.
  • Verified the legacy startup warning and full English fallback without a template.
  • Loaded the companion Live 36 dictionaries with the template and verified that all keys and values survived GenXY serialization and parsing.
image

aqpanaciy and others added 2 commits November 10, 2026 13:28
Add base-template filtering and English fallback merging, validate dictionary JSON values, and handle malformed files, duplicate keys, and language IDs more safely. Add unit tests for loading and fallback behavior.

Co-Authored-By: ChatGPT <noreply@openai.com>
@Sellafield
Sellafield merged commit 549dde3 into develop Nov 16, 2026
4 checks passed
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