Skip to content

Commit

Permalink
汉化setup
Browse files Browse the repository at this point in the history
  • Loading branch information
0x24a committed Jun 22, 2023
1 parent f376775 commit 67212f2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions server/src/scripts/setupSchema/Banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
`);
2 changes: 1 addition & 1 deletion server/src/scripts/setupSchema/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
*/

console.log('');
console.log('Config generated! You may now start the server normally.');
console.log('配置文件已创建!你现在可以使用 npm start 来正常运行您的LuminaChat实例.');
console.log('');
12 changes: 6 additions & 6 deletions server/src/scripts/setupSchema/Questions.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
const Questions = {
properties: {
tripSalt: {
description: 'Salt (leave as default)',
description: '混淆值 (推荐留空)',
type: 'string',
hidden: true,
replace: '*',
Expand All @@ -22,19 +22,19 @@ 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, ''),
},

adminTrip: {
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');
Expand All @@ -45,7 +45,7 @@ const Questions = {

websocketPort: {
type: 'integer',
message: 'The port may only be a number!',
message: '端口只能是一个数字!',
description: 'Websocket Port',
default: '6060',
},
Expand Down

1 comment on commit 67212f2

@vercel
Copy link

@vercel vercel bot commented on 67212f2 Jun 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.