fix(i18n): improve translations and modal titles for feeds (#1892)
* chore(i18n): update zh-CN locale files and others * update
This commit is contained in:
parent
996629c14c
commit
4186c898c6
|
|
@ -2,6 +2,7 @@ import { Button } from "@follow/components/ui/button/index.js"
|
|||
import type { FeedModel } from "@follow/models/types"
|
||||
import { nextFrame } from "@follow/utils/dom"
|
||||
import type { FC } from "react"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { useNavigate } from "react-router"
|
||||
|
||||
import { getSidebarActiveView } from "~/atoms/sidebar"
|
||||
|
|
@ -16,6 +17,7 @@ import { useResetErrorWhenRouteChange } from "./helper"
|
|||
import { FeedPreview } from "./previews/FeedPreview"
|
||||
|
||||
const FeedFoundCanBeFollowErrorFallback: FC<AppErrorFallbackProps> = ({ resetError, error }) => {
|
||||
const { t } = useTranslation()
|
||||
if (!(error instanceof FeedFoundCanBeFollowError)) {
|
||||
throw error
|
||||
}
|
||||
|
|
@ -45,7 +47,7 @@ const FeedFoundCanBeFollowErrorFallback: FC<AppErrorFallbackProps> = ({ resetErr
|
|||
<Button
|
||||
onClick={() => {
|
||||
present({
|
||||
title: "Add Feed",
|
||||
title: t("feed_form.add_feed"),
|
||||
content: ({ dismiss }) => (
|
||||
<FeedForm
|
||||
asWidget
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ export const DiscoverFeedForm = ({
|
|||
const defaultView = getViewFromRoute(route) || (getSidebarActiveView() as FeedViewType)
|
||||
|
||||
present({
|
||||
title: "Add Feed",
|
||||
title: t("feed_form.add_feed"),
|
||||
content: () => (
|
||||
<FeedForm
|
||||
asWidget
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export function DiscoverForm({ type = "search" }: { type?: string }) {
|
|||
if (info[type].showModal) {
|
||||
const defaultView = getSidebarActiveView() as FeedViewType
|
||||
present({
|
||||
title: "Add Feed",
|
||||
title: t("feed_form.add_feed"),
|
||||
content: () => (
|
||||
<FeedForm
|
||||
asWidget
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
|
|||
import { useLayoutEffect } from "react"
|
||||
import { useForm } from "react-hook-form"
|
||||
import { useHotkeys } from "react-hotkeys-hook"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { z } from "zod"
|
||||
|
||||
import { getSidebarActiveView } from "~/atoms/sidebar"
|
||||
|
|
@ -18,6 +19,7 @@ import { tipcClient } from "~/lib/client"
|
|||
import { FeedForm } from "../discover/feed-form"
|
||||
|
||||
const CmdNPanel = () => {
|
||||
const { t } = useTranslation()
|
||||
const form = useForm({
|
||||
resolver: zodResolver(
|
||||
z.object({
|
||||
|
|
@ -47,7 +49,7 @@ const CmdNPanel = () => {
|
|||
window.analytics?.capture("quick_add_feed", { url, defaultView })
|
||||
|
||||
present({
|
||||
title: "Add Feed",
|
||||
title: t("feed_form.add_feed"),
|
||||
content: () => (
|
||||
<FeedForm
|
||||
asWidget
|
||||
|
|
@ -80,8 +82,8 @@ const CmdNPanel = () => {
|
|||
<FormControl>
|
||||
<input
|
||||
{...field}
|
||||
placeholder="Quick follow a feed, typing feed url here..."
|
||||
className="w-full shrink-0 border-b border-zinc-200 bg-transparent p-4 px-5 text-lg leading-4 dark:border-neutral-700"
|
||||
placeholder={t("quick_add.placeholder")}
|
||||
className="w-full shrink-0 border-zinc-200 bg-transparent p-4 px-5 text-lg leading-4 dark:border-neutral-700"
|
||||
/>
|
||||
</FormControl>
|
||||
</FormItem>
|
||||
|
|
@ -103,10 +105,11 @@ const CmdNPanel = () => {
|
|||
}
|
||||
|
||||
export const CmdNTrigger = () => {
|
||||
const { t } = useTranslation()
|
||||
const { present } = useModalStack()
|
||||
const handler = () => {
|
||||
present({
|
||||
title: "Quick Follow",
|
||||
title: t("quick_add.title"),
|
||||
content: CmdNPanel,
|
||||
CustomModalComponent: PlainModal,
|
||||
overlay: false,
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ export function ActionCard({
|
|||
{conditionIdx === 0 && orConditionIdx !== 0 && (
|
||||
<TableRow className="flex h-16 items-center">
|
||||
<Button disabled variant="outline">
|
||||
Or
|
||||
{t("actions.action_card.or")}
|
||||
</Button>
|
||||
</TableRow>
|
||||
)}
|
||||
|
|
@ -463,7 +463,7 @@ export function ActionCard({
|
|||
{conditionIdx !== orConditions.length - 1 && (
|
||||
<TableRow className="relative flex items-center">
|
||||
<Button disabled variant="outline">
|
||||
And
|
||||
{t("actions.action_card.and")}
|
||||
</Button>
|
||||
</TableRow>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@
|
|||
"feed_claim_modal.tab_rss": "RSS Tag",
|
||||
"feed_claim_modal.title": "Feed Claim",
|
||||
"feed_claim_modal.verify_ownership": "To claim this feed as your own, you need to verify ownership.",
|
||||
"feed_form.add_feed": "Add Feed",
|
||||
"feed_form.add_follow": "Add follow",
|
||||
"feed_form.category": "Category",
|
||||
"feed_form.category_description": "By default, your follows will be grouped by website.",
|
||||
|
|
@ -279,6 +280,8 @@
|
|||
"player.playback_rate": "Playback Rate",
|
||||
"player.unmute": "Unmute",
|
||||
"player.volume": "Volume",
|
||||
"quick_add.placeholder": "Quick follow a feed, typing feed url here...",
|
||||
"quick_add.title": "Quick Follow",
|
||||
"resize.tooltip.double_click_to_collapse": "<b>Double click</b> to collapse",
|
||||
"resize.tooltip.drag_to_resize": "<b>Drag</b> to resize",
|
||||
"search.empty.no_results": "No results found.",
|
||||
|
|
|
|||
|
|
@ -153,9 +153,13 @@
|
|||
"entry_content.web_app_notice": "网页版不支持展示此类型,请下载客户端查看。",
|
||||
"entry_list.zero_unread": "全部已读",
|
||||
"entry_list_header.daily_report": "每日总结",
|
||||
"entry_list_header.grid": "网格布局",
|
||||
"entry_list_header.hide_no_image_items": "隐藏没有图片的条目",
|
||||
"entry_list_header.items": "内容",
|
||||
"entry_list_header.masonry": "砌体布局",
|
||||
"entry_list_header.masonry_column": "布局列数",
|
||||
"entry_list_header.new_entries_available": "有新内容",
|
||||
"entry_list_header.preview_mode": "预览模式",
|
||||
"entry_list_header.refetch": "刷新",
|
||||
"entry_list_header.refresh": "刷新",
|
||||
"entry_list_header.show_all": "显示全部",
|
||||
|
|
@ -186,6 +190,7 @@
|
|||
"feed_claim_modal.tab_rss": "RSS 标签",
|
||||
"feed_claim_modal.title": "认证订阅源",
|
||||
"feed_claim_modal.verify_ownership": "要证明你是此订阅源的所有者,你需要完成所有权认证。",
|
||||
"feed_form.add_feed": "添加订阅源",
|
||||
"feed_form.add_follow": "新增订阅",
|
||||
"feed_form.category": "分类",
|
||||
"feed_form.category_description": "默认情况下,你的订阅将按网站域名分组。",
|
||||
|
|
@ -261,6 +266,7 @@
|
|||
"notify.unfollow_feed_many": "已取消订阅选中的订阅源。",
|
||||
"notify.update_info": "{{app_name}} 已准备好更新!",
|
||||
"notify.update_info_1": "点击重新启动",
|
||||
"notify.update_info_2": "点击重新加载页面",
|
||||
"player.back_10s": "后退 10s",
|
||||
"player.close": "关闭",
|
||||
"player.download": "下载",
|
||||
|
|
@ -274,6 +280,8 @@
|
|||
"player.playback_rate": "播放速度",
|
||||
"player.unmute": "取消静音",
|
||||
"player.volume": "音量",
|
||||
"quick_add.placeholder": "在此输入订阅源地址以快速订阅…",
|
||||
"quick_add.title": "快速订阅",
|
||||
"resize.tooltip.double_click_to_collapse": "<b>双击</b>以折叠",
|
||||
"resize.tooltip.drag_to_resize": "<b>拖动</b>以调整大小",
|
||||
"search.empty.no_results": "搜索结果为空",
|
||||
|
|
@ -333,7 +341,8 @@
|
|||
"sidebar.feed_column.context_menu.rename_category_error": "重命名分类失败",
|
||||
"sidebar.feed_column.context_menu.rename_category_success": "分类重命名成功",
|
||||
"sidebar.select_sort_method": "选择排序方法",
|
||||
"signin.sign_in_to": "登录到",
|
||||
"signin.continue_with": "使用 {{provider}} 登入",
|
||||
"signin.sign_in_to": "登入至",
|
||||
"sync_indicator.disabled": "出于安全原因,已禁用同步",
|
||||
"sync_indicator.offline": "离线",
|
||||
"sync_indicator.synced": "已同步至云端",
|
||||
|
|
@ -379,7 +388,7 @@
|
|||
"words.link": "链接",
|
||||
"words.lists": "列表",
|
||||
"words.load_archived_entries": "加载已归档条目",
|
||||
"words.login": "登录",
|
||||
"words.login": "登入",
|
||||
"words.mint": "Mint",
|
||||
"words.newTab": "新标签页",
|
||||
"words.power": "Power",
|
||||
|
|
@ -396,5 +405,5 @@
|
|||
"words.user": "用户",
|
||||
"words.which.all": "全部",
|
||||
"words.zero_items": "没有内容",
|
||||
"zen.exit": "退出 Zen 模式"
|
||||
"zen.exit": "退出禅定模式"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@
|
|||
"invitation.getCodeMessage": "通过以下方式获取:",
|
||||
"invitation.title": "邀请码",
|
||||
"login.backToWebApp": "返回网页版",
|
||||
"login.logInTo": "登录到 ",
|
||||
"login.continueWith": "使用 {{provider}} 登入",
|
||||
"login.logInTo": "登入至 ",
|
||||
"login.openApp": "打开应用",
|
||||
"login.redirecting": "正在重定向",
|
||||
"login.signOut": "登出",
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
"menu.undo": "撤销",
|
||||
"menu.view": "视图",
|
||||
"menu.window": "窗口",
|
||||
"menu.zenMode": "Zen 模式",
|
||||
"menu.zenMode": "禅定模式",
|
||||
"menu.zoom": "缩放",
|
||||
"menu.zoomIn": "放大",
|
||||
"menu.zoomOut": "缩小"
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
"appearance.reduce_motion.description": "减弱动态效果以提高整体性能并减少电量消耗。",
|
||||
"appearance.reduce_motion.label": "减弱动态效果",
|
||||
"appearance.save": "保存",
|
||||
"appearance.show_dock_badge.label": "在 App 图标上显示",
|
||||
"appearance.show_dock_badge.label": "在应用图标上显示",
|
||||
"appearance.sidebar": "侧边栏",
|
||||
"appearance.sidebar_show_unread_count.label": "在侧边栏显示",
|
||||
"appearance.sidebar_title": "外观",
|
||||
|
|
@ -94,8 +94,8 @@
|
|||
"appearance.unread_count": "未读数",
|
||||
"appearance.use_pointer_cursor.description": "悬停在任何可交互元素上时将光标更改为指针。",
|
||||
"appearance.use_pointer_cursor.label": "使用指针光标",
|
||||
"appearance.zen_mode.description": "Zen 模式是一种防干扰的阅读模式,你可以专注于内容而不受其他干扰。启用 Zen 模式将会隐藏侧边栏。",
|
||||
"appearance.zen_mode.label": "Zen 模式",
|
||||
"appearance.zen_mode.description": "禅定模式是一种不受干扰的阅读模式,让你能够专注于内容而不受任何干扰。启用禅定模式将会隐藏侧边栏。",
|
||||
"appearance.zen_mode.label": "禅定模式",
|
||||
"common.give_star": "<HeartIcon />喜欢我们的产品吗? <Link>在 GitHub 上给我们「标星」吧!</Link>",
|
||||
"data_control.app_cache_limit.description": "应用缓存大小的上限。一旦缓存达到此上限,最早的项目将被删除以释放空间。",
|
||||
"data_control.app_cache_limit.label": "应用缓存限制",
|
||||
|
|
@ -111,6 +111,7 @@
|
|||
"general.auto_group.label": "自动分组",
|
||||
"general.cache": "缓存",
|
||||
"general.data": "数据",
|
||||
"general.data_file.label": "数据文件",
|
||||
"general.data_persist.description": "在本地保留数据以启用离线访问和本地搜索。",
|
||||
"general.data_persist.label": "保留数据以供离线使用",
|
||||
"general.export.button": "导出",
|
||||
|
|
@ -122,12 +123,15 @@
|
|||
"general.group_by_date.description": "按日期对条目进行分组。",
|
||||
"general.group_by_date.label": "按日期分组",
|
||||
"general.language": "语言",
|
||||
"general.launch_at_login": "开机自启动",
|
||||
"general.mark_as_read.hover.description": "鼠标悬停在条目时将自动标记为已读。",
|
||||
"general.launch_at_login": "开机时启动",
|
||||
"general.log_file.button": "显示",
|
||||
"general.log_file.description": "在系统中显示日志文件。",
|
||||
"general.log_file.label": "日志文件",
|
||||
"general.mark_as_read.hover.description": "当鼠标悬停在条目时自动将其标记为已读。",
|
||||
"general.mark_as_read.hover.label": "悬停时标记为已读",
|
||||
"general.mark_as_read.render.description": "条目进入可视区域时自动标记为已读。",
|
||||
"general.mark_as_read.render.label": "在窗口中时标记为已读",
|
||||
"general.mark_as_read.scroll.description": "当条目滚动出窗口时自动标记为已读。",
|
||||
"general.mark_as_read.render.description": "当单级条目(例如社交媒体贴文、图片、视频观看)进入可视区域时自动将其标记为已读。",
|
||||
"general.mark_as_read.render.label": "在可视区域中时标记为已读",
|
||||
"general.mark_as_read.scroll.description": "当条目滚动出可视区域时自动将其标记为已读。",
|
||||
"general.mark_as_read.scroll.label": "滚动时标记为已读",
|
||||
"general.minimize_to_tray.description": "关闭窗口时最小化到系统托盘。",
|
||||
"general.minimize_to_tray.label": "最小化到托盘",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
"keys.layout.showShortcuts": "显示/隐藏快捷键",
|
||||
"keys.layout.toggleSidebar": "显示/隐藏侧边栏",
|
||||
"keys.layout.toggleWideMode": "切换宽屏模式",
|
||||
"keys.layout.zenMode": "Zen 模式",
|
||||
"keys.layout.zenMode": "禅定模式",
|
||||
"keys.misc.quickSearch": "快速搜索",
|
||||
"keys.type.audio": "音频",
|
||||
"keys.type.entries": "条目列表",
|
||||
|
|
|
|||
Loading…
Reference in New Issue