feat: Add multilingual deployment progress messages
- Created backend i18n system with EN/NL/AR translations - Frontend now sends language preference with deployment request - Backend deployment messages follow user's selected language - Translated key messages: initializing, creating app, SSL waiting, etc. - Added top margin (100px) on mobile to prevent language button overlap Fixes real-time deployment status showing English regardless of language selection.
This commit is contained in:
@@ -10,9 +10,10 @@ import type { DeploymentState as OrchestratorDeploymentState } from './orchestra
|
||||
const PORT = parseInt(process.env.PORT || '3000', 10);
|
||||
const HOST = process.env.HOST || '0.0.0.0';
|
||||
|
||||
// Extended deployment state for HTTP server (adds logs)
|
||||
// Extended deployment state for HTTP server (adds logs and language)
|
||||
interface HttpDeploymentState extends OrchestratorDeploymentState {
|
||||
logs: string[];
|
||||
lang: string;
|
||||
}
|
||||
|
||||
const deployments = new Map<string, HttpDeploymentState>();
|
||||
@@ -90,6 +91,7 @@ async function deployStack(deploymentId: string): Promise<void> {
|
||||
registryId: process.env.STACK_REGISTRY_ID,
|
||||
sharedProjectId: process.env.SHARED_PROJECT_ID,
|
||||
sharedEnvironmentId: process.env.SHARED_ENVIRONMENT_ID,
|
||||
lang: deployment.lang,
|
||||
});
|
||||
|
||||
// Final update with logs
|
||||
@@ -144,7 +146,7 @@ app.get('/health', (c) => {
|
||||
app.post('/api/deploy', async (c) => {
|
||||
try {
|
||||
const body = await c.req.json();
|
||||
const { name } = body;
|
||||
const { name, lang = 'en' } = body;
|
||||
|
||||
// Validate name
|
||||
const validation = validateStackName(name);
|
||||
@@ -197,6 +199,7 @@ app.post('/api/deploy', async (c) => {
|
||||
started: new Date().toISOString(),
|
||||
},
|
||||
logs: [],
|
||||
lang,
|
||||
};
|
||||
|
||||
deployments.set(deploymentId, deployment);
|
||||
|
||||
Reference in New Issue
Block a user