Skip to content

fix(brick-kit): internationalize app bar tips in Router - #4893

Merged
weareoutman merged 1 commit into
masterfrom
fix/brick-kit-license-i18n-260923
Sep 23, 2026
Merged

weareoutman merged 1 commit into
masterfrom
fix/brick-kit-license-i18n-260923

Conversation

@smiletan084

Copy link
Copy Markdown

问题
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 天

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>
@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 05239253-ae08-44f4-b4f9-79fe6df1c8c1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@cypress

cypress Bot commented Sep 23, 2026

Copy link
Copy Markdown

next-core    Run #12062

Run Properties:  status check passed Passed #12062  •  git commit f5f9f71165 ℹ️: Merge 8016017cb00a769bd0a48175c38af2437fc67beb into fb1be2bf66ed944f89b365592962...
Project next-core
Branch Review refs/pull/4893/merge
Run status status check passed Passed #12062
Run duration 00m 27s
Commit git commit f5f9f71165 ℹ️: Merge 8016017cb00a769bd0a48175c38af2437fc67beb into fb1be2bf66ed944f89b365592962...
Committer smiletan084
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 6
View all changes introduced in this branch ↗︎

@weareoutman
weareoutman merged commit 85b2132 into master Sep 23, 2026
16 of 18 checks passed
@weareoutman
weareoutman deleted the fix/brick-kit-license-i18n-260923 branch September 23, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants