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: update i18n structures
Steven1591fdf61c9e
diff --git a/web/src/components/ArchivedMemo.tsx b/web/src/components/ArchivedMemo.tsxindex 7b237ba49..c378fddae 100644--- a/web/src/components/ArchivedMemo.tsx+++ b/web/src/components/ArchivedMemo.tsx@@ -1,4 +1,3 @@-import { IMAGE_URL_REG } from "../helpers/marked";import * as utils from "../helpers/utils";import useI18n from "../hooks/useI18n";import useToggle from "../hooks/useToggle";@@ -44,7 +43,7 @@ const ArchivedMemo: React.FC<Props> = (props: Props) => {rowStatus: "NORMAL",});await memoService.fetchMemos();- toastHelper.info(t("common.restored-successfully"));+ toastHelper.info(t("message.restored-successfully"));} catch (error: any) {console.error(error);toastHelper.error(error.response.data.message);diff --git a/web/src/components/ChangeMemoCreatedTsDialog.tsx b/web/src/components/ChangeMemoCreatedTsDialog.tsxindex fd0f31871..cc2ddf864 100644--- a/web/src/components/ChangeMemoCreatedTsDialog.tsx+++ b/web/src/components/ChangeMemoCreatedTsDialog.tsx@@ -23,7 +23,7 @@ const ChangeMemoCreatedTsDialog: React.FC<Props> = (props: Props) => {const datetime = dayjs(memo.createdTs).format("YYYY-MM-DDTHH:mm");setCreatedAt(datetime);} else {- toastHelper.error(t("common.memo-not-found"));+ toastHelper.error(t("message.memo-not-found"));destroy();}}, []);@@ -42,7 +42,7 @@ const ChangeMemoCreatedTsDialog: React.FC<Props> = (props: Props) => {const createdTs = dayjs(createdAt).unix();if (createdTs > nowTs) {- toastHelper.error(t("common.invalid-created-datetime"));+ toastHelper.error(t("message.invalid-created-datetime"));return;}@@ -51,7 +51,7 @@ const ChangeMemoCreatedTsDialog: React.FC<Props> = (props: Props) => {id: memoId,createdTs,});- toastHelper.info(t("common.memo-updated-datetime"));+ toastHelper.info(t("message.memo-updated-datetime"));handleCloseBtnClick();} catch (error: any) {console.error(error);@@ -62,7 +62,7 @@ const ChangeMemoCreatedTsDialog: React.FC<Props> = (props: Props) => {return (<><div className="dialog-header-container">- <p className="title-text">{t("common.change-memo-created-time")}</p>+ <p className="title-text">{t("message.change-memo-created-time")}</p><button className="btn close-btn" onClick={handleCloseBtnClick}><Icon.X /></button>diff --git a/web/src/components/ChangePasswordDialog.tsx b/web/src/components/ChangePasswordDialog.tsxindex 6d3ca3a9b..a565d045e 100644--- a/web/src/components/ChangePasswordDialog.tsx+++ b/web/src/components/ChangePasswordDialog.tsx@@ -41,12 +41,12 @@ const ChangePasswordDialog: React.FC<Props> = ({ destroy }: Props) => {const handleSaveBtnClick = async () => {if (newPassword === "" || newPasswordAgain === "") {- toastHelper.error(t("common.fill-all"));+ toastHelper.error(t("message.fill-all"));return;}if (newPassword !== newPasswordAgain) {- toastHelper.error(t("common.new-password-not-match"));+ toastHelper.error(t("message.new-password-not-match"));setNewPasswordAgain("");return;}diff --git a/web/src/components/CreateShortcutDialog.tsx b/web/src/components/CreateShortcutDialog.tsxindex afb60dc06..ab40200bd 100644--- a/web/src/components/CreateShortcutDialog.tsx+++ b/web/src/components/CreateShortcutDialog.tsx@@ -113,7 +113,7 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {<inputclassName="title-input"type="text"- placeholder={t("common.shortcut-title")}+ placeholder={t("shortcut-list.shortcut-title")}value={title}onChange={handleTitleInputChange}/>diff --git a/web/src/components/Memo.tsx b/web/src/components/Memo.tsxindex 866bd4698..fa6858eb7 100644--- a/web/src/components/Memo.tsx+++ b/web/src/components/Memo.tsx@@ -105,7 +105,7 @@ const Memo: React.FC<Props> = (props: Props) => {if (memoTemp) {showMemoCardDialog(memoTemp);} else {- toastHelper.error(t("common.memo-not-found"));+ toastHelper.error(t("message.memo-not-found"));targetEl.classList.remove("memo-link-text");}} else if (targetEl.className === "tag-span") {diff --git a/web/src/components/MemoCardDialog.tsx b/web/src/components/MemoCardDialog.tsxindex 4de8e29de..7b89fc2d0 100644--- a/web/src/components/MemoCardDialog.tsx+++ b/web/src/components/MemoCardDialog.tsx@@ -97,7 +97,7 @@ const MemoCardDialog: React.FC<Props> = (props: Props) => {setLinkedMemos([]);setMemo(nextMemo);} else {- toastHelper.error(t("common.memo-not-found"));+ toastHelper.error(t("message.memo-not-found"));targetEl.classList.remove("memo-link-text");}}diff --git a/web/src/components/MemoList.tsx b/web/src/components/MemoList.tsxindex b39956f11..6ec896aa2 100644--- a/web/src/components/MemoList.tsx+++ b/web/src/components/MemoList.tsx@@ -108,7 +108,7 @@ const MemoList = () => {))}<Only when={!isFetching}><div className="status-text-container">- <p className="status-text">{sortedMemos.length === 0 ? t("common.no-memos") : showMemoFilter ? "" : t("common.memos-ready")}</p>+ <p className="status-text">{sortedMemos.length === 0 ? t("message.no-memos") : showMemoFilter ? "" : t("message.memos-ready")}</p></div></Only></div>diff --git a/web/src/components/Settings/MemberSection.tsx b/web/src/components/Settings/MemberSection.tsxindex 8644eb49b..be1bee01f 100644--- a/web/src/components/Settings/MemberSection.tsx+++ b/web/src/components/Settings/MemberSection.tsx@@ -48,7 +48,7 @@ const PreferencesSection = () => {const handleCreateUserBtnClick = async () => {if (isEmpty(state.createUserEmail) || isEmpty(state.createUserPassword)) {- toastHelper.error(t("common.fill-form"));+ toastHelper.error(t("message.fill-form"));return;}diff --git a/web/src/components/ShareMemoImageDialog.tsx b/web/src/components/ShareMemoImageDialog.tsxindex 786d68dbc..e76489532 100644--- a/web/src/components/ShareMemoImageDialog.tsx+++ b/web/src/components/ShareMemoImageDialog.tsx@@ -59,7 +59,7 @@ const ShareMemoImageDialog: React.FC<Props> = (props: Props) => {const handleImageOnLoad = (event: React.SyntheticEvent<HTMLImageElement>) => {if (event.type === "error") {- toastHelper.error(t("common.image-load-failed"));+ toastHelper.error(t("message.image-load-failed"));(event.target as HTMLImageElement).remove();}setImgAmount(imgAmount - 1);diff --git a/web/src/locales/en.json b/web/src/locales/en.jsonindex 81bd29b28..0f25eaab3 100644--- a/web/src/locales/en.json+++ b/web/src/locales/en.json@@ -30,27 +30,12 @@"back-to-home": "Back to Home","type": "Type","shortcuts": "Shortcuts",- "shortcut-title": "shortcut title","title": "Title","filter": "Filter","tags": "Tags",- "no-memos": "no memos 🌃",- "memos-ready": "all memos are ready 🎉","yourself": "Yourself","archived-at": "Archived at",- "restored-successfully": "Restored successfully",- "memo-updated-datetime":"Memo created datetime changed.",- "invalid-created-datetime": "Invalid created datetime.",- "change-memo-created-time": "Change memo created time",- "memo-not-found": "Memo not found.",- "fill-all": "Please fill in all fields.",- "new-password-not-match": "New passwords do not match.",- "changed": "changed",- "image-load-failed": "Image load failed",- "fill-form": "Please fill out this form",- "login-failed": "Login failed",- "signup-failed": "Signup failed",- "user-not-found": "User not found"+ "changed": "changed"},"slogan": "An open source, self-hosted knowledge base that works with a SQLite db file.","auth": {@@ -94,6 +79,7 @@"fetching-data": "fetching data..."},"shortcut-list": {+ "shortcut-title": "shortcut title","create-shortcut": "Create Shortcut","edit-shortcut": "Edit Shortcut","new-filter": "New Filter",@@ -122,5 +108,21 @@"member-section": {"create-a-member": "Create a member"}+ },+ "message": {+ "no-memos": "no memos 🌃",+ "memos-ready": "all memos are ready 🎉",+ "restored-successfully": "Restored successfully",+ "memo-updated-datetime": "Memo created datetime changed.",+ "invalid-created-datetime": "Invalid created datetime.",+ "change-memo-created-time": "Change memo created time",+ "memo-not-found": "Memo not found.",+ "fill-all": "Please fill in all fields.",+ "new-password-not-match": "New passwords do not match.",+ "image-load-failed": "Image load failed",+ "fill-form": "Please fill out this form",+ "login-failed": "Login failed",+ "signup-failed": "Signup failed",+ "user-not-found": "User not found"}}diff --git a/web/src/locales/vi.json b/web/src/locales/vi.jsonindex aabdea33f..30d996e8f 100644--- a/web/src/locales/vi.json+++ b/web/src/locales/vi.json@@ -30,27 +30,12 @@"back-to-home": "Quay về trang chủ","type": "Kiểu","shortcuts": "Lối tắt",- "shortcut-title": "Tên lối tắt","title": "Tên","filter": "Bộ lọc","tags": "Thẻ",- "no-memos": "Không có memo nào 🌃",- "memos-ready": "Tất cả memo ở đây rồi 🎉","yourself": "Của bạn","archived-at": "Lưu trữ lúc",- "restored-successfully": "Đã khôi phục thành công",- "memo-updated-datetime":"Memo đã thay đổi ngày giờ tạo.",- "invalid-created-datetime": "Ngày giờ tạo không hợp lệ.",- "change-memo-created-time": "Thay đổi thời gian tạo memo",- "memo-not-found": "Không tìm thấy memo.",- "fill-all": "Vui lòng nhập tất cả các mục.",- "new-password-not-match": "Mật khẩu mới không giống nhau.",- "changed": "đã thay đổi",- "image-load-failed": "Tải ảnh bị lỗi",- "fill-form": "Please fill out this form",- "login-failed": "Đăng nhập thất bại",- "signup-failed": "Đăng ký thất bại",- "user-not-found": "Không tìm thấy người dùng này"+ "changed": "đã thay đổi"},"slogan": "Một mã nguồn mở, tự lưu lại mọi thứ bạn biết dựa trên SQLite db.","auth": {@@ -94,6 +79,7 @@"fetching-data": "đang tải dữ liệu..."},"shortcut-list": {+ "shortcut-title": "Tên lối tắt","create-shortcut": "Tạo lối tắt","edit-shortcut": "Chỉnh sửa lối tắt","new-filter": "Bộ lọc mới",@@ -122,5 +108,21 @@"member-section": {"create-a-member": "Tạo một thành viên"}+ },+ "message": {+ "no-memos": "Không có memo nào 🌃",+ "memos-ready": "Tất cả memo ở đây rồi 🎉",+ "restored-successfully": "Đã khôi phục thành công",+ "memo-updated-datetime": "Memo đã thay đổi ngày giờ tạo.",+ "invalid-created-datetime": "Ngày giờ tạo không hợp lệ.",+ "change-memo-created-time": "Thay đổi thời gian tạo memo",+ "memo-not-found": "Không tìm thấy memo.",+ "fill-all": "Vui lòng nhập tất cả các mục.",+ "new-password-not-match": "Mật khẩu mới không giống nhau.",+ "image-load-failed": "Tải ảnh bị lỗi",+ "fill-form": "Please fill out this form",+ "login-failed": "Đăng nhập thất bại",+ "signup-failed": "Đăng ký thất bại",+ "user-not-found": "Không tìm thấy người dùng này"}}diff --git a/web/src/locales/zh.json b/web/src/locales/zh.jsonindex b384b0378..3448f9d78 100644--- a/web/src/locales/zh.json+++ b/web/src/locales/zh.json@@ -30,27 +30,12 @@"back-to-home": "回到主页","type": "类型","shortcuts": "捷径",- "shortcut-title": "捷径标题","title": "标题","filter": "过滤器","tags": "全部标签",- "no-memos": "没有 memo 了 🌃",- "memos-ready": "所有 memo 已就绪 🎉","yourself": "你自己","archived-at": "归档于",- "restored-successfully": "恢复成功",- "memo-updated-datetime": "Memo创建日期时间已更改。",- "invalid-created-datetime": "创建的日期时间无效。",- "change-memo-created-time": "更改Memo创建时间",- "memo-not-found": "找不到Memo。",- "fill-all": "请填写所有字段。",- "new-password-not-match": "新密码不匹配。",- "changed": "已更改",- "image-load-failed": "图片加载失败",- "fill-form": "请填写此表单",- "login-failed": "登录失败",- "signup-failed": "注册失败",- "user-not-found": "未找到用户"+ "changed": "已更改"},"slogan": "一个开源的、支持私有化部署的碎片化知识卡片管理工具。","auth": {@@ -94,6 +79,7 @@"fetching-data": "请求数据中..."},"shortcut-list": {+ "shortcut-title": "捷径标题","create-shortcut": "创建捷径","edit-shortcut": "编辑捷径","new-filter": "新建过滤器",@@ -122,5 +108,21 @@"member-section": {"create-a-member": "创建成员"}+ },+ "message": {+ "no-memos": "没有 memo 了 🌃",+ "memos-ready": "所有 memo 已就绪 🎉",+ "restored-successfully": "恢复成功",+ "memo-updated-datetime": "Memo创建日期时间已更改。",+ "invalid-created-datetime": "创建的日期时间无效。",+ "change-memo-created-time": "更改Memo创建时间",+ "memo-not-found": "找不到Memo。",+ "fill-all": "请填写所有字段。",+ "new-password-not-match": "新密码不匹配。",+ "image-load-failed": "图片加载失败",+ "fill-form": "请填写此表单",+ "login-failed": "登录失败",+ "signup-failed": "注册失败",+ "user-not-found": "未找到用户"}}diff --git a/web/src/pages/Auth.tsx b/web/src/pages/Auth.tsxindex 6125a5b0d..dfbcd0a09 100644--- a/web/src/pages/Auth.tsx+++ b/web/src/pages/Auth.tsx@@ -70,7 +70,7 @@ const Auth = () => {if (user) {locationService.replaceHistory("/");} else {- toastHelper.error(t("common.login-failed"));+ toastHelper.error(t("message.login-failed"));}} catch (error: any) {console.error(error);diff --git a/web/src/pages/Home.tsx b/web/src/pages/Home.tsxindex e8f1b6716..0f93ff2aa 100644--- a/web/src/pages/Home.tsx+++ b/web/src/pages/Home.tsx@@ -31,7 +31,7 @@ function Home() {if (userService.isVisitorMode()) {if (!owner) {- toastHelper.error(t("common.user-not-found"));+ toastHelper.error(t("message.user-not-found"));}} else {if (!user) {