mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-25 13:45:03 +08:00
i18n: complete internationalization for v3.8+ features
- Add health status translations (operational, degraded, failed, circuitOpen) - Add proxy panel translations (serviceAddress, stats, stopped state) - Add usage filter translations (appType, statusCode, searchPlaceholder) - Add providerIcon click hints (clickToChange, clickToSelect) - Add config load error translations for main.tsx - Complete Japanese proxy section (failoverQueue, autoFailover) - Fix date/time locale in usage charts and tables - Use t() function in all hardcoded UI strings
This commit is contained in:
@@ -16,8 +16,14 @@ export function RequestDetailPanel({
|
||||
requestId,
|
||||
onClose,
|
||||
}: RequestDetailPanelProps) {
|
||||
const { t } = useTranslation();
|
||||
const { t, i18n } = useTranslation();
|
||||
const { data: request, isLoading } = useRequestDetail(requestId);
|
||||
const dateLocale =
|
||||
i18n.language === "zh"
|
||||
? "zh-CN"
|
||||
: i18n.language === "ja"
|
||||
? "ja-JP"
|
||||
: "en-US";
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
@@ -69,7 +75,9 @@ export function RequestDetailPanel({
|
||||
{t("usage.time", "时间")}
|
||||
</dt>
|
||||
<dd>
|
||||
{new Date(request.createdAt * 1000).toLocaleString("zh-CN")}
|
||||
{new Date(request.createdAt * 1000).toLocaleString(
|
||||
dateLocale,
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user