Skip to content

feat: support translation key format resource pack desc#5965

Open
pynickle wants to merge 11 commits intoHMCL-dev:mainfrom
pynickle:feat/resourcepack-desc
Open

feat: support translation key format resource pack desc#5965
pynickle wants to merge 11 commits intoHMCL-dev:mainfrom
pynickle:feat/resourcepack-desc

Conversation

@pynickle
Copy link
Copy Markdown
Contributor

支持对 translation key 格式简介的资源包解析:

"description": {
    "translate": "sodium.resource_pack.unofficial",
    "fallback": "Unofficial translations for Sodium"
}
image

@Glavo
Copy link
Copy Markdown
Member

Glavo commented Apr 23, 2026

/gemini review

Comment thread HMCLCore/src/main/java/org/jackhuang/hmcl/util/i18n/LocaleUtils.java Outdated
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements localized description resolution for resource packs and refactors locale mapping to align with Minecraft's language tagging. Key updates include the introduction of ResourcepackDescriptionResolver to handle translated metadata, enhancements to LocaleUtils for identifying Minecraft-specific language files, and the propagation of locale information through the resource pack loading process. Review feedback recommends specifying UTF-8 encoding for metadata files to ensure cross-platform compatibility, optimizing loops by hoisting invariant calculations, and utilizing input streams for JSON parsing to improve memory efficiency.

@pynickle pynickle requested a review from Glavo April 23, 2026 14:10
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