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

Commit1eddf6d

Browse files
committed
Add trans for Apps, queries and DS tab
1 parent6e3ba72 commit1eddf6d

File tree

4 files changed

+174
-81
lines changed

4 files changed

+174
-81
lines changed

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

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2716,6 +2716,96 @@ export const en = {
27162716
"showingResults":"Showing {count} of {total} user groups",
27172717
"paginationTotal":"{start}-{end} of {total} user groups",
27182718
"noUserGroupsFound":"No user groups found in this environment"
2719+
},
2720+
"apps":{
2721+
"title":"Apps",
2722+
"subtitle":"Manage workspace applications",
2723+
"refresh":"Refresh",
2724+
"errorLoadingApps":"Error loading apps",
2725+
"configurationIssue":"Configuration Issue",
2726+
"missingConfiguration":"Missing required configuration: API key or API service URL",
2727+
"totalApps":"Total Apps",
2728+
"publishedApps":"Published Apps",
2729+
"managedApps":"Managed Apps",
2730+
"unmanagedApps":"Unmanaged Apps",
2731+
"app":"App",
2732+
"status":"Status",
2733+
"published":"Published",
2734+
"draft":"Draft",
2735+
"managed":"Managed",
2736+
"unmanaged":"Unmanaged",
2737+
"deploy":"Deploy",
2738+
"audit":"Audit",
2739+
"appMustBeManagedToDeploy":"App must be managed before it can be deployed",
2740+
"deployThisApp":"Deploy this app to another environment",
2741+
"viewAuditLogs":"View Audit Logs",
2742+
"searchApps":"Search apps by name or ID",
2743+
"showAll":"Show All",
2744+
"managedOnly":"Managed Only",
2745+
"showingResults":"Showing {count} of {total} apps",
2746+
"paginationTotal":"{start}-{end} of {total} apps",
2747+
"noAppsFound":"No apps found in this workspace",
2748+
"appRecycled":"This app has been moved to recycle bin",
2749+
"managedSuccess":"{name} is now Managed",
2750+
"unmanagedSuccess":"{name} is now Unmanaged",
2751+
"managedError":"Failed to change managed status for {name}"
2752+
},
2753+
"dataSources":{
2754+
"title":"Data Sources",
2755+
"subtitle":"Manage workspace data connections",
2756+
"refresh":"Refresh",
2757+
"errorLoadingDataSources":"Error loading data sources",
2758+
"configurationIssue":"Configuration Issue",
2759+
"missingConfiguration":"Missing required configuration: API key or API service URL",
2760+
"totalDataSources":"Total Data Sources",
2761+
"availableTypes":"Available Types",
2762+
"managed":"Managed",
2763+
"unmanaged":"Unmanaged",
2764+
"dataSource":"Data Source",
2765+
"type":"Type",
2766+
"status":"Status",
2767+
"deploy":"Deploy",
2768+
"audit":"Audit",
2769+
"dataSourceMustBeManagedToDeploy":"Data source must be managed before it can be deployed",
2770+
"deployThisDataSource":"Deploy this data source to another environment",
2771+
"viewAuditLogs":"View Audit Logs",
2772+
"searchDataSources":"Search data sources by name or ID",
2773+
"showAll":"Show All",
2774+
"managedOnly":"Managed Only",
2775+
"showingResults":"Showing {count} of {total} data sources",
2776+
"paginationTotal":"{start}-{end} of {total} data sources",
2777+
"noDataSourcesFound":"No data sources found in this workspace",
2778+
"managedSuccess":"{name} is now Managed",
2779+
"unmanagedSuccess":"{name} is now Unmanaged",
2780+
"managedError":"Failed to change managed status for {name}"
2781+
},
2782+
"queries":{
2783+
"title":"Queries",
2784+
"subtitle":"Manage workspace API queries",
2785+
"refresh":"Refresh",
2786+
"errorLoadingQueries":"Error loading queries",
2787+
"configurationIssue":"Configuration Issue",
2788+
"missingConfiguration":"Missing required configuration: API key or API service URL",
2789+
"totalQueries":"Total Queries",
2790+
"managed":"Managed",
2791+
"unmanaged":"Unmanaged",
2792+
"query":"Query",
2793+
"creator":"Creator",
2794+
"status":"Status",
2795+
"deploy":"Deploy",
2796+
"audit":"Audit",
2797+
"queryMustBeManagedToDeploy":"Query must be managed before it can be deployed",
2798+
"deployThisQuery":"Deploy this query to another environment",
2799+
"viewAuditLogs":"View Audit Logs",
2800+
"searchQueries":"Search queries by name or ID",
2801+
"showAll":"Show All",
2802+
"managedOnly":"Managed Only",
2803+
"showingResults":"Showing {count} of {total} queries",
2804+
"paginationTotal":"{start}-{end} of {total} queries",
2805+
"noQueriesFound":"No queries found in this workspace",
2806+
"managedSuccess":"{name} is now Managed",
2807+
"unmanagedSuccess":"{name} is now Unmanaged",
2808+
"managedError":"Failed to change managed status for {name}"
27192809
}
27202810
}
27212811
},

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

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { useDeployModal } from '../context/DeployModalContext';
1111
import{appsConfig}from'../config/apps.config';
1212
importhistoryfrom"@lowcoder-ee/util/history";
1313
import{messageInstance}from'lowcoder-design/src/components/GlobalInstances';
14+
import{trans}from'i18n';
1415

