@@ -4,6 +4,7 @@ import { EditOutlined, AuditOutlined, LinkOutlined, EnvironmentOutlined, StarFil
4
4
import { Environment } from '../types/environment.types' ;
5
5
import { getEnvironmentTagColor , formatEnvironmentType } from '../utils/environmentUtils' ;
6
6
import { getAPICallsStatusColor } from '../services/license.service' ;
7
+ import { trans } from 'i18n' ;
7
8
8
9
const { Text, Title } = Typography ;
9
10
@@ -56,35 +57,35 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
56
57
return {
57
58
icon : < SyncOutlined spin /> ,
58
59
color : '#40a9ff' ,
59
- text : 'Checking...' ,
60
+ text : trans ( "enterprise.environments.licenseStatus.checking" ) ,
60
61
status : 'processing' as const
61
62
} ;
62
63
case 'licensed' :
63
64
return {
64
65
icon : < CheckCircleOutlined /> ,
65
66
color : '#73d13d' ,
66
- text : 'Licensed' ,
67
+ text : trans ( "enterprise.environments.licenseStatus.licensed" ) ,
67
68
status : 'success' as const
68
69
} ;
69
70
case 'unlicensed' :
70
71
return {
71
72
icon : < CloseCircleOutlined /> ,
72
73
color : '#ff7875' ,
73
- text : 'License Required' ,
74
+ text : trans ( "enterprise.environments.licenseStatus.unlicensed" ) ,
74
75
status : 'warning' as const
75
76
} ;
76
77
case 'error' :
77
78
return {
78
79
icon : < ExclamationCircleOutlined /> ,
79
80
color : '#ffc53d' ,
80
- text : 'Setup Required' ,
81
+ text : trans ( "enterprise.environments.licenseStatus.error" ) ,
81
82
status : 'warning' as const
82
83
} ;
83
84
default :
84
85
return {
85
86
icon : < ExclamationCircleOutlined /> ,
86
87
color : '#d9d9d9' ,
87
- text : 'Unknown' ,
88
+ text : trans ( "enterprise.environments.licenseStatus.unknown" ) ,
88
89
status : 'default' as const
89
90
} ;
90
91
}
@@ -163,9 +164,9 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
163
164
/>
164
165
< div >
165
166
< Title level = { 5 } style = { { margin : 0 , marginBottom : '4px' , fontSize : '14px' } } >
166
- { env . environmentName || 'Unnamed Environment' }
167
+ { env . environmentName || trans ( "enterprise.environments.unnamedEnvironment" ) }
167
168
{ env . isMaster && (
168
- < Tooltip title = "Master Environment" >
169
+ < Tooltip title = { trans ( "enterprise.environments.masterEnvironment" ) } >
169
170
< StarFilled style = { { color : '#faad14' , marginLeft : '6px' , fontSize : '12px' } } />
170
171
</ Tooltip >
171
172
) }
@@ -192,7 +193,7 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
192
193
{ /* Only show audit button for licensed environments */ }
193
194
{ isAccessible && (
194
195
< div >
195
- < Tooltip title = "View Audit Logs" placement = "top" >
196
+ < Tooltip title = { trans ( "enterprise.environments.viewAuditLogs" ) } placement = "top" >
196
197
< Button
197
198
type = "text"
198
199
icon = { < AuditOutlined /> }
@@ -214,9 +215,9 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
214
215
< div style = { { padding : '8px 0' , borderTop : '1px solid #f5f5f5' } } >
215
216
< div style = { { display : 'flex' , flexDirection : 'column' , gap : '6px' } } >
216
217
< div style = { { display : 'flex' , justifyContent : 'space-between' , alignItems : 'center' } } >
217
- < Text type = "secondary" style = { { fontSize : '12px' } } > ID :</ Text >
218
+ < Text type = "secondary" style = { { fontSize : '12px' } } > { trans ( "enterprise.environments.id" ) } :</ Text >
218
219
{ isAccessible ? (
219
- < Text style = { { fontSize : '12px' , fontFamily : 'monospace' } } copyable = { { tooltips : [ 'Copy ID' , 'Copied!' ] } } >
220
+ < Text style = { { fontSize : '12px' , fontFamily : 'monospace' } } copyable = { { tooltips : [ trans ( "enterprise.environments.copyId" ) , trans ( "enterprise.environments.copied" ) ] } } >
220
221
{ env . environmentId }
221
222
</ Text >
222
223
) : (
@@ -227,7 +228,7 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
227
228
</ div >
228
229
229
230
< div style = { { display : 'flex' , justifyContent : 'space-between' , alignItems : 'center' } } >
230
- < Text type = "secondary" style = { { fontSize : '12px' } } > Domain :</ Text >
231
+ < Text type = "secondary" style = { { fontSize : '12px' } } > { trans ( "enterprise.environments.domain" ) } :</ Text >
231
232
{ env . environmentFrontendUrl ? (
232
233
isAccessible ? (
233
234
< a
@@ -251,14 +252,14 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
251
252
</ div >
252
253
253
254
< div style = { { display : 'flex' , justifyContent : 'space-between' , alignItems : 'center' } } >
254
- < Text type = "secondary" style = { { fontSize : '12px' } } > Master :</ Text >
255
+ < Text type = "secondary" style = { { fontSize : '12px' } } > { trans ( "enterprise.environments.master" ) } :</ Text >
255
256
< Text style = { { fontSize : '12px' } } >
256
- { env . isMaster ? 'Yes' : 'No' }
257
+ { env . isMaster ? trans ( "enterprise.environments.yes" ) : trans ( "enterprise.environments.no" ) }
257
258
</ Text >
258
259
</ div >
259
260
260
261
< div style = { { display : 'flex' , justifyContent : 'space-between' , alignItems : 'center' } } >
261
- < Text type = "secondary" style = { { fontSize : '12px' } } > License :</ Text >
262
+ < Text type = "secondary" style = { { fontSize : '12px' } } > { trans ( "enterprise.environments.license" ) } :</ Text >
262
263
< div style = { { display : 'flex' , alignItems : 'center' , gap : '4px' } } >
263
264
< span style = { { color : licenseDisplay . color , fontSize : '12px' } } >
264
265
{ licenseDisplay . icon }
@@ -275,7 +276,7 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
275
276
< div style = { { display : 'flex' , justifyContent : 'space-between' , alignItems : 'center' , marginBottom : '6px' } } >
276
277
< Text type = "secondary" style = { { fontSize : '11px' } } >
277
278
< ApiOutlined style = { { marginRight : '4px' } } />
278
- API Calls
279
+ { trans ( "enterprise.environments.apiCalls" ) }
279
280
</ Text >
280
281
281
282
</ div >
@@ -295,7 +296,7 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
295
296
fontSize : '10px' ,
296
297
color : '#8c8c8c'
297
298
} } >
298
- < span > { env . licenseDetails . apiCallsUsage || 0 } % used </ span >
299
+ < span > { trans ( "enterprise.environments.percentUsed" , { percent : env . licenseDetails . apiCallsUsage || 0 } ) } </ span >
299
300
</ div >
300
301
</ div >
301
302
) }
@@ -310,7 +311,7 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
310
311
{ environments . length > 10 && (
311
312
< div style = { { textAlign : 'center' , margin : '16px 0' } } >
312
313
< Text type = "secondary" style = { { fontSize : '13px' } } >
313
- Showing all { environments . length } environments
314
+ { trans ( "enterprise.environments.showingAllEnvironments" , { count : environments . length } ) }
314
315
</ Text >
315
316
</ div >
316
317
) }
0 commit comments