Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add translation for "show more" and update zh-HK file #2033

Merged
merged 3 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { LRUCache } from "@follow/utils/lru-cache"
import { cn } from "@follow/utils/utils"
import { atom } from "jotai"
import { useLayoutEffect, useMemo, useRef, useState } from "react"
import { useTranslation } from "react-i18next"

import { RelativeTime } from "~/components/ui/datetime"
import { Media } from "~/components/ui/media"
Expand Down Expand Up @@ -363,6 +364,7 @@ const collapsedItemCache = new LRUCache<string, boolean>(100)
const CollapsedSocialMediaItem: Component<{
entryId: string
}> = ({ children, entryId }) => {
const { t } = useTranslation()
const [isOverflow, setIsOverflow] = useState(false)
const [isShowMore, setIsShowMore] = useState(() => collapsedItemCache.get(entryId) ?? false)
const ref = useRef<HTMLDivElement>(null)
Expand Down Expand Up @@ -398,7 +400,7 @@ const CollapsedSocialMediaItem: Component<{
className="flex items-center justify-center text-xs duration-200 hover:text-foreground"
>
<i className="i-mingcute-arrow-to-down-line" />
<span className="ml-2">Show more</span>
<span className="ml-2">{t("words.show_more")}</span>
</button>
</div>
)}
Expand Down
1 change: 1 addition & 0 deletions locales/app/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"words.rss3": "RSS3",
"words.rsshub": "RSSHub",
"words.search": "Search",
"words.show_more": "Show more",
"words.starred": "Starred",
"words.title": "Title",
"words.transform": "Transform",
Expand Down
1 change: 1 addition & 0 deletions locales/app/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@
"words.rss3": "RSS3",
"words.rsshub": "RSSHub",
"words.search": "搜索",
"words.show_more": "显示更多",
"words.starred": "收藏",
"words.title": "标题",
"words.transform": "转换",
Expand Down
7 changes: 6 additions & 1 deletion locales/app/zh-HK.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
"feed_form.fee_description": "要追隨此清單,您必須向清單創建者支付費用。",
"feed_form.feed_not_found": "未找到相關資訊流",
"feed_form.feedback": "反饋",
"feed_form.fill_default": "填充",
"feed_form.follow": "追隨",
"feed_form.follow_with_fee": "追隨需要 {{fee}} Power",
"feed_form.followed": "🎉 已追隨",
Expand All @@ -218,6 +219,7 @@
"feed_item.claimed_by_unknown": "未知所有者",
"feed_item.claimed_by_you": "由你認領",
"feed_item.claimed_feed": "已認領訂閱源",
"feed_item.claimed_list": "已認領清單",
"feed_item.error_since": "錯誤始於",
"feed_item.not_publicly_visible": "在你的個人頁面上不公開可見",
"feed_view_type.articles": "文章",
Expand Down Expand Up @@ -371,6 +373,7 @@
"user_button.power": "Power",
"user_button.preferences": "偏好設定",
"user_button.profile": "個人檔案",
"user_button.zen_mode": "Zen 模式",
"user_profile.close": "關閉",
"user_profile.edit": "編輯",
"user_profile.loading": "載入中",
Expand Down Expand Up @@ -398,13 +401,15 @@
"words.rss3": "RSS3",
"words.rsshub": "RSSHub",
"words.search": "搜尋",
"words.show_more": "顯示更多",
"words.starred": "收藏",
"words.title": "標題",
"words.transform": "轉換",
"words.trending": "趨勢",
"words.undo": "取消動作",
"words.unread": "未讀",
"words.user": "使用者",
"words.which.all": "所有",
"words.zero_items": "沒有項目",
"zen.exit": "退出專注模式"
"zen.exit": "退出 Zen 模式"
}
1 change: 1 addition & 0 deletions locales/app/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@
"words.rss3": "RSS3",
"words.rsshub": "RSSHub",
"words.search": "搜尋",
"words.show_more": "顯示更多",
"words.starred": "收藏",
"words.title": "標題",
"words.transform": "轉換",
Expand Down
1 change: 1 addition & 0 deletions locales/external/zh-HK.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"feed_item.claimed_by_unknown": "未知所有者",
"feed_item.claimed_by_you": "由你認領",
"feed_item.claimed_feed": "已認領訂閱源",
"feed_item.claimed_list": "已認領清單",
"feed_item.error_since": "錯誤始於",
"feed_item.not_publicly_visible": "在你的個人頁面上不公開可見",
"header.app": "應用程式",
Expand Down
2 changes: 1 addition & 1 deletion locales/native/zh-HK.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"menu.undo": "撤銷",
"menu.view": "查看",
"menu.window": "窗口",
"menu.zenMode": "專注模式",
"menu.zenMode": "Zen 模式",
"menu.zoom": "縮放",
"menu.zoomIn": "放大",
"menu.zoomOut": "縮小"
Expand Down
4 changes: 2 additions & 2 deletions locales/settings/zh-HK.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
"appearance.unread_count": "未讀數量",
"appearance.use_pointer_cursor.description": "當鼠標懸停在任何互動元素上時,將光標更改為指標。",
"appearance.use_pointer_cursor.label": "使用指標光標",
"appearance.zen_mode.description": "專注模式是一種不受打擾的閱讀模式,讓您專注於內容而不會有任何干擾。啟用專注模式後,側邊欄將被隱藏。",
"appearance.zen_mode.label": "專注模式",
"appearance.zen_mode.description": "Zen 模式是一種不受打擾的閱讀模式,讓您專注於內容而不會有任何干擾。啟用 Zen 模式後,側邊欄將被隱藏。",
"appearance.zen_mode.label": "Zen 模式",
"common.give_star": "<HeartIcon />喜歡我們的產品嗎? <Link>在 GitHub 上給我們 star 吧!</Link>",
"data_control.app_cache_limit.description": "應用程式快取的最大大小。當快取達到此大小時,最舊的項目將被刪除以釋放空間。",
"data_control.app_cache_limit.label": "應用程式快取限制",
Expand Down
2 changes: 1 addition & 1 deletion locales/shortcuts/zh-HK.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"keys.layout.showShortcuts": "顯示/隱藏快捷鍵",
"keys.layout.toggleSidebar": "顯示/隱藏訂閱側邊欄",
"keys.layout.toggleWideMode": "切換寬屏模式",
"keys.layout.zenMode": "專注模式",
"keys.layout.zenMode": "Zen 模式",
"keys.misc.quickSearch": "快速搜索",
"keys.type.audio": "音頻",
"keys.type.entries": "條目列表",
Expand Down
Loading