中文显示修改

This commit is contained in:
xdragon 2024-09-05 15:27:27 +08:00
parent daa8c09a32
commit 8497f652bc
6 changed files with 8 additions and 8 deletions

View file

@ -91,7 +91,7 @@ export const App = ()=> {
<div className="inner-menu">
<span>
<Crown width={40} height={40}/>
<h5>Etherpad</h5>
<h5><Trans i18nKey="admin.page-title"/></h5>
</span>
<ul>
<li><NavLink to="/plugins"><Cable/><Trans i18nKey="admin_plugins"/></NavLink></li>

View file

@ -28,7 +28,7 @@ const LazyImportPlugin: BackendModule = {
try {
json = JSON.parse(await localeJSON.text())
} catch(e) {
callback(new Error("Error loading"), null);
callback(new Error("加载错误"), null);
}

View file

@ -21,13 +21,13 @@ export const SettingsPage = ()=>{
settingsSocket!.emit('saveSettings', settings!);
useStore.getState().setToastState({
open: true,
title: "Succesfully saved settings",
title: "保存设置成功",
success: true
})
} else {
useStore.getState().setToastState({
open: true,
title: "Error saving settings",
title: "保存设置出错",
success: false
})
}

View file

@ -19,7 +19,7 @@ if (process.argv.length !== 2) throw new Error('Use: node bin/checkAllPads.js');
try {
await pad.check();
} catch (err:any) {
console.error(`Error in pad ${padId}: ${err.stack || err}`);
console.error(`文档错误: ${padId}: ${err.stack || err}`);
return;
}
console.log(`Pad ${padId}: OK`);

View file

@ -32,7 +32,7 @@ const newPadId = process.argv[4] || `${padId}-rebuilt`;
throw new Error('Cannot create a pad with that id as it is invalid');
}
const exists = await PadManager.doesPadExist(newPadId);
if (exists) throw new Error('Cannot create a pad with that id as it already exists');
if (exists) throw new Error('由于该 ID 已存在,无法创建具有该 ID 的文档');
const oldPad = await PadManager.getPad(padId);
const newPad = new Pad(newPadId);
@ -54,7 +54,7 @@ const newPadId = process.argv[4] || `${padId}-rebuilt`;
newPad.pool.numToAttrib = oldPad.pool.numToAttrib;
for (let curRevNum = 0; curRevNum <= newRevHead; curRevNum++) {
const rev = await db.get(`pad:${padId}:revs:${curRevNum}`);
if (!rev || !rev.meta) throw new Error('The specified revision number could not be found.');
if (!rev || !rev.meta) throw new Error('指定的修订号无法找到。 ');
const newRevNum = ++newPad.head;
const newRevId = `pad:${newPad.id}:revs:${newRevNum}`;
await Promise.all([

View file

@ -24,7 +24,7 @@
"燃玉"
]
},
"admin.page-title": "管理员面板 - Etherpad",
"admin.page-title": "管理后台 - Etherpad",
"admin_plugins": "插件管理",
"admin_plugins.available": "可用插件",
"admin_plugins.available_not-found": "找不到插件。",