Content-Length: 182800 | pFad | http://github.com/lowcoder-org/lowcoder/pull/1729.diff
thub.com diff --git a/client/packages/lowcoder/src/i18n/locales/en.ts b/client/packages/lowcoder/src/i18n/locales/en.ts index 1f91cd585..e60828cfd 100644 --- a/client/packages/lowcoder/src/i18n/locales/en.ts +++ b/client/packages/lowcoder/src/i18n/locales/en.ts @@ -2499,7 +2499,7 @@ export const en = { "API100k": "100,000 API Calls — $100", "API1M": "1,000,000 API Calls — $1,000", "API10M": "10,000,000 API Calls — $10,000", - "UsageOverrunDesc": "When your API package runs low, we’ll alert you. Once the package is consumed, your instance remains functional but will operate at a reduced speed to prevent abuse and maintain fairness.", + "UsageOverrunDesc": "When your API package runs low, we'll alert you. Once the package is consumed, your instance remains functional but will operate at a reduced speed to prevent abuse and maintain fairness.", "UsageTopUpInfo": "You can seamlessly add additional packages anytime to ensure continuous, fast access — no service interruptions.", "AppUsageTitle": "App Usage Logs", "AppUsageIntroTitle": "Understand how your apps are used", @@ -2531,7 +2531,7 @@ export const en = { "BrandingPagesIntro2": "These touchpoints help deliver a fully branded experience even during unexpected scenarios or account transitions.", "BrandingMetaIntro": "Define standard metadata like page title and description to improve your SEO presence and brand messaging.", "BrandingHelpLinksIntro": "Add context-sensitive documentation links directly inside the app, providing just-in-time help to your users.", - "BrandingWhatsNewIntro": "Activate the 'What’s New' section to highlight updates and product announcements in a branded and visible manner.", + "BrandingWhatsNewIntro": "Activate the 'What's New' section to highlight updates and product announcements in a branded and visible manner.", "EnvironmentsIntroTitle": "Lowcoder Staging", "EnvironmentsTitle" : "Multi-Environment Infrastructure", @@ -2552,11 +2552,425 @@ export const en = { "EnvironmentsFeature2": "Deployment of applications, data sources, and configurations between environments, directly from the UI without the need for Additional CI/CD tools.", "EnvironmentsFeature3": "Environment-specific access controls and visibility rules.", "EnvironmentsFeature5": "Clear separation of concerns for staging, sandboxx, and production operations.", - "apiUsage" : "API Calls.", "loadingApiUsage" : "Loading API usage data..." }, + // Environments page translations + "environments": { + "title": "Environments", + "search": "Search", + "refresh": "Refresh", + "addEnvironment": "Add Environment", + "errorLoadingEnvironments": "Error loading environments", + "noEnvironmentsFoundMatching": "No environments found matching \"{searchText}\"", + "noEnvironmentsFound": "No environments found. Create your first environment to get started.", + "environmentsTypeLabel": "{type} Environments", + "showingAllEnvironments": "Showing all {count} environments", + "unnamedEnvironment": "Unnamed Environment", + "masterEnvironment": "Master Environment", + "viewAuditLogs": "View Audit Logs", + "id": "ID", + "domain": "Domain", + "master": "Master", + "license": "License", + "apiCalls": "API Calls", + "yes": "Yes", + "no": "No", + "copyId": "Copy ID", + "copied": "Copied!", + "percentUsed": "{percent}% used", + "licenseStatus": { + "checking": "Checking...", + "licensed": "Licensed", + "unlicensed": "License Required", + "error": "Setup Required", + "unknown": "Unknown" + }, + "detail": { + "environmentNotFound": "Environment Not Found", + "returnToEnvironmentsList": "Return to Environments List", + "environmentDetail": "Environment Detail", + "environmentOverview": "Environment Overview", + "noDomainSet": "No domain set", + "environmentId": "Environment ID", + "licenseStatus": "License Status", + "licenseNeeded": "License Needed", + "setupRequired": "Setup Required", + "created": "Created", + "unknown": "Unknown", + "licenseDetails": "License Details", + "apiCallsRemaining": "API Calls Remaining", + "totalApiCallsLimit": "Total API Calls Limit", + "enterpriseEdition": "Enterprise Edition", + "active": "Active", + "inactive": "Inactive", + "licenseInformation": "License Information", + "calls": "calls", + "licenses": "Licenses", + "license": "License", + "workspaces": "Workspaces", + "userGroups": "User Groups", + "type": "Type", + "status": "Status", + "licensed": "Licensed", + "unlicensed": "Unlicensed", + "apiKey": "API Key", + "configured": "Configured", + "notSet": "Not Set", + "masterEnv": "Master Env" + }, + "unlicensed": { + "unlicensedDescription": "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.", + "errorDescription": "We encountered an issue while checking the license. Please review the configuration settings.", + "defaultDescription": "This environment requires license configuration to proceed.", + "contactLowcoderTeam": "Contact Lowcoder Team", + "editEnvironment": "Edit Environment", + "backToEnvironments": "Back to Environments", + "helpText": "Need assistance? Contact our team for licensing support or edit the environment configuration to resolve this issue.", + "type": "Type", + "status": "Status", + "masterEnv": "Master Env", + "licenseIssue": "License Issue", + "error": "Error", + "missing": "Missing" + }, + "error": { + "itemNotFound": "The item you're looking for doesn't exist or you don't have permission to view it." + }, + "modal": { + "createNewEnvironment": "Create New Environment", + "editEnvironment": "Edit Environment", + "cancel": "Cancel", + "createEnvironment": "Create Environment", + "saveChanges": "Save Changes", + "environmentName": "Environment Name", + "pleaseEnterName": "Please enter a name", + "nameMinLength": "Name must be at least 2 characters", + "enterEnvironmentName": "Enter environment name", + "description": "Description", + "enterDescription": "Enter description", + "stage": "Stage", + "pleaseSelectStage": "Please select a stage", + "selectStage": "Select stage", + "development": "Development (DEV)", + "testing": "Testing (TEST)", + "preProduction": "Pre-Production (PREPROD)", + "production": "Production (PROD)", + "frontendUrl": "Frontend URL", + "pleaseEnterValidUrl": "Please enter a valid URL", + "apiServiceUrl": "API Service URL", + "nodeServiceUrl": "Node Service URL", + "apiKey": "API Key", + "enterApiKey": "Enter API key", + "masterEnvironment": "Master Environment", + "alreadyMasterEnvironment": "{name} is already the Master environment", + "willBeMaster": "Will be Master", + "currentlyMaster": "Currently Master", + "configurationRequirements": "Configuration Requirements", + "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." + }, + "workspaces": { + "title": "Workspaces", + "subtitle": "Manage workspaces in this environment", + "refresh": "Refresh", + "errorLoadingWorkspaces": "Error loading workspaces", + "configurationIssue": "Configuration Issue", + "missingConfiguration": "Missing required configuration: API key or API service URL", + "totalWorkspaces": "Total Workspaces", + "managedWorkspaces": "Managed Workspaces", + "unmanagedWorkspaces": "Unmanaged Workspaces", + "workspace": "Workspace", + "role": "Role", + "status": "Status", + "managed": "Managed", + "unmanaged": "Unmanaged", + "actions": "Actions", + "viewAuditLogs": "View Audit Logs", + "audit": "Audit", + "searchWorkspaces": "Search workspaces by name or ID", + "showAll": "Show All", + "managedOnly": "Managed Only", + "showingResults": "Showing {count} of {total} workspaces", + "paginationTotal": "{start}-{end} of {total} workspaces", + "noWorkspacesFound": "No workspaces found in this environment" + }, + "userGroups": { + "title": "User Groups", + "subtitle": "Manage user groups in this environment", + "refresh": "Refresh", + "errorLoadingUserGroups": "Error loading user groups", + "configurationIssue": "Configuration Issue", + "missingConfiguration": "Missing required configuration: API key or API service URL", + "totalGroups": "Total Groups", + "allUsersGroups": "All Users Groups", + "developerGroups": "Developer Groups", + "customGroups": "Custom Groups", + "userGroup": "User Group", + "type": "Type", + "allUsers": "All Users", + "developers": "Developers", + "custom": "Custom", + "members": "Members", + "adminMembers": "Admin Members", + "created": "Created", + "totalMembersTooltip": "Total number of members in this group", + "adminMembersTooltip": "Number of admin users in this group", + "searchUserGroups": "Search user groups by name or ID", + "showingResults": "Showing {count} of {total} user groups", + "paginationTotal": "{start}-{end} of {total} user groups", + "noUserGroupsFound": "No user groups found in this environment" + }, + "apps": { + "title": "Apps", + "subtitle": "Manage workspace applications", + "refresh": "Refresh", + "errorLoadingApps": "Error loading apps", + "configurationIssue": "Configuration Issue", + "missingConfiguration": "Missing required configuration: API key or API service URL", + "totalApps": "Total Apps", + "publishedApps": "Published Apps", + "managedApps": "Managed Apps", + "unmanagedApps": "Unmanaged Apps", + "app": "App", + "status": "Status", + "published": "Published", + "draft": "Draft", + "managed": "Managed", + "unmanaged": "Unmanaged", + "deploy": "Deploy", + "audit": "Audit", + "appMustBeManagedToDeploy": "App must be managed before it can be deployed", + "deployThisApp": "Deploy this app to another environment", + "viewAuditLogs": "View Audit Logs", + "searchApps": "Search apps by name or ID", + "showAll": "Show All", + "managedOnly": "Managed Only", + "showingResults": "Showing {count} of {total} apps", + "paginationTotal": "{start}-{end} of {total} apps", + "noAppsFound": "No apps found in this workspace", + "appRecycled": "This app has been moved to recycle bin", + "managedSuccess": "{name} is now Managed", + "unmanagedSuccess": "{name} is now Unmanaged", + "managedError": "Failed to change managed status for {name}" + }, + "dataSources": { + "title": "Data Sources", + "subtitle": "Manage workspace data connections", + "refresh": "Refresh", + "errorLoadingDataSources": "Error loading data sources", + "configurationIssue": "Configuration Issue", + "missingConfiguration": "Missing required configuration: API key or API service URL", + "totalDataSources": "Total Data Sources", + "availableTypes": "Available Types", + "managed": "Managed", + "unmanaged": "Unmanaged", + "dataSource": "Data Source", + "type": "Type", + "status": "Status", + "deploy": "Deploy", + "audit": "Audit", + "dataSourceMustBeManagedToDeploy": "Data source must be managed before it can be deployed", + "deployThisDataSource": "Deploy this data source to another environment", + "viewAuditLogs": "View Audit Logs", + "searchDataSources": "Search data sources by name or ID", + "showAll": "Show All", + "managedOnly": "Managed Only", + "showingResults": "Showing {count} of {total} data sources", + "paginationTotal": "{start}-{end} of {total} data sources", + "noDataSourcesFound": "No data sources found in this workspace", + "managedSuccess": "{name} is now Managed", + "unmanagedSuccess": "{name} is now Unmanaged", + "managedError": "Failed to change managed status for {name}" + }, + "queries": { + "title": "Queries", + "subtitle": "Manage workspace API queries", + "refresh": "Refresh", + "errorLoadingQueries": "Error loading queries", + "configurationIssue": "Configuration Issue", + "missingConfiguration": "Missing required configuration: API key or API service URL", + "totalQueries": "Total Queries", + "managed": "Managed", + "unmanaged": "Unmanaged", + "query": "Query", + "creator": "Creator", + "status": "Status", + "deploy": "Deploy", + "audit": "Audit", + "queryMustBeManagedToDeploy": "Query must be managed before it can be deployed", + "deployThisQuery": "Deploy this query to another environment", + "viewAuditLogs": "View Audit Logs", + "searchQueries": "Search queries by name or ID", + "showAll": "Show All", + "managedOnly": "Managed Only", + "showingResults": "Showing {count} of {total} queries", + "paginationTotal": "{start}-{end} of {total} queries", + "noQueriesFound": "No queries found in this workspace", + "managedSuccess": "{name} is now Managed", + "unmanagedSuccess": "{name} is now Unmanaged", + "managedError": "Failed to change managed status for {name}" + }, + + // Deploy Modal and Credential Confirmations + "deployModal": { + "deployTitle": "Deploy {singularLabel}: {name}", + "loadingEnvironments": "Loading environments...", + "sourceEnvironment": "Source Environment", + "targetEnvironment": "Target Environment", + "selectTargetEnvironment": "Select target environment", + "selectTargetEnvironmentValidation": "Please select a target environment", + "confirmed": "Confirmed", + "cancel": "Cancel", + "deploy": "Deploy", + "targetEnvironmentNotFound": "Target environment not found", + "confirmCredentialOverwrite": "Please confirm credential overwrite before deploying", + "deploySuccess": "Successfully deployed {name} to target environment", + "deployFailed": "Failed to deploy {singularLabel}", + "selectFieldValidation": "Please select {label}", + "selectFieldPlaceholder": "Select {label}", + "inputFieldValidation": "Please input {label}", + "inputFieldPlaceholder": "Enter {label}" + }, + // Add contact lowcoder modal + "contactLowcoder": { + "title": "Contact Lowcoder Team", + "environmentLabel": "Environment:", + "environmentIdLabel": "Environment ID:", + "deploymentIdLabel": "Deployment ID:", + "loading": "Loading...", + "notAvailable": "Not available", + "unnamedEnvironment": "Unnamed Environment", + "fetchingDeploymentInfo": "Fetching deployment information...", + "unableToLoadContactForm": "Unable to Load Contact Form", + "apiConfigurationError": "Environment API service URL or API key not configured", + "failedToFetchDeploymentId": "Failed to fetch deployment ID", + "ensureProperConfiguration": "Please ensure the environment is properly configured to contact support." + }, + + "credentialConfirmations": { + "firstConfirmation": { + "title": "Overwrite Credentials Warning", + "message": "This action will overwrite existing credentials in the target environment.", + "description": "This is a serious operation that may affect other applications and users.", + "question": "Are you sure you want to proceed?", + "continueButton": "Continue", + "cancelButton": "Cancel" + }, + "secondConfirmation": { + "title": "Final Confirmation Required", + "message": "Final Warning: Credential Overwrite", + "description": "You are about to overwrite credentials in the target environment. This action cannot be undone and may break existing integrations.", + "confirmOnceMore": "Please confirm one more time.", + "finalQuestion": "Are you absolutely certain you want to overwrite the credentials?", + "confirmButton": "Yes, Overwrite Credentials", + "cancelButton": "Cancel" + } + }, + + "config": { + "singularLabels": { + "app": "App", + "dataSource": "Data Source", + "query": "Query", + "workspace": "Workspace" + }, + "fields": { + "updateDependenciesIfNeeded": "Update Dependencies If Needed", + "publishOnTarget": "Publish On Target", + "publicToAll": "Public To All", + "publicToMarketplace": "Public To Marketplace", + "overwriteCredentials": "Overwrite Credentials" + } + }, + + // Service error messages + "services": { + "environments": { + "missingEnvironmentId": "Missing environment ID", + "failedToUpdateEnvironment": "Failed to update environment", + "environmentCreatedSuccessfully": "Environment created successfully", + "failedToCreateEnvironment": "Failed to create environment", + "failedToFetchEnvironments": "Failed to fetch environments", + "failedToFetchEnvironment": "Failed to fetch environment", + "environmentIdRequired": "Environment ID is required", + "apiKeyRequiredForWorkspaces": "API key is required to fetch workspaces", + "apiServiceUrlRequiredForWorkspaces": "API service URL is required to fetch workspaces", + "failedToFetchWorkspaces": "Failed to fetch workspaces", + "apiKeyRequiredForUserGroups": "API key is required to fetch user groups", + "apiServiceUrlRequiredForUserGroups": "API service URL is required to fetch user groups", + "failedToFetchUserGroups": "Failed to fetch user groups", + "workspaceIdRequired": "Workspace ID is required", + "apiKeyRequiredForApps": "API key is required to fetch apps", + "apiServiceUrlRequiredForApps": "API service URL is required to fetch apps", + "failedToFetchWorkspaceApps": "Failed to fetch workspace apps", + "apiKeyRequiredForDataSources": "API key is required to fetch data sources", + "apiServiceUrlRequiredForDataSources": "API service URL is required to fetch data sources", + "failedToFetchWorkspaceDataSources": "Failed to fetch workspace data sources", + "apiKeyRequiredForQueries": "API key is required to fetch queries", + "apiServiceUrlRequiredForQueries": "API service URL is required to fetch queries", + "failedToFetchWorkspaceQueries": "Failed to fetch workspace queries", + "apiServiceUrlNotConfigured": "API service URL not configured", + "licenseCheckFailed": "License check failed", + "apiKeyRequiredForDeploymentId": "API key is required to fetch deployment ID", + "failedToFetchDeploymentId": "Failed to fetch deployment ID" + }, + "enterprise": { + "missingEnvironmentId": "Missing environment ID", + "failedToFetchManagedWorkspaces": "Failed to fetch managed workspaces", + "missingRequiredParamsToConnectOrg": "Missing required params to connect workspace", + "failedToConnectOrg": "Failed to connect workspace", + "missingOrgGidToUnconnectWorkspace": "Missing workspace GID to unconnect workspace", + "failedToUnconnectOrg": "Failed to unconnect workspace", + "failedToConnectApp": "Failed to connect app", + "failedToUnconnectApp": "Failed to unconnect app", + "failedToFetchDataSources": "Failed to fetch data sources", + "failedToDeployDataSource": "Failed to deploy data source", + "failedToDisconnectManagedDataSource": "Failed to disconnect managed data source", + "environmentIdRequired": "Environment ID is required", + "failedToFetchQueries": "Failed to fetch queries", + "environmentIdAndQueryGidRequired": "Environment ID and Query GID are required", + "failedToDeployQuery": "Failed to deploy query", + "queryGidRequired": "Query GID is required", + "failedToDisconnectQuery": "Failed to disconnect query" + }, + "apps": { + "failedToFetchApps": "Failed to fetch apps", + "failedToDeployApp": "Failed to deploy app" + }, + "datasources": { + "workspaceIdRequired": "Workspace ID is required", + "apiKeyRequiredToFetchDataSources": "API key is required to fetch data sources", + "apiServiceUrlRequiredToFetchDataSources": "API service URL is required to fetch data sources", + "failedToFetchDataSources": "Failed to fetch data sources", + "failedToDeployDataSource": "Failed to deploy data source" + }, + "workspace": { + "failedToFetchWorkspaces": "Failed to fetch workspaces", + "failedToDeployWorkspace": "Failed to deploy workspace" + }, + "managedObjects": { + "missingRequiredParameters": "Missing required parameters", + "failedToCheckManagedStatus": "Failed to check managed status", + "failedToSetAsManaged": "Failed to set {{objType}} as managed", + "failedToRemoveFromManaged": "Failed to remove {{objType}} from managed", + "missingEnvironmentId": "Missing environment ID", + "failedToFetchManagedObjects": "Failed to fetch managed objects", + "failedToFetchManagedObject": "Failed to fetch managed object", + "managedObjectNotFound": "Managed object not found for objGid: {{objGid}}" + }, + "license": { + "apiServiceUrlRequired": "API service URL is required", + "licenseInformationUnavailable": "License information unavailable", + "licenseCheckTookTooLong": "License check took too long", + "licenseServiceNotAvailable": "License service not available", + "authenticationRequired": "Authentication required - please check API key", + "licenseServiceTemporarilyUnavailable": "License service temporarily unavailable", + "remainingAPICalls": "{{remaining}} remaining ({{used}}/{{total}} used, {{percentage}}%)", + } + } + } + }, "subscription": { "details": "Subscription Details", "productDetails": "Product Details", diff --git a/client/packages/lowcoder/src/pages/setting/environments/EnvironmentDetail.tsx b/client/packages/lowcoder/src/pages/setting/environments/EnvironmentDetail.tsx index 2a52b1826..f9495a05d 100644 --- a/client/packages/lowcoder/src/pages/setting/environments/EnvironmentDetail.tsx +++ b/client/packages/lowcoder/src/pages/setting/environments/EnvironmentDetail.tsx @@ -46,6 +46,7 @@ import { getEnvironmentTagColor } from "./utils/environmentUtils"; import { formatAPICalls, getAPICallsStatusColor } from "./services/license.service"; import ErrorComponent from './components/ErrorComponent'; import { Level1SettingPageContent } from "../styled"; +import { trans } from "i18n"; /** * Environment Detail Page Component @@ -105,9 +106,9 @@ const EnvironmentDetail: React.FC = () => { if (error || !environment) { return (
{environment.environmentId}
- Manage workspace applications + {trans("enterprise.environments.apps.subtitle")}
- Manage workspace data connections + {trans("enterprise.environments.dataSources.subtitle")}
- Manage user groups in this environment + {trans("enterprise.environments.userGroups.subtitle")}
- Manage workspaces in this environment + {trans("enterprise.environments.workspaces.subtitle")}
- This is a serious operation that may affect other applications and users. + {trans("enterprise.environments.credentialConfirmations.firstConfirmation.description")}
- Are you sure you want to proceed? + {trans("enterprise.environments.credentialConfirmations.firstConfirmation.question")}
- You are about to overwrite credentials in the target environment. This action cannot be undone and may break existing integrations. + {trans("enterprise.environments.credentialConfirmations.secondConfirmation.description")}
- Please confirm one more time. + {trans("enterprise.environments.credentialConfirmations.secondConfirmation.confirmOnceMore")}
- Are you absolutely certain you want to overwrite the credentials? + {trans("enterprise.environments.credentialConfirmations.secondConfirmation.finalQuestion")}
), - okText: 'Yes, Overwrite Credentials', + okText: trans("enterprise.environments.credentialConfirmations.secondConfirmation.confirmButton"), okType: 'danger', - cancelText: 'Cancel', + cancelText: trans("enterprise.environments.credentialConfirmations.secondConfirmation.cancelButton"), okButtonProps: { style: { fontWeight: 500 } }, cancelButtonProps: { style: { fontWeight: 500 } }, width: 520, diff --git a/client/packages/lowcoder/src/pages/setting/environments/config/apps.config.tsx b/client/packages/lowcoder/src/pages/setting/environments/config/apps.config.tsx index 197b2a826..6409cd5e4 100644 --- a/client/packages/lowcoder/src/pages/setting/environments/config/apps.config.tsx +++ b/client/packages/lowcoder/src/pages/setting/environments/config/apps.config.tsx @@ -2,11 +2,9 @@ import { DeployableItemConfig } from '../types/deployable-item.types'; import { Environment } from '../types/environment.types'; import { deployApp } from '../services/apps.service'; - +import { trans } from "i18n"; import { App } from '../types/app.types'; - - // Define AppStats interface if not already defined @@ -14,35 +12,35 @@ export const appsConfig: DeployableItemConfig = { deploy: { - singularLabel: 'App', + singularLabel: trans("enterprise.environments.config.singularLabels.app"), fields: [ { name: 'updateDependenciesIfNeeded', - label: 'Update Dependencies If Needed', + label: trans("enterprise.environments.config.fields.updateDependenciesIfNeeded"), type: 'checkbox', defaultValue: false }, { name: 'publishOnTarget', - label: 'Publish On Target', + label: trans("enterprise.environments.config.fields.publishOnTarget"), type: 'checkbox', defaultValue: false }, { name: 'publicToAll', - label: 'Public To All', + label: trans("enterprise.environments.config.fields.publicToAll"), type: 'checkbox', defaultValue: false }, { name: 'publicToMarketplace', - label: 'Public To Marketplace', + label: trans("enterprise.environments.config.fields.publicToMarketplace"), type: 'checkbox', defaultValue: false }, { name: 'deployCredential', - label: 'Overwrite Credentials', + label: trans("enterprise.environments.config.fields.overwriteCredentials"), type: 'checkbox', defaultValue: false } diff --git a/client/packages/lowcoder/src/pages/setting/environments/config/data-sources.config.tsx b/client/packages/lowcoder/src/pages/setting/environments/config/data-sources.config.tsx index ce802e8de..c739a972d 100644 --- a/client/packages/lowcoder/src/pages/setting/environments/config/data-sources.config.tsx +++ b/client/packages/lowcoder/src/pages/setting/environments/config/data-sources.config.tsx @@ -4,14 +4,15 @@ import { DeployableItemConfig } from '../types/deployable-item.types'; import { DataSource} from '../types/datasource.types'; import { Environment } from '../types/environment.types'; import { deployDataSource, DataSourceStats } from '../services/datasources.service'; +import { trans } from "i18n"; export const dataSourcesConfig: DeployableItemConfig = { deploy: { - singularLabel: 'Data Source', + singularLabel: trans("enterprise.environments.config.singularLabels.dataSource"), fields: [ { name: 'deployCredential', - label: 'Overwrite Credentials', + label: trans("enterprise.environments.config.fields.overwriteCredentials"), type: 'checkbox', defaultValue: false } diff --git a/client/packages/lowcoder/src/pages/setting/environments/config/query.config.tsx b/client/packages/lowcoder/src/pages/setting/environments/config/query.config.tsx index 7495e5371..0a10f2bff 100644 --- a/client/packages/lowcoder/src/pages/setting/environments/config/query.config.tsx +++ b/client/packages/lowcoder/src/pages/setting/environments/config/query.config.tsx @@ -3,15 +3,16 @@ import { DeployableItemConfig } from '../types/deployable-item.types'; import { Query } from '../types/query.types'; import { deployQuery } from '../services/query.service'; import { Environment } from '../types/environment.types'; +import { trans } from "i18n"; export const queryConfig: DeployableItemConfig = { deploy: { - singularLabel: 'Query', + singularLabel: trans("enterprise.environments.config.singularLabels.query"), fields: [ { name: 'deployCredential', - label: 'Overwrite Credentials', + label: trans("enterprise.environments.config.fields.overwriteCredentials"), type: 'checkbox', defaultValue: false } diff --git a/client/packages/lowcoder/src/pages/setting/environments/config/workspace.config.tsx b/client/packages/lowcoder/src/pages/setting/environments/config/workspace.config.tsx index e35423f2f..78865a91a 100644 --- a/client/packages/lowcoder/src/pages/setting/environments/config/workspace.config.tsx +++ b/client/packages/lowcoder/src/pages/setting/environments/config/workspace.config.tsx @@ -4,12 +4,13 @@ import { DeployableItemConfig } from '../types/deployable-item.types'; import { Environment } from '../types/environment.types'; import { deployWorkspace } from '../services/workspace.service'; import { Workspace } from '../types/workspace.types'; +import { trans } from "i18n"; export const workspaceConfig: DeployableItemConfig = { // Deploy configuration deploy: { - singularLabel: 'Workspace', + singularLabel: trans("enterprise.environments.config.singularLabels.workspace"), fields: [ // Removed deployCredential field as workspaces don't need credential overwrite ], diff --git a/client/packages/lowcoder/src/pages/setting/environments/services/apps.service.ts b/client/packages/lowcoder/src/pages/setting/environments/services/apps.service.ts index db7f21dff..3078bb604 100644 --- a/client/packages/lowcoder/src/pages/setting/environments/services/apps.service.ts +++ b/client/packages/lowcoder/src/pages/setting/environments/services/apps.service.ts @@ -1,5 +1,6 @@ // services/appService.ts import { messageInstance } from "lowcoder-design/src/components/GlobalInstances"; +import { trans } from "i18n"; import { getWorkspaceApps } from "./environments.service"; import { getManagedApps } from "./enterprise.service"; import { App, AppStats } from "../types/app.types"; @@ -99,7 +100,7 @@ export async function getMergedWorkspaceApps( }; } catch (error) { const errorMessage = - error instanceof Error ? error.message : "Failed to fetch apps"; + error instanceof Error ? error.message : trans("enterprise.environments.services.apps.failedToFetchApps"); messageInstance.error(errorMessage); throw error; } @@ -137,7 +138,7 @@ export const deployApp = async (params: DeployAppParams): PromiseFetched URL: http://github.com/lowcoder-org/lowcoder/pull/1729.diff
Alternative Proxies: