Improve chinese locale translation

This commit is contained in:
oiov
2025-08-06 17:35:42 +08:00
parent 8f4847e13c
commit 25ac692268
6 changed files with 34 additions and 17 deletions

View File

@@ -552,7 +552,7 @@ export default function S3Configs({}: {}) {
<Icons.help className="size-4 text-muted-foreground" />
</TooltipTrigger>
<TooltipContent className="max-w-64 text-wrap">
{t("maxStorageTooltip")}
{t("maxFileSizeTooltip")}
</TooltipContent>
</Tooltip>
</TooltipProvider>

View File

@@ -3,6 +3,7 @@
import { useEffect, useRef, useState } from "react";
import dynamic from "next/dynamic";
import { differenceInMinutes, format } from "date-fns";
import { useTranslations } from "next-intl";
import { DAILY_DIMENSION_ENUMS } from "@/lib/enums";
import {
@@ -437,6 +438,7 @@ export function RealtimeTimePicker({
timeRange: string;
setTimeRange: (value: string) => void;
}) {
const t = useTranslations("Components");
return (
<Select onValueChange={setTimeRange} name="time range" value={timeRange}>
<SelectTrigger className="left-0 top-0 z-10 h-9 rounded-b-none border-b-0 bg-transparent text-left backdrop-blur-2xl sm:absolute sm:w-[326px]">
@@ -446,7 +448,7 @@ export function RealtimeTimePicker({
{DAILY_DIMENSION_ENUMS.map((e, i) => (
<div key={e.value}>
<SelectItem value={e.value}>
<span className="flex items-center gap-1">{e.label}</span>
<span className="flex items-center gap-1">{t(e.label)}</span>
</SelectItem>
{i % 2 === 0 && i !== DAILY_DIMENSION_ENUMS.length - 1 && (
<SelectSeparator />

View File

@@ -217,31 +217,32 @@ export function LinkInfoPreviewer({
</TooltipTrigger>
<TooltipContent
align="start"
className="group flex h-[187px] w-[300px] flex-col items-center justify-center rounded-lg bg-gradient-to-br from-gray-500 to-gray-300 p-0 shadow-inner transition-all duration-200"
className="group flex h-[187px] w-[300px] flex-col items-center justify-center rounded-lg bg-gradient-to-br from-gray-300 to-gray-100 p-0 shadow-inner transition-all duration-200"
>
<TooltipArrow className="fill-gray-400" />
<TooltipArrow className="fill-gray-300" />
{metaInfo.title ? (
<>
<BlurImg
className={cn(
"rounded-md bg-primary-foreground group-hover:scale-95 group-hover:opacity-95",
"h-full rounded-md bg-primary-foreground group-hover:scale-95 group-hover:opacity-95",
(metaInfo.image === placeholdImage || !metaInfo.image) &&
"h-full w-full",
"w-full",
)}
src={metaInfo.image || placeholdImage}
alt={`Preview of ${url}`}
fill
/>
<div className="absolute bottom-0 w-full rounded-b-md p-2 backdrop-blur">
<p className="line-clamp-1 text-sm font-semibold text-neutral-600 dark:text-neutral-300">
{metaInfo.title}
</p>
{metaInfo.description && (
<p className="mt-1 line-clamp-1 text-xs text-neutral-500 dark:text-neutral-400">
{metaInfo.description}
{!isImageUrl(url) && (
<div className="absolute bottom-0 w-full rounded-b-md p-2 backdrop-blur">
<p className="line-clamp-1 text-sm font-semibold text-neutral-600 dark:text-neutral-300">
{metaInfo.title}
</p>
)}
</div>
{metaInfo.description && (
<p className="mt-1 line-clamp-1 text-xs text-neutral-500 dark:text-neutral-400">
{metaInfo.description}
</p>
)}
</div>
)}
</>
) : (
<Skeleton className="h-[187px] w-[300px]" />

View File

@@ -342,6 +342,12 @@
"Last 6 Months": "Last 6 Months",
"Last 1 Year": "Last 1 Year",
"All the time": "All the time",
"Last 5 Minutes": "Last 5 Minutes",
"Last 10 Minutes": "Last 10 Minutes",
"Last 30 Minutes": "Last 30 Minutes",
"Last 1 Hour": "Last 1 Hour",
"Last 6 Hours": "Last 6 Hours",
"Last 12 Hours": "Last 12 Hours",
"No Visits": "No Visits",
"You don't have any visits yet in": "You don't have any visits yet in",
"System Settings": "System Settings",
@@ -638,6 +644,7 @@
"Optional": "Optional",
"Max Storage": "Max Storage",
"maxStorageTooltip": "Set maximum storage capacity for this bucket (in bytes). If not set, uses plan quota global limit.",
"maxFileSizeTooltip": "Set maximum file size for this bucket (in bytes). If not set, uses plan quota global limit.",
"Allowed File Types": "Allowed File Types",
"Public": "Public",
"Publicize this storage bucket, all registered users can upload files to this storage bucket; If not public, only administrators can upload files to this storage bucket": "Publicize this storage bucket, all registered users can upload files to this storage bucket; If not public, only administrators can upload files to this storage bucket",

View File

@@ -342,6 +342,12 @@
"Last 6 Months": "最近 6 个月",
"Last 1 Year": "最近 1 年",
"All the time": "所有时间",
"Last 5 Minutes": "最近 5 分钟",
"Last 10 Minutes": "最近 10 分钟",
"Last 30 Minutes": "最近 30 分钟",
"Last 1 Hour": "最近 1 小时",
"Last 6 Hours": "最近 6 小时",
"Last 12 Hours": "最近 12 小时",
"No Visits": "无访问记录",
"You don't have any visits yet in": "您还没有任何访问记录于",
"System Settings": "系统设置",
@@ -639,6 +645,7 @@
"Optional": "可选",
"Max Storage": "最大存储容量",
"maxStorageTooltip": "设置此存储桶的最大存储容量(字节)。如果不设置,默认使用 Plan 配额的全局限制。",
"maxFileSizeTooltip": "设置此存储桶的最大上传文件大小(字节)。如果不设置,则使用 Plan 配额的全局限制。",
"Allowed File Types": "允许的文件类型",
"Public": "公开",
"Publicize this storage bucket, all registered users can upload files to this storage bucket; If not public, only administrators can upload files to this storage bucket": "公开此存储桶,所有注册用户都可以上传文件到此存储桶; 若不公开,只有管理员可以上传文件到此存储桶",

File diff suppressed because one or more lines are too long