@@ -16,6 +16,7 @@ import EnvironmentHeader from './EnvironmentHeader';
16
16
import StatsCard from './StatsCard' ;
17
17
import { Level1SettingPageContent } from "../../styled" ;
18
18
import history from "@lowcoder-ee/util/history" ;
19
+ import { trans } from 'i18n' ;
19
20
20
21
const { Title, Text } = Typography ;
21
22
@@ -54,37 +55,37 @@ const UnlicensedEnvironmentView: React.FC<UnlicensedEnvironmentViewProps> = ({
54
55
55
56
switch ( environment . licenseStatus ) {
56
57
case 'unlicensed' :
57
- return 'This environment needs a valid license to unlock its full capabilities and features. Please make sure your API Service URL is correctly configured and Plugin is installed.' ;
58
+ return trans ( "enterprise.environments.unlicensed.unlicensedDescription" ) ;
58
59
case 'error' :
59
- return 'We encountered an issue while checking the license. Please review the configuration settings.' ;
60
+ return trans ( "enterprise.environments.unlicensed.errorDescription" ) ;
60
61
default :
61
- return 'This environment requires license configuration to proceed.' ;
62
+ return trans ( "enterprise.environments.unlicensed.defaultDescription" ) ;
62
63
}
63
64
} ;
64
65
65
66
// Stats data consistent with other environment pages
66
67
const statsData = [
67
68
{
68
- title : "Type" ,
69
- value : environment . environmentType || "Unknown" ,
69
+ title : trans ( "enterprise.environments.unlicensed.type" ) ,
70
+ value : environment . environmentType || trans ( "enterprise.environments.detail.unknown" ) ,
70
71
icon : < CloudServerOutlined /> ,
71
72
color : "#1890ff"
72
73
} ,
73
74
{
74
- title : "Status" ,
75
- value : "Unlicensed" ,
75
+ title : trans ( "enterprise.environments.unlicensed.status" ) ,
76
+ value : trans ( "enterprise.environments.detail.unlicensed" ) ,
76
77
icon : < CloseCircleOutlined /> ,
77
78
color : "#ff4d4f"
78
79
} ,
79
80
{
80
- title : "Master Env" ,
81
- value : environment . isMaster ? "Yes" : "No" ,
81
+ title : trans ( "enterprise.environments.unlicensed.masterEnv" ) ,
82
+ value : environment . isMaster ? trans ( "enterprise.environments.yes" ) : trans ( "enterprise.environments.no" ) ,
82
83
icon : < CloudServerOutlined /> ,
83
84
color : environment . isMaster ? "#722ed1" : "#8c8c8c"
84
85
} ,
85
86
{
86
- title : "License Issue" ,
87
- value : environment . licenseStatus === 'error' ? "Error" : "Missing" ,
87
+ title : trans ( "enterprise.environments.unlicensed.licenseIssue" ) ,
88
+ value : environment . licenseStatus === 'error' ? trans ( "enterprise.environments.unlicensed.error" ) : trans ( "enterprise.environments.unlicensed.missing" ) ,
88
89
icon : environment . licenseStatus === 'error' ? < ExclamationCircleOutlined /> : < CloseCircleOutlined /> ,
89
90
color : environment . licenseStatus === 'error' ? "#faad14" : "#ff4d4f"
90
91
}
@@ -117,12 +118,12 @@ const UnlicensedEnvironmentView: React.FC<UnlicensedEnvironmentViewProps> = ({
117
118
items = { [
118
119
{
119
120
key : 'environments' ,
120
- title : 'Environments' ,
121
+ title : trans ( "enterprise.environments.title" ) ,
121
122
onClick : ( ) => history . push ( '/setting/environments' )
122
123
} ,
123
124
{
124
125
key : 'current' ,
125
- title : environment . environmentName || "Environment Detail"
126
+ title : environment . environmentName || trans ( "enterprise.environments.detail.environmentDetail" )
126
127
}
127
128
] }
128
129
/>
@@ -179,7 +180,7 @@ const UnlicensedEnvironmentView: React.FC<UnlicensedEnvironmentViewProps> = ({
179
180
fontWeight : 500
180
181
} }
181
182
>
182
- Contact Lowcoder Team
183
+ { trans ( "enterprise.environments.unlicensed.contactLowcoderTeam" ) }
183
184
</ Button >
184
185
185
186
< Button
@@ -194,7 +195,7 @@ const UnlicensedEnvironmentView: React.FC<UnlicensedEnvironmentViewProps> = ({
194
195
fontWeight : 500
195
196
} }
196
197
>
197
- Edit Environment
198
+ { trans ( "enterprise.environments.unlicensed.editEnvironment" ) }
198
199
</ Button >
199
200
200
201
< Button
@@ -209,7 +210,7 @@ const UnlicensedEnvironmentView: React.FC<UnlicensedEnvironmentViewProps> = ({
209
210
fontWeight : 500
210
211
} }
211
212
>
212
- Back to Environments
213
+ { trans ( "enterprise.environments.unlicensed.backToEnvironments" ) }
213
214
</ Button >
214
215
</ Space >
215
216
</ div >
@@ -233,7 +234,7 @@ const UnlicensedEnvironmentView: React.FC<UnlicensedEnvironmentViewProps> = ({
233
234
display : 'block' ,
234
235
lineHeight : '1.5'
235
236
} } >
236
- Need assistance? Contact our team for licensing support or edit the environment configuration to resolve this issue.
237
+ { trans ( "enterprise.environments.unlicensed.helpText" ) }
237
238
</ Text >
238
239
</ Card >
239
240
0 commit comments