i18n: "Endpoint" reads 接口地址 in Chinese, not the machine-translated 终结点 (Pluviophile)
Pluviophile (Discord) said the 终结点 beside /v1/responses in a request's
details reads like machine translation. 终结点 was the zh word for the
"Endpoint" key, used by the Requests tab's details, the Azure OpenAI and
Remote magpie editors' field and the S3 sync form, and by four Azure
strings. All of them now say 接口地址 (the address a request goes to).
Not 端点, which the rest of zh uses for "Endpoints": the Azure editor
shows both labels at once, and with 端点 for both the zh editor had two
labels named the same (the Azure test counted 2). zh-TW had that clash
already ("Endpoint" and "Endpoints" both 端點), so its field is now
端點位址; zh-TW's other wording is unchanged. Azure portal's own blade name,
「密钥和终结点」, stays as Azure writes it.
Tests: azure-endpoint now runs zh-TW too, and its one-label count is what
caught the 端点 clash.
Run on mote at this head, chromium + webkit: i18n-keys, azure-endpoint
(en, zh, zh-TW), usage-ledger-detail, s3-sync, remote-magpie. 44 pass,
8 fail; the same 8 fail at origin/main b2f7818d2 run beside it:
remote-magpie (#4398, red on macOS too, en and zh) and s3-sync in WebKit
(#2448).
Broken by hand: with 端点 for "Endpoint", azure-endpoint zh was red
(label count 2 != 1).
Not tried: the real app's windows; ja and de untouched.
This commit is contained in:
@@ -2120,7 +2120,7 @@ const I18N = {
|
||||
"it is the agent's own sign-in; add the subscription in magpie": "这是 agent 自己的登录,请在 magpie 里添加订阅",
|
||||
"it is the agent's own sign-in": "这是 agent 自己的登录",
|
||||
"it is a sign-in, not a key; add the subscription in magpie": "这是登录账号而不是密钥,请在 magpie 里添加订阅",
|
||||
"it has no Azure OpenAI endpoint": "没有 Azure OpenAI 终结点",
|
||||
"it has no Azure OpenAI endpoint": "没有 Azure OpenAI 接口地址",
|
||||
"it points at magpie itself": "它指向的就是 magpie 自己",
|
||||
"it has no base URL": "没有 Base URL",
|
||||
"it has no API key": "没有 API 密钥",
|
||||
@@ -2437,14 +2437,14 @@ const I18N = {
|
||||
"{name} added": "已添加 {name}",
|
||||
"Give it a name": "先起个名字",
|
||||
"A base URL is needed": "需要填写 Base URL",
|
||||
"Endpoint": "终结点",
|
||||
"Your resource's endpoint is needed": "需要填写你的资源终结点",
|
||||
"Endpoint": "接口地址",
|
||||
"Your resource's endpoint is needed": "需要填写你的资源接口地址",
|
||||
"Server address": "服务器地址",
|
||||
"Advanced": "高级",
|
||||
"Where the server listens; change the port, or give another computer's address": "服务监听的地址;可改端口,或填另一台电脑的地址",
|
||||
"Address: {v} isn't an address like http://localhost:11434": "地址:{v} 不是形如 http://localhost:11434 的地址",
|
||||
"your resource's endpoint and key": "你的资源终结点和密钥",
|
||||
"Your resource's endpoint, from Keys and Endpoint in the Azure portal. Once added, magpie asks the resource for its deployments with this key, over its v1 API; the deployments' names are the model ids.": "资源终结点,见 Azure 门户的「密钥和终结点」。添加后,magpie 会用这把 key 通过 v1 API 查询该资源的部署;部署名称就是模型 ID。",
|
||||
"your resource's endpoint and key": "你的资源接口地址和密钥",
|
||||
"Your resource's endpoint, from Keys and Endpoint in the Azure portal. Once added, magpie asks the resource for its deployments with this key, over its v1 API; the deployments' names are the model ids.": "资源的接口地址,见 Azure 门户的「密钥和终结点」。添加后,magpie 会用这把 key 通过 v1 API 查询该资源的部署;部署名称就是模型 ID。",
|
||||
"No need to type them: once added, magpie lists the deployments this key can call. Type a deployment's name as a model id only if that list can't be fetched.": "不用手填:添加后 magpie 会列出这把 key 能调用的部署。只有列表拉取失败时,才把部署名称当作模型 ID 填写。",
|
||||
"Asking your resource for its deployments with this key…": "正在用这把 key 查询该资源的部署…",
|
||||
"No deployments came back for this key. Fetch models again, or type a deployment's name as a model id.": "这把 key 没有查到部署。重新获取模型,或把部署名称当作模型 ID 填写。",
|
||||
@@ -6813,7 +6813,7 @@ const I18N = {
|
||||
"{name} added": "已新增 {name}",
|
||||
"Give it a name": "先起個名字",
|
||||
"A base URL is needed": "需要填寫 Base URL",
|
||||
"Endpoint": "端點",
|
||||
"Endpoint": "端點位址",
|
||||
"Your resource's endpoint is needed": "需要填寫你的資源端點",
|
||||
"Server address": "伺服器位址",
|
||||
"Advanced": "進階",
|
||||
|
||||
@@ -51,9 +51,13 @@ const L = {
|
||||
en: { field: "Endpoint", hint: /Keys and Endpoint in the Azure portal\. Once added, magpie asks the resource for its deployments with this key.*deployments' names are the model ids/, needed: "Your resource's endpoint is needed", add: "Add",
|
||||
models: "Models", modelsNote: /^No need to type them: once added, magpie lists the deployments this key can call/,
|
||||
asking: "Asking your resource for its deployments with this key…", none: /^No deployments came back for this key\..*deployment's name as a model id/, empty: "The vendor's list is empty. Fetch models again, or type a model id." },
|
||||
zh: { field: "终结点", hint: /Azure 门户的「密钥和终结点」。添加后,magpie 会用这把 key.*查询该资源的部署;部署名称就是模型 ID/, needed: "需要填写你的资源终结点", add: "添加",
|
||||
zh: { field: "接口地址", hint: /Azure 门户的「密钥和终结点」。添加后,magpie 会用这把 key.*查询该资源的部署;部署名称就是模型 ID/, needed: "需要填写你的资源接口地址", add: "添加",
|
||||
models: "模型", modelsNote: /^不用手填:添加后 magpie 会列出这把 key 能调用的部署/,
|
||||
asking: "正在用这把 key 查询该资源的部署…", none: /^这把 key 没有查到部署。.*部署名称当作模型 ID/, empty: "供应商列表为空。重新获取模型,或输入一个模型 ID。" },
|
||||
// "Endpoints" is 端點 here, so the field is named apart from it
|
||||
"zh-TW": { field: "端點位址", hint: /Azure 入口網站的「金鑰和端點」。新增後,magpie 會用這把 key.*查詢該資源的部署;部署名稱就是模型 ID/, needed: "需要填寫你的資源端點", add: "新增",
|
||||
models: "模型", modelsNote: /^不用手動填寫:新增後 magpie 會列出這把 key 能呼叫的部署/,
|
||||
asking: "正在用這把 key 查詢該資源的部署…", none: /^這把 key 沒有查到部署。.*部署名稱當作模型 ID/, empty: "供應商列表為空。重新取得模型,或輸入一個模型 ID。" },
|
||||
};
|
||||
|
||||
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
|
||||
@@ -61,7 +65,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
assert(["chromium", "webkit"].includes(engine), "BROWSER must be chromium or webkit");
|
||||
const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" }));
|
||||
t.after(() => browser.close());
|
||||
for (const lang of ["en", "zh"]) {
|
||||
for (const lang of ["en", "zh", "zh-TW"]) {
|
||||
await t.test(lang, async () => {
|
||||
const w = L[lang];
|
||||
const saves = [];
|
||||
|
||||
@@ -57,7 +57,7 @@ function server(lang, saves) {
|
||||
const L = {
|
||||
en: { field: "Endpoint", hint: /Settings → Network and sharing, under Share on local network.*the API the agent spoke/, needed: "The other magpie's address is needed", note: "another computer's magpie, shared on its network", add: "Add",
|
||||
decide: ["Jev endpoint", "System One endpoint"] },
|
||||
zh: { field: "终结点", hint: /设置 → 网络与共享 → 局域网共享.*原样转发/, needed: "需要填写另一台 magpie 的地址", note: "远程:另一台电脑上的 magpie,局域网共享", add: "添加",
|
||||
zh: { field: "接口地址", hint: /设置 → 网络与共享 → 局域网共享.*原样转发/, needed: "需要填写另一台 magpie 的地址", note: "远程:另一台电脑上的 magpie,局域网共享", add: "添加",
|
||||
decide: ["Jev 端点", "System One 端点"] },
|
||||
};
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
await page.waitForTimeout(250);
|
||||
assert.equal(await top(), before, "picking S3 must not scroll the page");
|
||||
assert.deepEqual(await labels(), zh
|
||||
? ["同步到", "终结点", "存储桶", "前缀", "区域", "Access Key", "Secret", "口令", "同时同步"]
|
||||
? ["同步到", "接口地址", "存储桶", "前缀", "区域", "Access Key", "Secret", "口令", "同时同步"]
|
||||
: ["Sync to", "Endpoint", "Bucket", "Prefix", "Region", "Access key", "Secret", "Passphrase", "Also sync"]);
|
||||
// every label fits its column
|
||||
for (const l of await form.locator(":scope > label:visible").all()) {
|
||||
@@ -109,7 +109,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
}
|
||||
|
||||
const box = (label) => form.locator(":scope > label:visible", { hasText: new RegExp("^" + label + "$") }).locator("xpath=following-sibling::div[1]").locator("input");
|
||||
const L = zh ? { endpoint: "终结点", bucket: "存储桶", prefix: "前缀", region: "区域", key: "Access Key", secret: "Secret", phrase: "口令" }
|
||||
const L = zh ? { endpoint: "接口地址", bucket: "存储桶", prefix: "前缀", region: "区域", key: "Access Key", secret: "Secret", phrase: "口令" }
|
||||
: { endpoint: "Endpoint", bucket: "Bucket", prefix: "Prefix", region: "Region", key: "Access key", secret: "Secret", phrase: "Passphrase" };
|
||||
await box(L.endpoint).fill("https://acct.r2.cloudflarestorage.com");
|
||||
await box(L.phrase).fill("correct horse");
|
||||
|
||||
@@ -74,7 +74,7 @@ const L = {
|
||||
zh: {
|
||||
statuses: ["429 · rate_limit_error", "200", "成功", "rate_limit", "200 · 2 次尝试"], badge: "本地会话",
|
||||
split: [["脱敏", "150 毫秒"], ["magpie 内耗时", "30 毫秒"], ["之前失败的尝试", "103 秒"], ["连接并发送请求", "820 毫秒"], ["厂商首字等待", "37 秒"]],
|
||||
speed: "24 token/秒", tokens: "输入 300 · 输出 40 · 缓存读取 0 · 缓存创建 0", labels: { fail: ["状态", "错误类型", "上游返回", "耗时", "请求 ID", "终结点", "协议", "会话 ID"], ok: ["状态", "耗时", "Token", "速度", "请求 ID", "终结点", "协议", "用途", "首字耗时", "magpie 内耗时", "厂商首字等待"], log: ["请求 ID", "会话 ID", "数据来源"], logFail: ["状态", "错误类型", "错误", "请求 ID", "会话 ID", "数据来源"] },
|
||||
speed: "24 token/秒", tokens: "输入 300 · 输出 40 · 缓存读取 0 · 缓存创建 0", labels: { fail: ["状态", "错误类型", "上游返回", "耗时", "请求 ID", "接口地址", "协议", "会话 ID"], ok: ["状态", "耗时", "Token", "速度", "请求 ID", "接口地址", "协议", "用途", "首字耗时", "magpie 内耗时", "厂商首字等待"], log: ["请求 ID", "会话 ID", "数据来源"], logFail: ["状态", "错误类型", "错误", "请求 ID", "会话 ID", "数据来源"] },
|
||||
subagent: "子代理",
|
||||
noStatus: "读自 Agent 的会话文件;仅在本地元数据能够明确识别时显示账号,不推断供应商。",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user