内容脚本按翻译功能所需注入。
## 安装与开发
@@ -60,7 +62,7 @@ pnpm dev
## 项目状态
-功能开发完成,已通过测试验收:462 项单元测试(含覆盖率门槛)、32 项核心 E2E,CI 全绿;累计修复 40+ 个 issue(含多轮审计发现的并发竞态、采集盲区、引擎异常路径)。当前 v2.0 为发布就绪版本。
+功能开发完成,已通过测试验收:679 项单元测试(含覆盖率门槛)、36 项核心 E2E,CI 全绿;累计修复 40+ 个 issue(含多轮审计发现的并发竞态、采集盲区、引擎异常路径)。当前 v2.0 为发布就绪版本。
## 文档
@@ -83,4 +85,19 @@ pnpm dev
## 许可
-尚未确定。在选定许可证之前,本仓库保留所有权利。
+[GNU 通用公共许可证第 3 版](LICENSE)(GPL-3.0-or-later)。
+
+ Parallel-Translation —— 对照式网页翻译浏览器扩展
+ Copyright (C) 2026 Parallel-Translation contributors
+
+ 本程序是自由软件:你可以依据自由软件基金会发布的 GNU 通用公共许可证
+ 第 3 版,或(由你选择)任何更新的版本,重新发布和/或修改它。
+
+ 发布本程序是希望它能有用,但不作任何担保;甚至不含对适销性或
+ 特定用途适用性的默示担保。详见 GNU 通用公共许可证。
+
+ 你应当已随本程序收到一份 GNU 通用公共许可证副本。若没有,
+ 请见 。
+
+也就是说:可自由使用、修改、再分发,但分发衍生作品(含上架商店的改版)时,
+须同样以 GPL-3.0 开源其完整源码。
diff --git a/entrypoints/background.ts b/entrypoints/background.ts
index d41c2d3..b36c13b 100644
--- a/entrypoints/background.ts
+++ b/entrypoints/background.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 6 — Background service worker。
// 代理翻译请求 + 注册右键菜单 + 转发菜单事件。
diff --git a/entrypoints/content.ts b/entrypoints/content.ts
index 207134e..36bdef9 100644
--- a/entrypoints/content.ts
+++ b/entrypoints/content.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 4/5/6 — Content script。
// 集成:三模式渲染 + 注入式 UI(悬浮球/段落按钮/toast)+
// 快捷键 + 划词交互。
diff --git a/entrypoints/options/index.html b/entrypoints/options/index.html
index e425b90..eac5f2f 100644
--- a/entrypoints/options/index.html
+++ b/entrypoints/options/index.html
@@ -1,4 +1,11 @@
+
diff --git a/entrypoints/options/main.ts b/entrypoints/options/main.ts
index b37e5e5..f2fd188 100644
--- a/entrypoints/options/main.ts
+++ b/entrypoints/options/main.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 7 — Options 页主控制器。
// 管理 6 个标签页的切换,统一处理 toast 提示。
diff --git a/entrypoints/options/options.css b/entrypoints/options/options.css
index 2a17904..50219e1 100644
--- a/entrypoints/options/options.css
+++ b/entrypoints/options/options.css
@@ -1,3 +1,11 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2026 Parallel-Translation contributors
+ *
+ * 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+ * 不含任何担保。完整条款见仓库根目录的 LICENSE。
+ */
+
/* Phase 7 — Options 页完整样式(设置页 + 分区控件) */
@import '../../src/styles/tokens.css';
/* 预设样式必须真的进设置页 —— 预览区靠的就是这份规则,
diff --git a/entrypoints/options/sections/advanced.ts b/entrypoints/options/sections/advanced.ts
index aaed951..91f0d4e 100644
--- a/entrypoints/options/sections/advanced.ts
+++ b/entrypoints/options/sections/advanced.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 7 — 高级分区:并发数、缓存管理、设置导入/导出。
import { DEFAULT_SETTINGS } from '~/src/storage/schema';
diff --git a/entrypoints/options/sections/appearance.ts b/entrypoints/options/sections/appearance.ts
index 1685c4f..7948f84 100644
--- a/entrypoints/options/sections/appearance.ts
+++ b/entrypoints/options/sections/appearance.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 7 — 外观分区:样式预设选择 + 实时预览 + 自定义 CSS。
import type { StyleId } from '~/src/storage/schema';
diff --git a/entrypoints/options/sections/engines.ts b/entrypoints/options/sections/engines.ts
index 98fcfd2..dde4b18 100644
--- a/entrypoints/options/sections/engines.ts
+++ b/entrypoints/options/sections/engines.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 7 — 引擎分区:优先级拖拽排序 + 启用/停用 + BYOK 密钥与模型名 + 测试连接。
import type { EngineId } from '~/src/storage/schema';
diff --git a/entrypoints/options/sections/general.ts b/entrypoints/options/sections/general.ts
index aadc974..c63fa4a 100644
--- a/entrypoints/options/sections/general.ts
+++ b/entrypoints/options/sections/general.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 7 — 通用设置分区:开关、语言对、显示模式、悬浮 UI。
import { LANG_LIST } from '~/src/storage/schema';
diff --git a/entrypoints/options/sections/hotkeys.ts b/entrypoints/options/sections/hotkeys.ts
index 4467e49..0067b42 100644
--- a/entrypoints/options/sections/hotkeys.ts
+++ b/entrypoints/options/sections/hotkeys.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 7 — 快捷键分区:动作列表 + 格式化显示 + 录制按钮 + 冲突检测。
import type { HotkeyAction } from '~/src/storage/schema';
diff --git a/entrypoints/options/sections/sites.ts b/entrypoints/options/sections/sites.ts
index 80930b9..9cfb499 100644
--- a/entrypoints/options/sections/sites.ts
+++ b/entrypoints/options/sections/sites.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 7 — 站点分区:黑/白名单模式切换 + 域名列表增删。
import {
diff --git a/entrypoints/popup/index.html b/entrypoints/popup/index.html
index f3054ea..a750371 100644
--- a/entrypoints/popup/index.html
+++ b/entrypoints/popup/index.html
@@ -1,4 +1,11 @@
+
diff --git a/entrypoints/popup/main.ts b/entrypoints/popup/main.ts
index 6500d8b..5789fae 100644
--- a/entrypoints/popup/main.ts
+++ b/entrypoints/popup/main.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
import '~/src/styles/popup.css';
import {
type EngineId,
diff --git a/entrypoints/welcome/index.html b/entrypoints/welcome/index.html
index 27c3829..1993385 100644
--- a/entrypoints/welcome/index.html
+++ b/entrypoints/welcome/index.html
@@ -1,4 +1,11 @@
+
diff --git a/entrypoints/welcome/main.ts b/entrypoints/welcome/main.ts
index 2604160..cedfba6 100644
--- a/entrypoints/welcome/main.ts
+++ b/entrypoints/welcome/main.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
import './welcome.css';
import { applyI18n } from '~/src/i18n';
import { detectOS, formatHotkey } from '~/src/hotkeys/platform';
diff --git a/entrypoints/welcome/welcome.css b/entrypoints/welcome/welcome.css
index 6913689..04a37f7 100644
--- a/entrypoints/welcome/welcome.css
+++ b/entrypoints/welcome/welcome.css
@@ -1,3 +1,11 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2026 Parallel-Translation contributors
+ *
+ * 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+ * 不含任何担保。完整条款见仓库根目录的 LICENSE。
+ */
+
@import '../../src/styles/tokens.css';
*,
diff --git a/package.json b/package.json
index bb5024b..38b91de 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
"name": "parallel-translation",
"version": "2.0.67",
"description": "对照式网页翻译浏览器扩展",
+ "license": "GPL-3.0-or-later",
"private": true,
"type": "module",
"packageManager": "pnpm@11.18.0",
diff --git a/src/changelog/claim.ts b/src/changelog/claim.ts
index 882c481..9aa9334 100644
--- a/src/changelog/claim.ts
+++ b/src/changelog/claim.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 更新提示的显示权仲裁(background 侧)。
//
// 扩展更新后,用户打开的每个新页面都会有一个 content script 启动并来问
diff --git a/src/changelog/data.ts b/src/changelog/data.ts
index 496be47..d89482c 100644
--- a/src/changelog/data.ts
+++ b/src/changelog/data.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 更新提示的变更数据 —— ADR-0002:此文件即上架版本的唯一真相。
//
// 这里写了条目的版本号就是「上架版本」,扩展更新到该版本后会向用户
diff --git a/src/changelog/decide.ts b/src/changelog/decide.ts
index 4ae6459..0fc870e 100644
--- a/src/changelog/decide.ts
+++ b/src/changelog/decide.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 「该不该弹更新提示」的判定 —— 纯函数,输入全部显式传入。
//
// 把判定从 content script 的副作用里摘出来单测,是因为它有五条互相
diff --git a/src/changelog/locale.ts b/src/changelog/locale.ts
index c8aa830..13976ab 100644
--- a/src/changelog/locale.ts
+++ b/src/changelog/locale.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 变更条目的语言选择。
//
// 骨架文案(「更新内容」标题、分组名、按钮)走 chrome.i18n,由浏览器按
diff --git a/src/changelog/modal.css b/src/changelog/modal.css
index d9abb8e..a1c3cd7 100644
--- a/src/changelog/modal.css
+++ b/src/changelog/modal.css
@@ -1,3 +1,11 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2026 Parallel-Translation contributors
+ *
+ * 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+ * 不含任何担保。完整条款见仓库根目录的 LICENSE。
+ */
+
/* 更新提示弹窗 —— 经 shadow DOM 注入宿主页面,样式自包含。
色值一律取 tokens.css 的设计令牌(README 全局要求:不得硬编码色值)。
本文件由 modal.ts 以 ?inline 引入,随动态 import 一同分包,
diff --git a/src/changelog/modal.ts b/src/changelog/modal.ts
index cdc0095..855d540 100644
--- a/src/changelog/modal.ts
+++ b/src/changelog/modal.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 更新提示弹窗的渲染。
//
// 由 content.ts 经动态 import() 引入 —— 该形式在 MV3 下并不会真的分包,
diff --git a/src/changelog/state.ts b/src/changelog/state.ts
index 01a1630..86ff0ea 100644
--- a/src/changelog/state.ts
+++ b/src/changelog/state.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 更新提示的已读状态。
//
// 独立 key `pt-changelog`,不并入 `pt-settings`:它不是设置(用户不会
diff --git a/src/dom/classify.ts b/src/dom/classify.ts
index 0e397d6..ab35007 100644
--- a/src/dom/classify.ts
+++ b/src/dom/classify.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 3 — 节点分类三集合 + 判定规则。
//
// 设计原则:
diff --git a/src/dom/compat.ts b/src/dom/compat.ts
index f8966a3..05ae00b 100644
--- a/src/dom/compat.ts
+++ b/src/dom/compat.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 8 — 域名级采集补丁。
// 仅在通用 walker 判断有误时才添加条目 —— 这是兜底层,不是主路径。
// 每加一条都意味着一处通用逻辑的缺陷,先问“能不能改进通用规则”。
diff --git a/src/dom/normalize.ts b/src/dom/normalize.ts
index 8e27097..0cb8124 100644
--- a/src/dom/normalize.ts
+++ b/src/dom/normalize.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 9 — 取文本前的空白归一化(纯函数,无 DOM 依赖)。
//
// Markdown 段落内的软换行会原样保留为文本节点里的 \n(GitHub README 等
diff --git a/src/dom/observer.ts b/src/dom/observer.ts
index 5f56945..19e77de 100644
--- a/src/dom/observer.ts
+++ b/src/dom/observer.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 3 — MutationObserver 增量补翻 + IntersectionObserver 可见性补翻。
//
// 监听 DOM 变化,对新增节点补翻。
diff --git a/src/dom/pre-split.ts b/src/dom/pre-split.ts
index 774f1b7..04f1e3f 100644
--- a/src/dom/pre-split.ts
+++ b/src/dom/pre-split.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 11 — 纯文本 按空行切块。
//
// #65:大型纯文本文档(如 GitHub README 的 .plain > pre)一次性文本过长,
diff --git a/src/dom/renderer.ts b/src/dom/renderer.ts
index 1690753..93f7625 100644
--- a/src/dom/renderer.ts
+++ b/src/dom/renderer.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 4 — 三模式渲染器,替换阶段 2 的 inject.ts。
//
// 三种显示模式共用同一套 DOM 结构 ——
diff --git a/src/dom/shadow-walk.ts b/src/dom/shadow-walk.ts
index 73f9f70..6c0adf3 100644
--- a/src/dom/shadow-walk.ts
+++ b/src/dom/shadow-walk.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 统一 shadow 子树遍历模块 —— #220 架构评审候选 4 的核心(#233)。
//
// Shadow-DOM 的递归遍历此前在还原流程、已翻译判定、观察器三处各写一遍,
diff --git a/src/dom/site-filter.ts b/src/dom/site-filter.ts
index 0552788..fd9983f 100644
--- a/src/dom/site-filter.ts
+++ b/src/dom/site-filter.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 7 — 站点黑白名单判定(#153)。
//
// options 页存的是裸域名(小写、无协议)。运行时按 location.hostname
diff --git a/src/dom/text.ts b/src/dom/text.ts
index 6a8c71f..e4fd859 100644
--- a/src/dom/text.ts
+++ b/src/dom/text.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 9 — 提取可翻译文本(跳过 .notranslate 与站点元数据子树)。
//
// 单元文本不能直接取 textContent:Google AI 概览的来源角标(chip)是
diff --git a/src/dom/walker.ts b/src/dom/walker.ts
index cf8b548..cbd182b 100644
--- a/src/dom/walker.ts
+++ b/src/dom/walker.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 3 / 8 — 采集器:统一遍历模块的一个访问回调。
//
// #320:遍历本身、shadow 下沉、集中式跳过规则(扩展自身 UI)、去重
diff --git a/src/engines/bing-edge.ts b/src/engines/bing-edge.ts
index 6fc82ab..7bcc599 100644
--- a/src/engines/bing-edge.ts
+++ b/src/engines/bing-edge.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 2 — Bing Edge 翻译引擎(免 key)。
// 通过 edge.microsoft.com/translate/auth 获取短期 JWT,
// 再调 cognitive.microsofttranslator.com 批量翻译。
diff --git a/src/engines/byok.ts b/src/engines/byok.ts
index 11529c9..2b823f5 100644
--- a/src/engines/byok.ts
+++ b/src/engines/byok.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 自带 key 引擎公共构造 —— #309 架构评审候选 6(#333)。
//
// openai / deepl / gemini 三家自带 key 引擎此前各自重复同一段骨架:
diff --git a/src/engines/deepl.ts b/src/engines/deepl.ts
index 4e86b6c..3853b50 100644
--- a/src/engines/deepl.ts
+++ b/src/engines/deepl.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 7 — DeepL 翻译引擎(BYOK)。
// 免费版与 Pro 版端点不同,靠 key 后缀 ':fx' 区分。
// DeepL 语言覆盖有限,supportedLangs 必须显式列举。
diff --git a/src/engines/e2e-mock.ts b/src/engines/e2e-mock.ts
index 10a9413..4fd6f85 100644
--- a/src/engines/e2e-mock.ts
+++ b/src/engines/e2e-mock.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// E2E 确定性 mock —— #90。
//
// fixtures.ts 通过 applyE2EMock 把 mock 描述符写入 chrome.storage.local;
diff --git a/src/engines/engine-gate.ts b/src/engines/engine-gate.ts
index 7eaf904..d8cae39 100644
--- a/src/engines/engine-gate.ts
+++ b/src/engines/engine-gate.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 引擎级并发闸门 —— #159。
//
// 整页翻译的所有批次在 content 侧并发发出(Promise.all),每个引擎的
diff --git a/src/engines/fetch-timeout.ts b/src/engines/fetch-timeout.ts
index b541fc9..859d5a1 100644
--- a/src/engines/fetch-timeout.ts
+++ b/src/engines/fetch-timeout.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 引擎 fetch 超时层 —— #154。
//
// Chrome fetch 无默认超时,网络黑洞 / 代理中断 / 服务端接受连接但不响应时
diff --git a/src/engines/gemini.ts b/src/engines/gemini.ts
index a2e4103..a35c4d8 100644
--- a/src/engines/gemini.ts
+++ b/src/engines/gemini.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 7 — Google Gemini 翻译引擎(BYOK)。
// 与 OpenAI 相同的编号批量策略,复用 parseNumbered。
//
diff --git a/src/engines/google-web.ts b/src/engines/google-web.ts
index 9680684..c94afa7 100644
--- a/src/engines/google-web.ts
+++ b/src/engines/google-web.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 2 — Google Web 翻译引擎(免 key)。
// 端点 translate.googleapis.com,单次只接受一段文本,批量靠并发多请求;
// 外裹并发闸门防限流。
diff --git a/src/engines/openai.ts b/src/engines/openai.ts
index 4de7b84..9e8222e 100644
--- a/src/engines/openai.ts
+++ b/src/engines/openai.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 7 — OpenAI 兼容翻译引擎(BYOK)。
// 端点默认 api.openai.com/v1,也可用于任何兼容的 OpenAI API 代理。
// 批量策略:编号后整批送,一次往返拿回全部译文,避免逐段请求的高延迟和高费用。
diff --git a/src/engines/router.ts b/src/engines/router.ts
index 83b6718..b735e76 100644
--- a/src/engines/router.ts
+++ b/src/engines/router.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 2 — 引擎路由器。
// 按设置的 enginePriority 依次尝试,retryable 失败才切下一个引擎。
// 集成翻译缓存:先查后写,二次请求不碰网络。
diff --git a/src/engines/shared.ts b/src/engines/shared.ts
index e2d0931..5e8ba19 100644
--- a/src/engines/shared.ts
+++ b/src/engines/shared.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 引擎公共模块 —— #222 架构评审候选 3。
//
// 状态分类与编号提示词模板此前在各引擎里各写一遍:401/403 → key 无效
diff --git a/src/engines/test-connection.ts b/src/engines/test-connection.ts
index 640b7da..a0a4e24 100644
--- a/src/engines/test-connection.ts
+++ b/src/engines/test-connection.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 设置页测试连接 —— 统一走探测入口(#322/#323)。
//
// 此前 openai 只查 401、deepl 只查 403,另一状态码会被显示成裸的
diff --git a/src/engines/types.ts b/src/engines/types.ts
index 3260630..b8f0579 100644
--- a/src/engines/types.ts
+++ b/src/engines/types.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 2 — 翻译引擎统一接口与错误类型。
export interface TranslateRequest {
diff --git a/src/hotkeys/listener.ts b/src/hotkeys/listener.ts
index 9caaecd..6d61b66 100644
--- a/src/hotkeys/listener.ts
+++ b/src/hotkeys/listener.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 6 — content script 运行时快捷键监听。
// 用捕获阶段监听,抢在页面自身的按键处理之前。
diff --git a/src/hotkeys/normalize.ts b/src/hotkeys/normalize.ts
index f1b9b47..2b8f6c4 100644
--- a/src/hotkeys/normalize.ts
+++ b/src/hotkeys/normalize.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 6 — 组合键规范化、解析、事件匹配。
//
// Mod 在 Mac 上是 ⌘、其余平台是 Ctrl;Ctrl 在 Mac 上是独立的 ⌃。
diff --git a/src/hotkeys/platform.ts b/src/hotkeys/platform.ts
index f4249cd..198a2d7 100644
--- a/src/hotkeys/platform.ts
+++ b/src/hotkeys/platform.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 6 — 系统识别 + 按键符号映射。
//
// Mac 用符号且不加分隔符;其余平台用单词加 +。
diff --git a/src/hotkeys/recorder.ts b/src/hotkeys/recorder.ts
index ffb25a6..5707815 100644
--- a/src/hotkeys/recorder.ts
+++ b/src/hotkeys/recorder.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 6 — 设置页录制组件 + 冲突检测。
//
// 浏览器优先拦截、扩展收不到的组合需提示用户,
diff --git a/src/i18n.ts b/src/i18n.ts
index 7d1375d..1d866d4 100644
--- a/src/i18n.ts
+++ b/src/i18n.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 7 — 扩展自身 UI 的国际化入口。
//
// 只覆盖扩展 UI,与译文内容无关。文案统一走 chrome.i18n.getMessage,
diff --git a/src/orchestration/orchestrator.ts b/src/orchestration/orchestrator.ts
index 3f325be..1f59bc7 100644
--- a/src/orchestration/orchestrator.ts
+++ b/src/orchestration/orchestrator.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 翻译编排模块 —— #221 架构评审候选 1。
//
// content 入口(约 585 行)一个闭包同时承担:翻译编排(批次拆分、
diff --git a/src/queue/concurrency.ts b/src/queue/concurrency.ts
index 1110d7f..adef89d 100644
--- a/src/queue/concurrency.ts
+++ b/src/queue/concurrency.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 2 — 并发闸门。
// 限制同时在飞的异步任务数,防止瞬间打爆端点触发限流。
// 浏览器对单域名并发连接数的常见上限为 6,与默认值对齐。
diff --git a/src/runtime/batch-retry.ts b/src/runtime/batch-retry.ts
index 8da0663..8083c70 100644
--- a/src/runtime/batch-retry.ts
+++ b/src/runtime/batch-retry.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 批次级「发送 → 失败重试」循环(content script 整页翻译专用)。
//
// 与 messaging.ts 的分工:messaging 负责消息通道的传输层重试
diff --git a/src/runtime/messaging.ts b/src/runtime/messaging.ts
index 21ee436..4edde55 100644
--- a/src/runtime/messaging.ts
+++ b/src/runtime/messaging.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// content → background 消息通道健壮层。
//
// #89:Chrome MV3 的 service worker 在 headless/冷启动场景下,
diff --git a/src/runtime/sleep.ts b/src/runtime/sleep.ts
index fa8a662..8036031 100644
--- a/src/runtime/sleep.ts
+++ b/src/runtime/sleep.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 共享 sleep —— #136:收敛 content.ts / messaging.ts / batch-retry.ts 三份复制。
//
// 用 globalThis.setTimeout 而非裸 setTimeout:content script(self 作用域)
diff --git a/src/storage/cache.ts b/src/storage/cache.ts
index 1603519..4c615e7 100644
--- a/src/storage/cache.ts
+++ b/src/storage/cache.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
const PREFIX = 'pt-c:';
const MAX_ENTRIES = 5000;
const INDEX_KEY = 'pt-cache-index';
diff --git a/src/storage/keys.ts b/src/storage/keys.ts
index e1349dd..350238e 100644
--- a/src/storage/keys.ts
+++ b/src/storage/keys.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
import type { EngineId } from './schema';
const KEY = 'pt-keys';
diff --git a/src/storage/schema.ts b/src/storage/schema.ts
index 41b2c3f..f724b2e 100644
--- a/src/storage/schema.ts
+++ b/src/storage/schema.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 1 — 全局 Settings 类型定义与默认值。
// 此文件为全局唯一真相来源。后续所有阶段新增配置项都改这里,
// 不要在别处另开定义。
diff --git a/src/storage/settings-import.ts b/src/storage/settings-import.ts
index 3acf69b..0bbea1c 100644
--- a/src/storage/settings-import.ts
+++ b/src/storage/settings-import.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 设置导入 —— 整体替换语义(#324)。
//
// 导入此前走 patchSettings(逐键合并):导入一份不含自定义模型名的
diff --git a/src/storage/settings.ts b/src/storage/settings.ts
index 49f58b2..7b90d9d 100644
--- a/src/storage/settings.ts
+++ b/src/storage/settings.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
import type { DeepPartial, Settings } from './schema';
import { DEFAULT_SETTINGS, clampConcurrency, migrateStyle } from './schema';
diff --git a/src/styles/custom.ts b/src/styles/custom.ts
index e17e1e0..98a0962 100644
--- a/src/styles/custom.ts
+++ b/src/styles/custom.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 4 — 用户自定义 CSS 校验、作用域限定、注入。
//
// 只收 CSS 声明块(属性: 值),不收选择器。
diff --git a/src/styles/injected.css b/src/styles/injected.css
index a1bc7f4..967c513 100644
--- a/src/styles/injected.css
+++ b/src/styles/injected.css
@@ -1,3 +1,11 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2026 Parallel-Translation contributors
+ *
+ * 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+ * 不含任何担保。完整条款见仓库根目录的 LICENSE。
+ */
+
/* Phase 5 — 注入 shadow root 的 UI 专属样式。
此处可安全使用短类名,不会与宿主冲突。
设计令牌由 mount.ts 注入同一 shadow root,故 CSS 变量可用。 */
diff --git a/src/styles/popup.css b/src/styles/popup.css
index c658dac..95f687d 100644
--- a/src/styles/popup.css
+++ b/src/styles/popup.css
@@ -1,3 +1,11 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2026 Parallel-Translation contributors
+ *
+ * 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+ * 不含任何担保。完整条款见仓库根目录的 LICENSE。
+ */
+
@import './tokens.css';
*,
diff --git a/src/styles/presets.css b/src/styles/presets.css
index 05bf39b..3978a59 100644
--- a/src/styles/presets.css
+++ b/src/styles/presets.css
@@ -1,3 +1,11 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2026 Parallel-Translation contributors
+ *
+ * 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+ * 不含任何担保。完整条款见仓库根目录的 LICENSE。
+ */
+
/* Phase 4 — 6 种译文样式预设 + 基础结构 + 仅译文模式。
译文字体/字号不在此设定 —— .pt-trans 继承宿主页面排版。 */
diff --git a/src/styles/shadow.ts b/src/styles/shadow.ts
index 7fcc3f2..41cf025 100644
--- a/src/styles/shadow.ts
+++ b/src/styles/shadow.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// #163: 扩展样式不跨 shadow 边界 —— shadow 内译文不受模式/样式预设控制。
//
// content script 的 CSS(presets.css / tokens.css)由 Chrome 以文档级样式
diff --git a/src/styles/tokens.css b/src/styles/tokens.css
index 7c46313..92ce305 100644
--- a/src/styles/tokens.css
+++ b/src/styles/tokens.css
@@ -1,3 +1,11 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2026 Parallel-Translation contributors
+ *
+ * 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+ * 不含任何担保。完整条款见仓库根目录的 LICENSE。
+ */
+
:root {
/* 主色板 */
--pt-paper: #f5f0e6; /* 底色,纸感米白 */
diff --git a/src/ui/context-menu.ts b/src/ui/context-menu.ts
index 81f4b85..00d39b9 100644
--- a/src/ui/context-menu.ts
+++ b/src/ui/context-menu.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 6 — 划词右键菜单。
// 注册在 background service worker,用户在页面上选中文本后右键出现。
diff --git a/src/ui/floating-ball.ts b/src/ui/floating-ball.ts
index 1e77731..863ced2 100644
--- a/src/ui/floating-ball.ts
+++ b/src/ui/floating-ball.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 5 — 右下角悬浮球。
// 点击触发全页翻译,再次点击还原。
// 位置可拖动并持久化到 storage.local。
diff --git a/src/ui/lifecycle-registry.ts b/src/ui/lifecycle-registry.ts
index ba7bf50..a6c08fe 100644
--- a/src/ui/lifecycle-registry.ts
+++ b/src/ui/lifecycle-registry.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// UI 生命周期注册表 —— #224 架构评审候选 6 的核心(#235)。
//
// mount/unmount 样板在每个 UI 模块里重复,content 入口用五个 stop 变量
diff --git a/src/ui/logo.ts b/src/ui/logo.ts
index d5d418f..1f297a3 100644
--- a/src/ui/logo.ts
+++ b/src/ui/logo.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// 品牌标识「A / 文」的字形定义 —— 唯一真相。
//
// 拉丁字母 A 在上、汉字「文」在下,对应产品的「原文在上、译文在下」。
diff --git a/src/ui/mount.ts b/src/ui/mount.ts
index 234b9ec..950448a 100644
--- a/src/ui/mount.ts
+++ b/src/ui/mount.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 5 — shadow root 挂载通用封装。
//
// 创建一个与宿主页面完全隔离的挂载点。
diff --git a/src/ui/paragraph-btn.ts b/src/ui/paragraph-btn.ts
index 7c04514..5f0afe0 100644
--- a/src/ui/paragraph-btn.ts
+++ b/src/ui/paragraph-btn.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 5 — 逐段翻译浮出按钮。
// 鼠标进入可翻译段落时,在其右侧浮出一个小按钮。
// 单个按钮实例复用,随鼠标在段落间移动,不为每段各建一个。
diff --git a/src/ui/selection-drag.ts b/src/ui/selection-drag.ts
index 16155f4..ee23c20 100644
--- a/src/ui/selection-drag.ts
+++ b/src/ui/selection-drag.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 6 — 修饰键 + 拖光标划词翻译。
//
// 按住修饰键并拖动光标选中文本,松开即翻译选区。
diff --git a/src/ui/toast.ts b/src/ui/toast.ts
index d24397d..11cfb03 100644
--- a/src/ui/toast.ts
+++ b/src/ui/toast.ts
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2026 Parallel-Translation contributors
+//
+// 本文件是 Parallel-Translation 的一部分,依 GNU GPL v3 或更新版本发布,
+// 不含任何担保。完整条款见仓库根目录的 LICENSE。
+
// Phase 5 — 状态与错误提示 toast。
// 短暂提示,通过注入 shadow root 隔离,不受宿主页面样式影响。
diff --git a/store/description-en.md b/store/description-en.md
index 84b813c..0475554 100644
--- a/store/description-en.md
+++ b/store/description-en.md
@@ -61,5 +61,5 @@ The interface speaks Simplified Chinese, Traditional Chinese and English, follow
After an update, the next page you open tells you what changed. It shows once and never again.
Found a problem? There is a link at the bottom of the toolbar panel.
-Open source. Code and issues:
+Open source under the GNU GPL v3. Code and issues:
https://github.com/Teeeeeeeerry/Parallel-Translation
diff --git a/store/description-zh.md b/store/description-zh.md
index 831ff31..b6e46f3 100644
--- a/store/description-zh.md
+++ b/store/description-zh.md
@@ -61,5 +61,5 @@ API 密钥存在本地,不参与浏览器账号同步,导出配置时也不
扩展更新后,下次打开网页时会告诉你这一版改了什么,看过一次就不再出现。
遇到问题可以从工具栏面板底部直接提交反馈。
-开源,源码与问题反馈:
+以 GPL-3.0 开源,源码与问题反馈:
https://github.com/Teeeeeeeerry/Parallel-Translation
diff --git a/store/description-zh_TW.md b/store/description-zh_TW.md
index 2f843e6..a214d12 100644
--- a/store/description-zh_TW.md
+++ b/store/description-zh_TW.md
@@ -61,5 +61,5 @@ API 金鑰存在本機,不參與瀏覽器帳號同步,匯出設定時也不
擴充功能更新後,下次開啟網頁時會告訴你這一版改了什麼,看過一次就不再出現。
遇到問題可以從工具列面板底部直接提交回報。
-開源,原始碼與問題回報:
+以 GPL-3.0 開源,原始碼與問題回報:
https://github.com/Teeeeeeeerry/Parallel-Translation