From 67212f2892cd6f66cccc919a5ce34eeeb88e34e3 Mon Sep 17 00:00:00 2001 From: tanhanze Date: Thu, 22 Jun 2023 19:35:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B1=89=E5=8C=96setup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/scripts/setupSchema/Banner.js | 16 ++++++++-------- server/src/scripts/setupSchema/Footer.js | 2 +- server/src/scripts/setupSchema/Questions.js | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/server/src/scripts/setupSchema/Banner.js b/server/src/scripts/setupSchema/Banner.js index 56713b4..38d4329 100644 --- a/server/src/scripts/setupSchema/Banner.js +++ b/server/src/scripts/setupSchema/Banner.js @@ -11,18 +11,18 @@ import chalk from 'chalk'; // gotta have that sexy console console.log(stripIndents` ${chalk.magenta('°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸°º¤ø,¸¸,ø¤º°`°º¤ø')} - ${chalk.gray('--------------(') + chalk.white(' LuminaChat Setup Wizard ') + chalk.gray(')--------------')} + ${chalk.gray('--------------(') + chalk.white(' LuminaChat 安装指导 ') + chalk.gray(')--------------')} ${chalk.magenta('°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸°º¤ø,¸¸,ø¤º°`°º¤ø')} - For advanced setup, see the documentation at: - ${chalk.green('https://github.com/hack-chat/main/tree/master/documentation')} + 了解更多,请查看: + ${chalk.green('https://github.com/LuminaChat/main')} - ${chalk.white('Note:')} ${chalk.green('npm/yarn run config')} will re-run this utility. + ${chalk.white('提示:')} ${chalk.green('npm/yarn run config')} 会重新运行此程序. You will now be asked for the following: - - ${chalk.magenta(' Salt')}, the salt for username trip - - ${chalk.magenta('Admin Name')}, the initial admin username - - ${chalk.magenta('Admin Pass')}, the initial admin password - - ${chalk.magenta(' Port')}, the port for the websocket + - ${chalk.magenta(' 混淆值')}, 来让加密更安全 + - ${chalk.magenta(' 站长名称')}, 字面意思 + - ${chalk.magenta(' 站长密码')}, 字面意思 + - ${chalk.magenta(' 端口')}, Websocket服务端口 \u200b `); diff --git a/server/src/scripts/setupSchema/Footer.js b/server/src/scripts/setupSchema/Footer.js index 5fb627b..e941013 100644 --- a/server/src/scripts/setupSchema/Footer.js +++ b/server/src/scripts/setupSchema/Footer.js @@ -5,5 +5,5 @@ */ console.log(''); -console.log('Config generated! You may now start the server normally.'); +console.log('配置文件已创建!你现在可以使用 npm start 来正常运行您的LuminaChat实例.'); console.log(''); diff --git a/server/src/scripts/setupSchema/Questions.js b/server/src/scripts/setupSchema/Questions.js index 532ba67..f546039 100644 --- a/server/src/scripts/setupSchema/Questions.js +++ b/server/src/scripts/setupSchema/Questions.js @@ -11,7 +11,7 @@ const Questions = { properties: { tripSalt: { - description: 'Salt (leave as default)', + description: '混淆值 (推荐留空)', type: 'string', hidden: true, replace: '*', @@ -22,10 +22,10 @@ const Questions = { }, adminName: { - description: 'Admin Nickname', + description: '站长名称', pattern: /^"?[a-zA-Z0-9_]+"?$/, type: 'string', - message: 'Nicks can only contain letters, numbers and underscores', + message: '站长名称仅可包含字母、数字、下划线。', before: (value) => value.replace(/"/g, ''), }, @@ -33,8 +33,8 @@ const Questions = { type: 'string', hidden: true, replace: '*', - description: 'Admin Password', - message: 'You must enter or re-enter a password', + description: '站长密码', + message: '你必须输入一个密码。', before: (value) => { const crypto = require('crypto'); const sha = crypto.createHash('sha256'); @@ -45,7 +45,7 @@ const Questions = { websocketPort: { type: 'integer', - message: 'The port may only be a number!', + message: '端口只能是一个数字!', description: 'Websocket Port', default: '6060', },