Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4ea9653

Browse files
committed
Add trans for Edit Environment Modal
1 parent352d715 commit4ea9653

File tree

2 files changed

+29
-25
lines changed

2 files changed

+29
-25
lines changed

‎client/packages/lowcoder/src/i18n/locales/en.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,8 +2636,10 @@ export const en = {
26362636
},
26372637
"modal":{
26382638
"createNewEnvironment":"Create New Environment",
2639+
"editEnvironment":"Edit Environment",
26392640
"cancel":"Cancel",
26402641
"createEnvironment":"Create Environment",
2642+
"saveChanges":"Save Changes",
26412643
"environmentName":"Environment Name",
26422644
"pleaseEnterName":"Please enter a name",
26432645
"nameMinLength":"Name must be at least 2 characters",
@@ -2660,6 +2662,7 @@ export const en = {
26602662
"masterEnvironment":"Master Environment",
26612663
"alreadyMasterEnvironment":"{name} is already the Master environment",
26622664
"willBeMaster":"Will be Master",
2665+
"currentlyMaster":"Currently Master",
26632666
"configurationRequirements":"Configuration Requirements",
26642667
"configurationRequirementsDesc":"Ensure that the API Service URL is configured and correct, the API key is valid, and for license verification make sure you have both the license and plugin properly installed."
26652668
}

‎client/packages/lowcoder/src/pages/setting/environments/components/EditEnvironmentModal.tsx‎

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Modal, Form, Input, Select, Switch, Button, Alert, Tooltip } from 'antd
33
import{useSelector}from'react-redux';
44
import{selectMasterEnvironment,selectHasMasterEnvironment}from'redux/selectors/enterpriseSelectors';
55
import{Environment}from'../types/environment.types';
6+
import{trans}from'i18n';
67

78
const{ Option}=Select;
89

@@ -81,22 +82,22 @@ const EditEnvironmentModal: React.FC<EditEnvironmentModalProps> = ({
8182

8283
return(
8384
<Modal
84-
title="Edit Environment"
85+
title={trans("enterprise.environments.modal.editEnvironment")}
8586
open={visible}
8687
onCancel={onClose}
8788
maskClosable={true}
8889
destroyOnHidden={true}
8990
footer={[
9091
<Buttonkey="back"onClick={onClose}>
91-
Cancel
92+
{trans("enterprise.environments.modal.cancel")}
9293
</Button>,
9394
<Button
9495
key="submit"
9596
type="primary"
9697
loading={loading||submitLoading}
9798
onClick={handleSubmit}
9899
>
99-
Save Changes
100+
{trans("enterprise.environments.modal.saveChanges")}
100101
</Button>
101102
]}
102103
>
@@ -107,72 +108,72 @@ const EditEnvironmentModal: React.FC<EditEnvironmentModalProps> = ({
107108
>
108109
<Form.Item
109110
name="environmentName"
110-
label="Environment Name"
111-
rules={[{required:true,message:'Please enter a name'}]}
111+
label={trans("enterprise.environments.modal.environmentName")}
112+
rules={[{required:true,message:trans("enterprise.environments.modal.pleaseEnterName")}]}
112113
>
113-
<Inputplaceholder="Enter environment name"/>
114+
<Inputplaceholder={trans("enterprise.environments.modal.enterEnvironmentName")}/>
114115
</Form.Item>
115116

116117
<Form.Item
117118
name="environmentDescription"
118-
label="Description"
119+
label={trans("enterprise.environments.modal.description")}
119120
>
120121
<Input.TextArea
121-
placeholder="Enter description"
122+
placeholder={trans("enterprise.environments.modal.enterDescription")}
122123
rows={3}
123124
/>
124125
</Form.Item>
125126

126127
<Form.Item
127128
name="environmentType"
128-
label="Stage"
129-
rules={[{required:true,message:'Please select a stage'}]}
129+
label={trans("enterprise.environments.modal.stage")}
130+
rules={[{required:true,message:trans("enterprise.environments.modal.pleaseSelectStage")}]}
130131
>
131-
<Selectplaceholder="Select stage">
132-
<Optionvalue="DEV">Development (DEV)</Option>
133-
<Optionvalue="TEST">Testing (TEST)</Option>
134-
<Optionvalue="PREPROD">Pre-Production (PREPROD)</Option>
135-
<Optionvalue="PROD">Production (PROD)</Option>
132+
<Selectplaceholder={trans("enterprise.environments.modal.selectStage")}>
133+
<Optionvalue="DEV">{trans("enterprise.environments.modal.development")}</Option>
134+
<Optionvalue="TEST">{trans("enterprise.environments.modal.testing")}</Option>
135+
<Optionvalue="PREPROD">{trans("enterprise.environments.modal.preProduction")}</Option>
136+
<Optionvalue="PROD">{trans("enterprise.environments.modal.production")}</Option>
136137
</Select>
137138
</Form.Item>
138139

139140
<Form.Item
140141
name="environmentFrontendUrl"
141-
label="Frontend URL"
142+
label={trans("enterprise.environments.modal.frontendUrl")}
142143
>
143144
<Inputplaceholder="https://example.com"/>
144145
</Form.Item>
145146

146147
<Form.Item
147148
name="environmentApiServiceUrl"
148-
label="API Service URL"
149+
label={trans("enterprise.environments.modal.apiServiceUrl")}
149150
>
150151
<Inputplaceholder="https://api.example.com"/>
151152
</Form.Item>
152153

153154
<Form.Item
154155
name="environmentNodeServiceUrl"
155-
label="Node Service URL"
156+
label={trans("enterprise.environments.modal.nodeServiceUrl")}
156157
>
157158
<Inputplaceholder="https://node.example.com"/>
158159
</Form.Item>
159160

160161
<Form.Item
161162
name="environmentApikey"
162-
label="API Key"
163+
label={trans("enterprise.environments.modal.apiKey")}
163164
>
164165
<Input.TextArea
165-
placeholder="Enter API key"
166+
placeholder={trans("enterprise.environments.modal.enterApiKey")}
166167
rows={2}
167168
/>
168169
</Form.Item>
169170

170-
<Form.Itemlabel="Master Environment">
171+
<Form.Itemlabel={trans("enterprise.environments.modal.masterEnvironment")}>
171172
<divstyle={{display:'flex',alignItems:'center',gap:'12px'}}>
172173
<Tooltip
173174
title={
174175
hasOtherMaster&&!isMaster
175-
?`${masterEnvironment?.environmentName} is already the Master environment`
176+
?trans("enterprise.environments.modal.alreadyMasterEnvironment",{name:masterEnvironment?.environmentName})
176177
:''
177178
}
178179
>
@@ -185,15 +186,15 @@ const EditEnvironmentModal: React.FC<EditEnvironmentModalProps> = ({
185186
</Tooltip>
186187
{isMaster&&(
187188
<spanstyle={{color:'#faad14',fontSize:'12px'}}>
188-
Currently Master
189+
{trans("enterprise.environments.modal.currentlyMaster")}
189190
</span>
190191
)}
191192
</div>
192193
</Form.Item>
193194

194195
<Alert
195-
message="Configuration Requirements"
196-
description="Ensure that the API Service URL is configured and correct, the API key is valid, and for license verification make sure you have both the license and plugin properly installed."
196+
message={trans("enterprise.environments.modal.configurationRequirements")}
197+
description={trans("enterprise.environments.modal.configurationRequirementsDesc")}
197198
type="warning"
198199
showIcon
199200
style={{marginTop:'16px'}}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp