fix(client): localize local build banner

This commit is contained in:
Turtle authored and imccyu committed 2026-08-24 15:04:01 +08:00
1 parent 17bde3f5be
commit 720c5c247c
6 files changed
+10 -6

No files matched your search

+2
View File
@@ -30,7 +30,9 @@ export const en = {
'collapse': 'Collapse',
'expand': 'Expand',
'back': 'Back',
'brand.name': 'DSH',
'brand.localBuild': 'DSH Local Build',
'brand.localBuildLabel': 'Local Build',
'unknown': 'Unknown',
'none': 'None',
'truncated': 'Truncated',
+2
View File
@@ -28,7 +28,9 @@ export const zh = {
'collapse': '收起',
'expand': '展开',
'back': '返回',
'brand.name': 'DSH',
'brand.localBuild': 'DSH 本地构建',
'brand.localBuildLabel': '本地构建',
'unknown': '未知',
'none': '无',
'truncated': '已截断',
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/client/ui-sidebar/README.md
README.md: 406f2930ac1deb9bf8e12caedbcfb11f7fc35fbc
README.zh.md: 147c30b5de5db07bbffa665157c3707430c0a099
README.zh.md: fd809b20298d069b37076c8dde4fe98f8fb761c8
+1 -1
View File
@@ -4,7 +4,7 @@
侧边栏外壳插件:负责品牌行、New Session 操作、布局持有的折叠控件、可感知滚动的区域 seat,以及固定在底部的 Settings seat。[ui-workspace](../ui-workspace/README.zh.md) 持有渲染到 `sidebar.workspaces` 的 Workspace 与 Session 浏览器;本包既不派生其中的行,也不持有其视图偏好。折叠到布局拥有的 56px 轨道仍属于本地呈现行为。约定:[slot 系统标准](../../../.agents/notes/implemented/architecture/2026-07-22-slot-type-chain-implementation.zh.md)。
展开的品牌行把 `sidebar.brand.mark` 与 `sidebar.brand.name` 渲染为两个独立的 single slot,收起轨道则渲染同一个 mark slot。没有占位者时,外壳使用鱼形标记和本地构建 fallback:完整构建显示 `DSH`、小号 `Local Build` 标注,以及把 `DSH_CLIENT_VERSION`、可选的 7 位 `DSH_CLIENT_COMMIT_HASH` 与 `DSH_CLIENT_GIT_DIRTY=true` 组装成的 `version[-commit][-dirty]` 代码徽标;缺少版本元数据时保留防御性的 `DSH Local Build` 标签。部署包可以单独替换任一值,而无须替换 New Session 控件或轨道几何;声明感知的 `slots.inject()` 让这种包无论先于还是后于侧边栏激活都能生效。
展开的品牌行把 `sidebar.brand.mark` 与 `sidebar.brand.name` 渲染为两个独立的 single slot,收起轨道则渲染同一个 mark slot。没有占位者时,外壳使用鱼形标记和本地构建 fallback:完整构建显示 `DSH`、小号 `本地构建` 标注,以及把 `DSH_CLIENT_VERSION`、可选的 7 位 `DSH_CLIENT_COMMIT_HASH` 与 `DSH_CLIENT_GIT_DIRTY=true` 组装成的 `version[-commit][-dirty]` 代码徽标;缺少版本元数据时保留防御性的 `DSH 本地构建` 标签。部署包可以单独替换任一值,而无须替换 New Session 控件或轨道几何;声明感知的 `slots.inject()` 让这种包无论先于还是后于侧边栏激活都能生效。
New Session 会启动运行时的页面局部前端 Session Intent。运行时优先使用作用域操作明确指定的 Workspace,否则使用当前 Session 所属 Workspace,再否则使用最近活跃 Workspace;一个 Workspace 都没有时则清空选择,进入空白 New Session 页面。Workspace 专属控件与共享选择器由 ui-workspace 持有。
@@ -154,12 +154,12 @@ export function SidebarRoot({
<span className={css.brandName}>
{renderSlot('sidebar.brand.name', {}, {
fallback: buildVersion === undefined
? <span className={css.fallbackBrandName}>DSH Local Build</span>
? <span className={css.fallbackBrandName}>{t('brand.localBuild')}</span>
: (
<>
<span className={css.localBuildBrand}>
<span className={css.localBuildName}>DSH</span>
<span className={css.localBuildLabel}>Local Build</span>
<span className={css.localBuildName}>{t('brand.name')}</span>
<span className={css.localBuildLabel}>{t('brand.localBuildLabel')}</span>
</span>
<span className={css.buildVersion}>{buildVersion}</span>
</>
@@ -283,7 +283,7 @@ exports[`sidebar shell snapshots > renders the expanded column in the default lo
<span
class="localBuildLabel"
>
Local Build
本地构建
</span>
</span>
<span