@@ -19,93 +19,96 @@ const TemplateDetail: React.FC<TemplateDetailProps> = ({
1919
2020 return (
2121 < Modal
22- title = "Template Details "
22+ title = "模板详情 "
2323 open = { visible }
2424 onCancel = { onClose }
2525 footer = { null }
2626 width = { 800 }
2727 >
2828 < Descriptions bordered column = { 2 } >
29- < Descriptions . Item label = "Name " span = { 2 } >
29+ < Descriptions . Item label = "名称 " span = { 2 } >
3030 { template . name }
3131 </ Descriptions . Item >
32- < Descriptions . Item label = "Description " span = { 2 } >
32+ < Descriptions . Item label = "描述 " span = { 2 } >
3333 { template . description || "-" }
3434 </ Descriptions . Item >
35- < Descriptions . Item label = "Data Type " >
35+ < Descriptions . Item label = "数据类型 " >
3636 < Tag color = "cyan" > { template . dataType } </ Tag >
3737 </ Descriptions . Item >
38- < Descriptions . Item label = "Labeling Type " >
38+ < Descriptions . Item label = "标注类型 " >
3939 < Tag color = "geekblue" > { template . labelingType } </ Tag >
4040 </ Descriptions . Item >
41- < Descriptions . Item label = "Category " >
41+ < Descriptions . Item label = "分类 " >
4242 < Tag color = "blue" > { template . category } </ Tag >
4343 </ Descriptions . Item >
44- < Descriptions . Item label = "Style " >
44+ < Descriptions . Item label = "样式 " >
4545 { template . style }
4646 </ Descriptions . Item >
47- < Descriptions . Item label = "Type " >
47+ < Descriptions . Item label = "类型 " >
4848 < Tag color = { template . builtIn ? "gold" : "default" } >
49- { template . builtIn ? "Built-in " : "Custom " }
49+ { template . builtIn ? "系统内置 " : "自定义 " }
5050 </ Tag >
5151 </ Descriptions . Item >
52- < Descriptions . Item label = "Version " >
52+ < Descriptions . Item label = "版本 " >
5353 { template . version }
5454 </ Descriptions . Item >
55- < Descriptions . Item label = "Created At " span = { 2 } >
55+ < Descriptions . Item label = "创建时间 " span = { 2 } >
5656 { new Date ( template . createdAt ) . toLocaleString ( ) }
5757 </ Descriptions . Item >
5858 { template . updatedAt && (
59- < Descriptions . Item label = "Updated At " span = { 2 } >
59+ < Descriptions . Item label = "更新时间 " span = { 2 } >
6060 { new Date ( template . updatedAt ) . toLocaleString ( ) }
6161 </ Descriptions . Item >
6262 ) }
6363 </ Descriptions >
6464
65- < Divider > Configuration </ Divider >
65+ < Divider > 配置详情 </ Divider >
6666
67- < Card title = "Data Objects " size = "small" style = { { marginBottom : 16 } } >
67+ < Card title = "数据对象 " size = "small" style = { { marginBottom : 16 } } >
6868 < Space direction = "vertical" style = { { width : "100%" } } >
6969 { template . configuration . objects . map ( ( obj , index ) => (
7070 < Card key = { index } size = "small" type = "inner" >
7171 < Space >
72- < Text strong > Name: </ Text >
72+ < Text strong > 名称: </ Text >
7373 < Tag > { obj . name } </ Tag >
74- < Text strong > Type: </ Text >
74+ < Text strong > 类型: </ Text >
7575 < Tag color = "blue" > { obj . type } </ Tag >
76- < Text strong > Value: </ Text >
76+ < Text strong > 值: </ Text >
7777 < Tag color = "green" > { obj . value } </ Tag >
7878 </ Space >
7979 </ Card >
8080 ) ) }
8181 </ Space >
8282 </ Card >
8383
84- < Card title = "Label Controls " size = "small" style = { { marginBottom : 16 } } >
84+ < Card title = "标注控件 " size = "small" style = { { marginBottom : 16 } } >
8585 < Space direction = "vertical" style = { { width : "100%" } } size = "middle" >
8686 { template . configuration . labels . map ( ( label , index ) => (
87- < Card key = { index } size = "small" type = "inner" title = { `Control ${ index + 1 } ` } >
87+ < Card key = { index } size = "small" type = "inner" title = { `控件 ${ index + 1 } ` } >
8888 < Space direction = "vertical" style = { { width : "100%" } } >
8989 < div >
90- < Text strong > From Name: </ Text >
90+ < Text strong > 来源名称: </ Text >
9191 < Tag > { label . fromName } </ Tag >
92- < Text strong style = { { marginLeft : 16 } } > To Name: </ Text >
92+
93+ < Text strong style = { { marginLeft : 16 } } > 目标名称:</ Text >
9394 < Tag > { label . toName } </ Tag >
94- < Text strong style = { { marginLeft : 16 } } > Type: </ Text >
95+
96+ < Text strong style = { { marginLeft : 16 } } > 类型:</ Text >
9597 < Tag color = "purple" > { label . type } </ Tag >
96- { label . required && < Tag color = "red" > Required</ Tag > }
98+
99+ { label . required && < Tag color = "red" > 必填</ Tag > }
97100 </ div >
98101
99102 { label . description && (
100103 < div >
101- < Text strong > Description: </ Text >
104+ < Text strong > 描述: </ Text >
102105 < Text type = "secondary" > { label . description } </ Text >
103106 </ div >
104107 ) }
105108
106109 { label . options && label . options . length > 0 && (
107110 < div >
108- < Text strong > Options: </ Text >
111+ < Text strong > 选项: </ Text >
109112 < div style = { { marginTop : 4 } } >
110113 { label . options . map ( ( opt , i ) => (
111114 < Tag key = { i } color = "cyan" > { opt } </ Tag >
@@ -116,7 +119,7 @@ const TemplateDetail: React.FC<TemplateDetailProps> = ({
116119
117120 { label . labels && label . labels . length > 0 && (
118121 < div >
119- < Text strong > Labels: </ Text >
122+ < Text strong > 标签: </ Text >
120123 < div style = { { marginTop : 4 } } >
121124 { label . labels . map ( ( lbl , i ) => (
122125 < Tag key = { i } color = "geekblue" > { lbl } </ Tag >
@@ -131,7 +134,7 @@ const TemplateDetail: React.FC<TemplateDetailProps> = ({
131134 </ Card >
132135
133136 { template . labelConfig && (
134- < Card title = "Label Studio XML Configuration " size = "small" >
137+ < Card title = "Label Studio XML 配置 " size = "small" >
135138 < Paragraph >
136139 < pre style = { {
137140 background : "#f5f5f5" ,
0 commit comments