feat(locales): update zh-cn translations (#2726)

Co-authored-by: Innei <i@innei.in>
This commit is contained in:
Eric Zhu 2025-02-26 13:06:11 +08:00 committed by GitHub
parent 6587664ec2
commit 2299f3eb94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 89 additions and 61 deletions

View File

@ -1,4 +1,3 @@
/* eslint-disable @eslint-react/hooks-extra/ensure-custom-hooks-using-other-hooks */
import { Button } from "@follow/components/ui/button/index.js"
import { Input } from "@follow/components/ui/input/index.js"
import {
@ -24,15 +23,18 @@ const FALLBACK_FONT = "Default (UI Font)"
const DEFAULT_FONT = "SN Pro"
const CUSTOM_FONT = "Custom"
const useFontDataElectron = () => {
const { t } = useTranslation("settings")
const { data } = useQuery({
queryFn: () => tipcClient?.getSystemFonts(),
queryKey: ["systemFonts"],
})
return [
{ label: FALLBACK_FONT, value: "inherit" },
{ label: "System UI", value: "system-ui" },
].concat(
return (
[
{ label: t("appearance.content_font.default"), value: "inherit" },
{ label: t("appearance.font.system"), value: "system-ui" },
] as { label: string; value: string }[]
).concat(
(data || []).map((font) => ({
label: font,
value: font,
@ -40,20 +42,22 @@ const useFontDataElectron = () => {
)
}
// eslint-disable-next-line @eslint-react/hooks-extra/no-useless-custom-hooks
const useFontDataWeb = () => [
{ label: FALLBACK_FONT, value: "inherit" },
{ label: "System UI", value: "system-ui" },
...["Arial", "PingFang SC", "Microsoft YaHei", "SF Pro"].map((font) => ({
label: font,
const useFontDataWeb = () => {
const { t } = useTranslation("settings")
return [
{ label: t("appearance.content_font.default"), value: "inherit" },
{ label: t("appearance.font.system"), value: "system-ui" },
...["Arial", "PingFang SC", "Microsoft YaHei", "SF Pro"].map((font) => ({
label: font,
value: font,
})),
{
label: "Custom",
value: CUSTOM_FONT,
},
]
value: font,
})),
{
label: t("appearance.font.custom"),
value: CUSTOM_FONT,
},
]
}
const useFontData = IN_ELECTRON ? useFontDataElectron : useFontDataWeb
export const ContentFontSelector = () => {
@ -71,7 +75,7 @@ export const ContentFontSelector = () => {
return (
<div className="mb-3 flex items-center justify-between">
<span className="shrink-0 text-sm font-medium">{t("appearance.content_font")}</span>
<span className="shrink-0 text-sm font-medium">{t("appearance.content_font.label")}</span>
<Select
defaultValue={FALLBACK_FONT}
value={readerFontFamily}

View File

@ -201,7 +201,7 @@ export const TextSize = () => {
return (
<div className="mb-3 flex items-center justify-between">
<span className="shrink-0 text-sm font-medium">{t("appearance.text_size")}</span>
<span className="shrink-0 text-sm font-medium">{t("appearance.text_size.label")}</span>
<Select
defaultValue={textSizeMap.default.toString()}
value={uiTextSize.toString() || textSizeMap.default.toString()}
@ -215,7 +215,7 @@ export const TextSize = () => {
<SelectContent position="item-aligned">
{Object.entries(textSizeMap).map(([size, value]) => (
<SelectItem className="capitalize" key={size} value={value.toString()}>
{size}
{t(`appearance.text_size.${size as keyof typeof textSizeMap}`)}
</SelectItem>
))}
</SelectContent>

View File

@ -233,6 +233,7 @@
"login.continueWith": "使用 {{provider}} 登入",
"login.email": "邮件地址",
"login.forget_password.note": "忘记了密码?",
"login.or": "或",
"login.password": "密码",
"login.signUp": "使用邮件地址注册",
"login.submit": "提交",

View File

@ -18,6 +18,7 @@
"words.back": "返回",
"words.copy": "复制",
"words.create": "创建",
"words.default": "默认",
"words.delete": "删除",
"words.download": "下载",
"words.edit": "编辑",

View File

@ -37,7 +37,7 @@
"actions.title": "الإجراءات",
"appearance.code_highlight_theme": "موضوع تمييز التعليمات البرمجية",
"appearance.content": "المحتوى",
"appearance.content_font": "خط المحتوى",
"appearance.content_font.label": "خط المحتوى",
"appearance.custom_font": "خط مخصص",
"appearance.fonts": "الخطوط",
"appearance.general": "عام",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "عرض كشارة Dock",
"appearance.sidebar_show_unread_count.label": "عرض في الشريط الجانبي",
"appearance.sidebar_title": "المظهر",
"appearance.text_size": "حجم النص",
"appearance.text_size.label": "حجم النص",
"appearance.theme.dark": "داكن",
"appearance.theme.label": "السمة",
"appearance.theme.light": "فاتح",

View File

@ -37,7 +37,7 @@
"actions.title": "الإجراءات",
"appearance.code_highlight_theme": "موضوع تمييز التعليمات البرمجية",
"appearance.content": "المحتوى",
"appearance.content_font": "خط المحتوى",
"appearance.content_font.label": "خط المحتوى",
"appearance.custom_font": "خط مخصص",
"appearance.fonts": "الخطوط",
"appearance.general": "عام",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "عرض كشارة Dock",
"appearance.sidebar_show_unread_count.label": "عرض في الشريط الجانبي",
"appearance.sidebar_title": "المظهر",
"appearance.text_size": "حجم النص",
"appearance.text_size.label": "حجم النص",
"appearance.theme.dark": "داكن",
"appearance.theme.label": "السمة",
"appearance.theme.light": "فاتح",

View File

@ -37,7 +37,7 @@
"actions.title": "الإجراءات",
"appearance.code_highlight_theme": "نمط تمييز الأكواد",
"appearance.content": "المحتوى",
"appearance.content_font": "خط المحتوى",
"appearance.content_font.label": "خط المحتوى",
"appearance.custom_font": "خط مخصص",
"appearance.fonts": "الخطوط",
"appearance.general": "عام",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "عرض كشارة Dock",
"appearance.sidebar_show_unread_count.label": "عرض في الشريط الجانبي",
"appearance.sidebar_title": "المظهر",
"appearance.text_size": "حجم النص",
"appearance.text_size.label": "حجم النص",
"appearance.theme.dark": "داكن",
"appearance.theme.label": "السمة",
"appearance.theme.light": "فاتح",

View File

@ -37,7 +37,7 @@
"actions.title": "الإجراءات",
"appearance.code_highlight_theme": "موضوع تمييز الكود",
"appearance.content": "المحتوى",
"appearance.content_font": "خط المحتوى",
"appearance.content_font.label": "خط المحتوى",
"appearance.custom_font": "خط مخصص",
"appearance.fonts": "الخطوط",
"appearance.general": "عام",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "عرض كشارة Dock",
"appearance.sidebar_show_unread_count.label": "عرض فالشريط الجانبي",
"appearance.sidebar_title": "المظهر",
"appearance.text_size": "حجم النص",
"appearance.text_size.label": "حجم النص",
"appearance.theme.dark": "داكن",
"appearance.theme.label": "السمة",
"appearance.theme.light": "فاتح",

View File

@ -37,7 +37,7 @@
"actions.title": "الإجراءات",
"appearance.code_highlight_theme": "موضوع إبراز الكود",
"appearance.content": "المحتوى",
"appearance.content_font": "خط المحتوى",
"appearance.content_font.label": "خط المحتوى",
"appearance.custom_font": "خط مخصص",
"appearance.fonts": "الخطوط",
"appearance.general": "عام",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "عرض كشارة على Dock",
"appearance.sidebar_show_unread_count.label": "عرض في الشريط الجانبي",
"appearance.sidebar_title": "المظهر",
"appearance.text_size": "حجم النص",
"appearance.text_size.label": "حجم النص",
"appearance.theme.dark": "داكن",
"appearance.theme.label": "الموضوع",
"appearance.theme.light": "فاتح",

View File

@ -37,7 +37,7 @@
"actions.title": "الإجراءات",
"appearance.code_highlight_theme": "سمة تمييز الشيفرة",
"appearance.content": "المحتوى",
"appearance.content_font": "خط المحتوى",
"appearance.content_font.label": "خط المحتوى",
"appearance.custom_font": "خط مخصص",
"appearance.fonts": "الخطوط",
"appearance.general": "عام",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "إظهار كشارة في Dock",
"appearance.sidebar_show_unread_count.label": "عرض في الشريط الجانبي",
"appearance.sidebar_title": "المظهر",
"appearance.text_size": "حجم النص",
"appearance.text_size.label": "حجم النص",
"appearance.theme.dark": "داكن",
"appearance.theme.label": "السمة",
"appearance.theme.light": "فاتح",

View File

@ -37,7 +37,7 @@
"actions.title": "Aktionen",
"appearance.code_highlight_theme": "Code-Hervorhebungsthema",
"appearance.content": "Inhalt",
"appearance.content_font": "Schriftart für Inhalte",
"appearance.content_font.label": "Schriftart für Inhalte",
"appearance.custom_font": "Benutzerdefinierte Schriftart",
"appearance.fonts": "Schriftarten",
"appearance.general": "Allgemein",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "Als Dock-Abzeichen anzeigen",
"appearance.sidebar_show_unread_count.label": "Im Seitenmenü anzeigen",
"appearance.sidebar_title": "Aussehen",
"appearance.text_size": "Textgröße",
"appearance.text_size.label": "Textgröße",
"appearance.theme.dark": "Dunkel",
"appearance.theme.label": "Thema",
"appearance.theme.light": "Hell",

View File

@ -54,7 +54,8 @@
"actions.title": "Actions",
"appearance.code_highlight_theme": "Code highlight theme",
"appearance.content": "Content",
"appearance.content_font": "Content Font",
"appearance.content_font.default": "Default (UI Font)",
"appearance.content_font.label": "Content Font",
"appearance.content_font_size": "Content Font Size",
"appearance.content_line_height.label": "Content Line Height",
"appearance.content_line_height.loose": "Loose",
@ -67,6 +68,8 @@
"appearance.custom_css.label": "Custom CSS",
"appearance.custom_font": "Custom Font",
"appearance.date_format": "Date format",
"appearance.font.custom": "Custom",
"appearance.font.system": "System UI",
"appearance.fonts": "Fonts",
"appearance.general": "General",
"appearance.guess_code_language.description": "Major programming languages that use models to infer unlabeled code blocks",
@ -88,7 +91,11 @@
"appearance.sidebar": "Sidebar",
"appearance.sidebar_show_unread_count.label": "Show in sidebar",
"appearance.sidebar_title": "Appearance",
"appearance.text_size": "Global Text Size",
"appearance.text_size.default": "Default",
"appearance.text_size.label": "Global Text Size",
"appearance.text_size.large": "Large",
"appearance.text_size.medium": "Medium",
"appearance.text_size.smaller": "Smaller",
"appearance.theme.dark": "Dark",
"appearance.theme.label": "Theme",
"appearance.theme.light": "Light",

View File

@ -37,7 +37,7 @@
"actions.title": "Acciones",
"appearance.code_highlight_theme": "Tema de resaltado de código",
"appearance.content": "Contenido",
"appearance.content_font": "Fuente del contenido",
"appearance.content_font.label": "Fuente del contenido",
"appearance.custom_font": "Fuente personalizada",
"appearance.fonts": "Fuentes",
"appearance.general": "General",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "Mostrar como insignia en el Dock",
"appearance.sidebar_show_unread_count.label": "Mostrar en la barra lateral",
"appearance.sidebar_title": "Apariencia",
"appearance.text_size": "Tamaño de texto",
"appearance.text_size.label": "Tamaño de texto",
"appearance.theme.dark": "Oscuro",
"appearance.theme.label": "Tema",
"appearance.theme.light": "Claro",

View File

@ -37,7 +37,7 @@
"actions.title": "Toiminnot",
"appearance.code_highlight_theme": "Koodin korostusteema",
"appearance.content": "Sisältö",
"appearance.content_font": "Sisällön fontti",
"appearance.content_font.label": "Sisällön fontti",
"appearance.custom_font": "Mukautettu fontti",
"appearance.fonts": "Fontit",
"appearance.general": "Yleiset",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "Näytä Dock-merkin yhteydessä",
"appearance.sidebar_show_unread_count.label": "Näytä sivupalkissa",
"appearance.sidebar_title": "Ulkoasu",
"appearance.text_size": "Tekstin koko",
"appearance.text_size.label": "Tekstin koko",
"appearance.theme.dark": "Tumma",
"appearance.theme.label": "Teema",
"appearance.theme.light": "Vaalea",

View File

@ -37,7 +37,7 @@
"actions.title": "Actions",
"appearance.code_highlight_theme": "Thème de mise en évidence du code",
"appearance.content": "Contenu",
"appearance.content_font": "Police de contenu",
"appearance.content_font.label": "Police de contenu",
"appearance.custom_font": "Police personnalisée",
"appearance.fonts": "Polices",
"appearance.general": "Général",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "Afficher comme badge Dock",
"appearance.sidebar_show_unread_count.label": "Afficher dans la barre latérale",
"appearance.sidebar_title": "Apparence",
"appearance.text_size": "Taille du texte",
"appearance.text_size.label": "Taille du texte",
"appearance.theme.dark": "Sombre",
"appearance.theme.label": "Thème",
"appearance.theme.light": "Clair",

View File

@ -37,7 +37,7 @@
"actions.title": "Azioni",
"appearance.code_highlight_theme": "Tema evidenziazione codice",
"appearance.content": "Contenuto",
"appearance.content_font": "Font del Contenuto",
"appearance.content_font.label": "Font del Contenuto",
"appearance.custom_font": "Font Personalizzato",
"appearance.fonts": "Font",
"appearance.general": "Generale",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "Mostra come badge Dock",
"appearance.sidebar_show_unread_count.label": "Mostra nella sidebar",
"appearance.sidebar_title": "Aspetto",
"appearance.text_size": "Dimensione del testo",
"appearance.text_size.label": "Dimensione del testo",
"appearance.theme.dark": "Scuro",
"appearance.theme.label": "Tema",
"appearance.theme.light": "Chiaro",

View File

@ -54,7 +54,7 @@
"actions.title": "アクション",
"appearance.code_highlight_theme": "コードハイライトテーマ",
"appearance.content": "コンテンツ",
"appearance.content_font": "コンテンツフォント",
"appearance.content_font.label": "コンテンツフォント",
"appearance.custom_css.button": "編集",
"appearance.custom_css.description": "コンテンツに Custom CSS を適用できます",
"appearance.custom_css.label": "Custom CSS",
@ -80,7 +80,7 @@
"appearance.sidebar": "サイドバー",
"appearance.sidebar_show_unread_count.label": "サイドバーに表示",
"appearance.sidebar_title": "外観",
"appearance.text_size": "テキストサイズ",
"appearance.text_size.label": "テキストサイズ",
"appearance.theme.dark": "ダーク",
"appearance.theme.label": "テーマ",
"appearance.theme.light": "ライト",

View File

@ -54,7 +54,7 @@
"actions.title": "액션",
"appearance.code_highlight_theme": "코드 하이라이트 테마",
"appearance.content": "콘텐츠",
"appearance.content_font": "콘텐츠 글꼴",
"appearance.content_font.label": "콘텐츠 글꼴",
"appearance.custom_css.button": "편집",
"appearance.custom_css.description": "콘텐츠를 위한 사용자 정의 CSS 스타일",
"appearance.custom_css.label": "사용자 정의 CSS",
@ -80,7 +80,7 @@
"appearance.sidebar": "Sidebar",
"appearance.sidebar_show_unread_count.label": "사이드바에 표시",
"appearance.sidebar_title": "외관",
"appearance.text_size": "텍스트 크기",
"appearance.text_size.label": "텍스트 크기",
"appearance.theme.dark": "다크",
"appearance.theme.label": "테마",
"appearance.theme.light": "라이트",

View File

@ -37,7 +37,7 @@
"actions.title": "Ações",
"appearance.code_highlight_theme": "Tema de destaque de código",
"appearance.content": "Conteúdo",
"appearance.content_font": "Fonte do conteúdo",
"appearance.content_font.label": "Fonte do conteúdo",
"appearance.custom_font": "Fonte personalizada",
"appearance.fonts": "Fontes",
"appearance.general": "Geral",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "Mostrar como badge no Dock",
"appearance.sidebar_show_unread_count.label": "Mostrar na barra lateral",
"appearance.sidebar_title": "Aparência",
"appearance.text_size": "Tamanho do texto",
"appearance.text_size.label": "Tamanho do texto",
"appearance.theme.dark": "Escuro",
"appearance.theme.label": "Tema",
"appearance.theme.light": "Claro",

View File

@ -54,7 +54,7 @@
"actions.title": "Действия",
"appearance.code_highlight_theme": "Тема подсветки кода",
"appearance.content": "Контент",
"appearance.content_font": "Шрифт контента",
"appearance.content_font.label": "Шрифт контента",
"appearance.custom_css.button": "Редактировать",
"appearance.custom_css.description": "Пользовательский стиль CSS для контента",
"appearance.custom_css.label": "Пользовательский CSS",
@ -80,7 +80,7 @@
"appearance.sidebar": "Боковая панель",
"appearance.sidebar_show_unread_count.label": "Показать в боковой панели",
"appearance.sidebar_title": "Внешний вид",
"appearance.text_size": "Размер текста",
"appearance.text_size.label": "Размер текста",
"appearance.theme.dark": "Тёмная",
"appearance.theme.label": "Тема",
"appearance.theme.light": "Светлая",

View File

@ -37,7 +37,7 @@
"actions.title": "Eylemler",
"appearance.code_highlight_theme": "Kod vurgulama teması",
"appearance.content": "İçerik",
"appearance.content_font": "İçerik Yazı Tipi",
"appearance.content_font.label": "İçerik Yazı Tipi",
"appearance.custom_font": "Özel Yazı Tipi",
"appearance.fonts": "Yazı Tipleri",
"appearance.general": "Genel",
@ -55,7 +55,7 @@
"appearance.show_dock_badge.label": "Dock rozeti olarak göster",
"appearance.sidebar_show_unread_count.label": "Kenar çubuğunda göster",
"appearance.sidebar_title": "Görünüm",
"appearance.text_size": "Metin boyutu",
"appearance.text_size.label": "Metin boyutu",
"appearance.theme.dark": "Koyu",
"appearance.theme.label": "Tema",
"appearance.theme.light": "Açık",

View File

@ -54,11 +54,22 @@
"actions.title": "自动化",
"appearance.code_highlight_theme": "代码高亮主题",
"appearance.content": "内容",
"appearance.content_font": "正文字体",
"appearance.content_font.default": "默认(界面字体)",
"appearance.content_font.label": "正文字体",
"appearance.content_font_size": "正文字体大小",
"appearance.content_line_height.label": "正文行高",
"appearance.content_line_height.loose": "松散",
"appearance.content_line_height.normal": "正常",
"appearance.content_line_height.relaxed": "宽松",
"appearance.content_line_height.snug": "紧凑",
"appearance.content_line_height.tight": "紧密",
"appearance.custom_css.button": "编辑",
"appearance.custom_css.description": "用于条目内容的自定义 CSS 样式。",
"appearance.custom_css.label": "自定义 CSS",
"appearance.custom_font": "自定义字体",
"appearance.date_format": "日期格式",
"appearance.font.custom": "自定义",
"appearance.font.system": "系统字体",
"appearance.fonts": "字体",
"appearance.general": "通用",
"appearance.guess_code_language.description": "使用模型推断未标记代码块的编程语言。",
@ -80,7 +91,11 @@
"appearance.sidebar": "侧边栏",
"appearance.sidebar_show_unread_count.label": "在侧边栏显示",
"appearance.sidebar_title": "外观",
"appearance.text_size": "字体大小",
"appearance.text_size.default": "默认",
"appearance.text_size.label": "界面字体大小",
"appearance.text_size.large": "较大",
"appearance.text_size.medium": "中等",
"appearance.text_size.smaller": "较小",
"appearance.theme.dark": "深色",
"appearance.theme.label": "主题",
"appearance.theme.light": "亮色",

View File

@ -54,7 +54,7 @@
"actions.title": "動作",
"appearance.code_highlight_theme": "程式碼高亮主題",
"appearance.content": "內容",
"appearance.content_font": "內容字體",
"appearance.content_font.label": "內容字體",
"appearance.custom_css.button": "編輯",
"appearance.custom_css.description": "自定義 CSS 樣式內容",
"appearance.custom_css.label": "自定義 CSS",
@ -80,7 +80,7 @@
"appearance.sidebar": "側邊欄",
"appearance.sidebar_show_unread_count.label": "側邊欄顯示未讀數量",
"appearance.sidebar_title": "外觀",
"appearance.text_size": "文字大小",
"appearance.text_size.label": "文字大小",
"appearance.theme.dark": "深色",
"appearance.theme.label": "主題",
"appearance.theme.light": "淺色",

View File

@ -54,7 +54,7 @@
"actions.title": "自動化操作",
"appearance.code_highlight_theme": "語法突顯主題",
"appearance.content": "內容",
"appearance.content_font": "內容字體",
"appearance.content_font.label": "內容字體",
"appearance.custom_css.button": "編輯",
"appearance.custom_css.description": "自訂條目渲染中的 CSS 樣式",
"appearance.custom_css.label": "自訂 CSS",
@ -80,7 +80,7 @@
"appearance.sidebar": "側邊欄",
"appearance.sidebar_show_unread_count.label": "在側邊欄中顯示",
"appearance.sidebar_title": "外觀",
"appearance.text_size": "文字大小",
"appearance.text_size.label": "文字大小",
"appearance.theme.dark": "深色",
"appearance.theme.label": "主題",
"appearance.theme.light": "淺色",