Repository navigation
支持读取模组自带的本地化名称和简介 - #7232
Open
Wulian233 wants to merge 3 commits into
Open
支持读取模组自带的本地化名称和简介#7232Wulian233 wants to merge 3 commits into
Wulian233 wants to merge 3 commits into
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Wulian233
commented
Nov 7, 2026
| displayName = localModFile.getFileName(); | ||
| String localizedName = localization.name(); | ||
| if (!localizedName.isEmpty()) | ||
| return (abbreviation.isEmpty() ? "" : "[" + abbreviation.trim() + "] ") |
Contributor
Author
There was a problem hiding this comment.
注,因为模组数据本身不包含缩写,所以为了显示[缩写]还需要读一遍百科数据,大概是[百科缩写]模组本地化名(模组原名)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #5641
Modmenu和Forge/Neoforge都支持让模组本体本地化模组名和简介,本地化的内容为模组作者发布的官方版。目前相当数量的模组都支持了此功能。格式为:
如果我们检测到模组存在本地化内容,则会使用此翻译并为最高优先级,再尝试匹配百科数据,再回退到英文原名