Skip to content

feat(i18n): localize default journal title and extract from hardcoded values - #147

Merged
evanbones merged 2 commits into
evanbones:1.21.1from
megatocha:i18n/localize-journal-title
Jul 29, 2026
Merged

feat(i18n): localize default journal title and extract from hardcoded values#147
evanbones merged 2 commits into
evanbones:1.21.1from
megatocha:i18n/localize-journal-title

Conversation

@megatocha

Copy link
Copy Markdown
Contributor

Preview

Medal

Context

The default journal title "My Field Guide" was hardcoded in the Java code. This meant players with non-English clients still saw the English title. This PR moves the default text into the translation system so it respects the player's language.

Summary of Changes

  • Replaced hardcoded "My Field Guide" with a translatable lang key fieldguide.journal.default.title.
  • Changed the internal default from the hardcoded string to null. When no custom title is set, the game now pulls the text from the client's current language file.
  • Empty or blank titles are treated as null, so they correctly fall back to the translated default instead of saving an invisible custom name.
  • Added the translation key to all existing lang files.
  • Old save files that still contain the literal text "My Field Guide" are automatically converted to null on load, so they pick up the new translated default immediately.

Impact

  • Saves: Fully backwards compatible. Existing worlds auto-migrate the old hardcoded title on next load.
  • UI/Localization: The journal now shows the default title in the player's selected language.
  • Multiplayer: No breaking changes. Empty strings are sent over the network when the title is unset, which the client resolves to the local translation.

@evanbones
evanbones merged commit 7bdf2bc into evanbones:1.21.1 Jul 29, 2026
1 check passed
@megatocha
megatocha deleted the i18n/localize-journal-title branch July 30, 2026 18:40
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