Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
1acf2f8b
Unverified
Commit
1acf2f8b
authored
Nov 19, 2022
by
Zeng1998
Committed by
GitHub
Nov 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update i18 for settings (#490)
parent
a4a5e539
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
9 deletions
+36
-9
SettingDialog.tsx
web/src/components/SettingDialog.tsx
+1
-1
SystemSection.tsx
web/src/components/Settings/SystemSection.tsx
+8
-8
en.json
web/src/locales/en.json
+9
-0
vi.json
web/src/locales/vi.json
+9
-0
zh.json
web/src/locales/zh.json
+9
-0
No files found.
web/src/components/SettingDialog.tsx
View file @
1acf2f8b
...
@@ -66,7 +66,7 @@ const SettingDialog: React.FC<Props> = (props: Props) => {
...
@@ -66,7 +66,7 @@ const SettingDialog: React.FC<Props> = (props: Props) => {
onClick=
{
()
=>
handleSectionSelectorItemClick
(
"system"
)
}
onClick=
{
()
=>
handleSectionSelectorItemClick
(
"system"
)
}
className=
{
`section-item ${state.selectedSection === "system" ? "selected" : ""}`
}
className=
{
`section-item ${state.selectedSection === "system" ? "selected" : ""}`
}
>
>
<
span
className=
"icon-text"
>
🧑🔧
</
span
>
System
<
span
className=
"icon-text"
>
🧑🔧
</
span
>
{
t
(
"setting.system"
)
}
</
span
>
</
span
>
</
div
>
</
div
>
</>
</>
...
...
web/src/components/Settings/SystemSection.tsx
View file @
1acf2f8b
...
@@ -97,17 +97,17 @@ const SystemSection = () => {
...
@@ -97,17 +97,17 @@ const SystemSection = () => {
<
div
className=
"section-container system-section-container"
>
<
div
className=
"section-container system-section-container"
>
<
p
className=
"title-text"
>
{
t
(
"common.basic"
)
}
</
p
>
<
p
className=
"title-text"
>
{
t
(
"common.basic"
)
}
</
p
>
<
p
className=
"text-value"
>
<
p
className=
"text-value"
>
Database File Size
:
<
span
className=
"font-mono font-medium"
>
{
formatBytes
(
state
.
dbSize
)
}
</
span
>
{
t
(
"setting.system-section.database-file-size"
)
}
:
<
span
className=
"font-mono font-medium"
>
{
formatBytes
(
state
.
dbSize
)
}
</
span
>
</
p
>
</
p
>
<
p
className=
"title-text"
>
{
t
(
"sidebar.setting"
)
}
</
p
>
<
p
className=
"title-text"
>
{
t
(
"sidebar.setting"
)
}
</
p
>
<
label
className=
"form-label"
>
<
label
className=
"form-label"
>
<
span
className=
"normal-text"
>
Allow user signup
</
span
>
<
span
className=
"normal-text"
>
{
t
(
"setting.system-section.allow-user-signup"
)
}
</
span
>
<
Switch
size=
"sm"
checked=
{
state
.
allowSignUp
}
onChange=
{
(
event
)
=>
handleAllowSignUpChanged
(
event
.
target
.
checked
)
}
/>
<
Switch
size=
"sm"
checked=
{
state
.
allowSignUp
}
onChange=
{
(
event
)
=>
handleAllowSignUpChanged
(
event
.
target
.
checked
)
}
/>
</
label
>
</
label
>
<
div
className=
"form-label"
>
<
div
className=
"form-label"
>
<
span
className=
"normal-text"
>
Additional style
</
span
>
<
span
className=
"normal-text"
>
{
t
(
"setting.system-section.additional-style"
)
}
</
span
>
<
Button
size=
"sm"
onClick=
{
handleSaveAdditionalStyle
}
>
<
Button
size=
"sm"
onClick=
{
handleSaveAdditionalStyle
}
>
Save
{
t
(
"common.save"
)
}
</
Button
>
</
Button
>
</
div
>
</
div
>
<
Textarea
<
Textarea
...
@@ -118,14 +118,14 @@ const SystemSection = () => {
...
@@ -118,14 +118,14 @@ const SystemSection = () => {
}
}
}
}
minRows=
{
4
}
minRows=
{
4
}
maxRows=
{
10
}
maxRows=
{
10
}
placeholder=
"Additional css codes"
placeholder=
{
t
(
"setting.system-section.additional-style-placeholder"
)
}
value=
{
state
.
additionalStyle
}
value=
{
state
.
additionalStyle
}
onChange=
{
(
event
)
=>
handleAdditionalStyleChanged
(
event
.
target
.
value
)
}
onChange=
{
(
event
)
=>
handleAdditionalStyleChanged
(
event
.
target
.
value
)
}
/>
/>
<
div
className=
"form-label mt-2"
>
<
div
className=
"form-label mt-2"
>
<
span
className=
"normal-text"
>
Additional script
</
span
>
<
span
className=
"normal-text"
>
{
t
(
"setting.system-section.additional-script"
)
}
</
span
>
<
Button
size=
"sm"
onClick=
{
handleSaveAdditionalScript
}
>
<
Button
size=
"sm"
onClick=
{
handleSaveAdditionalScript
}
>
Save
{
t
(
"common.save"
)
}
</
Button
>
</
Button
>
</
div
>
</
div
>
<
Textarea
<
Textarea
...
@@ -136,7 +136,7 @@ const SystemSection = () => {
...
@@ -136,7 +136,7 @@ const SystemSection = () => {
}
}
}
}
minRows=
{
4
}
minRows=
{
4
}
maxRows=
{
10
}
maxRows=
{
10
}
placeholder=
"Additional JavaScript codes"
placeholder=
{
t
(
"setting.system-section.additional-script-placeholder"
)
}
value=
{
state
.
additionalScript
}
value=
{
state
.
additionalScript
}
onChange=
{
(
event
)
=>
handleAdditionalScriptChanged
(
event
.
target
.
value
)
}
onChange=
{
(
event
)
=>
handleAdditionalScriptChanged
(
event
.
target
.
value
)
}
/>
/>
...
...
web/src/locales/en.json
View file @
1acf2f8b
...
@@ -133,6 +133,7 @@
...
@@ -133,6 +133,7 @@
"preference"
:
"Preference"
,
"preference"
:
"Preference"
,
"member"
:
"Member"
,
"member"
:
"Member"
,
"member-list"
:
"Member list"
,
"member-list"
:
"Member list"
,
"system"
:
"System"
,
"account-section"
:
{
"account-section"
:
{
"title"
:
"Account Information"
,
"title"
:
"Account Information"
,
"change-password"
:
"Change password"
"change-password"
:
"Change password"
...
@@ -148,6 +149,14 @@
...
@@ -148,6 +149,14 @@
},
},
"member-section"
:
{
"member-section"
:
{
"create-a-member"
:
"Create a member"
"create-a-member"
:
"Create a member"
},
"system-section"
:
{
"database-file-size"
:
"Database File Size"
,
"allow-user-signup"
:
"Allow user signup"
,
"additional-style"
:
"Additional style"
,
"additional-script"
:
"Additional script"
,
"additional-style-placeholder"
:
"Additional CSS codes"
,
"additional-script-placeholder"
:
"Additional JavaScript codes"
}
}
},
},
"amount-text"
:
{
"amount-text"
:
{
...
...
web/src/locales/vi.json
View file @
1acf2f8b
...
@@ -132,6 +132,7 @@
...
@@ -132,6 +132,7 @@
"preference"
:
"Sở thích"
,
"preference"
:
"Sở thích"
,
"member"
:
"Thành viên"
,
"member"
:
"Thành viên"
,
"member-list"
:
"Danh sách thành viên"
,
"member-list"
:
"Danh sách thành viên"
,
"system"
:
"hệ thống"
,
"account-section"
:
{
"account-section"
:
{
"title"
:
"Thông tin tài khoản"
,
"title"
:
"Thông tin tài khoản"
,
"change-password"
:
"Đổi mật khẩu"
"change-password"
:
"Đổi mật khẩu"
...
@@ -147,6 +148,14 @@
...
@@ -147,6 +148,14 @@
},
},
"member-section"
:
{
"member-section"
:
{
"create-a-member"
:
"Tạo thành viên"
"create-a-member"
:
"Tạo thành viên"
},
"system-section"
:
{
"database-file-size"
:
"Kích thước tệp cơ sở dữ liệu"
,
"allow-user-signup"
:
"Cho phép người dùng đăng ký"
,
"additional-style"
:
"Phong cách bổ sung"
,
"additional-script"
:
"Tập lệnh bổ sung"
,
"additional-style-placeholder"
:
"Mã css bổ sung"
,
"additional-script-placeholder"
:
"Mã JavaScript bổ sung"
}
}
},
},
"amount-text"
:
{
"amount-text"
:
{
...
...
web/src/locales/zh.json
View file @
1acf2f8b
...
@@ -133,6 +133,7 @@
...
@@ -133,6 +133,7 @@
"preference"
:
"偏好设置"
,
"preference"
:
"偏好设置"
,
"member"
:
"成员"
,
"member"
:
"成员"
,
"member-list"
:
"成员列表"
,
"member-list"
:
"成员列表"
,
"system"
:
"系统"
,
"account-section"
:
{
"account-section"
:
{
"title"
:
"账号信息"
,
"title"
:
"账号信息"
,
"change-password"
:
"修改密码"
"change-password"
:
"修改密码"
...
@@ -148,6 +149,14 @@
...
@@ -148,6 +149,14 @@
},
},
"member-section"
:
{
"member-section"
:
{
"create-a-member"
:
"创建成员"
"create-a-member"
:
"创建成员"
},
"system-section"
:
{
"database-file-size"
:
"数据库文件大小"
,
"allow-user-signup"
:
"允许用户注册"
,
"additional-style"
:
"自定义样式"
,
"additional-script"
:
"自定义脚本"
,
"additional-style-placeholder"
:
"自定义 CSS 代码"
,
"additional-script-placeholder"
:
"自定义 JavaScript 代码"
}
}
},
},
"amount-text"
:
{
"amount-text"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment