refactor(communication): localize ChannelHeader strings; bump tiny chips from 9px to 10px

Stragglers from the Communication audit that did not fit into C10's
FilterBar scope:

- ChannelHeader carried two hardcoded English strings: the sidebar
  reveal button's aria-label ("Show sidebar") and the "Open task"
  link that appears on task-discussion channels. Both now go through
  i18n — added `comm.showSidebar` ("显示侧边栏" / "Show sidebar") and
  reused the existing `comm.openTask` key. Users running in Chinese
  now get a fully Chinese header.

- MessageBubble had two 9px uppercase chips (department badge and
  priority badge). 9px with tracking is unreadable at standard display
  density; bumped both to 10px and loosened the tracking slightly so
  the letters don't collide. Same typography decision we made for
  the OrgChart connector label in C3.

Covers the remaining Communication audit items. J-C1 (resizable
sidebar) and J-C6 (resizable ThreadPanel) are feature additions and
stay out of scope per the audit's "bug fix only" contract.
This commit is contained in:
ZacharyZhang-NY committed 2026-04-17 20:16:43 -04:00
1 parent ab731e64d2
commit 3608578ba3
4 files changed
+6 -4

No files matched your search

@@ -53,7 +53,7 @@ export function ChannelHeader({
type="button"
onClick={onShowSidebar}
className="rounded-[4px] p-1 text-muted-foreground transition hover:text-foreground"
aria-label="Show sidebar"
aria-label={t("comm.showSidebar")}
>
<CaretDown size={12} className="rotate-90" />
</button>
@@ -64,7 +64,7 @@ export function ChannelHeader({
<div className="truncate text-[13px] font-semibold text-foreground">{activeChannel.label}</div>
{activeChannel.kind === "task" && activeTask ? (
<button type="button" onClick={() => onNavigateToTask(activeTask.id)} className="mt-0.5 text-[11px] font-medium text-primary transition hover:underline">
Open task
{t("comm.openTask")}
</button>
) : null}
</div>
@@ -100,7 +100,7 @@ export const MessageBubble = memo(function MessageBubble({
) : null}
{agent?.department ? (
<span
className="shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-[0.08em] text-muted-foreground"
className="shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-[0.06em] text-muted-foreground"
>
{agent.department.replace("_", " ")}
</span>
@@ -110,7 +110,7 @@ export const MessageBubble = memo(function MessageBubble({
</span>
{message.priority !== "normal" ? (
<span
className={`flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-[0.06em] ${priorityMap[message.priority]?.className ?? ""}`}
className={`flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-[0.04em] ${priorityMap[message.priority]?.className ?? ""}`}
>
{message.priority === "urgent" ? <WarningCircle size={10} weight="fill" /> : null}
{priorityMap[message.priority]?.label}
+1
View File
@@ -599,6 +599,7 @@ export const en: Record<string, string> = {
"comm.adjustFilters": "Try another search or filter",
"comm.messagesAppear": "No messages yet",
"comm.openTask": "Open task",
"comm.showSidebar": "Show sidebar",
"comm.selectChannelSend": "Pick a channel first.",
"comm.replyInDiscussion": "Reply in task discussion...",
"comm.typeMessage": "Type a message...",
+1
View File
@@ -599,6 +599,7 @@ export const zh: Record<string, string> = {
"comm.adjustFilters": "换个搜索或筛选试试",
"comm.messagesAppear": "暂无消息",
"comm.openTask": "打开任务",
"comm.showSidebar": "显示侧边栏",
"comm.selectChannelSend": "先选一个频道。",
"comm.replyInDiscussion": "在任务讨论中回复...",
"comm.typeMessage": "输入消息...",