From dbd46f2b76c377ffd2dbc66908ad672eb7c92c71 Mon Sep 17 00:00:00 2001 From: Slinetrac Date: Thu, 13 Nov 2025 21:45:04 +0800 Subject: [PATCH] fix: ruleEditor i18n keys --- src/components/profile/rules-editor-viewer.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/profile/rules-editor-viewer.tsx b/src/components/profile/rules-editor-viewer.tsx index 9ece10982..0eeab9629 100644 --- a/src/components/profile/rules-editor-viewer.tsx +++ b/src/components/profile/rules-editor-viewer.tsx @@ -47,6 +47,7 @@ import { RuleItem } from "@/components/profile/rule-item"; import { readProfileFile, saveProfileFile } from "@/services/cmds"; import { showNotice } from "@/services/noticeService"; import { useThemeMode } from "@/services/states"; +import type { TranslationKey } from "@/types/generated/i18n-keys"; import getSystem from "@/utils/get-system"; import { BaseSearchBox } from "../base/base-search-box"; @@ -249,13 +250,14 @@ const RULE_TYPE_LABEL_KEYS: Record = Object.fromEntries( const builtinProxyPolicies = ["DIRECT", "REJECT", "REJECT-DROP", "PASS"]; -const PROXY_POLICY_LABEL_KEYS: Record = +const PROXY_POLICY_LABEL_KEYS: Record = builtinProxyPolicies.reduce( (acc, policy) => { - acc[policy] = `proxy.policies.${policy}`; + acc[policy] = + `proxies.components.enums.policies.${policy}` as TranslationKey; return acc; }, - {} as Record, + {} as Record, ); export const RulesEditorViewer = (props: Props) => {