mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-05-18 00:52:31 +08:00
整理国际化标识符
This commit is contained in:
@@ -21,7 +21,7 @@ exports.translate = (name, lang) ->
|
||||
result = data[lang][names.shift()]
|
||||
|
||||
for item in names
|
||||
if result[item]
|
||||
if result and result[item]
|
||||
result = result[item]
|
||||
else
|
||||
return name
|
||||
|
||||
@@ -3,41 +3,44 @@
|
||||
"name": "RootPanel",
|
||||
"description": "一个插件化的 Linux 虚拟主机管理系统。"
|
||||
},
|
||||
"word": {
|
||||
"account": "帐号",
|
||||
"common": {
|
||||
"error": "错误"
|
||||
},
|
||||
"account": {
|
||||
"": "帐号",
|
||||
"signup": "注册",
|
||||
"login": "登录",
|
||||
"username": "用户名",
|
||||
"email": "邮箱",
|
||||
"passwd": "密码",
|
||||
"error": "错误",
|
||||
"logout": "注销",
|
||||
"panel": "管理面板",
|
||||
"ticket": "工单",
|
||||
"logout": "注销"
|
||||
},
|
||||
"panel": {
|
||||
"": "管理面板"
|
||||
},
|
||||
"ticket": {
|
||||
"": "工单",
|
||||
"type": "类型",
|
||||
"title": "标题",
|
||||
"status": "状态",
|
||||
"create": "创建",
|
||||
"reply": "回复",
|
||||
"replies": "全部回复",
|
||||
"create_ticket": "创建工单",
|
||||
"create_reply": "创建回复",
|
||||
"adminPanel": "管理员面板"
|
||||
"ticket_list": "工单列表"
|
||||
},
|
||||
"admin": {
|
||||
"admin_panel": "管理员面板"
|
||||
},
|
||||
"view": {
|
||||
"signup": {
|
||||
"layout": {
|
||||
"navigation": "展开导航"
|
||||
},
|
||||
"account": {
|
||||
"passwd2": "重复",
|
||||
"alreadySignup": "已有帐号?"
|
||||
},
|
||||
"login": {
|
||||
"noAccount": "还没有账户?"
|
||||
},
|
||||
"ticket": {
|
||||
"word": {
|
||||
"create": "创建工单"
|
||||
},
|
||||
|
||||
"list": {
|
||||
"title": "工单列表"
|
||||
}
|
||||
"already_signup": "已有帐号?",
|
||||
"no_account": "还没有账户?"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
extends ../layout
|
||||
|
||||
prepend head
|
||||
title #{t("word.login")} | #{t('app.name')}
|
||||
title #{t('account.login')} | #{t('app.name')}
|
||||
|
||||
block main
|
||||
header= t('word.login')
|
||||
form.form-horizontal(method='post', role='form')
|
||||
.form-group
|
||||
label.col-sm-2.col-md-offset-1.control-label(for='username')= t('word.username')
|
||||
label.col-sm-2.col-md-offset-1.control-label(for='username')= t('account.username')
|
||||
.col-sm-5
|
||||
input#username.form-control(type='text', name='username', required, value=username)
|
||||
input#username.form-control(type='text', name='username', required)
|
||||
.form-group
|
||||
label.col-sm-2.col-md-offset-1.control-label(for='passwd')= t('word.passwd')
|
||||
label.col-sm-2.col-md-offset-1.control-label(for='passwd')= t('account.passwd')
|
||||
.col-sm-5
|
||||
input#passwd.form-control(type='password', name='passwd', required)
|
||||
.form-group
|
||||
.col-sm-offset-3
|
||||
button#login-btn.btn.btn-lg.btn-primary(type='submit')= t('word.login')
|
||||
button#login-btn.btn.btn-lg.btn-primary(type='submit')= t('account.login')
|
||||
|
||||
prepend sidebar
|
||||
.row
|
||||
header= t('view.login.noAccount')
|
||||
a.btn.btn-lg.btn-success(href='/account/signup/')= t('word.signup')
|
||||
header= t('view.account.no_account')
|
||||
a.btn.btn-lg.btn-success(href='/account/signup/')= t('account.signup')
|
||||
|
||||
append footer
|
||||
script(src='/script/account/login.js')
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
extends ../layout
|
||||
|
||||
prepend head
|
||||
title #{t("word.signup")} | #{t('app.name')}
|
||||
title #{t('account.signup')} | #{t('app.name')}
|
||||
|
||||
block main
|
||||
header= t('word.signup')
|
||||
header= t('account.signup')
|
||||
form.form-horizontal.signup-form(method='post', role='form')
|
||||
.form-group
|
||||
label.col-sm-2.col-md-offset-1.control-label(for='username')= t('word.username')
|
||||
label.col-sm-2.col-md-offset-1.control-label(for='username')= t('account.username')
|
||||
.col-sm-5
|
||||
input#username.form-control(type='text', name='username', required, value=username)
|
||||
input#username.form-control(type='text', name='username', required)
|
||||
.form-group
|
||||
label.col-sm-2.col-md-offset-1.control-label(for='email')= t('word.email')
|
||||
label.col-sm-2.col-md-offset-1.control-label(for='email')= t('account.email')
|
||||
.col-sm-5
|
||||
input#email.form-control(type='email', name='email', required, value=email)
|
||||
input#email.form-control(type='email', name='email', required)
|
||||
.form-group
|
||||
label.col-sm-2.col-md-offset-1.control-label(for='passwd')= t('word.passwd')
|
||||
label.col-sm-2.col-md-offset-1.control-label(for='passwd')= t('account.passwd')
|
||||
.col-sm-5
|
||||
input#passwd.form-control(type='password', name='passwd', required)
|
||||
.form-group
|
||||
label.col-sm-2.col-md-offset-1.control-label(for='passwd2')= t('view.signup.passwd2')
|
||||
label.col-sm-2.col-md-offset-1.control-label(for='passwd2')= t('view.account.passwd2')
|
||||
.col-sm-5
|
||||
input#passwd2.form-control(type='password', name='passwd2', required)
|
||||
.form-group
|
||||
.col-sm-offset-3
|
||||
button.signup-btn.btn.btn-lg.btn-primary(type='submit')= t('word.signup')
|
||||
button.signup-btn.btn.btn-lg.btn-primary(type='submit')= t('account.signup')
|
||||
|
||||
prepend sidebar
|
||||
.row
|
||||
header= t('view.signup.alreadySignup')
|
||||
a.btn.btn-lg.btn-success(href='/account/login/')= t('word.login')
|
||||
header= t('view.account.already_signup')
|
||||
a.btn.btn-lg.btn-success(href='/account/login/')= t('account.login')
|
||||
|
||||
append footer
|
||||
script(src='/script/account/signup.js')
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
extends ../layout
|
||||
|
||||
prepend head
|
||||
title #{t("word.adminPanel")} | #{t('app.name')}
|
||||
title #{t('admin.admin_panel')} | #{t('app.name')}
|
||||
|
||||
block main
|
||||
header= t('word.adminPanel')
|
||||
header= t('admin.admin_panel')
|
||||
table.table.table-hover
|
||||
thead
|
||||
tr
|
||||
th= t('word.username')
|
||||
th= t('word.email')
|
||||
th= t('account.username')
|
||||
th= t('account.email')
|
||||
tbody
|
||||
for account in accounts
|
||||
tr
|
||||
@@ -18,4 +18,4 @@ block main
|
||||
|
||||
prepend sidebar
|
||||
.row
|
||||
a.btn.btn-lg.btn-success(href='/admin/ticket/')= t('view.ticket.list.title')
|
||||
a.btn.btn-lg.btn-success(href='/admin/ticket/')= t('ticket.ticket_list')
|
||||
|
||||
@@ -11,7 +11,7 @@ html
|
||||
nav.navbar.navbar-default.navbar-inverse(role='navigation')
|
||||
.navbar-header
|
||||
button.navbar-toggle(type='button', data-toggle='collapse', data-target='#navbar-collapse')
|
||||
span.sr-only Toggle navigation
|
||||
span.sr-only= t('view.layout.navigation')
|
||||
span.icon-bar
|
||||
span.icon-bar
|
||||
span.icon-bar
|
||||
@@ -25,20 +25,20 @@ html
|
||||
li
|
||||
a= account.username
|
||||
li
|
||||
a(href='/panel/')= t('word.panel')
|
||||
a(href='/panel/')= t('panel.')
|
||||
li
|
||||
a#logout(href='/account/logout/')= t('word.logout')
|
||||
a#logout(href='/account/logout/')= t('account.logout')
|
||||
else
|
||||
li
|
||||
a(href='/account/signup/')= t('word.signup')
|
||||
a(href='/account/signup/')= t('account.signup')
|
||||
li
|
||||
a(href='/account/login/')= t('word.login')
|
||||
a(href='/account/login/')= t('account.login')
|
||||
|
||||
block content
|
||||
#content.container
|
||||
.row
|
||||
.col-md-9
|
||||
.alert.alert-danger#page-alert
|
||||
#page-alert.alert.alert-danger
|
||||
block main
|
||||
|
||||
#sidebar.col-md-3
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
extends layout
|
||||
|
||||
prepend head
|
||||
title #{t('word.panel')} | #{t('app.name')}
|
||||
title #{t('panel.panel')} | #{t('app.name')}
|
||||
|
||||
append head
|
||||
link(rel='stylesheet', href='/style/panel/panel.css')
|
||||
@@ -14,11 +14,11 @@ block content
|
||||
li.active
|
||||
a(href='/panel/')
|
||||
span.glyphicon.pull-right.glyphicon-home
|
||||
| #{t('word.panel')}
|
||||
| #{t('panel.')}
|
||||
li
|
||||
a(href='/ticket/list/')
|
||||
span.glyphicon.pull-right.glyphicon-edit
|
||||
| #{t('word.ticket')}
|
||||
| #{t('ticket.')}
|
||||
|
||||
.col-md-9
|
||||
h2 Panel
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
extends ../layout
|
||||
|
||||
prepend head
|
||||
title #{t('view.ticket.word.create')} | #{t('app.name')}
|
||||
title #{t('ticket.create_ticket')} | #{t('app.name')}
|
||||
link(rel='stylesheet', href='/style/ticket.css')
|
||||
|
||||
block main
|
||||
header= t('view.ticket.word.create')
|
||||
header= t('ticket.create_ticket')
|
||||
|
||||
form.form-horizontal(method='post', role='form')
|
||||
.form-group
|
||||
@@ -19,8 +19,7 @@ block main
|
||||
textarea#ticket-content.form-control(name='content', rows='15', required)
|
||||
.form-group
|
||||
.col-sm-offset-3
|
||||
button.btn.btn-lg.btn-primary#create-ticket(type='submit')= t('word.create')
|
||||
|
||||
button.btn.btn-lg.btn-primary#create-ticket(type='submit')= t('ticket.create')
|
||||
|
||||
append footer
|
||||
script(src='/script/ticket/create.js')
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
extends ../layout
|
||||
|
||||
prepend head
|
||||
title #{t('view.ticket.list.title')} | #{t('app.name')}
|
||||
title #{t('ticket.ticket_list')} | #{t('app.name')}
|
||||
|
||||
block main
|
||||
header= t('view.ticket.list.title')
|
||||
header= t('ticket.ticket_list')
|
||||
|
||||
table.table.table-hover
|
||||
thead
|
||||
tr
|
||||
th= t('word.type')
|
||||
th= t('word.title')
|
||||
th= t('word.status')
|
||||
th= t('ticket.type')
|
||||
th= t('ticket.title')
|
||||
th= t('ticket.status')
|
||||
tbody
|
||||
for ticket in tickets
|
||||
tr(data-id= ticket._id)
|
||||
@@ -22,4 +22,4 @@ block main
|
||||
|
||||
prepend sidebar
|
||||
.row
|
||||
a.btn.btn-lg.btn-success(href='/ticket/create/')= t('view.ticket.word.create')
|
||||
a.btn.btn-lg.btn-success(href='/ticket/create/')= t('ticket.create_reply')
|
||||
|
||||
@@ -10,7 +10,7 @@ block main
|
||||
p!= ticket.content_html
|
||||
|
||||
.row
|
||||
header= t('word.reply')
|
||||
header= t('ticket.replies')
|
||||
ul.list-group
|
||||
for reply in ticket.replys
|
||||
li.list-group-item
|
||||
@@ -25,8 +25,8 @@ block main
|
||||
.form-group.contentarea
|
||||
textarea#contetn.form-control(name='content', rows='5', required)
|
||||
.form-group
|
||||
button.btn.btn-lg.btn-primary(type='submit')= t('word.create_reply')
|
||||
button.btn.btn-lg.btn-primary(type='submit')= t('ticket.create_reply')
|
||||
|
||||
prepend sidebar
|
||||
.row
|
||||
a.btn.btn-lg.btn-success(href='/ticket/list/')= t('view.ticket.list.title')
|
||||
a.btn.btn-lg.btn-success(href='/ticket/list/')= t('ticket.ticket_list')
|
||||
|
||||
Reference in New Issue
Block a user