Conversation
Glavo
commented
Sep 1, 2025
- 修复中文环境下部分版本无法跳转的问题
- 修复无法正确选择简体/繁体页面的问题
- 支持文言文环境中跳转至礦藝大典
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes the Minecraft Wiki jump functionality by fixing several issues with version navigation across different language environments.
- Fixed wiki URL generation to properly handle Chinese simplified/traditional page selection
- Added support for Classical Chinese (文言文) environment to redirect to 礦藝大典 (lzh.minecraft.wiki)
- Replaced search-based URLs with direct page links for better accuracy
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| I18N*.properties | Updated wiki URL patterns from search-based to direct page links for all languages |
| MinecraftWiki.java | New comprehensive wiki link generation logic with language-specific handling |
| Locales.java | Added i18n helper methods and renamed variable for clarity |
| I18n.java | Refactored i18n methods and added wiki link generation entry point |
| VersionsPage.java | Removed inline wiki URL logic and delegated to centralized MinecraftWiki class |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if (wikiVersion.startsWith("2.0")) | ||
| translatedVersion = "二點〇"; | ||
| else if (wikiVersion.startsWith("1.0.0-rc2")) | ||
| translatedVersion = WenyanUtils.translateGameVersion(GameVersionNumber.asGameVersion("1.0.0-rc2")); | ||
| else | ||
| translatedVersion = WenyanUtils.translateGameVersion(gameVersion); |
There was a problem hiding this comment.
The hardcoded string '二點〇' should be defined as a constant or moved to the WenyanUtils class for consistency with other translation logic.
| switch (lower) { | ||
| case "0.30-1": | ||
| case "0.30-2": | ||
| case "c0.30_01c": | ||
| wikiVersion = "Classic_0.30"; | ||
| break replace; |
There was a problem hiding this comment.
This large switch statement with many hardcoded version mappings should be extracted into a separate configuration file or constants class to improve maintainability and reduce code complexity.