From 88ade2c0b7bd4e507482415c7665292756be1471 Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 9 Oct 2022 08:54:05 +0800 Subject: [PATCH] chore: update i18n for filter --- web/src/components/CreateShortcutDialog.tsx | 2 +- web/src/helpers/filter.ts | 16 ++++++++-------- web/src/locales/en.json | 8 +++++--- web/src/locales/vi.json | 21 +++++++++++++++++++-- web/src/locales/zh.json | 8 +++++--- 5 files changed, 38 insertions(+), 17 deletions(-) diff --git a/web/src/components/CreateShortcutDialog.tsx b/web/src/components/CreateShortcutDialog.tsx index a4051e8b..d6a32c5c 100644 --- a/web/src/components/CreateShortcutDialog.tsx +++ b/web/src/components/CreateShortcutDialog.tsx @@ -132,7 +132,7 @@ const CreateShortcutDialog: React.FC = (props: Props) => { ); })}
- {t("shortcut-list.new-filter")} + {t("filter.new-filter")}
diff --git a/web/src/helpers/filter.ts b/web/src/helpers/filter.ts index 039c1e6f..667049cd 100644 --- a/web/src/helpers/filter.ts +++ b/web/src/helpers/filter.ts @@ -11,11 +11,11 @@ export const filterConsts = { value: "TAG", operators: [ { - text: "shortcut-list.operator.contains", + text: "filter.operator.contains", value: "CONTAIN", }, { - text: "shortcut-list.operator.not-contains", + text: "filter.operator.not-contains", value: "NOT_CONTAIN", }, ], @@ -25,21 +25,21 @@ export const filterConsts = { value: "TYPE", operators: [ { - text: "shortcut-list.operator.is", + text: "filter.operator.is", value: "IS", }, { - text: "shortcut-list.operator.is-not", + text: "filter.operator.is-not", value: "IS_NOT", }, ], values: [ { - text: "shortcut-list.value.not-tagged", + text: "filter.value.not-tagged", value: "NOT_TAGGED", }, { - text: "shortcut-list.value.linked", + text: "filter.value.linked", value: "LINKED", }, ], @@ -49,11 +49,11 @@ export const filterConsts = { value: "TEXT", operators: [ { - text: "shortcut-list.operator.contains", + text: "filter.operator.contains", value: "CONTAIN", }, { - text: "shortcut-list.operator.not-contains", + text: "filter.operator.not-contains", value: "NOT_CONTAIN", }, ], diff --git a/web/src/locales/en.json b/web/src/locales/en.json index c99b3f7d..d780fbb3 100644 --- a/web/src/locales/en.json +++ b/web/src/locales/en.json @@ -93,10 +93,12 @@ "shortcut-title": "shortcut title", "create-shortcut": "Create Shortcut", "edit-shortcut": "Edit Shortcut", - "new-filter": "New Filter", "eligible-memo": "eligible memo", "fill-previous": "Please fill in previous filter value", - "title-required": "Title is required", + "title-required": "Title is required" + }, + "filter": { + "new-filter": "New Filter", "operator": { "contains": "Contains", "not-contains": "Does not contain", @@ -157,4 +159,4 @@ "copied": "Copied", "succeed-copy-content": "Succeed to copy content to clipboard." } -} \ No newline at end of file +} diff --git a/web/src/locales/vi.json b/web/src/locales/vi.json index 230abdc5..6ae2ef27 100644 --- a/web/src/locales/vi.json +++ b/web/src/locales/vi.json @@ -7,9 +7,11 @@ "repeat-new-password": "Nhập lại mật khẩu mới", "username": "Tên đăng nhập", "save": "Lưu", + "close": "Close", "cancel": "Hủy", "create": "Tạo mới", "change": "Thay đổi", + "confirm": "Confirm", "reset": "Khôi phục", "language": "Ngôn Ngữ", "version": "Phiên bản", @@ -58,7 +60,10 @@ "fetching-data": "đang tải dữ liệu...", "upload": "Tải lên", "preview": "Xem trước", - "copy-link": "Sao chép" + "copy-link": "Sao chép", + "delete-resource": "Delete Resource", + "warning-text": "Are you sure to delete this resource? THIS ACTION IS IRREVERSIABLE❗️", + "linked-amount": "Linked memo amount" }, "archived": { "archived-memos": "Memo đã lưu trữ", @@ -88,11 +93,23 @@ "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", "eligible-memo": "memo đạt chuẩn", "fill-previous": "Vui lòng nhập vào giá trị của bộ lọc trước đó", "title-required": "Tiêu đề là bắt buộc" }, + "filter": { + "new-filter": "Bộ lọc mới", + "operator": { + "contains": "Contains", + "not-contains": "Does not contain", + "is": "Is", + "is-not": "Is Not" + }, + "value": { + "not-tagged": "No tags", + "linked": "Has links" + } + }, "tag-list": { "tip-text": "Nhập `#tag` để tạo mới" }, diff --git a/web/src/locales/zh.json b/web/src/locales/zh.json index a9c1386f..e3f75149 100644 --- a/web/src/locales/zh.json +++ b/web/src/locales/zh.json @@ -93,10 +93,12 @@ "shortcut-title": "捷径标题", "create-shortcut": "创建捷径", "edit-shortcut": "编辑捷径", - "new-filter": "新建过滤器", "eligible-memo": "符合条件的 memo", "fill-previous": "请填写之前的过滤值", - "title-required": "标题是必填项。", + "title-required": "标题是必填项。" + }, + "filter": { + "new-filter": "新建过滤器", "operator": { "contains": "包含", "not-contains": "不包含", @@ -157,4 +159,4 @@ "copied": "Copied", "succeed-copy-content": "Succeed to copy content to clipboard." } -} \ No newline at end of file +}