Skip to content

Commit b53a57a

Browse files
committed
fix: add word space and put the app name into the title
1 parent ade3da3 commit b53a57a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/browser/pages/login.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
http-equiv="Content-Security-Policy"
1111
content="style-src 'self'; script-src 'self' 'unsafe-inline'; manifest-src 'self'; img-src 'self' data:; font-src 'self' data:;"
1212
/>
13-
<title>{{APP_NAME}} {{I18N_LOGIN_TITLE}}</title>
13+
<title>{{I18N_LOGIN_TITLE}}</title>
1414
<link rel="icon" href="{{CS_STATIC_BASE}}/src/browser/media/favicon-dark-support.svg" />
1515
<link rel="alternate icon" href="{{CS_STATIC_BASE}}/src/browser/media/favicon.ico" />
1616
<link rel="manifest" href="{{BASE}}/manifest.json" crossorigin="use-credentials" />
@@ -25,7 +25,7 @@
2525
<div class="card-box">
2626
<div class="header">
2727
<h1 class="main">{{WELCOME_TEXT}}</h1>
28-
<div class="sub">{{I18N_LOGIN_BELOW}}{{PASSWORD_MSG}}</div>
28+
<div class="sub">{{I18N_LOGIN_BELOW}} {{PASSWORD_MSG}}</div>
2929
</div>
3030
<div class="content">
3131
<form class="login-form" method="post">

src/node/i18n/locales/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"LOGIN_TITLE": "login",
3-
"LOGIN_BELOW": "Please log in below. ",
2+
"LOGIN_TITLE": "{{app}} login",
3+
"LOGIN_BELOW": "Please log in below.",
44
"WELCOME": "Welcome to {{app}}",
55
"LOGIN_PASSWORD": "Check the config file at {{configFile}} for the password.",
66
"LOGIN_USING_ENV_PASSWORD": "Password was set from $PASSWORD.",

src/node/i18n/locales/zh-cn.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"LOGIN_TITLE": "登录",
2+
"LOGIN_TITLE": "{{app}} 登录",
33
"LOGIN_BELOW": "请在下面登录。",
44
"WELCOME": "欢迎来到 {{app}}",
55
"LOGIN_PASSWORD": "查看配置文件 {{configFile}} 中的密码。",

src/node/routes/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const getRoot = async (req: Request, error?: Error): Promise<string> => {
4343
return replaceTemplates(
4444
req,
4545
content
46-
.replace(/{{APP_NAME}}/g, appName)
46+
.replace(/{{I18N_LOGIN_TITLE}}/g, i18n.t("LOGIN_TITLE", { app: appName}))
4747
.replace(/{{WELCOME_TEXT}}/g, welcomeText)
4848
.replace(/{{PASSWORD_MSG}}/g, passwordMsg)
4949
.replace(/{{I18N_LOGIN_TITLE}}/g, i18n.t("LOGIN_TITLE"))

0 commit comments

Comments
 (0)