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 for memo visibility (#233)
boojack02c26d5bb4f3
diff --git a/web/src/components/MemoCardDialog.tsx b/web/src/components/MemoCardDialog.tsxindex a38b7204b..28113cab4 100644--- a/web/src/components/MemoCardDialog.tsx+++ b/web/src/components/MemoCardDialog.tsx@@ -33,6 +33,12 @@ const MemoCardDialog: React.FC<Props> = (props: Props) => {});const [linkMemos, setLinkMemos] = useState<LinkedMemo[]>([]);const [linkedMemos, setLinkedMemos] = useState<LinkedMemo[]>([]);+ const visibilitySelectorItems = VISIBILITY_SELECTOR_ITEMS.map((item) => {+ return {+ value: item.value,+ text: t(`memo.visibility.${item.text.toLowerCase()}`),+ };+ });useEffect(() => {const fetchLinkedMemos = async () => {@@ -148,7 +154,7 @@ const MemoCardDialog: React.FC<Props> = (props: Props) => {<Icon.Eye className="icon-img" /><SelectorclassName="visibility-selector"- dataSource={VISIBILITY_SELECTOR_ITEMS}+ dataSource={visibilitySelectorItems}value={memo.visibility}handleValueChanged={(value) => handleVisibilitySelectorChange(value as Visibility)}/>diff --git a/web/src/components/Settings/PreferencesSection.tsx b/web/src/components/Settings/PreferencesSection.tsxindex c3fb71957..e9aa1f60a 100644--- a/web/src/components/Settings/PreferencesSection.tsx+++ b/web/src/components/Settings/PreferencesSection.tsx@@ -34,6 +34,12 @@ const editorFontStyleSelectorItems = [const PreferencesSection = () => {const { t } = useTranslation();const { setting } = useAppSelector((state) => state.user.user as User);+ const visibilitySelectorItems = VISIBILITY_SELECTOR_ITEMS.map((item) => {+ return {+ value: item.value,+ text: t(`memo.visibility.${item.text.toLowerCase()}`),+ };+ });const handleLocaleChanged = async (value: string) => {await userService.upsertUserSetting("locale", value);@@ -61,7 +67,7 @@ const PreferencesSection = () => {<SelectorclassName="ml-2 w-32"value={setting.memoVisibility}- dataSource={VISIBILITY_SELECTOR_ITEMS}+ dataSource={visibilitySelectorItems}handleValueChanged={handleDefaultMemoVisibilityChanged}/></label>diff --git a/web/src/locales/en.json b/web/src/locales/en.jsonindex 90db3b787..ee59bcaef 100644--- a/web/src/locales/en.json+++ b/web/src/locales/en.json@@ -73,7 +73,12 @@"cant-empty": "Content can't be empty"},"memo": {- "view-story": "View Story"+ "view-story": "View Story",+ "visibility": {+ "private": "Private",+ "protected": "Protected",+ "public": "Public"+ }},"memo-list": {"fetching-data": "fetching data..."diff --git a/web/src/locales/vi.json b/web/src/locales/vi.jsonindex 1afbd865a..3467dc6d5 100644--- a/web/src/locales/vi.json+++ b/web/src/locales/vi.json@@ -73,7 +73,12 @@"cant-empty": "Nội dung không thể trống"},"memo": {- "view-story": "Xem nội dung"+ "view-story": "Xem nội dung",+ "visibility": {+ "private": "Private",+ "protected": "Protected",+ "public": "Public"+ }},"memo-list": {"fetching-data": "đang tải dữ liệu..."diff --git a/web/src/locales/zh.json b/web/src/locales/zh.jsonindex 91e91cb07..0e30eecb4 100644--- a/web/src/locales/zh.json+++ b/web/src/locales/zh.json@@ -73,7 +73,12 @@"cant-empty": "Content can't be empty"},"memo": {- "view-story": "查看详情"+ "view-story": "查看详情",+ "visibility": {+ "private": "仅自己可见",+ "protected": "对所有用户公开",+ "public": "对互联网公开"+ }},"memo-list": {"fetching-data": "请求数据中..."