Skip to content

Commit d0b696e

Browse files
chore(i18n): change to using english keys for the translations
1 parent ccb57ad commit d0b696e

File tree

7 files changed

+46
-44
lines changed

7 files changed

+46
-44
lines changed

locales/cn.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
2-
"请登录": "请登录",
3-
"邮箱地址": "邮箱地址",
4-
"用户名": "用户名",
5-
"密码": "密码",
6-
"记住我": "记住我",
7-
"登录": "登录",
8-
"热更新服务器": "热更新服务器",
9-
"修改密码": "修改密码",
10-
"获取": "获取",
11-
"请重新登录": "请重新登录"
12-
}
2+
"Please sign in": "请登录",
3+
"email address": "邮箱地址",
4+
"username": "用户名",
5+
"password": "密码",
6+
"Remember me": "记住我",
7+
"Log in": "登录",
8+
"hot update server": "热更新服务器",
9+
"Change Password": "修改密码",
10+
"Obtain": "获取",
11+
"old password": "原密码",
12+
"new password": "新密码",
13+
"please login again": "请重新登录"
14+
}

locales/en.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"请登录": "Please sign in",
3-
"邮箱地址": "email address",
4-
"用户名": "username",
5-
"密码": "password",
6-
"记住我": "Remember me",
7-
"登录": "Log in",
8-
"热更新服务器": "hot update server",
9-
"修改密码": "Change Password",
10-
"获取": "Obtain",
11-
"原密码": "old password",
12-
"新密码": "new password",
13-
"请重新登录": "please login again"
2+
"Please sign in": "Please sign in",
3+
"email address": "email address",
4+
"username": "username",
5+
"password": "password",
6+
"Remember me": "Remember me",
7+
"Log in": "Log in",
8+
"hot update server": "hot update server",
9+
"Change Password": "Change Password",
10+
"Obtain": "Obtain",
11+
"old password": "old password",
12+
"new password": "new password",
13+
"please login again": "please login again"
1414
}

src/routes/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ indexRouter.get('/', (req, res) => {
1111
});
1212

1313
indexRouter.get('/tokens', (req, res) => {
14-
res.render('tokens', { title: `${i18n.__('获取')} token` });
14+
res.render('tokens', { title: `${i18n.__('Obtain')} token` });
1515
});
1616

1717
indexRouter.get(

views/auth/login.pug

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ block css
55
block content
66
.container
77
form#form.form-signin(method="post")
8-
h2.form-signin-heading #{__('请登录')}
9-
label.sr-only(for="inputEmail") #{__('邮箱地址')}#{__('用户名')}
10-
input#inputEmail.form-control(type="text" name="account" placeholder=`${__('邮箱地址')}${__('用户名')}` required autofocus)
11-
label.sr-only(for="inputPassword") #{__('密码')}
12-
input#inputPassword.form-control(type="password" name="password" placeholder=`${__('密码')}` required)
8+
h2.form-signin-heading #{__('Please sign in')}
9+
label.sr-only(for="inputEmail") #{__('email address')}#{__('username')}
10+
input#inputEmail.form-control(type="text" name="account" placeholder=`${__('email address')}${__('username')}` required autofocus)
11+
label.sr-only(for="inputPassword") #{__('password')}
12+
input#inputPassword.form-control(type="password" name="password" placeholder=`${__('password')}` required)
1313
.checkbox
1414
label
1515
input(type="checkbox" value="remember-me")
16-
span #{__('记住我')}
17-
a#submitBtn.btn.btn-lg.btn-primary.btn-block #{__('登录')}
16+
span #{__('Remember me')}
17+
a#submitBtn.btn.btn-lg.btn-primary.btn-block #{__('Log in')}
1818

1919
block js
2020
script().

views/auth/password.pug

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ block content
44
.container(style="margin-top:30px;")
55
form#form.col-md-5.col-md-offset-3(method="post")
66
.form-group
7-
label.sr-only(for="inputEmail") #{__('邮箱地址')}#{__('用户名')}
8-
input#inputEmail.form-control(type="text" name="account" placeholder=`${__('邮箱地址')}${__('用户名')}` required autofocus)
7+
label.sr-only(for="inputEmail") #{__('email address')}#{__('username')}
8+
input#inputEmail.form-control(type="text" name="account" placeholder=`${__('email address')}${__('username')}` required autofocus)
99
.form-group
1010
.col-md-10(style="margin-left:-15px;")
1111
label.sr-only(for="inputToken") token
1212
input#inputToken.form-control(type="text" name="token" placeholder="token" required)
1313
.col-md-2
14-
a.form-control.btn.btn-link(style="margin-bottom:15px;" target="_blank" href="/auth/login") #{__('获取')} token
14+
a.form-control.btn.btn-link(style="margin-bottom:15px;" target="_blank" href="/auth/login") #{__('Obtain')} token
1515
.form-group
16-
label.sr-only(for="inputPassword") #{__('原密码')}
17-
input#inputPassword.form-control(type="password" name="oldPassword" placeholder=`${__('原密码')}` required)
16+
label.sr-only(for="inputPassword") #{__('old password')}
17+
input#inputPassword.form-control(type="password" name="oldPassword" placeholder=`${__('old password')}` required)
1818
.form-group
19-
label.sr-only(for="inputNewPassword") #{__('新密码')}
20-
input#inputNewPassword.form-control(type="password" name="newPassword" placeholder=`${__('新密码')}` required)
19+
label.sr-only(for="inputNewPassword") #{__('new password')}
20+
input#inputNewPassword.form-control(type="password" name="newPassword" placeholder=`${__('new password')}` required)
2121
.form-group
22-
a#submitBtn.btn.btn-lg.btn-primary.btn-block #{__('修改密码')}
22+
a#submitBtn.btn.btn-lg.btn-primary.btn-block #{__('Change Password')}
2323

2424
block js
2525
script().

views/index.pug

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ block css
33
link(rel='stylesheet', href='/stylesheets/index.css')
44

55
block content
6-
.site-notice react native / cordova #{__('热更新服务器')}
6+
.site-notice react native / cordova #{__('hot update server')}
77
h1(style="text-align: center;")= title
88
p(style="text-align: center;") Welcome to #{title}
99
.site-notice
10-
a.btn.btn-primary(href="/auth/login" type="button") #{__('登录')}
11-
a.btn.btn-primary.col-md-offset-1(href="/auth/password" type="button") #{__('修改密码')}
10+
a.btn.btn-primary(href="/auth/login" type="button") #{__('Log in')}
11+
a.btn.btn-primary.col-md-offset-1(href="/auth/password" type="button") #{__('Change Password')}

views/tokens.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ block css
55
block content
66
h1(style="text-align: center;")= title
77
.site-notice
8-
a#submitBtn.btn.btn-lg.btn-primary #{__('获取')} token
8+
a#submitBtn.btn.btn-lg.btn-primary #{__('Obtain')} token
99
.form-group
1010
#tipsSuccess(style="display:none")
1111
h2(style="text-align: center;") Authentication succeeded.
@@ -68,7 +68,7 @@ block js
6868
error: function(XMLHttpRequest, textStatus, errorThrown) {
6969
submit = false;
7070
if (errorThrown == 'Unauthorized') {
71-
alert(`#{__('请重新登录')}!`);
71+
alert(`#{__('please login again')}!`);
7272
location.href = '/auth/login'
7373
}else {
7474
alert(errorThrown);

0 commit comments

Comments
 (0)