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