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 ? (
|
||||
<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" />
|
||||
<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">
|
||||
{renderError}
|
||||
</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"
|
||||
onClick={() => window.location.reload()}
|
||||
>
|
||||
{t.tryRefreshing}
|
||||
Try Refreshing Page
|
||||
</Button>
|
||||
</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" />
|
||||
</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>
|
||||
);
|
||||
|
||||
@@ -345,7 +345,7 @@ function parseStreamingContent(text: string, currentAgent: string) {
|
||||
};
|
||||
if (preview.isStreaming) {
|
||||
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) {
|
||||
chatDisplay = t.renderingLive;
|
||||
chatDisplay = "Rendering live artifact...";
|
||||
}
|
||||
|
||||
return { chatDisplay, preview, agent, status };
|
||||
|
||||
@@ -218,7 +218,7 @@ export default function GoogleAdsGenerator() {
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("[GoogleAdsGenerator] Generation error:", err);
|
||||
setError(err instanceof Error ? err.message : t.error);
|
||||
setError(err instanceof Error ? err.message : t.errorGenerate);
|
||||
} finally {
|
||||
setProcessing(false);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ export const translations = {
|
||||
settings: "Settings",
|
||||
error: "Error",
|
||||
configApiKey: "Configure API key in Settings",
|
||||
emptyState: "Generated content will appear here",
|
||||
},
|
||||
promptEnhancer: {
|
||||
title: "Prompt Enhancer",
|
||||
@@ -55,6 +56,7 @@ export const translations = {
|
||||
generatedDesc: "Structured requirements document ready for development",
|
||||
emptyState: "Generated PRD will appear here",
|
||||
enterIdeaError: "Please enter an idea to generate PRD",
|
||||
errorGenerate: "Failed to generate PRD",
|
||||
sections: {
|
||||
overview: "Product Overview",
|
||||
personas: "User Personas & Use Cases",
|
||||
@@ -400,6 +402,7 @@ export const translations = {
|
||||
architecture: "Architecture",
|
||||
techStack: "Tech Stack",
|
||||
filesPlanned: (count: number) => `${count} modules planned`,
|
||||
files: "Files",
|
||||
approveGenerate: "Approve & Generate Development",
|
||||
startingEngine: "Starting Engine...",
|
||||
activateArtifact: "Activate Artifact",
|
||||
@@ -467,6 +470,7 @@ export const translations = {
|
||||
settings: "Настройки",
|
||||
error: "Ошибка",
|
||||
configApiKey: "Настройте API ключ в настройках",
|
||||
emptyState: "Сгенерированный контент появится здесь",
|
||||
},
|
||||
promptEnhancer: {
|
||||
title: "Улучшение промптов",
|
||||
@@ -488,6 +492,7 @@ export const translations = {
|
||||
generatedDesc: "Структурированный документ требований готов к разработке",
|
||||
emptyState: "Здесь появится созданный PRD",
|
||||
enterIdeaError: "Пожалуйста, введите идею для создания PRD",
|
||||
errorGenerate: "Не удалось создать PRD",
|
||||
sections: {
|
||||
overview: "Обзор продукта",
|
||||
personas: "Персоны пользователей",
|
||||
@@ -833,6 +838,7 @@ export const translations = {
|
||||
architecture: "Архитектура",
|
||||
techStack: "Стек технологий",
|
||||
filesPlanned: (count: number) => `Запланировано ${count} модулей`,
|
||||
files: "Файлы",
|
||||
approveGenerate: "Одобрить и начать разработку",
|
||||
startingEngine: "Запуск двигателя...",
|
||||
activateArtifact: "Активировать артефакт",
|
||||
@@ -900,6 +906,7 @@ export const translations = {
|
||||
settings: "הגדרות",
|
||||
error: "שגיאה",
|
||||
configApiKey: "הגדר מפתח API בהגדרות",
|
||||
emptyState: "תוכן שהופק יופיע כאן",
|
||||
},
|
||||
promptEnhancer: {
|
||||
title: "משפר פרומפטים",
|
||||
@@ -921,6 +928,7 @@ export const translations = {
|
||||
generatedDesc: "מסמך דרישות מובנה מוכן לפיתוח",
|
||||
emptyState: "PRD שחולל יופיע כאן",
|
||||
enterIdeaError: "אנא הזן רעיון לחולל PRD",
|
||||
errorGenerate: "נכשל בחוללת PRD",
|
||||
sections: {
|
||||
overview: "סקירת מוצר",
|
||||
personas: "פרסונות משתמשים",
|
||||
@@ -1266,6 +1274,7 @@ export const translations = {
|
||||
architecture: "ארכיטקטורה",
|
||||
techStack: "ערימת טכנולוגיות",
|
||||
filesPlanned: (count: number) => `תוכננו ${count} מודולים`,
|
||||
files: "קבצים",
|
||||
approveGenerate: "אשר וחולל פיתוח",
|
||||
startingEngine: "מניע מנוע...",
|
||||
activateArtifact: "הפעל ארטיפקט",
|
||||
|
||||
Reference in New Issue
Block a user