Repository navigation
完善本地化规则和导出,改用 NeoForge 注解扫描 - #12
Merged
Merged
Conversation
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.
What / 目的
完善
26.1的本地化规则、交换数据导出和 DataGen 扩展。复用 NeoForge 的注解扫描结果,让下游使用默认 JAR 配置即可打包本地化声明。Implementation Details / 实现细节
@Trans与@TransVariants均由 NeoForge 扫描收集。单 Mod 文件可以省略modId,多 Mod 文件通过显式modId区分归属。:test。Kotlin DataGen 使用 fastutil 列表和快速迭代,导出时按需创建条目,注解的显式 Locale 译文使用EnumMap。Outcome / 结果
build通过,包含 Spotless 检查。:test:runGameTestServer的 5 项测试全部通过。:test:runTestdata通过。集合调整前后,44 个生成资源与本地化交换 JSON 的 SHA-256 一致。Potential Compatibility Issues / 潜在兼容性问题
annotationProcessor和ksp依赖。使用旧版本生成的索引由下游清理旧构建目录后移除。modId。namespace决定语言文件的输出位置。