From e43274e9a217979bdd67a2443c40539fbf8b4f26 Mon Sep 17 00:00:00 2001 From: keyhan Date: Fri, 12 Jun 2026 00:48:45 +0330 Subject: [PATCH] Localize the deploy wizard. Move the multi-step deploy wizard (app type/runtime, source, versions & database, optional services, resources & cluster assignment, custom domain + DNS, env vars, cost/payment, review and the provisioning overlay) onto a dashboard.deployWizard dictionary, with localized runtime descriptions, billing cycles, stage labels and RTL-aware controls. This completes full fa-IR/en-US localization of the dashboard. Co-Authored-By: Claude Opus 4.8 --- .../src/app/[lang]/dashboard/deploy/page.tsx | 474 ++++++++---------- frontend/src/i18n/dictionaries/en.ts | 129 +++++ frontend/src/i18n/dictionaries/fa.ts | 135 +++++ frontend/tsconfig.tsbuildinfo | 2 +- 4 files changed, 483 insertions(+), 257 deletions(-) diff --git a/frontend/src/app/[lang]/dashboard/deploy/page.tsx b/frontend/src/app/[lang]/dashboard/deploy/page.tsx index 412cc1a..2dca928 100644 --- a/frontend/src/app/[lang]/dashboard/deploy/page.tsx +++ b/frontend/src/app/[lang]/dashboard/deploy/page.tsx @@ -1,9 +1,10 @@ 'use client'; import { useState, useRef, useCallback, useMemo } from 'react'; -import { useRouter } from 'next/navigation'; import { useMutation, useQuery } from '@tanstack/react-query'; import api from '@/lib/api'; +import { useT, useLocale } from '@/i18n/I18nProvider'; +import { useLocalizedRouter } from '@/i18n/navigation'; import { parseDotenv } from '@/lib/parseDotenv'; import { useAuthStore } from '@/lib/store'; import { useDeployProgressStore } from '@/lib/deploy-progress-store'; @@ -21,8 +22,6 @@ import type { } from '@/types'; import { Hexagon, FolderUp, Link as LinkIcon, CheckCircle, Package, Server, Scale, Home, Target, BarChart3, RotateCw, KeyRound, Rocket, Clock, Upload, XCircle, Database, Eye, EyeOff, RefreshCw, DollarSign, Wallet, CreditCard, Loader2, Globe, Copy, AlertCircle, ShieldCheck } from 'lucide-react'; -const steps = ['Basic Info', 'Versions & Database', 'Resources', 'Review']; - /** WordPress uses the managed image stack — wizard hides env & optional services; strip if ever sent. */ function sanitizePayloadForWordPressRuntime(payload: CreateApplicationDto): CreateApplicationDto { if (payload.runtime !== 'wordpress') return payload; @@ -88,6 +87,7 @@ function WorkloadResourceFields({ readOnly?: boolean; onChange: (patch: Partial) => void; }) { + const dw = useT().dashboard.deployWizard; const storageStr = String(config.storageGi); const setStorage = (gb: number) => onChange({ storageGi: Math.max(0, gb) }); @@ -99,7 +99,7 @@ function WorkloadResourceFields({
- +
- +
- +