Skip to content

Commit

Permalink
feat(discover): implement localized search results
Browse files Browse the repository at this point in the history
  • Loading branch information
kovsu committed Jan 21, 2025
1 parent aa5d5f5 commit e13363d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions apps/renderer/src/modules/discover/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,7 @@ export function DiscoverForm({ type = "search" }: { type?: string }) {
{mutation.isSuccess && (
<div className="mt-8 w-full max-w-lg">
<div className="mb-4 text-zinc-500">
Found {mutation.data?.length || 0} feed
{mutation.data?.length > 1 && "s"}
{t("discover.search.results", { count: mutation.data?.length || 0 })}
</div>
<div className="space-y-6 text-sm">
{discoverSearchData?.map((item) => (
Expand Down
3 changes: 3 additions & 0 deletions locales/app/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions locales/app/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "搜索",
Expand Down

0 comments on commit e13363d

Please sign in to comment.