fix(i18n): Fix syntax errors and add missing translation keys - Restored broken useStore destructuring in PromptEnhancer, UXDesignerPrompt, ActionPlanGenerator, SlidesGenerator - Fixed GoogleAdsGenerator scope issue with renderMagicWandSectionContent - Added missing inputLabel keys to promptEnhancer for all languages - Fixed t.resultTitle to t.enhancedTitle in PromptEnhancer
This commit is contained in:
@@ -11,7 +11,16 @@ import { cn } from "@/lib/utils";
|
|||||||
import { translations } from "@/lib/i18n/translations";
|
import { translations } from "@/lib/i18n/translations";
|
||||||
|
|
||||||
export default function ActionPlanGenerator() {
|
export default function ActionPlanGenerator() {
|
||||||
|
const {
|
||||||
language,
|
language,
|
||||||
|
currentPrompt,
|
||||||
|
actionPlan,
|
||||||
|
selectedProvider,
|
||||||
|
selectedModels,
|
||||||
|
availableModels,
|
||||||
|
apiKeys,
|
||||||
|
isProcessing,
|
||||||
|
error,
|
||||||
setCurrentPrompt,
|
setCurrentPrompt,
|
||||||
setSelectedProvider,
|
setSelectedProvider,
|
||||||
setActionPlan,
|
setActionPlan,
|
||||||
|
|||||||
@@ -394,7 +394,6 @@ export default function GoogleAdsGenerator() {
|
|||||||
default:
|
default:
|
||||||
return <pre className="whitespace-pre-wrap text-xs">{googleAdsResult.rawContent}</pre>;
|
return <pre className="whitespace-pre-wrap text-xs">{googleAdsResult.rawContent}</pre>;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderMagicWandSectionContent = (sectionId: string) => {
|
const renderMagicWandSectionContent = (sectionId: string) => {
|
||||||
|
|||||||
@@ -11,7 +11,16 @@ import { cn } from "@/lib/utils";
|
|||||||
import { translations } from "@/lib/i18n/translations";
|
import { translations } from "@/lib/i18n/translations";
|
||||||
|
|
||||||
export default function PromptEnhancer() {
|
export default function PromptEnhancer() {
|
||||||
|
const {
|
||||||
language,
|
language,
|
||||||
|
currentPrompt,
|
||||||
|
enhancedPrompt,
|
||||||
|
selectedProvider,
|
||||||
|
selectedModels,
|
||||||
|
availableModels,
|
||||||
|
apiKeys,
|
||||||
|
isProcessing,
|
||||||
|
error,
|
||||||
setSelectedProvider,
|
setSelectedProvider,
|
||||||
setCurrentPrompt,
|
setCurrentPrompt,
|
||||||
setEnhancedPrompt,
|
setEnhancedPrompt,
|
||||||
@@ -209,7 +218,7 @@ return (
|
|||||||
<CardTitle className="flex items-center justify-between text-base lg:text-lg">
|
<CardTitle className="flex items-center justify-between text-base lg:text-lg">
|
||||||
<span className="flex items-center gap-2">
|
<span className="flex items-center gap-2">
|
||||||
<CheckCircle2 className="h-4 w-4 lg:h-5 lg:w-5 text-green-500" />
|
<CheckCircle2 className="h-4 w-4 lg:h-5 lg:w-5 text-green-500" />
|
||||||
{t.resultTitle}
|
{t.enhancedTitle}
|
||||||
</span>
|
</span>
|
||||||
{enhancedPrompt && (
|
{enhancedPrompt && (
|
||||||
<Button variant="ghost" size="icon" onClick={handleCopy} className="h-8 w-8 lg:h-9 lg:w-9">
|
<Button variant="ghost" size="icon" onClick={handleCopy} className="h-8 w-8 lg:h-9 lg:w-9">
|
||||||
|
|||||||
@@ -108,6 +108,19 @@ const ACCEPTED_FILE_TYPES = {
|
|||||||
const ALL_ACCEPTED = Object.values(ACCEPTED_FILE_TYPES).flat().join(",");
|
const ALL_ACCEPTED = Object.values(ACCEPTED_FILE_TYPES).flat().join(",");
|
||||||
|
|
||||||
export default function SlidesGenerator() {
|
export default function SlidesGenerator() {
|
||||||
|
const {
|
||||||
|
selectedProvider,
|
||||||
|
selectedModels,
|
||||||
|
availableModels,
|
||||||
|
apiKeys,
|
||||||
|
isProcessing,
|
||||||
|
error,
|
||||||
|
slidesPresentation,
|
||||||
|
setSelectedProvider,
|
||||||
|
setSlidesPresentation,
|
||||||
|
setProcessing,
|
||||||
|
setError,
|
||||||
|
setAvailableModels,
|
||||||
setSelectedModel,
|
setSelectedModel,
|
||||||
language: uiLanguage,
|
language: uiLanguage,
|
||||||
} = useStore();
|
} = useStore();
|
||||||
|
|||||||
@@ -11,7 +11,16 @@ import { cn } from "@/lib/utils";
|
|||||||
import { translations } from "@/lib/i18n/translations";
|
import { translations } from "@/lib/i18n/translations";
|
||||||
|
|
||||||
export default function UXDesignerPrompt() {
|
export default function UXDesignerPrompt() {
|
||||||
|
const {
|
||||||
language,
|
language,
|
||||||
|
currentPrompt,
|
||||||
|
enhancedPrompt,
|
||||||
|
selectedProvider,
|
||||||
|
selectedModels,
|
||||||
|
availableModels,
|
||||||
|
apiKeys,
|
||||||
|
isProcessing,
|
||||||
|
error,
|
||||||
setSelectedProvider,
|
setSelectedProvider,
|
||||||
setCurrentPrompt,
|
setCurrentPrompt,
|
||||||
setEnhancedPrompt,
|
setEnhancedPrompt,
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export const translations = {
|
|||||||
title: "Prompt Enhancer",
|
title: "Prompt Enhancer",
|
||||||
description: "Transform your simple ideas into professional, high-quality prompts",
|
description: "Transform your simple ideas into professional, high-quality prompts",
|
||||||
placeholder: "Enter your prompt here...",
|
placeholder: "Enter your prompt here...",
|
||||||
|
inputLabel: "Your Prompt",
|
||||||
enhancedTitle: "Enhanced Prompt",
|
enhancedTitle: "Enhanced Prompt",
|
||||||
enhancedDesc: "Your prompt has been optimized for better AI performance",
|
enhancedDesc: "Your prompt has been optimized for better AI performance",
|
||||||
},
|
},
|
||||||
@@ -150,6 +151,7 @@ export const translations = {
|
|||||||
title: "Улучшение промптов",
|
title: "Улучшение промптов",
|
||||||
description: "Превратите ваши простые идеи в профессиональные, качественные промпты",
|
description: "Превратите ваши простые идеи в профессиональные, качественные промпты",
|
||||||
placeholder: "Введите ваш промпт здесь...",
|
placeholder: "Введите ваш промпт здесь...",
|
||||||
|
inputLabel: "Ваш промпт",
|
||||||
enhancedTitle: "Улучшенный промпт",
|
enhancedTitle: "Улучшенный промпт",
|
||||||
enhancedDesc: "Ваш промпт оптимизирован для лучшей работы ИИ",
|
enhancedDesc: "Ваш промпт оптимизирован для лучшей работы ИИ",
|
||||||
},
|
},
|
||||||
@@ -271,6 +273,7 @@ export const translations = {
|
|||||||
title: "משפר פרומפטים",
|
title: "משפר פרומפטים",
|
||||||
description: "הפוך רעיונות פשוטים לפרומפטים מקצועיים באיכות גבוהה",
|
description: "הפוך רעיונות פשוטים לפרומפטים מקצועיים באיכות גבוהה",
|
||||||
placeholder: "הזן את הפרומפט שלך כאן...",
|
placeholder: "הזן את הפרומפט שלך כאן...",
|
||||||
|
inputLabel: "הפרומפט שלך",
|
||||||
enhancedTitle: "פרומפט משופר",
|
enhancedTitle: "פרומפט משופר",
|
||||||
enhancedDesc: "הפרומפט שלך הותאם לביצועי בינה מלאכותית טובים יותר",
|
enhancedDesc: "הפרומפט שלך הותאם לביצועי בינה מלאכותית טובים יותר",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user