feat(desktop): i18n for trending

This commit is contained in:
DIYgod 2025-05-04 12:02:30 +08:00
parent 7a8a092c63
commit d8e6035a66
No known key found for this signature in database
3 changed files with 11 additions and 4 deletions

View File

@ -14,7 +14,7 @@ import { FeedCard } from "../discover/feed-card"
const LanguageOptions = [
{
label: "All",
label: "words.all",
value: "all",
},
{
@ -31,7 +31,7 @@ type Language = (typeof LanguageOptions)[number]["value"]
const viewOptions = [
{
label: "All",
label: "words.all",
value: "all",
},
...views.map((view) => ({
@ -90,7 +90,7 @@ export function Trending({
</div>
<div className={cn("flex gap-4", center && "center")}>
<div className="flex items-center">
<span className="text-text text-sm font-medium">Language:</span>
<span className="text-text shrink-0 text-sm font-medium">{t("words.language")}:</span>
<ResponsiveSelect
value={selectedLang}
onValueChange={(value) => {
@ -99,10 +99,11 @@ export function Trending({
triggerClassName="h-8 rounded border-0"
size="sm"
items={LanguageOptions}
renderItem={(item) => <>{tCommon(item.label as any)}</>}
/>
</div>
<div className="flex items-center">
<span className="text-text text-sm font-medium">View:</span>
<span className="text-text shrink-0 text-sm font-medium">{t("words.view")}:</span>
<ResponsiveSelect
value={selectedView}
onValueChange={(value: string) => {

View File

@ -406,6 +406,7 @@
"words.achievement": "Achievements",
"words.actions": "Actions",
"words.add": "Add",
"words.all": "All",
"words.boost": "Boost",
"words.browser": "Browser",
"words.categories": "Categories",
@ -436,6 +437,7 @@
"words.undo": "Undo",
"words.unread": "Unread",
"words.user": "User",
"words.view": "View",
"words.which.all": "all",
"words.zero_items": "Zero items",
"zen.exit": "Exit Zen Mode"

View File

@ -253,6 +253,8 @@
"new_user_guide.step.behavior.unread_question.option1": "主动:显示时自动标记为已读。",
"new_user_guide.step.behavior.unread_question.option2": "平衡:悬停或滚出视野时自动标记为已读。",
"new_user_guide.step.behavior.unread_question.option3": "被动:仅在点击时标记为已读。",
"new_user_guide.step.discover.description": "你也可以稍后在“发现”中找到它们。",
"new_user_guide.step.discover.title": "为你推荐",
"new_user_guide.step.features.actions.description": "自动化规则允许你对不同的订阅执行不同的操作。\n- 使用 AI 进行总结或翻译\n- 配置阅读条目的方式\n- 启用新条目的通知或静音\n- 重写或屏蔽特定条目\n- 将新条目发送到 webhook 地址",
"new_user_guide.step.features.integration.description": "集成允许你将条目保存到其他服务。目前支持的服务有:\n- Eagle\n- Readwise\n- Instapaper\n- Obsidian\n- Outline\n- Readeck",
"new_user_guide.step.migrate.description": "您也可以稍后在“发现”中导入它们。",
@ -402,6 +404,7 @@
"words.achievement": "成就",
"words.actions": "自动化",
"words.add": "添加",
"words.all": "全部",
"words.boost": "助力",
"words.browser": "浏览器",
"words.confirm": "确认",
@ -431,6 +434,7 @@
"words.undo": "撤销",
"words.unread": "未读",
"words.user": "用户",
"words.view": "视图",
"words.which.all": "全部",
"words.zero_items": "没有内容",
"zen.exit": "退出禅定模式"