- 雪梨纽西兰希思露甘奶迪2026-08-115349
感觉以后每个项目好像都能吵起来了(bushi)
github.com/anomalyco/opencode
fix(i18n): use 词元 instead of 令牌 for token in zh locale (#40977)
dev←Speechlessmanbilibili:fix/zh-token-translation已合并 09:22AM - 07 Aug 26 UTC

Speechlessmanbilibili
+7
-7Issue for this PR
Closes #40976
Type of change
- [x] Bug fix
Wha…t does this PR do?
In the zh locale, the context usage panel translates "token" as 「令牌」, which is the API-credential term (访问令牌) and reads oddly in an LLM context — e.g. 「推理令牌」, 「缓存令牌」. This replaces the 7 occurrences in
packages/app/src/i18n/zh.tswith 「词元」, the common scholarly translation for LLM tokens.The zht locale and older zh versions keep the English "token" (总 token, 输入 token), and
.opencode/glossary/zh-cn.mdhas no entry for token, so there is no established convention to contradict.How did you verify your code works?
- Only the 7 string values changed; no keys or logic touched
git diffconfirms exactly those 7 lines- i18n keys still match
en.ts(parity is key-based)
Screenshots / recordings
N/A — translation-only change
Checklist
- [x] I have tested my changes locally
- [x] I have not included unrelated changes in this PR
主楼 - 一只羊蝎子2026-08-1113307
- Ming2026-08-1111301
- Xinalin2026-08-1115777
虽然词元这个翻译有点神秘,但是令牌确实算是一种错译吧。
如果让一个没有context的人说令牌,应该没人能懂是指LLM的token
总感觉强推“词元”触发了部分人的逆反心理,不然很难解释为什么会喜欢“令牌”
- Galaxy_Ron2026-08-1111569
- Lunafleur2026-08-118769
- Claude_Mythos_52026-08-1131731
- anzi2026-08-1112339
- wangdakee2026-08-1129963
感觉作为老外开发者都麻了,怎么这群人事情这么多
- sxjeru2026-08-1118966
最难绷的是原本居然能翻译成令牌,大模型的 token 和授权有一点关系么。
- Cimix2026-08-1129464
只用英文就没那么多事了,只能说很多人还是闲的
- tshtxyd-linuxdo2026-08-115675
直接用token不就行了,为啥一定要吵词元、令牌呢,也没人说令牌啊,不都说的token
- epoch2026-08-1110705
核心还是触发上面佬友提到的逆反心理。 词元这个词翻译的时候没毛病。主要是没在一开始就翻译,不过再用几年,国内 AI 也大行其道的时候,这个词就会顺理成章广泛使用了。
主要更搞笑的是,前几天新闻稿有个泄露 access token 的被翻译成了 词元了。
- WWT2026-08-1134225
- 目灯2026-08-1123937
- ilvsx2026-08-1125813
我是不能接受某天
token bucket被叫成词元桶 - MorriganAensland2026-08-1155349
- Germa2026-08-119851
AI的token 是令牌的意思吗?
- 一只羊蝎子2026-08-1113307
- 薛定谔的按钮2026-08-1164633
能翻还是最好翻一下吧,
词元确实比token直观。就像不少时候我们会把
container叫做容器,但很少人真的会把docker叫做码头工人。直观的理解永远是第一位。毕竟谁也不想天天看
鲁棒性那样的翻译吧




