Repository navigation
fix(brick-kit): internationalize app bar tips in Router - #4893
Merged
Merged
Conversation
Fix the license bar tip showing Chinese under the English locale on v2-mode apps (ops-automation, permission-center, etc.): the tip text was hardcoded in Router when dispatching `app.bar.tips`, while nav-legacy only renders what it receives. Replace the three hardcoded Chinese tips (license expiry, slow-render warning and its suggestion link) with i18next translations under the existing NS_BRICK_KIT namespace, following the same pattern already used for error pages in Router. Add zh/en locales with v4 `_other` and v3-compatible `_plural` plural keys for "License expires in N day(s)", so the tips follow language switching on both v2 mode (dispatched here) and the already-i18n v3 consumers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
next-core
|
||||||||||||||||||||||||||||
| Project |
next-core
|
| Branch Review |
refs/pull/4893/merge
|
| Run status |
|
| Run duration | 00m 27s |
| Commit |
|
| Committer | smiletan084 |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
6
|
| View all changes introduced in this branch ↗︎ | |
weareoutman
approved these changes
Sep 23, 2026
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.
问题
v2 模式页面(ops-automation、permission-center 等)的 License 吊顶在英文模式下
仍显示中文——文案由 Router dispatch 的 app.bar.tips 事件生成(此处硬编码),
nav-legacy 只负责渲染。
改动
Router.ts:License 吊顶 / 性能告警 / "建议解决思路" 3 处硬编码
→ i18next.t(NS_BRICK_KIT:...)(对齐同文件错误页既有惯例)
i18n/:+3 词条双语;复数提供 _other(v4)与 _plural(v3 宿主兼容)双键,
"License expires in N day(s)" 两种引擎均正确
新增 license-locales.spec.ts:6 用例(双语、count=1 单数、v3 复数、插值)
验证
单测 6/6 passed;TS 与 master 基线零差异
本地对接 5.56(brick-container-serve + 本地 dll)实测 ops-automation:
EN:License expires in 8 days
ZH:离License过期还有 8 天