Skip to content

fix: 调整国际化实例注册顺序,确保在DataTypesPlugin之前注册#326

Merged
YufJi merged 1 commit into
testfrom
fix/3305553247475712
Jan 20, 2026
Merged

fix: 调整国际化实例注册顺序,确保在DataTypesPlugin之前注册#326
YufJi merged 1 commit into
testfrom
fix/3305553247475712

Conversation

@YufJi

@YufJi YufJi commented Jan 20, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

Bug Fixes

  • 优化了应用初始化顺序,确保国际化功能在应用启动时更加稳定可靠
  • 移除了国际化初始化过程中的重复配置,简化了启动流程

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

总体概述

重新调整了初始化顺序,将国际化实例注册移至序列早期阶段,并移除了重复的调用,确保 i18n 在 DataTypesPlugin 等依赖插件初始化之前即可可用。

变更

内聚组 / 文件 变更摘要
初始化顺序调整
packages/vue3/source/src/init.ts
createI18nInstance() 调用移至 LogicsPlugin、RouterPlugin 和 ServicesPlugin 之前执行,移除了 pinia 之后的重复国际化初始化代码,确保 i18n 实例对后续依赖插件可用

代码审查工作量评估

🎯 2 (Simple) | ⏱️ ~8 分钟

可能相关的拉取请求

  • fix: 提前创建i18n #180:同样通过将 i18n 初始化提前(在 init 文件中创建/复用单一 i18n 实例)来确保 i18n 在插件和数据类型设置期间可用

诗歌

🐰 初始化的舞步重新编排,
i18n 提前登场不迟到,
插件们无需再等待,
依赖关系更清晰明了,
重复代码悄然挥手告别 ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR标题准确描述了主要变更:调整国际化实例的注册顺序,确保在DataTypesPlugin之前注册,与代码变更完全吻合。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@YufJi YufJi merged commit 8916fd3 into test Jan 20, 2026
2 checks passed
@YufJi YufJi deleted the fix/3305553247475712 branch January 20, 2026 09:58
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.

1 participant