1516
const{ Search}=Input;
1617

@@ -117,10 +118,10 @@ const AppsTab: React.FC<AppsTabProps> = ({ environment, workspaceId }) => {
117118
unmanaged:prev.total-managed
118119
}));
119120

120-
messageInstance.success(`${app.name} is now${checked ?'Managed' :'Unmanaged'}`);
121+
messageInstance.success(trans(checked ?"enterprise.environments.apps.managedSuccess" :"enterprise.environments.apps.unmanagedSuccess",{name:app.name}));
121122
returntrue;
122123
}catch(error){
123-
messageInstance.error(`Failed to change managed status for${app.name}`);
124+
messageInstance.error(trans("enterprise.environments.apps.managedError",{name:app.name}));
124125
returnfalse;
125126
}finally{
126127
setRefreshing(false);
@@ -141,7 +142,7 @@ const AppsTab: React.FC<AppsTabProps> = ({ environment, workspaceId }) => {
141142
// Table columns
142143
constcolumns=[
143144
{
144-
title:'App',
145+
title:trans("enterprise.environments.apps.app"),
145146
key:'app',
146147
render:(app:App)=>(
147148
<divstyle={{display:'flex',alignItems:'center'}}>
@@ -158,7 +159,7 @@ const AppsTab: React.FC<AppsTabProps> = ({ environment, workspaceId }) => {
158159
<divstyle={{display:'flex',alignItems:'center',gap:8}}>
159160
<spanstyle={{fontWeight:500}}>{app.name}</span>
160161
{app.applicationStatus==='RECYCLED'&&(
161-
<Tooltiptitle="This app has been moved to recycle bin">
162+
<Tooltiptitle={trans("enterprise.environments.apps.appRecycled")}>
162163
<DeleteOutlined
163164
style={{
164165
color:'#faad14',
@@ -176,24 +177,24 @@ const AppsTab: React.FC<AppsTabProps> = ({ environment, workspaceId }) => {
176177
),
177178
},
178179
{
179-
title:'Status',
180+
title:trans("enterprise.environments.apps.status"),
180181
key:'status',
181182
render:(app:App)=>(
182183
<Spacedirection="vertical"size={0}>
183184
<Tagcolor={app.published ?'success' :'default'}style={{borderRadius:'4px'}}>
184-
{app.published ?<CheckCircleFilled/> :null}{app.published ?'Published' :'Draft'}
185+
{app.published ?<CheckCircleFilled/> :null}{app.published ?trans("enterprise.environments.apps.published") :trans("enterprise.environments.apps.draft")}
185186
</Tag>
186187
<Tag
187188
color={app.managed ?'processing' :'default'}
188189
style={{marginTop:8,borderRadius:'4px'}}
189190
>
190-
{app.managed ?<CloudServerOutlined/> :<DisconnectOutlined/>}{app.managed ?'Managed' :'Unmanaged'}
191+
{app.managed ?<CloudServerOutlined/> :<DisconnectOutlined/>}{app.managed ?trans("enterprise.environments.apps.managed") :trans("enterprise.environments.apps.unmanaged")}
191192
</Tag>
192193
</Space>
193194
),
194195
},
195196
{
196-
title:'Managed',
197+
title:trans("enterprise.environments.apps.managed"),
197198
key:'managed',
198199
render:(_:any,app:App)=>(
199200
<Switch
@@ -204,22 +205,22 @@ const AppsTab: React.FC<AppsTabProps> = ({ environment, workspaceId }) => {
204205
),
205206
},
206207
{
207-
title:'Actions',
208+
title:trans("enterprise.environments.workspaces.actions"),
208209
key:'actions',
209210
render:(_:any,app:App)=>(
210211
<SpaceonClick={(e)=>e.stopPropagation()}>
211212

212-
<Tooltiptitle={!app.managed ?"App must be managed before it can be deployed" :"Deploy this app to another environment"}>
213+
<Tooltiptitle={!app.managed ?trans("enterprise.environments.apps.appMustBeManagedToDeploy") :trans("enterprise.environments.apps.deployThisApp")}>
213214
<Button
214215
type="primary"
215216
icon={<CloudUploadOutlined/>}
216217
onClick={()=>openDeployModal(app,appsConfig,environment)}
217218
disabled={!app.managed}
218219
>
219-
Deploy
220+
{trans("enterprise.environments.apps.deploy")}
220221
</Button>
221222
</Tooltip>
222-
<Tooltiptitle="View Audit Logs">
223+
<Tooltiptitle={trans("enterprise.environments.apps.viewAuditLogs")}>
223224
<Button
224225
icon={<AuditOutlined/>}
225226
onClick={(e)=>{
@@ -228,7 +229,7 @@ const AppsTab: React.FC<AppsTabProps> = ({ environment, workspaceId }) => {
228229
window.open(auditUrl,'_blank');
229230
}}
230231
>
231-
Audit
232+
{trans("enterprise.environments.apps.audit")}
232233
</Button>
233234
</Tooltip>
234235
</Space>
@@ -289,25 +290,25 @@ const AppsTab: React.FC<AppsTabProps> = ({ environment, workspaceId }) => {
289290
}}>
290291
<div>
291292
<Titlelevel={4}style={{margin:0,marginBottom:'4px'}}>
292-
<AppstoreOutlinedstyle={{marginRight:8}}/>Apps
293+
<AppstoreOutlinedstyle={{marginRight:8}}/>{trans("enterprise.environments.apps.title")}
293294
</Title>
294295
<pstyle={{marginBottom:0,color:'#8c8c8c',fontSize:'14px'}}>
295-
Manage workspace applications
296+
{trans("enterprise.environments.apps.subtitle")}
296297
</p>
297298
</div>
298299
<Button
299300
icon={<SyncOutlinedspin={refreshing}/>}
300301
onClick={handleRefresh}
301302
loading={loading}
302303
>
303-
Refresh
304+
{trans("enterprise.environments.apps.refresh")}
304305
</Button>
305306
</div>
306307

307308
{/* Error display */}
308309
{error&&(
309310
<Alert
310-
message="Error loadingapps"
311+
message={trans("enterprise.environments.apps.errorLoadingApps")}
311312
description={error}
312313
type="error"
313314
showIcon
@@ -318,8 +319,8 @@ const AppsTab: React.FC<AppsTabProps> = ({ environment, workspaceId }) => {
318319
{/* Configuration warnings */}
319320
{(!environment.environmentApikey||!environment.environmentApiServiceUrl)&&!error&&(
320321
<Alert
321-
message="Configuration Issue"
322-
description="Missing required configuration: API key or API service URL"
322+
message={trans("enterprise.environments.apps.configurationIssue")}
323+
description={trans("enterprise.environments.apps.missingConfiguration")}
323324
type="warning"
324325
showIcon
325326
style={{marginBottom:"16px"}}
@@ -330,28 +331,28 @@ const AppsTab: React.FC<AppsTabProps> = ({ environment, workspaceId }) => {
330331
<Rowgutter={[16,16]}style={{marginBottom:'20px'}}>
331332
<Colxs={12}sm={12}md={6}>
332333
<StatCard
333-
title="Total Apps"
334+
title={trans("enterprise.environments.apps.totalApps")}
334335
value={stats.total}
335336
icon={<AppstoreOutlined/>}
336337
/>
337338
</Col>
338339
<Colxs={12}sm={12}md={6}>
339340
<StatCard
340-
title="Published Apps"
341+
title={trans("enterprise.environments.apps.publishedApps")}
341342
value={stats.published}
342343
icon={<CheckCircleFilled/>}
343344
/>
344345
</Col>
345346
<Colxs={12}sm={12}md={6}>
346347
<StatCard
347-
title="Managed Apps"
348+
title={trans("enterprise.environments.apps.managedApps")}
348349
value={stats.managed}
349350
icon={<CloudServerOutlined/>}
350351
/>
351352
</Col>
352353
<Colxs={12}sm={12}md={6}>
353354
<StatCard
354-
title="Unmanaged Apps"
355+
title={trans("enterprise.environments.apps.unmanagedApps")}
355356
value={stats.unmanaged}
356357
icon={<DisconnectOutlined/>}
357358
/>
@@ -371,15 +372,15 @@ const AppsTab: React.FC<AppsTabProps> = ({ environment, workspaceId }) => {
371372
</div>
372373
) :apps.length===0 ?(
373374
<Empty
374-
description={error||"Noapps found in this workspace"}
375+
description={error||trans("enterprise.environments.apps.noAppsFound")}
375376
image={Empty.PRESENTED_IMAGE_SIMPLE}
376377
/>
377378
) :(
378379
<>
379380
{/* Search and Filter Bar */}
380381
<divstyle={{display:'flex',justifyContent:'space-between',marginBottom:16}}>
381382
<Search
382-
placeholder="Searchapps by name or ID"
383+
placeholder={trans("enterprise.environments.apps.searchApps")}
383384
allowClear
384385
onSearch={value=>setSearchText(value)}
385386
onChange={e=>setSearchText(e.target.value)}
@@ -391,13 +392,13 @@ const AppsTab: React.FC<AppsTabProps> = ({ environment, workspaceId }) => {
391392
icon={<FilterOutlined/>}
392393
style={{marginLeft:'8px'}}
393394
>
394-
{showManagedOnly ?'Show All' :'Managed Only'}
395+
{showManagedOnly ?trans("enterprise.environments.apps.showAll") :trans("enterprise.environments.apps.managedOnly")}
395396
</Button>
396397
</div>
397398

398399
{searchText&&displayedApps.length!==apps.length&&(
399400
<divstyle={{marginBottom:16,color:'#8c8c8c',fontSize:'13px'}}>
400-
Showing{displayedApps.length} of{apps.length} apps
401+
{trans("enterprise.environments.apps.showingResults",{count:displayedApps.length,total:apps.length})}
401402
</div>
402403
)}
403404

@@ -407,7 +408,7 @@ const AppsTab: React.FC<AppsTabProps> = ({ environment, workspaceId }) => {
407408
rowKey="applicationId"
408409
pagination={{
409410
pageSize:10,
410-
showTotal:(total,range)=>`${range[0]}-${range[1]} of${total} apps`,
411+
showTotal:(total,range)=>trans("enterprise.environments.apps.paginationTotal",{start:range[0],end:range[1],total}),
411412
size:'small'
412413
}}
413414
size="middle"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp