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 common locales
Steven54db6eda04e1
diff --git a/web/src/components/ArchivedMemo.tsx b/web/src/components/ArchivedMemo.tsxindex 87a8db37a..742ebd4cf 100644--- a/web/src/components/ArchivedMemo.tsx+++ b/web/src/components/ArchivedMemo.tsx@@ -21,7 +21,6 @@ const ArchivedMemo: React.FC<Props> = (props: Props) => {};const { t } = useI18n();const [showConfirmDeleteBtn, toggleConfirmDeleteBtn] = useToggle(false);- const imageUrls = Array.from(memo.content.match(IMAGE_URL_REG) ?? []).map((s) => s.replace(IMAGE_URL_REG, "$1"));const handleDeleteMemoClick = async () => {if (showConfirmDeleteBtn) {diff --git a/web/src/components/CreateShortcutDialog.tsx b/web/src/components/CreateShortcutDialog.tsxindex 29fb0b876..9185dcbad 100644--- a/web/src/components/CreateShortcutDialog.tsx+++ b/web/src/components/CreateShortcutDialog.tsx@@ -101,7 +101,7 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {<div className="dialog-header-container"><p className="title-text"><span className="icon-text">🚀</span>- {shortcutId ? t("common.edit-shortcut") : t("common.create-shortcut")}+ {shortcutId ? t("shortcut-list.edit-shortcut") : t("shortcut-list.create-shortcut")}</p><button className="btn close-btn" onClick={destroy}><Icon.X />@@ -113,7 +113,7 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {<input className="title-input" type="text" placeholder="shortcut title" value={title} onChange={handleTitleInputChange} /></div><div className="form-item-container filter-form-container">- <span className="normal-text">{t("common.filters")}</span>+ <span className="normal-text">{t("common.filter")}</span><div className="filters-wrapper">{filters.map((f, index) => {return (@@ -127,7 +127,7 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {);})}<div className="create-filter-btn" onClick={handleAddFilterBenClick}>- {t("common.new-filter")}+ {t("shortcut-list.new-filter")}</div></div></div>@@ -136,7 +136,7 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {<div></div><div className="btns-container"><span className={`tip-text ${filters.length === 0 && "hidden"}`}>- <strong>{shownMemoLength}</strong> {t("common.eligible-memo")}+ <strong>{shownMemoLength}</strong> {t("shortcut-list.eligible-memo")}</span><button className={`btn save-btn ${requestState.isLoading ? "requesting" : ""}`} onClick={handleSaveBtnClick}>{t("common.save")}diff --git a/web/src/components/SearchBar.tsx b/web/src/components/SearchBar.tsxindex 27bf234e4..a50d92b97 100644--- a/web/src/components/SearchBar.tsx+++ b/web/src/components/SearchBar.tsx@@ -30,9 +30,9 @@ const SearchBar = () => {</div><div className="quickly-action-wrapper"><div className="quickly-action-container">- <p className="title-text">{t("common.quickly-filter")}</p>+ <p className="title-text">{t("search.quickly-filter").toUpperCase()}</p><div className="section-container types-container">- <span className="section-text">{t("common.types")}:</span>+ <span className="section-text">{t("common.type").toUpperCase()}:</span><div className="values-container">{memoSpecialTypes.map((t, idx) => {return (diff --git a/web/src/labs/i18n/useI18n.ts b/web/src/labs/i18n/useI18n.tsindex 0819590bf..cfa6f0d7a 100644--- a/web/src/labs/i18n/useI18n.ts+++ b/web/src/labs/i18n/useI18n.ts@@ -21,7 +21,7 @@ const useI18n = () => {};}, []);- const translate = (key: string) => {+ const translate = (key: string): string => {const keys = key.split(".");let value = resources[locale];for (const k of keys) {diff --git a/web/src/locales/en.json b/web/src/locales/en.jsonindex 30b941002..8d8af0e9a 100644--- a/web/src/locales/en.json+++ b/web/src/locales/en.json@@ -26,17 +26,11 @@"sign-in": "Sign in","sign-out": "Sign out","back-to-home": "Back to Home",+ "type": "Type","shortcuts": "Shortcuts",- "create-shortcut" : "Create Shortcut",- "edit-shortcut": "Edit Shortcut","title": "Title","filter": "Filter",- "filters": "Filters",- "new-filter": "New Filter",- "eligible-memo": "eligible memo",- "tags": "Tags",- "quickly-filter": "QUICKLY FILTER",- "types": "TYPE"+ "tags": "Tags"},"slogan": "An open source, self-hosted knowledge base that works with a SQLite db file.","auth": {@@ -77,9 +71,18 @@"memo-list": {"fetching-data": "fetching data..."},+ "shortcut-list": {+ "create-shortcut": "Create Shortcut",+ "edit-shortcut": "Edit Shortcut",+ "new-filter": "New Filter",+ "eligible-memo": "eligible memo"+ },"tag-list": {"tip-text": "Enter `#tag ` to create"},+ "search": {+ "quickly-filter": "Quickly filter"+ },"setting": {"my-account": "My Account","preference": "Preference",@@ -95,4 +98,4 @@"create-a-member": "Create a member"}}-}\ No newline at end of file+}diff --git a/web/src/locales/zh.json b/web/src/locales/zh.jsonindex d1273fde5..173567eaf 100644--- a/web/src/locales/zh.json+++ b/web/src/locales/zh.json@@ -26,17 +26,11 @@"sign-in": "登录","sign-out": "退出登录","back-to-home": "回到主页",- "shortcuts": "快捷方式",- "create-shortcut" : "创建快捷方式",- "edit-shortcut": "编辑快捷方式",+ "type": "类型",+ "shortcuts": "捷径","title": "标题",- "filter": "过滤",- "filters": "全部过滤",- "new-filter": "新建过滤",- "eligible-memo": "符合条件的memo",- "tags": "全部标签",- "quickly-filter": "快速过滤",- "types": "类型"+ "filter": "过滤器",+ "tags": "全部标签"},"slogan": "一个开源的、支持私有化部署的碎片化知识卡片管理工具。","auth": {@@ -77,9 +71,18 @@"memo-list": {"fetching-data": "请求数据中..."},+ "shortcut-list": {+ "create-shortcut": "创建捷径",+ "edit-shortcut": "编辑捷径",+ "new-filter": "新建过滤器",+ "eligible-memo": "符合条件的 memo"+ },"tag-list": {"tip-text": "输入`#tag `来创建标签"},+ "search": {+ "quickly-filter": "快速过滤"+ },"setting": {"my-account": "我的账号","preference": "偏好设置",@@ -95,4 +98,4 @@"create-a-member": "创建成员"}}-}\ No newline at end of file+}