fix: resolve all TypeScript errors and add missing translation keys
This commit is contained in:
@@ -267,7 +267,7 @@ const LiveCanvas = memo(({ data, type, isStreaming }: { data: string, type: stri
|
|||||||
{renderError ? (
|
{renderError ? (
|
||||||
<div className="absolute inset-0 flex flex-col items-center justify-center p-12 text-center animate-in zoom-in-95 duration-300">
|
<div className="absolute inset-0 flex flex-col items-center justify-center p-12 text-center animate-in zoom-in-95 duration-300">
|
||||||
<StopCircle className="h-10 w-10 text-red-500/40 mb-5" />
|
<StopCircle className="h-10 w-10 text-red-500/40 mb-5" />
|
||||||
<h4 className="text-xs font-black uppercase tracking-[0.2em] text-red-400 mb-3">{t.runtimeError}</h4>
|
<h4 className="text-xs font-black uppercase tracking-[0.2em] text-red-400 mb-3">Runtime Execution Error</h4>
|
||||||
<p className="text-[9px] font-mono text-slate-500 max-w-sm border border-red-500/10 bg-red-500/5 p-4 rounded-xl leading-relaxed">
|
<p className="text-[9px] font-mono text-slate-500 max-w-sm border border-red-500/10 bg-red-500/5 p-4 rounded-xl leading-relaxed">
|
||||||
{renderError}
|
{renderError}
|
||||||
</p>
|
</p>
|
||||||
@@ -277,7 +277,7 @@ const LiveCanvas = memo(({ data, type, isStreaming }: { data: string, type: stri
|
|||||||
className="mt-6 text-[9px] font-black uppercase tracking-widest text-slate-400 hover:text-white"
|
className="mt-6 text-[9px] font-black uppercase tracking-widest text-slate-400 hover:text-white"
|
||||||
onClick={() => window.location.reload()}
|
onClick={() => window.location.reload()}
|
||||||
>
|
>
|
||||||
{t.tryRefreshing}
|
Try Refreshing Page
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
@@ -307,7 +307,7 @@ const ThinkingIndicator = () => (
|
|||||||
<div className="w-1.5 h-1.5 bg-blue-500 rounded-full animate-bounce [animation-delay:-0.15s]" />
|
<div className="w-1.5 h-1.5 bg-blue-500 rounded-full animate-bounce [animation-delay:-0.15s]" />
|
||||||
<div className="w-1.5 h-1.5 bg-blue-500 rounded-full animate-bounce" />
|
<div className="w-1.5 h-1.5 bg-blue-500 rounded-full animate-bounce" />
|
||||||
</div>
|
</div>
|
||||||
<span className="text-[10px] font-black text-blue-700/60 dark:text-blue-200/60 uppercase tracking-widest ml-2">{t.neuralLinkThinking}</span>
|
<span className="text-[10px] font-black text-blue-700/60 dark:text-blue-200/60 uppercase tracking-widest ml-2">Neural Link Thinking...</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -345,7 +345,7 @@ function parseStreamingContent(text: string, currentAgent: string) {
|
|||||||
};
|
};
|
||||||
if (preview.isStreaming) {
|
if (preview.isStreaming) {
|
||||||
const isUpdate = text.toLowerCase().includes("update") || text.toLowerCase().includes("fix") || text.toLowerCase().includes("change");
|
const isUpdate = text.toLowerCase().includes("update") || text.toLowerCase().includes("fix") || text.toLowerCase().includes("change");
|
||||||
status = isUpdate ? t.applyingEdits(preview.type) : t.generatingArtifact(preview.type);
|
status = isUpdate ? `Applying surgical edits to ${preview.type}...` : `Generating ${preview.type} artifact...`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@ function parseStreamingContent(text: string, currentAgent: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!chatDisplay && preview && preview.isStreaming) {
|
if (!chatDisplay && preview && preview.isStreaming) {
|
||||||
chatDisplay = t.renderingLive;
|
chatDisplay = "Rendering live artifact...";
|
||||||
}
|
}
|
||||||
|
|
||||||
return { chatDisplay, preview, agent, status };
|
return { chatDisplay, preview, agent, status };
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ export default function GoogleAdsGenerator() {
|
|||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("[GoogleAdsGenerator] Generation error:", err);
|
console.error("[GoogleAdsGenerator] Generation error:", err);
|
||||||
setError(err instanceof Error ? err.message : t.error);
|
setError(err instanceof Error ? err.message : t.errorGenerate);
|
||||||
} finally {
|
} finally {
|
||||||
setProcessing(false);
|
setProcessing(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export const translations = {
|
|||||||
settings: "Settings",
|
settings: "Settings",
|
||||||
error: "Error",
|
error: "Error",
|
||||||
configApiKey: "Configure API key in Settings",
|
configApiKey: "Configure API key in Settings",
|
||||||
|
emptyState: "Generated content will appear here",
|
||||||
},
|
},
|
||||||
promptEnhancer: {
|
promptEnhancer: {
|
||||||
title: "Prompt Enhancer",
|
title: "Prompt Enhancer",
|
||||||
@@ -55,6 +56,7 @@ export const translations = {
|
|||||||
generatedDesc: "Structured requirements document ready for development",
|
generatedDesc: "Structured requirements document ready for development",
|
||||||
emptyState: "Generated PRD will appear here",
|
emptyState: "Generated PRD will appear here",
|
||||||
enterIdeaError: "Please enter an idea to generate PRD",
|
enterIdeaError: "Please enter an idea to generate PRD",
|
||||||
|
errorGenerate: "Failed to generate PRD",
|
||||||
sections: {
|
sections: {
|
||||||
overview: "Product Overview",
|
overview: "Product Overview",
|
||||||
personas: "User Personas & Use Cases",
|
personas: "User Personas & Use Cases",
|
||||||
@@ -400,6 +402,7 @@ export const translations = {
|
|||||||
architecture: "Architecture",
|
architecture: "Architecture",
|
||||||
techStack: "Tech Stack",
|
techStack: "Tech Stack",
|
||||||
filesPlanned: (count: number) => `${count} modules planned`,
|
filesPlanned: (count: number) => `${count} modules planned`,
|
||||||
|
files: "Files",
|
||||||
approveGenerate: "Approve & Generate Development",
|
approveGenerate: "Approve & Generate Development",
|
||||||
startingEngine: "Starting Engine...",
|
startingEngine: "Starting Engine...",
|
||||||
activateArtifact: "Activate Artifact",
|
activateArtifact: "Activate Artifact",
|
||||||
@@ -467,6 +470,7 @@ export const translations = {
|
|||||||
settings: "Настройки",
|
settings: "Настройки",
|
||||||
error: "Ошибка",
|
error: "Ошибка",
|
||||||
configApiKey: "Настройте API ключ в настройках",
|
configApiKey: "Настройте API ключ в настройках",
|
||||||
|
emptyState: "Сгенерированный контент появится здесь",
|
||||||
},
|
},
|
||||||
promptEnhancer: {
|
promptEnhancer: {
|
||||||
title: "Улучшение промптов",
|
title: "Улучшение промптов",
|
||||||
@@ -488,6 +492,7 @@ export const translations = {
|
|||||||
generatedDesc: "Структурированный документ требований готов к разработке",
|
generatedDesc: "Структурированный документ требований готов к разработке",
|
||||||
emptyState: "Здесь появится созданный PRD",
|
emptyState: "Здесь появится созданный PRD",
|
||||||
enterIdeaError: "Пожалуйста, введите идею для создания PRD",
|
enterIdeaError: "Пожалуйста, введите идею для создания PRD",
|
||||||
|
errorGenerate: "Не удалось создать PRD",
|
||||||
sections: {
|
sections: {
|
||||||
overview: "Обзор продукта",
|
overview: "Обзор продукта",
|
||||||
personas: "Персоны пользователей",
|
personas: "Персоны пользователей",
|
||||||
@@ -833,6 +838,7 @@ export const translations = {
|
|||||||
architecture: "Архитектура",
|
architecture: "Архитектура",
|
||||||
techStack: "Стек технологий",
|
techStack: "Стек технологий",
|
||||||
filesPlanned: (count: number) => `Запланировано ${count} модулей`,
|
filesPlanned: (count: number) => `Запланировано ${count} модулей`,
|
||||||
|
files: "Файлы",
|
||||||
approveGenerate: "Одобрить и начать разработку",
|
approveGenerate: "Одобрить и начать разработку",
|
||||||
startingEngine: "Запуск двигателя...",
|
startingEngine: "Запуск двигателя...",
|
||||||
activateArtifact: "Активировать артефакт",
|
activateArtifact: "Активировать артефакт",
|
||||||
@@ -900,6 +906,7 @@ export const translations = {
|
|||||||
settings: "הגדרות",
|
settings: "הגדרות",
|
||||||
error: "שגיאה",
|
error: "שגיאה",
|
||||||
configApiKey: "הגדר מפתח API בהגדרות",
|
configApiKey: "הגדר מפתח API בהגדרות",
|
||||||
|
emptyState: "תוכן שהופק יופיע כאן",
|
||||||
},
|
},
|
||||||
promptEnhancer: {
|
promptEnhancer: {
|
||||||
title: "משפר פרומפטים",
|
title: "משפר פרומפטים",
|
||||||
@@ -921,6 +928,7 @@ export const translations = {
|
|||||||
generatedDesc: "מסמך דרישות מובנה מוכן לפיתוח",
|
generatedDesc: "מסמך דרישות מובנה מוכן לפיתוח",
|
||||||
emptyState: "PRD שחולל יופיע כאן",
|
emptyState: "PRD שחולל יופיע כאן",
|
||||||
enterIdeaError: "אנא הזן רעיון לחולל PRD",
|
enterIdeaError: "אנא הזן רעיון לחולל PRD",
|
||||||
|
errorGenerate: "נכשל בחוללת PRD",
|
||||||
sections: {
|
sections: {
|
||||||
overview: "סקירת מוצר",
|
overview: "סקירת מוצר",
|
||||||
personas: "פרסונות משתמשים",
|
personas: "פרסונות משתמשים",
|
||||||
@@ -1266,6 +1274,7 @@ export const translations = {
|
|||||||
architecture: "ארכיטקטורה",
|
architecture: "ארכיטקטורה",
|
||||||
techStack: "ערימת טכנולוגיות",
|
techStack: "ערימת טכנולוגיות",
|
||||||
filesPlanned: (count: number) => `תוכננו ${count} מודולים`,
|
filesPlanned: (count: number) => `תוכננו ${count} מודולים`,
|
||||||
|
files: "קבצים",
|
||||||
approveGenerate: "אשר וחולל פיתוח",
|
approveGenerate: "אשר וחולל פיתוח",
|
||||||
startingEngine: "מניע מנוע...",
|
startingEngine: "מניע מנוע...",
|
||||||
activateArtifact: "הפעל ארטיפקט",
|
activateArtifact: "הפעל ארטיפקט",
|
||||||
|
|||||||
Reference in New Issue
Block a user