feat(desktop): i18n supports for feeds settings (#4192)

This commit is contained in:
Konv Suu
2025-07-17 11:31:58 +08:00
committed by GitHub
parent f2656ccf15
commit e3e9fbfb93
4 changed files with 50 additions and 23 deletions
@@ -177,7 +177,7 @@ const SubscriptionFeedsSection = () => {
className="hover:text-text ml-4 text-left transition-colors"
onClick={() => handleSort("view")}
>
View
{t("feeds.tableHeaders.view")}
{sortField === "view" && (
<span className="ml-1">{sortDirection === "asc" ? "↑" : "↓"}</span>
)}
@@ -187,7 +187,7 @@ const SubscriptionFeedsSection = () => {
onClick={() => handleSort("date")}
type="button"
>
Subscribed Date
{t("feeds.tableHeaders.date")}
{sortField === "date" && (
<span className="ml-1">{sortDirection === "asc" ? "↑" : "↓"}</span>
)}
@@ -197,7 +197,7 @@ const SubscriptionFeedsSection = () => {
onClick={() => handleSort("subscriptionCount")}
type="button"
>
Followers
{t("feeds.tableHeaders.followers")}
{sortField === "subscriptionCount" && (
<span className="ml-1">{sortDirection === "asc" ? "↑" : "↓"}</span>
)}
@@ -207,7 +207,7 @@ const SubscriptionFeedsSection = () => {
onClick={() => handleSort("updatesPerWeek")}
type="button"
>
Updates
{t("feeds.tableHeaders.updatesPerWeek")}
{sortField === "updatesPerWeek" && (
<span className="ml-1">{sortDirection === "asc" ? "↑" : "↓"}</span>
)}
@@ -235,13 +235,13 @@ const SubscriptionFeedsSection = () => {
className="sticky bottom-16 mt-4 flex justify-center"
>
<div className="text-text-secondary bg-material-opaque rounded-md px-4 py-2 text-sm">
{selectedFeeds.size} item(s) selected
{t("feeds.tableSelected.item", { count: selectedFeeds.size })}
<button
className="text-accent cursor-button ml-3 text-xs"
type="button"
onClick={() => setSelectedFeeds(new Set())}
>
Clear
{t("feeds.tableSelected.clear")}
</button>
</div>
</m.div>
@@ -256,7 +256,7 @@ const SubscriptionFeedsSection = () => {
<DropdownMenu>
<DropdownMenuTrigger asChild>
<MotionButtonBase className="text-accent text-xs" type="button">
Move to View
{t("feeds.tableSelected.moveToView.action")}
</MotionButtonBase>
</DropdownMenuTrigger>
<DropdownMenuContent side="top">
@@ -269,7 +269,7 @@ const SubscriptionFeedsSection = () => {
type="button"
onClick={handleBatchUnsubscribe}
>
Unsubscribe
{t("feeds.tableSelected.unsubscribe")}
</MotionButtonBase>
</div>
</m.div>
@@ -369,6 +369,7 @@ const SortedFeedsList: FC<{
}
const ViewSelector: FC<{ selectedFeeds: Set<string> }> = ({ selectedFeeds }) => {
const { t } = useTranslation("settings")
const { t: tCommon } = useTranslation("common")
const { mutate: batchUpdateSubscription } = useBatchUpdateSubscription()
const { ask } = useDialog()
@@ -379,8 +380,8 @@ const ViewSelector: FC<{ selectedFeeds: Set<string> }> = ({ selectedFeeds }) =>
icon={view.icon}
onClick={() => {
ask({
title: "Confirm",
message: `Are you sure you want to move these feeds to ${tCommon(view.name)}?`,
title: t("feeds.tableSelected.moveToView.confirmTitle"),
message: t("feeds.tableSelected.moveToView.confirm", { view: tCommon(view.name) }),
onConfirm: () => {
batchUpdateSubscription({
feedIdList: Array.from(selectedFeeds),
+10
View File
@@ -200,9 +200,19 @@
"feeds.claimTips": "To claim your feeds and receive tips, right-click on the feed in your subscription list and select Claim.",
"feeds.noFeeds": "No claimed feeds",
"feeds.subscription": "Subscribed Feeds",
"feeds.tableHeaders.date": "Subscribed Date",
"feeds.tableHeaders.followers": "Followers",
"feeds.tableHeaders.name": "Name",
"feeds.tableHeaders.subscriptionCount": "Subs",
"feeds.tableHeaders.tipAmount": "Tips",
"feeds.tableHeaders.updatesPerWeek": "Updates",
"feeds.tableHeaders.view": "View",
"feeds.tableSelected.clear": "Clear",
"feeds.tableSelected.item": "{{count}} item(s) selected",
"feeds.tableSelected.moveToView.action": "Move to View",
"feeds.tableSelected.moveToView.confirm": "Are you sure you want to move these feeds to {{view}}?",
"feeds.tableSelected.moveToView.confirmTitle": "Confirm",
"feeds.tableSelected.unsubscribe": "Unsubscribe",
"general.action.summary.description": "Generate a summary of the entry using AI.",
"general.action.summary.label": "AI Summary",
"general.action.title": "AI Actions",
+10
View File
@@ -195,9 +195,19 @@
"feeds.claimTips": "要认证你的订阅源并接收打赏,请在订阅列表中右键点击订阅源并选择「认证」。",
"feeds.noFeeds": "没有已认证的订阅源",
"feeds.subscription": "已订阅的订阅源",
"feeds.tableHeaders.date": "订阅日期",
"feeds.tableHeaders.followers": "订阅人数",
"feeds.tableHeaders.name": "名称",
"feeds.tableHeaders.subscriptionCount": "订阅数",
"feeds.tableHeaders.tipAmount": "收到的打赏",
"feeds.tableHeaders.updatesPerWeek": "更新频率",
"feeds.tableHeaders.view": "视图",
"feeds.tableSelected.clear": "清空",
"feeds.tableSelected.item": "{{count}} 项已选中",
"feeds.tableSelected.moveToView.action": "移动视图",
"feeds.tableSelected.moveToView.confirm": "确定要将这些订阅源移动到 {{view}} 吗?",
"feeds.tableSelected.moveToView.confirmTitle": "确认",
"feeds.tableSelected.unsubscribe": "取消订阅",
"general.action.summary.description": "使用 AI 生成条目总结。",
"general.action.summary.label": "AI 总结",
"general.action.title": "自动化",
+19 -13
View File
@@ -1,16 +1,22 @@
export const Logo = ({
ref,
...props
}: React.SVGProps<SVGSVGElement> & { ref?: React.Ref<SVGSVGElement | null> }) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props} ref={ref}>
<title>Folo</title>
<path
fill="#ff5c00"
d="M5.382 0h13.236A5.37 5.37 0 0 1 24 5.383v13.235A5.37 5.37 0 0 1 18.618 24H5.382A5.37 5.37 0 0 1 0 18.618V5.383A5.37 5.37 0 0 1 5.382.001Z"
/>
<path
fill="#fff"
d="M13.269 17.31a1.813 1.813 0 1 0-3.626.002 1.813 1.813 0 0 0 3.626-.002m-.535-6.527H7.213a1.813 1.813 0 1 0 0 3.624h5.521a1.813 1.813 0 1 0 0-3.624m4.417-4.712H8.87a1.813 1.813 0 1 0 0 3.625h8.283a1.813 1.813 0 1 0 0-3.624z"
/>
</svg>
)
}: React.SVGProps<SVGSVGElement> & {
ref?: React.Ref<SVGSVGElement | null>
accentColor?: string
}) => {
const { accentColor } = props
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props} ref={ref}>
<title>Folo</title>
<path
fill={accentColor || "#ff5c00"}
d="M5.382 0h13.236A5.37 5.37 0 0 1 24 5.383v13.235A5.37 5.37 0 0 1 18.618 24H5.382A5.37 5.37 0 0 1 0 18.618V5.383A5.37 5.37 0 0 1 5.382.001Z"
/>
<path
fill="#fff"
d="M13.269 17.31a1.813 1.813 0 1 0-3.626.002 1.813 1.813 0 0 0 3.626-.002m-.535-6.527H7.213a1.813 1.813 0 1 0 0 3.624h5.521a1.813 1.813 0 1 0 0-3.624m4.417-4.712H8.87a1.813 1.813 0 1 0 0 3.625h8.283a1.813 1.813 0 1 0 0-3.624z"
/>
</svg>
)
}