修复多语言加载失败问题 (v1.8.0-fix1)#7
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a multilingual loading failure issue introduced by changes to the mod loading mechanism. The fix passes the mod directory path explicitly to the initialization method instead of relying on assembly location detection.
- Modified
ModEntry.Initialize()to accept amodDirectoryparameter and store it in a static property - Updated
Localizationclass to use the stored mod directory path with a fallback to assembly location - Enhanced
ModLoaderto invoke the updated Initialize method with proper null checks and error handling - Updated version to 1.8.0-fix1 with corresponding changelog entries
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| DuckovCustomModel/ModEntry.cs | Added ModDirectory property and updated Initialize() method signature to accept mod directory path parameter |
| DuckovCustomModel/Localizations/Localization.cs | Modified LocalizationDirectory to prioritize ModEntry.ModDirectory over assembly location detection |
| DuckovCustomModel.ModLoader/ModLoader.cs | Rewrote InvokeModEntryMethodInitialize() to explicitly pass mod directory parameter with comprehensive null checks and error handling |
| DuckovCustomModel/Constant.cs | Updated ModVersion constant from "1.8.0" to "1.8.0-fix1" |
| CHANGELOG_EN.md | Added v1.8.0-fix1 release notes describing the multilingual loading fix |
| CHANGELOG.md | Added v1.8.0-fix1 release notes in Chinese |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
419de8b to
ac9a03f
Compare
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.
修复了因修改加载方式导致的多语言加载失败问题