Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
80f0ccd
add marketplace and oauth application translations
SychO3 Mar 22, 2026
858312f
Merge branch 'gh-pages' into gh-pages
SychO3 Mar 22, 2026
bd9af58
feat(zh-CN): add translations for billing, security, and organization…
SychO3 Mar 22, 2026
7eb8527
add translations for org plans and developer program
SychO3 Mar 22, 2026
9302a1c
fix: improve translation reliability across turbo and history navigation
SychO3 Mar 23, 2026
11f1d04
fix: exclude organization paths from repository detection
SychO3 Mar 23, 2026
846c8f6
add translations for org policies and licensing settings
SychO3 Mar 23, 2026
d3b6310
add translations for pr notifications and billing
SychO3 Mar 23, 2026
76286cd
feat(i18n): update chinese translations for repository dashboard
SychO3 Mar 25, 2026
403dac0
add translations for organization roles and settings
SychO3 Mar 25, 2026
36c8a68
add translations for Copilot memory and session management
SychO3 Mar 25, 2026
0edaa91
✨ feat(i18n): 优化时间元素翻译逻辑并补充 Copilot 智能体及 Action 相关词条。
SychO3 Mar 28, 2026
226d14e
add translations for dashboard entry point and AI model usage consent
SychO3 Apr 20, 2026
6f821bb
Merge remote-tracking branch 'upstream/gh-pages' into gh-pages
SychO3 Apr 20, 2026
fcde2c9
add translations for Copilot cloud agent and task delegation
SychO3 Apr 20, 2026
5842f31
Merge branch 'maboloshi:gh-pages' into gh-pages
SychO3 May 1, 2026
7d9dbe3
Merge branch 'maboloshi:gh-pages' into gh-pages
SychO3 May 4, 2026
aa11ad3
Merge remote-tracking branch 'upstream/gh-pages' into gh-pages
SychO3 Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions locals.js
Original file line number Diff line number Diff line change
Expand Up @@ -11610,7 +11610,7 @@ I18N["zh-CN"]["repository/pull"] = { // 仓库 - 某个拉取请求页面
"Apply suggestions": "应用建议",
"Suggestions to apply": "待应用的建议",
"There was an error trying to commit changes.": "尝试提交更改时出错。",

"This diff has recently been updated.": "该差异最近已更新。",
"Refresh and try again.": "刷新并重试。",

Expand Down Expand Up @@ -16211,7 +16211,7 @@ I18N["zh-CN"]["repository/tasks"] = {

"Diff": "差异",
"Create pull request": "创建拉取请求",

"This pull request was merged. To continue iterating,": "此拉取请求已合并。若要继续迭代,",
"start a new session": "请开始一个新会话",
},
Expand Down
19 changes: 11 additions & 8 deletions main.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,10 @@
* 在新页面加载后执行必要的翻译
*/
function handleTurboLoad() {
updatePageConfig('Turbo 加载');
if (!State.pageConfig) return;

safe(traverseNode, 'Turbo 遍历')(document.body);
transTitle(); // 翻译页面标题
transBySelector(); // 通过选择器翻译特定元素

Expand Down Expand Up @@ -355,6 +357,7 @@
const url = new URL(window.location.href);
const { PAGE_MAP, SPECIAL_SITES } = CONFIG;
const { hostname, pathname } = url;
const { rePagePathRepo, rePagePathOrg } = I18N.conf;

// 基础配置
const site = PAGE_MAP[hostname] || 'github'; // 通过站点映射获取基础类型
Expand All @@ -365,8 +368,8 @@
const isSession = document.body.classList.contains("session-authentication");
const isHomepage = pathname === '/' && site === 'github';
const isProfile = document.body.classList.contains("page-profile") || metaLocation === '/<user-name>';
const isRepository = /\/<user-name>\/<repo-name>/.test(metaLocation);
const isOrganization = /\/<org-login>/.test(metaLocation) || /^\/(?:orgs|organizations)/.test(pathname);
const isRepository = /\/<user-name>\/<repo-name>/.test(metaLocation) || (rePagePathRepo.test(pathname) && !/^\/(?:orgs|organizations)\//.test(pathname));
const isOrganization = /\/<org-login>/.test(metaLocation) || /^\/(?:orgs|organizations)/.test(pathname) || rePagePathOrg.test(pathname);

let pageType;
// 根据页面特征确定页面类型
Expand Down Expand Up @@ -653,13 +656,13 @@
* @param {Element} element - 时间元素
*/
function transTimeElement(element) {
// 获取时间文本
const text = element.textContent;
const text = element.childNodes.length > 0 ? element.lastChild.textContent : element.textContent;
if (!text) return;
// 移除开头的"on"
const result = text.replace(/^on/, "");
if (result !== text) {
element.textContent = result; // 应用翻译
const stripped = text.replace(/^on/, "");
const result = transText(stripped);
const output = result !== false ? result : stripped;
if (output !== text) {
element.textContent = output; // 应用翻译
}
}

Expand Down
19 changes: 11 additions & 8 deletions main_zh-TW.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,10 @@
* 在新頁面加載後執行必要的翻譯
*/
function handleTurboLoad() {
updatePageConfig('Turbo 加載');
if (!State.pageConfig) return;

safe(traverseNode, 'Turbo 遍歷')(document.body);
transTitle(); // 翻譯頁面標題
transBySelector(); // 通過選擇器翻譯特定元素

Expand Down Expand Up @@ -355,6 +357,7 @@
const url = new URL(window.location.href);
const { PAGE_MAP, SPECIAL_SITES } = CONFIG;
const { hostname, pathname } = url;
const { rePagePathRepo, rePagePathOrg } = I18N.conf;

// 基礎配置
const site = PAGE_MAP[hostname] || 'github'; // 通過站點映射獲取基礎類型
Expand All @@ -365,8 +368,8 @@
const isSession = document.body.classList.contains("session-authentication");
const isHomepage = pathname === '/' && site === 'github';
const isProfile = document.body.classList.contains("page-profile") || metaLocation === '/<user-name>';
const isRepository = /\/<user-name>\/<repo-name>/.test(metaLocation);
const isOrganization = /\/<org-login>/.test(metaLocation) || /^\/(?:orgs|organizations)/.test(pathname);
const isRepository = /\/<user-name>\/<repo-name>/.test(metaLocation) || (rePagePathRepo.test(pathname) && !/^\/(?:orgs|organizations)\//.test(pathname));
const isOrganization = /\/<org-login>/.test(metaLocation) || /^\/(?:orgs|organizations)/.test(pathname) || rePagePathOrg.test(pathname);

let pageType;
// 根據頁面特征確定頁面類型
Expand Down Expand Up @@ -653,13 +656,13 @@
* @param {Element} element - 時間元素
*/
function transTimeElement(element) {
// 獲取時間文本
const text = element.textContent;
const text = element.childNodes.length > 0 ? element.lastChild.textContent : element.textContent;
if (!text) return;
// 移除開頭的"on"
const result = text.replace(/^on/, "");
if (result !== text) {
element.textContent = result; // 應用翻譯
const stripped = text.replace(/^on/, "");
const result = transText(stripped);
const output = result !== false ? result : stripped;
if (output !== text) {
element.textContent = output; // 應用翻譯
}
}

Expand Down