chore: pluggable locale config

This commit is contained in:
jialin
2025-10-13 14:40:26 +08:00
parent caabeb065a
commit b5fa40047a
30 changed files with 731 additions and 575 deletions
+14 -10
View File
@@ -18,8 +18,8 @@ const SEAL_SCHEMA = jsYaml.DEFAULT_SCHEMA.extend([SealYamlType]);
export const builtInBackends = {
SGLang: 'SGLang',
vLLM: 'vllm',
MindIE: 'mindie',
vLLM: 'vLLM',
MindIE: 'MindIE',
VoxBox: 'voxbox'
};
@@ -32,25 +32,25 @@ export const builtInBackendLogos: Record<string, string> = {
export const backendActions = [
{
label: 'Edit',
label: 'common.button.edit',
value: 'edit',
key: 'edit',
icon: icons.EditOutlined,
locale: false
locale: true,
icon: icons.EditOutlined
},
{
label: 'Export YAML',
label: 'backend.export.yaml',
value: 'yaml',
key: 'export',
icon: icons.Yaml,
locale: false
locale: true,
icon: icons.Yaml
},
{
label: 'Delete',
label: 'common.button.delete',
value: 'delete',
key: 'delete',
icon: icons.DeleteOutlined,
locale: false,
locale: true,
danger: true
}
];
@@ -136,6 +136,10 @@ export const frameworks = [
{
label: 'CoreX',
value: 'corex'
},
{
label: 'CPU',
value: 'cpu'
}
];
+6 -1
View File
@@ -3,11 +3,15 @@ export interface VersionConfigs {
run_command: string;
is_default: boolean;
build_in_frameworks?: string[];
custom_framework: string;
custom_framework?: string;
version_no?: string;
is_built_in?: boolean;
}
export interface VersionListItem extends VersionConfigs {
availableFrameworks: string[];
}
export interface FormData {
backend_name: string;
description?: string;
@@ -26,4 +30,5 @@ export interface ListItem extends FormData {
created_at?: string;
updated_at?: string;
build_in_version_configs?: Record<string, VersionConfigs>;
framework_index_map?: Record<string, string[]>;
}