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
5bdf15ae
Unverified
Commit
5bdf15ae
authored
Nov 01, 2022
by
winwin2011
Committed by
GitHub
Nov 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: fold/expand i18n (#400)
parent
d347b7a9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
7 deletions
+15
-7
MemoContent.tsx
web/src/components/MemoContent.tsx
+3
-1
en.json
web/src/locales/en.json
+4
-2
vi.json
web/src/locales/vi.json
+4
-2
zh.json
web/src/locales/zh.json
+4
-2
No files found.
web/src/components/MemoContent.tsx
View file @
5bdf15ae
import
{
useEffect
,
useRef
,
useState
}
from
"react"
;
import
{
useEffect
,
useRef
,
useState
}
from
"react"
;
import
{
useTranslation
}
from
"react-i18next"
;
import
{
marked
}
from
"../labs/marked"
;
import
{
marked
}
from
"../labs/marked"
;
import
Icon
from
"./Icon"
;
import
Icon
from
"./Icon"
;
import
"../less/memo-content.less"
;
import
"../less/memo-content.less"
;
...
@@ -29,6 +30,7 @@ const MAX_MEMO_CONTAINER_HEIGHT = 384;
...
@@ -29,6 +30,7 @@ const MAX_MEMO_CONTAINER_HEIGHT = 384;
const
MemoContent
:
React
.
FC
<
Props
>
=
(
props
:
Props
)
=>
{
const
MemoContent
:
React
.
FC
<
Props
>
=
(
props
:
Props
)
=>
{
const
{
className
,
content
,
onMemoContentClick
,
onMemoContentDoubleClick
}
=
props
;
const
{
className
,
content
,
onMemoContentClick
,
onMemoContentDoubleClick
}
=
props
;
const
{
t
}
=
useTranslation
();
const
[
state
,
setState
]
=
useState
<
State
>
({
const
[
state
,
setState
]
=
useState
<
State
>
({
expandButtonStatus
:
-
1
,
expandButtonStatus
:
-
1
,
});
});
...
@@ -84,7 +86,7 @@ const MemoContent: React.FC<Props> = (props: Props) => {
...
@@ -84,7 +86,7 @@ const MemoContent: React.FC<Props> = (props: Props) => {
{
state
.
expandButtonStatus
!==
-
1
&&
(
{
state
.
expandButtonStatus
!==
-
1
&&
(
<
div
className=
"expand-btn-container"
>
<
div
className=
"expand-btn-container"
>
<
span
className=
{
`btn ${state.expandButtonStatus === 0 ? "expand-btn" : "fold-btn"}`
}
onClick=
{
handleExpandBtnClick
}
>
<
span
className=
{
`btn ${state.expandButtonStatus === 0 ? "expand-btn" : "fold-btn"}`
}
onClick=
{
handleExpandBtnClick
}
>
{
state
.
expandButtonStatus
===
0
?
"Expand"
:
"Fold"
}
{
state
.
expandButtonStatus
===
0
?
t
(
"common.expand"
)
:
t
(
"common.fold"
)
}
<
Icon
.
ChevronRight
className=
"icon-img"
/>
<
Icon
.
ChevronRight
className=
"icon-img"
/>
</
span
>
</
span
>
</
div
>
</
div
>
...
...
web/src/locales/en.json
View file @
5bdf15ae
...
@@ -38,7 +38,9 @@
...
@@ -38,7 +38,9 @@
"yourself"
:
"Yourself"
,
"yourself"
:
"Yourself"
,
"archived-at"
:
"Archived at"
,
"archived-at"
:
"Archived at"
,
"changed"
:
"changed"
,
"changed"
:
"changed"
,
"update-on"
:
"Update on"
"update-on"
:
"Update on"
,
"fold"
:
"Fold"
,
"expand"
:
"Expand"
},
},
"slogan"
:
"An open source, self-hosted knowledge base that works with a SQLite db file."
,
"slogan"
:
"An open source, self-hosted knowledge base that works with a SQLite db file."
,
"auth"
:
{
"auth"
:
{
...
...
web/src/locales/vi.json
View file @
5bdf15ae
...
@@ -38,7 +38,9 @@
...
@@ -38,7 +38,9 @@
"yourself"
:
"Chính bạn"
,
"yourself"
:
"Chính bạn"
,
"archived-at"
:
"Lưu trữ lúc"
,
"archived-at"
:
"Lưu trữ lúc"
,
"changed"
:
"đã thay đổi"
,
"changed"
:
"đã thay đổi"
,
"update-on"
:
"Cập nhật"
"update-on"
:
"Cập nhật"
,
"fold"
:
"Fold"
,
"expand"
:
"Expand"
},
},
"slogan"
:
"Một mã nguồn mở, tự bạn lưu lại mọi thứ bạn biết dựa trên SQLite db."
,
"slogan"
:
"Một mã nguồn mở, tự bạn lưu lại mọi thứ bạn biết dựa trên SQLite db."
,
"auth"
:
{
"auth"
:
{
...
...
web/src/locales/zh.json
View file @
5bdf15ae
...
@@ -38,7 +38,9 @@
...
@@ -38,7 +38,9 @@
"yourself"
:
"你自己"
,
"yourself"
:
"你自己"
,
"archived-at"
:
"归档于"
,
"archived-at"
:
"归档于"
,
"changed"
:
"已更改"
,
"changed"
:
"已更改"
,
"update-on"
:
"更新于"
"update-on"
:
"更新于"
,
"fold"
:
"折叠"
,
"expand"
:
"展开"
},
},
"slogan"
:
"一个开源的、支持私有化部署的碎片化知识卡片管理工具。"
,
"slogan"
:
"一个开源的、支持私有化部署的碎片化知识卡片管理工具。"
,
"auth"
:
{
"auth"
:
{
...
...
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