Repository navigation
Conversation
The usage line under an assistant reply ("1,234 in · 567 out · 8,900
cache R · 12 cache W") was hard-coded English, while the turn duration
next to it ("took 3s") is translated, so the Chinese UIs showed a line
half in each language. The four labels now go through chat.* messages
in en, zh-CN and zh-TW; the English text is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under a truncated ! command, the "view full output" / "loading…" button and the "download full output" link were hard-coded English. They now go through chat.* messages in en, zh-CN and zh-TW; the English text is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 25, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Problem
Three places in the chat stay English with the UI set to 简体中文 or 繁體中文:
The line under an assistant reply shows its token usage and the turn's duration. The duration is translated (
chat.turnDuration), but the usage part is hard-coded informatUsage()(components/MessageView.tsx), so the line reads half in each language:Under a
!command whose output was truncated, theview full output(loading…while it loads) button and thedownload full outputlink are hard-coded (components/MessageView.tsx).The × that closes the composer's "Images may not be sent" banner has a hard-coded
aria-label="Dismiss"(ModelNoticeBanner,components/ChatInput.tsx), so a screen reader reads English.Reproduce on
main1,234 in · 567 out · ….!seq 1 5000in the composer and expand its card:view full outputanddownload full output.inputis text only and attach an image: the banner's × is labelledDismiss.Fix
formatUsage()takestand builds the four parts from newchat.usageInput,chat.usageOutput,chat.usageCacheReadandchat.usageCacheWritemessages, with the number as{count}. The cost part is unchanged. The Chinese labels reuse the wording of the existingsession.input/session.output/session.cacheRead/session.cacheWritelabels.BashExecutionViewuses newchat.viewFullOutput,chat.loadingFullOutputandchat.downloadFullOutputmessages.ModelNoticeBannerlabels its × with the existingsidebar.dismissmessage (Dismiss / 关闭 / 關閉), which the sidebar toast's × already uses, so the English label staysDismiss.All new messages are in
en,zh-CNandzh-TW, and the English strings are exactly the old ones. This is the same kind of fix as #1378 for the top bar's tooltip.After the change, in 简体中文:
Checks
npm test(2869 passed, 0 failed),node_modules/.bin/tsc --noEmit,npm run lint.1,234 in · 567 out · 8,900 cache R · 12 cache W · $0.0036. In a session,!seq 1 5000shows 查看完整输出 / 下载完整输出, and clicking 查看完整输出 loads the full output from line 1. With a text-only model and an image attached, the banner's × isaria-label="关闭"and still closes the banner.node_modules/.bin/tsc --noEmit,components/ChatInput.test.mjs(45 passed),eslint components/ChatInput.tsx.🤖 Generated with Claude Code