From e13363d2ec94344db7258e30e0dce347d3a713c4 Mon Sep 17 00:00:00 2001 From: kovsu <2583695112@qq.com> Date: Tue, 21 Jan 2025 10:06:25 +0800 Subject: [PATCH] feat(discover): implement localized search results --- apps/renderer/src/modules/discover/form.tsx | 3 +-- locales/app/en.json | 3 +++ locales/app/zh-CN.json | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/renderer/src/modules/discover/form.tsx b/apps/renderer/src/modules/discover/form.tsx index b77a670fde..fb9ae3434f 100644 --- a/apps/renderer/src/modules/discover/form.tsx +++ b/apps/renderer/src/modules/discover/form.tsx @@ -262,8 +262,7 @@ export function DiscoverForm({ type = "search" }: { type?: string }) { {mutation.isSuccess && (
- Found {mutation.data?.length || 0} feed - {mutation.data?.length > 1 && "s"} + {t("discover.search.results", { count: mutation.data?.length || 0 })}
{discoverSearchData?.map((item) => ( diff --git a/locales/app/en.json b/locales/app/en.json index 7fe258c712..2400cdbe2b 100644 --- a/locales/app/en.json +++ b/locales/app/en.json @@ -98,6 +98,9 @@ "discover.preview": "Preview", "discover.rss_hub_route": "RSSHub Route", "discover.rss_url": "RSS URL", + "discover.search.results_one": "Found {{count}} feed", + "discover.search.results_other": "Found {{count}} feeds", + "discover.search.results_zero": "No feeds found", "discover.select_placeholder": "Select", "discover.target.feeds": "Feeds", "discover.target.label": "Search for", diff --git a/locales/app/zh-CN.json b/locales/app/zh-CN.json index 4a50d0c46b..c4a46b4fcc 100644 --- a/locales/app/zh-CN.json +++ b/locales/app/zh-CN.json @@ -98,6 +98,9 @@ "discover.preview": "预览", "discover.rss_hub_route": "RSSHub 路由", "discover.rss_url": "RSS URL", + "discover.search.results_one": "找到 {{count}} 个订阅源", + "discover.search.results_other": "找到 {{count}} 个订阅源", + "discover.search.results_zero": "搜索结果为空", "discover.select_placeholder": "选择", "discover.target.feeds": "订阅源", "discover.target.label": "搜索",