- Go 后端 handler 错误消息统一中文化(middleware/repos/generate/review/settings) - 前端 JS 加载和错误消息中文化(diff-viewer.js, graph.js) - 模板页面错误 fallback 和静态文本中文化(index/generate/review/base) - 消除中英文混杂,提升中文用户体验
This commit is contained in:
@@ -76,7 +76,7 @@
|
||||
{{define "footer"}}
|
||||
<footer class="bg-white border-t border-gray-200 py-4">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center text-sm text-gray-400">
|
||||
PR-Helper — AI-powered PR description & code review
|
||||
PR-Helper — AI 驱动的 PR 描述与代码审查
|
||||
</div>
|
||||
</footer>
|
||||
{{end}}
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
async function loadRefs() {
|
||||
try {
|
||||
const resp = await fetch(`/api/repos/${repoId}/refs`, { credentials: 'same-origin' });
|
||||
if (!resp.ok) throw new Error('Failed to load refs');
|
||||
if (!resp.ok) throw new Error('加载分支列表失败');
|
||||
const refs = await resp.json();
|
||||
|
||||
// Fetch recent commits for the "Recent Commits" group
|
||||
|
||||
@@ -142,7 +142,7 @@ document.getElementById('clone-form').addEventListener('submit', async function(
|
||||
|
||||
if (!resp.ok) {
|
||||
const data = await resp.json();
|
||||
throw new Error(data.error || 'clone failed');
|
||||
throw new Error(data.error || '克隆失败');
|
||||
}
|
||||
|
||||
const reader = resp.body.getReader();
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
async function loadRefs() {
|
||||
try {
|
||||
const resp = await fetch(`/api/repos/${repoId}/refs`, { credentials: 'same-origin' });
|
||||
if (!resp.ok) throw new Error('Failed to load refs');
|
||||
if (!resp.ok) throw new Error('加载分支列表失败');
|
||||
const refs = await resp.json();
|
||||
|
||||
// Fetch recent commits for the "Recent Commits" group
|
||||
@@ -576,7 +576,7 @@
|
||||
try {
|
||||
// Fetch the review result
|
||||
const resp = await fetch(`/api/repos/${repoId}/review/analyses/${analysisId}`, { credentials: 'same-origin' });
|
||||
if (!resp.ok) throw new Error('Failed to load review');
|
||||
if (!resp.ok) throw new Error('加载评审数据失败');
|
||||
const data = await resp.json();
|
||||
|
||||
const result = data.result;
|
||||
|
||||
Reference in New Issue
Block a user