Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
chore: fold/expand i18n (#400)
winwin20115bdf15aecec5
diff --git a/web/src/components/MemoContent.tsx b/web/src/components/MemoContent.tsxindex 11a963cfa..f45e55579 100644--- a/web/src/components/MemoContent.tsx+++ b/web/src/components/MemoContent.tsx@@ -1,4 +1,5 @@import { useEffect, useRef, useState } from "react";+import { useTranslation } from "react-i18next";import { marked } from "../labs/marked";import Icon from "./Icon";import "../less/memo-content.less";@@ -29,6 +30,7 @@ const MAX_MEMO_CONTAINER_HEIGHT = 384;const MemoContent: React.FC<Props> = (props: Props) => {const { className, content, onMemoContentClick, onMemoContentDoubleClick } = props;+ const { t } = useTranslation();const [state, setState] = useState<State>({expandButtonStatus: -1,});@@ -84,7 +86,7 @@ const MemoContent: React.FC<Props> = (props: Props) => {{state.expandButtonStatus !== -1 && (<div className="expand-btn-container"><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" /></span></div>diff --git a/web/src/locales/en.json b/web/src/locales/en.jsonindex db87e0f72..87f98d8dc 100644--- a/web/src/locales/en.json+++ b/web/src/locales/en.json@@ -38,7 +38,9 @@"yourself": "Yourself","archived-at": "Archived at","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.","auth": {@@ -171,4 +173,4 @@"resource-filename-updated": "Resource filename changed.","invalid-resource-filename": "Invalid filename."}-}+}\ No newline at end of filediff --git a/web/src/locales/vi.json b/web/src/locales/vi.jsonindex 1d3336a57..51d59b146 100644--- a/web/src/locales/vi.json+++ b/web/src/locales/vi.json@@ -38,7 +38,9 @@"yourself": "Chính bạn","archived-at": "Lưu trữ lúc","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.","auth": {@@ -171,4 +173,4 @@"resource-filename-updated": "Tên tệp tài nguyên đã thay đổi.","invalid-resource-filename": "Tên tệp không hợp lệ."}-}+}\ No newline at end of filediff --git a/web/src/locales/zh.json b/web/src/locales/zh.jsonindex 883411a08..3073eba7d 100644--- a/web/src/locales/zh.json+++ b/web/src/locales/zh.json@@ -38,7 +38,9 @@"yourself": "你自己","archived-at": "归档于","changed": "已更改",- "update-on": "更新于"+ "update-on": "更新于",+ "fold": "折叠",+ "expand": "展开"},"slogan": "一个开源的、支持私有化部署的碎片化知识卡片管理工具。","auth": {@@ -171,4 +173,4 @@"resource-filename-updated": "资源文件名更改成功。","invalid-resource-filename": "无效的资源文件名"}-}+}\ No newline at end of file