@@ -4,6 +4,7 @@ import { EditOutlined, AuditOutlined, LinkOutlined, EnvironmentOutlined, StarFil
44import { Environment } from '../types/environment.types' ;
55import { getEnvironmentTagColor , formatEnvironmentType } from '../utils/environmentUtils' ;
66import { getAPICallsStatusColor } from '../services/license.service' ;
7+ import { trans } from 'i18n' ;
78
89const { Text, Title} = Typography ;
910
@@ -56,35 +57,35 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
5657return {
5758icon :< SyncOutlined spin /> ,
5859color :'#40a9ff' ,
59- text :'Checking...' ,
60+ text :trans ( "enterprise.environments.licenseStatus.checking" ) ,
6061status :'processing' as const
6162} ;
6263case 'licensed' :
6364return {
6465icon :< CheckCircleOutlined /> ,
6566color :'#73d13d' ,
66- text :'Licensed' ,
67+ text :trans ( "enterprise.environments.licenseStatus.licensed" ) ,
6768status :'success' as const
6869} ;
6970case 'unlicensed' :
7071return {
7172icon :< CloseCircleOutlined /> ,
7273color :'#ff7875' ,
73- text :'License Required' ,
74+ text :trans ( "enterprise.environments.licenseStatus.unlicensed" ) ,
7475status :'warning' as const
7576} ;
7677case 'error' :
7778return {
7879icon :< ExclamationCircleOutlined /> ,
7980color :'#ffc53d' ,
80- text :'Setup Required' ,
81+ text :trans ( "enterprise.environments.licenseStatus.error" ) ,
8182status :'warning' as const
8283} ;
8384default :
8485return {
8586icon :< ExclamationCircleOutlined /> ,
8687color :'#d9d9d9' ,
87- text :'Unknown' ,
88+ text :trans ( "enterprise.environments.licenseStatus.unknown" ) ,
8889status :'default' as const
8990} ;
9091}
@@ -163,9 +164,9 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
163164/>
164165< div >
165166< Title level = { 5 } style = { { margin :0 , marginBottom :'4px' , fontSize :'14px' } } >
166- { env . environmentName || 'Unnamed Environment' }
167+ { env . environmentName || trans ( "enterprise.environments.unnamedEnvironment" ) }
167168{ env . isMaster && (
168- < Tooltip title = "Master Environment" >
169+ < Tooltip title = { trans ( "enterprise.environments.masterEnvironment" ) } >
169170< StarFilled style = { { color :'#faad14' , marginLeft :'6px' , fontSize :'12px' } } />
170171</ Tooltip >
171172) }
@@ -192,7 +193,7 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
192193{ /* Only show audit button for licensed environments */ }
193194{ isAccessible && (
194195< div >
195- < Tooltip title = "View Audit Logs" placement = "top" >
196+ < Tooltip title = { trans ( "enterprise.environments.viewAuditLogs" ) } placement = "top" >
196197< Button
197198type = "text"
198199icon = { < AuditOutlined /> }
@@ -214,9 +215,9 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
214215< div style = { { padding :'8px 0' , borderTop :'1px solid #f5f5f5' } } >
215216< div style = { { display :'flex' , flexDirection :'column' , gap :'6px' } } >
216217< 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 >
218219{ 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" ) ] } } >
220221{ env . environmentId }
221222</ Text >
222223) :(
@@ -227,7 +228,7 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
227228</ div >
228229
229230< 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 >
231232{ env . environmentFrontendUrl ?(
232233isAccessible ?(
233234< a
@@ -251,14 +252,14 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
251252</ div >
252253
253254< 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 >
255256< Text style = { { fontSize :'12px' } } >
256- { env . isMaster ?'Yes' :'No' }
257+ { env . isMaster ?trans ( "enterprise.environments.yes" ) :trans ( "enterprise.environments.no" ) }
257258</ Text >
258259</ div >
259260
260261< 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 >
262263< div style = { { display :'flex' , alignItems :'center' , gap :'4px' } } >
263264< span style = { { color :licenseDisplay . color , fontSize :'12px' } } >
264265{ licenseDisplay . icon }
@@ -275,7 +276,7 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
275276< div style = { { display :'flex' , justifyContent :'space-between' , alignItems :'center' , marginBottom :'6px' } } >
276277< Text type = "secondary" style = { { fontSize :'11px' } } >
277278< ApiOutlined style = { { marginRight :'4px' } } />
278- API Calls
279+ { trans ( "enterprise.environments.apiCalls" ) }
279280</ Text >
280281
281282</ div >
@@ -295,7 +296,7 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
295296fontSize :'10px' ,
296297color :'#8c8c8c'
297298} } >
298- < span > { env . licenseDetails . apiCallsUsage || 0 } % used </ span >
299+ < span > { trans ( "enterprise.environments.percentUsed" , { percent : env . licenseDetails . apiCallsUsage || 0 } ) } </ span >
299300</ div >
300301</ div >
301302) }
@@ -310,7 +311,7 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
310311{ environments . length > 10 && (
311312< div style = { { textAlign :'center' , margin :'16px 0' } } >
312313< Text type = "secondary" style = { { fontSize :'13px' } } >
313- Showing all { environments . length } environments
314+ { trans ( "enterprise.environments.showingAllEnvironments" , { count : environments . length } ) }
314315</ Text >
315316</ div >
316317) }