feat: Add multilingual deployment progress messages
Some checks failed
Build and Push Docker Image (Production) / build-and-push-main (push) Failing after 3m9s
Build and Push Docker Image (Staging) / build-and-push-staging (push) Failing after 30s

- 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:
Oussama Douhou
2026-01-13 16:40:05 +01:00
parent dd41bb5a6a
commit 86fe7a8bf1
4 changed files with 89 additions and 15 deletions

View File

@@ -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);