Repository navigation
Conversation
be6009d to
377a49a
Compare
|
@jundot — companion note to #3586. That PR moves the remaining hardcoded strings into the catalog; this one covers the other half — an audit of the pre-existing Worth doing now because once the catalog is the single place UI text lives, its quality is what every later localization inherits. Two properties: the key sets stay identical across the nine locales, and no locale other than Happy to adjust wording or drop individual entries if you disagree with a term — that kind of feedback is exactly what I'm after here. The one test change relaxes a hard-coded English pin so I'll keep contributing to the oMLX UI and to the zh-Hans localization going forward. |
e9750b4 to
62b5eb2
Compare
The Simplified Chinese UI had drifted from the English source and from its own conventions. 235 values are corrected across the two Chinese catalogs: 230 in the web catalog (omlx/admin/i18n/zh.json) and 5 in the macOS one (Localizable.xcstrings). 149 of the web values were still the English string. Translated (149) The whole web-search settings panel, the GDN snapshot / sidecar-precision settings, the PLE / Engram SSD-offload rows, the Qwen ANE panel including its tuner dialog, the Qwen INT8 and MoE expert-offload labels, the cluster badges and v2 staging status chips, the chat web-search and transcription statuses, and the metric tooltips' lead-ins (which had kept the English metric name while the matching .name key was translated). One value was stale rather than merely untranslated: websearch.provider_hint still carried an obsolete English sentence describing a backend the source had since replaced. Punctuation and spacing (48) 34 ASCII "..." -> "…"; 3 half-width colons and 2 half-width parentheses in Chinese sentences -> full-width; 8 missing spaces between Chinese and Latin; 1 corner-bracket pair 「」 -> “”. Latin casing (5 + 5) Token capitalised as a common noun wherever it is a word rather than an identifier, matching the catalog's 39:18 preference; the same five values in the macOS catalog are aligned. Parameter names (max_tokens:, tool_result_tokens:) and the your_token... example keep their literal form, since those are the API names, not prose. Terminology and wording (28) cache: "Hot Cache" / "KV Cache" -> 热缓存 / KV 缓存, matching the 40+ values that already said 缓存. batch size: one rendering (批大小) for the three that were in use. prompt processing: 提示处理 -> 提示词处理. The bench metric tooltips' English lead-ins now match their translated .name. `sidecar` is written in Latin in four values that said 边车, and the cluster's `readiness canary` keeps `canary`. This is a preference, not a correction: 边车 is what Kubernetes' official Chinese documentation uses, and 金丝雀发布 is standard for canary releases. The Latin term is used here because oMLX's own documents say "sidecar" (SQLite sidecars, GDN sidecars) and the newly added GDN error message already read `GDN SSD sidecar`. Acronyms and mechanism names (MTP, PLE, Engram, GDN, MoE, DFlash, SpecPrefill, TurboQuant, imatrix, rank) were already Latin and are unchanged. Three values used a second wording for a meaning the catalog already words one way: 留空表示不限制 -> 留空表示无限制, 您的客户端 -> 你的客户端 (the catalog addresses the reader as 你 everywhere else), and 将不需要身份验证 -> 将无需身份验证. Language selector (included above) settings.language.en was 英语 while every sibling is an endonym, so the selector read inconsistently; it is now English. Left in English deliberately Product and protocol names (oMLX, Mac, MLX, MoE, GDN, ANE, SSD, KV, RHT, INT8, Qwen, Brave, SearXNG), sampling parameter names (top_p, top_k, min_p), chat-template kwarg identifiers (enable_thinking, reasoning_effort), placeholder examples (hf_..., your_token..., mlx-community/...), config keys shown in code chips, and the language selector's endonyms. Two distinctions that look like inconsistencies but are not Token vs 令牌 - model tokens keep the Latin word, auth tokens (HF / MS) are 令牌. Memory -> RAM 缓存 in the runtime-cache panel disambiguates the RAM tier from general memory. Also translated chat.enhanced_readability was the one value still pinned to English: the test asserted the label equalled "Enhanced Readability" in every locale. That pin is relaxed for zh - the other locales keep the English fallback until their own translations land - and the label is now 增强可读性, the same wording the macOS catalog uses for the same preference. Co-Authored-By: Claude <noreply@anthropic.com>
The first commit audited the web catalog on its own. This pass compares it with the macOS app's Simplified Chinese -- the other surface the same user reads -- and removes every case where one English string shipped two different Chinese ones. 25 web values and 17 app values change. The app's wording wins by default. It loses where the web text is the better Chinese, which is the six the reviewer will want to check: sidebar.accuracyBench 准确率 (was 准确度) settings.model_type.rerank 重排序 (was 重排器) ...qwen_ane.tuner.tune_for_mac 为这台 Mac 调优 (was 为此 Mac 调优) ...dflash.draft_quant_group.label 分组大小 (was 组大小) ...dflash.draft_quant_activation 激活位宽 (was 激活位) ...dflash.draft_quant_weight 权重位宽 (was 权重位) A few more are decided by the catalog's own conventions rather than by either side: sampling parameters stay Latin (Min P, not 最小 P), `Max Tokens` is 最大 Token 数, Profile is 配置档 rather than the ambiguous 配置文件 (a config *file* is also 配置文件), and 提示词处理 is kept for Prompt Processing because the bench tooltips already use it and 预填充 is the rendering for Prefill. `Token` is capitalised as a common noun, auth tokens stay 令牌, and 词元 is never used. The auth-token values keep 令牌 deliberately; the two are not the same concept and are not merged. Inside the catalog, five English strings had two renderings each -- the previous commit fixed one side of them -- so 已复制, 已缓存 Token, 从列表中移除, 预处理 TPS/请求 and 无头节点 are now the only rendering. Two values that landed on main after this branch was cut were still English: the DeepSeek V4.1 CED prefill label and its hint. Both are translated here, so nothing arrives in the Chinese UI untranslated.
62b5eb2 to
d1600ef
Compare
The web catalog was audited to the last value; the app's own catalog was only checked where it disagreed with the web. Completing it: Eight entries had an English value and no `zh-Hans` at all, so a Chinese user saw English in the app — the K2 ANE panel (label, hint, dense/shared MLP) and the Qwen4 PLE SSD-offload panel (label, hint, forced note), plus the "0.0.0.0 & :: (All Networks)" host entry. All eight are translated here; the four whose English already existed in the web catalog reuse that catalog's wording, so both surfaces now read the same. Nine smaller values drifted from the conventions the rest of the catalog follows: four half-width colons inside Chinese labels (`设置: %2$lld`, `覆盖: %lld`, `键: %lld`, `参数: %lld`) are now full-width, three half-width parentheses wrapping Chinese (CMMLU/JMMLU/KMMLU) are full-width, and two mirror placeholders had a doubled space before a full-width bracket.
|
Superseded, and re-published as part of a dedicated Simplified Chinese localization PR against the current The migration this audit was interleaved with is now #3682 (string extraction only, every locale on the English fallback). This PR's catalog audit — the corrections to the Simplified Chinese that shipped before the migration — lands in that separate localization PR together with the zh wording for the migrated strings, so the two concerns stay apart. The recorded reasoning (scoping the audit against the catalog's own conventions, the app's wording winning by default, and the deliberately-kept Latin terms) carries over intact. |
Audits the Simplified Chinese UI that shipped before the i18n migration and corrects what drifted. Three files:
omlx/admin/i18n/zh.json, the macOS app'sLocalizable.xcstrings, and one assertion intests/test_admin_enhanced_readability.py. 263 values corrected — 233 inomlx/admin/i18n/zh.jsonand 30 in the macOS app'sLocalizable.xcstrings.Two commits: the audit itself, then a pass that compares the web catalog with the macOS app's (the same user reads both surfaces). The second one is described under "One rendering per meaning" below.
How the audit was scoped
Rather than applying an outside style guide, the target was the catalog's own accepted conventions (the values already merged). Punctuation, spacing, casing and terminology were measured across those values first, then every value — pre-existing and new — was checked against that profile. Where the catalog contradicted itself, the majority usage won; where a difference was semantic rather than stylistic it was kept.
What it fixes
Untranslated — 125 values
Search provider,Snippets only,Content limit,Test search, all six hint stringsSnapshot Storage,SSD Write Buffer,SSD Snapshot Precision,Dedicated SSD SidecarSSD N-gram Offload (Qwen4 only),SSD N-gram Offload (DeepSeek V4.1)Tuner overrides,Apply result,Preparing tuner…,CPU workers)Qwen INT8 Activation Prefill,MoE Expert OffloadSearching the web,Transcribing,Listening,Fetching page).namekey was translated — now批大小,端到端延迟,总吞吐量,TTFT(首个 Token 时间), …Two values that arrived on
mainafter this branch was cut — the DeepSeek V4.1 CED prefill label and its hint — are translated here too, so the Chinese UI has no English left in it.Punctuation and spacing — 48 values
...→…「」→“”Latin casing — 4 values, plus 5 in the macOS catalog
Tokencapitalised as a common noun wherever it is a word rather than an identifier, plus the unit in128 Token (fixed)and the same five values inLocalizable.xcstrings. Parameter names (max_tokens:,tool_result_tokens:) and theyour_token...example keep their literal form — those are API names, not prose.Terminology and wording — 27 values
Hot Cache/KV Cache→ 热缓存 / KV 缓存, matching the 40+ values that already said 缓存提示处理→提示词处理留空表示不限制→留空表示无限制,您的客户端→你的客户端(the catalog addresses the reader as 你 everywhere else), and将不需要身份验证→将无需身份验证.namekeysidecaris written in Latin in four values that said 边车, and the cluster'sreadiness canarykeepscanaryover 金丝雀. To be explicit that this is a preference and not a correction: 边车 is a legitimate rendering — it is what Kubernetes' official Chinese documentation uses for sidecar containers — and 金丝雀发布 is standard for canary releases. They are aligned to the Latin terms here because oMLX's own documents say "sidecar" (SQLite sidecars,GDN sidecars), because the newly added GDN error message already readGDN SSD sidecar, and because the Latin term is what the surrounding docs and search results use.125 translated + 48 punctuation and spacing + 4 casing + 27 terminology and wording = 204 web values in the first commit, plus 5 in the macOS catalog; the second commit adds 34 web values and 25 app values, five of which were already touched by the first, which is why the PR changes 233 web values in total.
Twenty-six further values — the Cluster v2 strategy/staging chips plus two bench and usage hints — sit inside the blocks the migration PR inserts new keys into. They are corrected in that PR instead, so that the two can be merged in either order without a conflict in
zh.json. They are: 推荐, 每台 Mac 都处理每个 Token, 层分片, Tensor 拆分, 正在复制…, 复制失败, 本地网络权限,pp_tps_req的说明, and 每小时 Token 总量.One rendering per meaning (second commit)
The audit above only looked inside the web catalog. This commit compares it with the macOS app's Simplified Chinese and removes the cases where one English string shipped two different Chinese ones. 34 web values and 25 app values change.
The app's wording wins by default. It loses where the web text is the better Chinese:
sidebar.accuracyBenchsettings.model_type.rerank…qwen_ane.tuner.tune_for_mac…dflash.draft_quant_group.label…dflash.draft_quant_activation.label…dflash.draft_quant_weight.labelA few more are decided by the catalog's own conventions rather than by either side: sampling parameters stay Latin (
Min P, not 最小 P),Max Tokensis 最大 Token 数, Profile is 配置档 rather than the ambiguous 配置文件 (a config file is also 配置文件),Prompt Processingstays 提示词处理 because the bench tooltips already use it and 预填充 is the rendering for Prefill, and the Runtime Cache panel'sRAM 条目matches theRAM 缓存tier next to it.Inside the catalog, five English strings had two renderings each — the previous commit fixed one side of them — so 已复制, 已缓存 Token, 从列表中移除, 预处理 TPS/请求 and 无头节点 are now the only rendering.
Two distinctions that look like inconsistencies but are not, and are left alone:
Tokenvs令牌— model tokens keep the Latin word; auth tokens (HF / MS) are 令牌. 词元 is never used.Off→ 关 vs 关闭,On→ 开 vs 在,Throughput→ 吞吐优先 vs 吞吐量,Full→ 全量 vs 完整,Yes→ 是 vs 确定 — each pair is a different thing (a toggle versus a select option, a mode name versus a metric, a preposition versus a switch state), not two renderings of one.Deliberately kept in English
Product and protocol names (oMLX, Mac, MLX, MoE, GDN, ANE, SSD, KV, RHT, INT8, Qwen, Brave, SearXNG), sampling parameters (
top_p,top_k,min_p), chat-template kwarg identifiers (enable_thinking,reasoning_effort), placeholder examples (hf_...,your_token...,mlx-community/...), config keys shown in code chips, and the language selector's endonyms (Español, Français, Русский, 日本語, …).The last pinned value
chat.enhanced_readabilitywas the one value that could not be translated:tests/test_admin_enhanced_readability.pyasserted the label equalled"Enhanced Readability"in every locale.That pin is relaxed here for
zh— every other locale still has to carry the English fallback until its own translation lands, so the assertion keeps its teeth there: