@seekskyworld/open-browser 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CONTRIBUTING.md +2 -0
  2. package/Docs/desktop-packages.md +45 -0
  3. package/Docs//350/267/250/345/271/263/345/217/260/350/257/225/347/224/250/344/270/216/345/217/221/350/241/214.md +1 -1
  4. package/README.md +8 -6
  5. package/README.zh-CN.md +2 -0
  6. package/api-contract.mjs +2 -1
  7. package/browser-extension/_locales/en/messages.json +8 -0
  8. package/browser-extension/_locales/zh_CN/messages.json +8 -0
  9. package/browser-extension/i18n.js +84 -0
  10. package/browser-extension/manifest.json +5 -4
  11. package/browser-extension/messages.js +266 -0
  12. package/browser-extension/newtab.css +4 -0
  13. package/browser-extension/newtab.html +9 -9
  14. package/browser-extension/newtab.js +38 -36
  15. package/browser-extension/page-locale.js +23 -0
  16. package/browser-extension/phase-labels.js +33 -6
  17. package/browser-extension/popup.css +2 -2
  18. package/browser-extension/popup.html +24 -26
  19. package/browser-extension/popup.js +72 -49
  20. package/browser-extension/tab-action.js +29 -24
  21. package/browser-extension/worker.js +29 -5
  22. package/browser-extension/workspace-title.js +2 -2
  23. package/build-profile.mjs +10 -2
  24. package/chromium-host.mjs +22 -11
  25. package/chromium-shell.mjs +5 -3
  26. package/cli.mjs +33 -30
  27. package/control.mjs +9 -8
  28. package/desktop/Info.plist +3 -1
  29. package/desktop/Launcher.m +10 -2
  30. package/desktop/OBControlBar.m +12 -8
  31. package/desktop/OBLocalization.h +20 -0
  32. package/desktop/OBPageView.m +2 -1
  33. package/desktop/WorkspacePanel.m +84 -83
  34. package/desktop/archive-release.py +5 -1
  35. package/desktop/build-macos.mjs +11 -5
  36. package/desktop/build-managed-input.mjs +2 -1
  37. package/desktop/build-portable.mjs +5 -3
  38. package/desktop/build-profile.mjs +2 -1
  39. package/desktop/build.mjs +2 -1
  40. package/desktop/create-shortcut.ps1 +7 -1
  41. package/desktop/en.lproj/Localizable.strings +106 -0
  42. package/desktop/install-menu-entry.mjs +2 -0
  43. package/desktop/notarize-macos.mjs +21 -24
  44. package/desktop/package-macos.mjs +4 -3
  45. package/desktop/sign.mjs +5 -4
  46. package/desktop/start-profile.mjs +2 -1
  47. package/desktop/start.mjs +3 -1
  48. package/desktop/verify-macos-release.mjs +9 -8
  49. package/desktop/zh-Hans.lproj/Localizable.strings +106 -0
  50. package/engine-service.mjs +1 -1
  51. package/hosted/cli.mjs +2 -1
  52. package/hosted/init.mjs +2 -1
  53. package/i18n.mjs +41 -0
  54. package/mcp-http.mjs +3 -2
  55. package/mcp-server.mjs +4 -3
  56. package/messages.zh-CN.mjs +175 -0
  57. package/package.json +4 -1
  58. package/page-activity.mjs +8 -6
  59. package/paths.mjs +2 -5
  60. package/runtime.mjs +4 -3
  61. package/sdk.mjs +40 -39
  62. package/service.mjs +2 -1
  63. package/skills/open-browser/SKILL.md +11 -9
  64. package/skills/open-browser/SKILL.zh-CN.md +22 -0
  65. package/skills/open-browser/references/macos.en.md +3 -0
  66. package/skills/open-browser/references/macos.md +2 -0
  67. package/skills/open-browser/references/operations.en.md +54 -0
  68. package/skills/open-browser/references/operations.md +2 -0
  69. package/skills/open-browser/references/recovery.en.md +36 -0
  70. package/skills/open-browser/references/recovery.md +2 -0
  71. package/skills/open-browser/references/windows.en.md +3 -0
  72. package/skills/open-browser/references/windows.md +2 -0
  73. package/skills/open-browser/scripts/bootstrap.mjs +6 -4
  74. package/skills/open-browser/scripts/guide.mjs +7 -4
  75. package/skills/open-browser/scripts/open-browser +5 -1
  76. package/studio/demo-site.mjs +5 -4
  77. package/studio/index.html +37 -33
  78. package/studio/index.mjs +10 -3
  79. package/studio/native-demo.mjs +8 -7
  80. package/studio/studio.css +3 -0
  81. package/studio/studio.js +98 -68
  82. package/system-i18n.mjs +19 -0
@@ -1,8 +1,15 @@
1
- 'use strict';
1
+ import { errorLabel, kinds, modes, phases } from './phase-labels.js';
2
+
3
+ const { t } = globalThis.openBrowserI18n;
2
4
 
3
5
  const el = id => document.getElementById(id);
4
- const phases = globalThis.openBrowserPhaseLabels;
5
- const modes = globalThis.openBrowserModeLabels;
6
+ const showLanguage = globalThis.openBrowserI18n.bindLanguageSelect(el('interface-language'),
7
+ preference => call('setInterfaceLanguage', {preference}), notify);
8
+
9
+ export function updateLanguage(settings) {
10
+ showLanguage(settings);
11
+ void refresh();
12
+ }
6
13
 
7
14
  async function call(method, params = {}) {
8
15
  const reply = await chrome.runtime.sendMessage({ method, params });
@@ -18,19 +25,16 @@ function notify(message) {
18
25
 
19
26
  function friendlyError(error) {
20
27
  const code = error?.message || '';
21
- if (code === 'host_unavailable' || code === 'host_timeout') return code === 'host_timeout'
22
- ? 'open-browser 已收到请求,但服务响应超时,请检查应用后重试。'
23
- : 'open-browser 服务未连接,请先启动应用后点击刷新。';
24
- if (code === 'extension_worker_timeout') return 'open-browser 扩展响应超时,请重新加载扩展或重启应用。';
25
- if (code === 'extension_unavailable') return 'open-browser 工作区扩展未运行,请重新启动应用。';
26
- return code || '暂时无法读取 Agent 状态,请点击刷新重试。';
28
+ if (code === 'extension_worker_timeout') return t("The extension timed out. Reload it or restart Open Browser.");
29
+ if (code === 'extension_unavailable') return t("The workspace extension is offline. Restart Open Browser.");
30
+ return errorLabel(code) || t("Could not read agent status. Click Refresh to try again.");
27
31
  }
28
32
 
29
33
  function stateLabel(workspace) {
30
- if (workspace.activity?.needsHumanVerification) return '需要人工验证';
31
- if (workspace.activity?.needsVisualPermission) return '需要授权截图';
32
- if (workspace.activity?.needsCredential) return '等待凭据';
33
- return modes[workspace.mode] || phases[workspace.activity?.current?.phase] || phases[workspace.activity?.phase] || '待命';
34
+ if (workspace.activity?.needsHumanVerification) return t("Human verification required");
35
+ if (workspace.activity?.needsVisualPermission) return t("Screenshot permission required");
36
+ if (workspace.activity?.needsCredential) return t("Waiting for credentials");
37
+ return modes[workspace.mode] || phases[workspace.activity?.current?.phase] || phases[workspace.activity?.phase] || t("Idle");
34
38
  }
35
39
 
36
40
  const formatWorkspaceTitle = globalThis.openBrowserWorkspaceTitle;
@@ -44,10 +48,10 @@ function line(text, className = '') {
44
48
  }
45
49
 
46
50
  function eventLabel(event) {
47
- const state = event.state || 'unknown';
48
- const steps = Number.isInteger(event.completedSteps) ? ` · ${event.completedSteps} 步` : '';
51
+ const state = event.state || t("Unknown");
52
+ const steps = Number.isInteger(event.completedSteps) ? t(" · Steps: {0}", event.completedSteps) : '';
49
53
  const operation = event.operationId ? ` · ${event.operationId.slice(0, 8)}` : '';
50
- return `${event.kind || '事件'} · ${phases[state] || state}${steps}${operation}`;
54
+ return `${kinds[event.kind] || event.kind || t("Event")} · ${phases[state] || modes[state] || state}${steps}${operation}`;
51
55
  }
52
56
 
53
57
  async function showEvents(workspaceId, host) {
@@ -58,13 +62,13 @@ async function showEvents(workspaceId, host) {
58
62
  return;
59
63
  }
60
64
  timeline.hidden = false;
61
- timeline.replaceChildren(line('正在读取记录…', 'detail'));
65
+ timeline.replaceChildren(line(t("Loading activity…"), 'detail'));
62
66
  try {
63
67
  const result = await call('listEvents', { workspaceId, after: 0, limit: 24 });
64
68
  const events = result?.events || [];
65
69
  timeline.replaceChildren(...(events.length
66
70
  ? events.map(event => line(eventLabel(event), 'timeline-row'))
67
- : [line('暂无可显示的脱敏事件。', 'detail')]));
71
+ : [line(t("No redacted events to show."), 'detail')]));
68
72
  } catch (error) {
69
73
  timeline.replaceChildren(line(friendlyError(error), 'detail'));
70
74
  }
@@ -74,13 +78,13 @@ function recordButton(workspaceId, host) {
74
78
  const button = document.createElement('button');
75
79
  button.type = 'button';
76
80
  button.className = 'quiet record-button';
77
- button.textContent = '查看记录';
81
+ button.textContent = t("View activity");
78
82
  button.onclick = () => void showEvents(workspaceId, host);
79
83
  return button;
80
84
  }
81
85
 
82
86
  function renderWorkspaces(items) {
83
- el('workspace-count').textContent = items.length ? `${items.length} 个` : '';
87
+ el('workspace-count').textContent = items.length ? t("Workspaces: {0}", items.length) : '';
84
88
  el('empty').hidden = items.length > 0;
85
89
  el('workspaces').replaceChildren(...items.map(workspace => {
86
90
  const card = document.createElement('article');
@@ -90,11 +94,11 @@ function renderWorkspaces(items) {
90
94
  const status = line(stateLabel(workspace), 'state');
91
95
  const current = workspace.activity?.current;
92
96
  const detail = line(current
93
- ? `${current.kind || '操作'} · ${current.completedSteps || 0}/${current.totalSteps || 0} 步`
94
- : `${workspace.pages?.length || 0} 个页面 · 暂无正在执行的操作`, 'detail');
97
+ ? t("{0} · Steps: {1}/{2}", kinds[current.kind] || current.kind || t("Action"), current.completedSteps || 0, current.totalSteps || 0)
98
+ : t("Pages: {0} · No action in progress", workspace.pages?.length || 0), 'detail');
95
99
  const agent = line(workspace.agentName || 'Agent', 'agent-name');
96
100
  card.append(title, agent, status, detail);
97
- if (needsTaskName(workspace)) card.append(line('请为此任务命名', 'name-hint'));
101
+ if (needsTaskName(workspace)) card.append(line(t("Name this task"), 'name-hint'));
98
102
  const timeline = document.createElement('div');
99
103
  timeline.className = 'timeline';
100
104
  timeline.hidden = true;
@@ -104,29 +108,29 @@ function renderWorkspaces(items) {
104
108
  }
105
109
 
106
110
  function operationLabel(operation) {
107
- if (!operation) return '暂无操作记录';
111
+ if (!operation) return t("No actions recorded");
108
112
  const phase = operation.phase || operation.state;
109
- const progress = operation.totalSteps ? `${operation.completedSteps || 0}/${operation.totalSteps} 步` : `${operation.completedSteps || 0} 步`;
110
- return `${operation.kind || '操作'} · ${phases[phase] || phase} · ${progress}`;
113
+ const progress = operation.totalSteps ? t("Steps: {0}/{1}", operation.completedSteps || 0, operation.totalSteps) : t("Steps: {0}", operation.completedSteps || 0);
114
+ return `${kinds[operation.kind] || operation.kind || t("Action")} · ${phases[phase] || phase} · ${progress}`;
111
115
  }
112
116
 
113
117
  function formatTime(value) {
114
118
  if (!Number.isFinite(value) || value <= 0) return '';
115
- return new Intl.DateTimeFormat('zh-CN', { month: 'numeric', day: 'numeric', hour: '2-digit', minute: '2-digit' }).format(value);
119
+ return new Intl.DateTimeFormat(globalThis.openBrowserI18n.locale, { month: 'numeric', day: 'numeric', hour: '2-digit', minute: '2-digit' }).format(value);
116
120
  }
117
121
 
118
122
  function renderHistory(items) {
119
- el('history-count').textContent = items.length ? `${items.length} 条` : '';
123
+ el('history-count').textContent = items.length ? t("Records: {0}", items.length) : '';
120
124
  el('history-empty').hidden = items.length > 0;
121
125
  el('history').replaceChildren(...items.map(item => {
122
126
  const row = document.createElement('article');
123
127
  row.className = 'history-row';
124
128
  const main = document.createElement('div');
125
129
  main.append(line(formatWorkspaceTitle(item), 'history-title'), line(operationLabel(item.recentOperation), 'detail'));
126
- if (needsTaskName(item)) main.append(line('请为此任务命名', 'name-hint'));
130
+ if (needsTaskName(item)) main.append(line(t("Name this task"), 'name-hint'));
127
131
  const meta = document.createElement('div');
128
132
  meta.className = 'history-meta';
129
- meta.append(line(phases[item.state] || item.state || '已完成', `history-state ${item.state || ''}`));
133
+ meta.append(line(phases[item.state] || item.state || t("Completed"), `history-state ${item.state || ''}`));
130
134
  const time = formatTime(item.updatedAt || item.createdAt);
131
135
  if (time) meta.append(line(time, 'detail'));
132
136
  const timeline = document.createElement('div');
@@ -148,10 +152,10 @@ async function refresh() {
148
152
  ]);
149
153
  renderWorkspaces(workspaces);
150
154
  renderHistory(history);
151
- el('status').textContent = '本机服务已连接';
155
+ el('status').textContent = t("Local service connected");
152
156
  notify('');
153
157
  } catch (error) {
154
- el('status').textContent = '服务未连接';
158
+ el('status').textContent = t("Service disconnected");
155
159
  notify(friendlyError(error));
156
160
  }
157
161
  }
@@ -167,9 +171,7 @@ el('copy-prompt').onclick = async () => {
167
171
  el('agent-prompt').setSelectionRange(0, 0);
168
172
  }
169
173
  const button = el('copy-prompt');
170
- const label = button.textContent;
171
- button.textContent = '已复制';
172
- setTimeout(() => { button.textContent = label; }, 1600);
174
+ button.textContent = t("Copied");
175
+ setTimeout(() => { button.textContent = t("Copy prompt"); }, 1600);
173
176
  };
174
- void refresh();
175
177
  setInterval(() => void refresh(), 5000);
@@ -0,0 +1,23 @@
1
+ // Translate packaged UI before populating any page or user data.
2
+ import './messages.js';
3
+ import './i18n.js';
4
+
5
+ const i18n = globalThis.openBrowserI18n;
6
+ let settings, page, receivedChange = false;
7
+ function apply(value) {
8
+ settings = value;
9
+ i18n.setLocale(value?.locale);
10
+ i18n.applyDocument(document);
11
+ page?.updateLanguage(settings);
12
+ }
13
+ chrome.storage.onChanged.addListener((changes, area) => {
14
+ if (area !== 'session' || !changes.interfaceLanguage) return;
15
+ receivedChange = true;
16
+ apply(changes.interfaceLanguage.newValue);
17
+ });
18
+
19
+ const { interfaceLanguage } = await chrome.storage.session.get('interfaceLanguage');
20
+ if (!receivedChange) apply(interfaceLanguage);
21
+ await import('./workspace-title.js');
22
+ page = location.pathname === '/popup.html' ? await import('./popup.js') : await import('./newtab.js');
23
+ page.updateLanguage(settings);
@@ -1,9 +1,36 @@
1
1
  'use strict';
2
2
 
3
- globalThis.openBrowserPhaseLabels = Object.freeze({
4
- idle: '等待指令', queued: '已排队', running: '执行中', actionability: '检查目标',
5
- dispatching: '正在派发', waiting: '等待页面', verifying: '核对结果',
6
- needs_credential: '等待凭据', needs_human_verification: '需要人工验证', needs_visual_permission: '需要授权截图', completed: '已完成', failed: '失败',
7
- cancelled: '已取消', outcome_unknown: '结果待核实',
3
+ const { messageLabels } = globalThis.openBrowserI18n;
4
+
5
+ export const phases = messageLabels({
6
+ idle: "Waiting for instructions", queued: "Queued", running: "Running", actionability: "Checking target",
7
+ dispatching: "Dispatching", waiting: "Waiting for page", verifying: "Checking result",
8
+ needs_credential: "Waiting for credentials", needs_human_verification: "Human verification required", needs_visual_permission: "Screenshot permission required", completed: "Completed", failed: "Failed",
9
+ cancelled: "Cancelled", outcome_unknown: "Outcome unknown",
10
+ closed: "Closed", finished: "Completed", opened: "Opened", managed: "Managed",
11
+ receiving: "Downloading", expired: "Expired", service_shutdown: "Service stopped",
12
+ human_verification_required: "Human verification required",
13
+ });
14
+ export const modes = messageLabels({ agent: "Agent in control", human: "Human in control", transferring: "Transferring" });
15
+
16
+ export const kinds = messageLabels({
17
+ openPage: "Open page", observe: "Observe page", act: "Page action", canvasSnapshot: "Canvas snapshot",
18
+ captureVisual: "Screenshot", runWorkflow: "Run workflow", page_bound: "Tab assigned",
19
+ visual_capture: "Screenshot", dispatch: "Dispatch", operation: "Operation", control: "Control",
20
+ action: "Action", dialog: "Dialog", security: "Site verification", download: "Download",
21
+ popup: "Popup", workspace_end: "Workspace ended",
22
+ });
23
+
24
+ const extensionErrors = messageLabels({
25
+ host_unavailable: "The local service is disconnected. Start Open Browser and click Refresh.",
26
+ host_timeout: "Open Browser received the request but the service timed out. Check the app and try again.",
27
+ queue_full: "The service is busy. Try again shortly.",
28
+ stale_control: "Control has changed. Refresh the workspace and try again.",
29
+ workspace_under_user_control: "The user controls this workspace. Return control to the agent first.",
30
+ stale_document: "The page binding has changed. Reopen the extension on the target tab.",
31
+ origin_denied: "The site is outside this task’s allowed origins.",
32
+ adoption_page_changed: "The current tab cannot be assigned to this workspace.",
33
+ page_not_found: "This page has closed. Select the original tab again.",
34
+ workspace_not_found: "The task ended or the service restarted.",
8
35
  });
9
- globalThis.openBrowserModeLabels = Object.freeze({ agent: 'Agent 控制', human: '人工接管', transferring: '交接中' });
36
+ export const errorLabel = code => Object.hasOwn(extensionErrors, code) ? extensionErrors[code] : code;
@@ -8,12 +8,12 @@ strong { font-size: 17px; letter-spacing: -.3px; }
8
8
  main { padding: 0 16px 14px; } section, form, details { margin-top: 14px; }
9
9
  h2 { font-size: 14px; margin: 0 0 3px; } p { margin: 8px 0; overflow-wrap: anywhere; }
10
10
  label { display: block; margin: 8px 0 3px; }
11
- select, #adoption input, input[type=password] { width: 100%; height: 30px; font: inherit; }
11
+ select, #adoption input:not([type=checkbox]), input[type=password] { width: 100%; height: 30px; font: inherit; }
12
12
  input[type=password] { padding: 3px 6px; }
13
13
  button { font: inherit; border: 1px solid transparent; border-radius: 5px; padding: 4px 10px; background: #176244; color: white; cursor: pointer; }
14
14
  button.secondary { background: ButtonFace; color: ButtonText; border-color: color-mix(in srgb, ButtonText 25%, transparent); }
15
15
  button:disabled { opacity: .55; cursor: default; }
16
- .action { display: flex; gap: 7px; margin-top: 9px; }
16
+ .action { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
17
17
  form, details { border-top: 1px solid color-mix(in srgb, CanvasText 16%, transparent); padding-top: 10px; }
18
18
  summary { cursor: pointer; } .check { margin: 9px 0; } .check input { vertical-align: middle; }
19
19
  #notice { margin: 12px 0 0; } [hidden] { display: none !important; }
@@ -1,56 +1,54 @@
1
1
  <!doctype html>
2
- <html lang="zh-CN">
2
+ <html lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <title>open-browser 工作区</title>
6
+ <title data-i18n>Open Browser Workspace</title>
7
7
  <link rel="icon" type="image/png" href="icons/open-browser-32.png">
8
8
  <link rel="stylesheet" href="popup.css">
9
- <script defer src="workspace-title.js"></script>
10
- <script defer src="phase-labels.js"></script>
11
- <script defer src="popup.js"></script>
9
+ <script type="module" src="page-locale.js"></script>
12
10
  </head>
13
11
  <body>
14
- <header><strong><img src="icons/open-browser-48.png" width="24" height="24" alt="">open-browser</strong><span id="status" role="status">正在连接…</span></header>
12
+ <header><strong><img src="icons/open-browser-48.png" width="24" height="24" alt="">open-browser</strong><span data-i18n id="status" role="status">Connecting…</span></header>
15
13
  <main>
16
- <p id="empty" hidden>当前没有活动任务。新标签页会显示 Agent 控制台。</p>
14
+ <p data-i18n id="empty" hidden>No active tasks. Open a new tab to see the Agent Console.</p>
17
15
  <section id="adoption" hidden>
18
16
  <p id="adopt-site"></p>
19
- <label for="adopt-task">授权给哪个 Agent 任务</label><select id="adopt-task"></select>
20
- <label for="adopt-alias">账号别名(选填)</label><input id="adopt-alias" maxlength="48" placeholder="例如:工作账号">
21
- <label><input type="checkbox" id="resume-tab">重启时恢复上次浏览会话,并继续此页任务</label>
22
- <div class="action"><button id="adopt" type="button">让 Agent 操作此页</button><button class="secondary" id="adopt-manual" type="button">生成备用授权码</button></div>
23
- <label id="adopt-result" hidden>将以下授权交给所选 Agent,两分钟内有效<input id="adopt-token" readonly></label>
17
+ <label data-i18n for="adopt-task">Agent task to authorize</label><select id="adopt-task"></select>
18
+ <label data-i18n for="adopt-alias">Account alias (optional)</label><input data-i18n-attrs="placeholder" id="adopt-alias" maxlength="48" placeholder="For example, Work account">
19
+ <label data-i18n><input type="checkbox" id="resume-tab">Restore the last browser session on restart and resume this task</label>
20
+ <div class="action"><button data-i18n id="adopt" type="button">Give this tab to the agent</button><button data-i18n class="secondary" id="adopt-manual" type="button">Generate backup authorization code</button></div>
21
+ <label data-i18n id="adopt-result" hidden>Send this authorization to the selected agent within two minutes<input id="adopt-token" readonly></label>
24
22
  </section>
25
23
  <section id="workspace" hidden>
26
24
  <div id="context-selection" hidden>
27
- <label for="workspaces">工作区</label><select id="workspaces"></select>
28
- <label for="pages">标签页</label><select id="pages"></select>
25
+ <label data-i18n for="workspaces">Workspace</label><select id="workspaces"></select>
26
+ <label data-i18n for="pages">Tabs</label><select id="pages"></select>
29
27
  </div>
30
28
  <p id="page-details"></p>
31
29
  <div class="action"><button id="control" type="button"></button></div>
32
30
  <div id="dialogs"></div>
33
31
  <div id="blocked"></div>
34
- <details id="uploads"><summary>授权上传文件</summary><p id="upload-origin"></p>
32
+ <details id="uploads"><summary data-i18n>Allow file uploads</summary><p id="upload-origin"></p>
35
33
  <input id="upload-file" type="file"><div id="upload-list"></div></details>
36
- <details id="downloads" hidden><summary>任务下载</summary><div id="download-list"></div></details>
34
+ <details id="downloads" hidden><summary data-i18n>Task downloads</summary><div id="download-list"></div></details>
37
35
  <button id="pixel-permission" type="button" class="secondary" hidden></button>
38
36
  <p id="visual-status" hidden></p>
39
- <details><summary>导出错误日志</summary>
40
- <p>导出当前任务的脱敏失败记录,便于排查问题。</p>
41
- <button id="diagnostic-export-button" type="button" class="secondary">导出错误日志</button>
42
- <a id="diagnostic-export" download="open-browser-error-log.json" hidden>下载错误日志</a>
37
+ <details><summary data-i18n>Export error log</summary>
38
+ <p data-i18n>Export redacted failures for this task to help diagnose problems.</p>
39
+ <button data-i18n id="diagnostic-export-button" type="button" class="secondary">Export error log</button>
40
+ <a data-i18n id="diagnostic-export" download="open-browser-error-log.json" hidden>Download error log</a>
43
41
  </details>
44
- <details id="delivery"><summary>结束任务</summary>
45
- <p>勾选要留给自己的标签,其余任务标签将关闭。</p>
46
- <div id="keep"></div><button id="finish" type="button">结束</button>
42
+ <details id="delivery"><summary data-i18n>Finish task</summary>
43
+ <p data-i18n>Select the tabs to keep. The other task tabs will close.</p>
44
+ <div id="keep"></div><button data-i18n id="finish" type="button">Finish</button>
47
45
  </details>
48
46
  </section>
49
47
  <form id="credential" hidden>
50
- <h2>补充凭据</h2>
48
+ <h2 data-i18n>Supply credentials</h2>
51
49
  <p id="credential-target"></p>
52
- <label for="secret">凭据值</label><input id="secret" type="password" autocomplete="off" required>
53
- <div class="action"><button id="save" type="submit">绑定凭据</button></div>
50
+ <label data-i18n for="secret">Credential value</label><input id="secret" type="password" autocomplete="off" required>
51
+ <div class="action"><button data-i18n id="save" type="submit">Bind credential</button></div>
54
52
  </form>
55
53
  <p id="notice" role="status" hidden></p>
56
54
  </main>