mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 11:55:23 +02:00
Update short description AI prompts with character limits and improved translation logic
This commit is contained in:
@@ -240,14 +240,15 @@ export function EditPanel({ row, rowIndex, onSave, onClose, onCaptureState }: Ed
|
||||
1. Translate everything, including any ALL CAPS phrases, maintaining the all-caps formatting.
|
||||
2. ENSURE the translation is complete and does not cut off mid-sentence.\n\n${formData.shortEn}`;
|
||||
} else if (formData.longDe) {
|
||||
const targetChars = Math.round(formData.longDe.length * 0.3);
|
||||
prompt = `Create a concise summary of the following German product description.
|
||||
The summary must be approximately ${targetChars} characters long (about 30% of the original).
|
||||
CRITICAL: The summary MUST be between 250 and 450 characters long.
|
||||
Preserve the most important commercial highlights and features in natural, professional German for B2B toy buyers.
|
||||
Do not use bullet points — write flowing prose.
|
||||
IMPORTANT: Ensure the summary is a complete thought and ends with a finished sentence.\n\nOriginal description:\n${formData.longDe}`;
|
||||
} else {
|
||||
prompt = `Based on the following product details, generate a short commercial description in German (2-4 sentences max). Ensure the text is complete and ends with a finished sentence.\n\n${baseContext}`;
|
||||
prompt = `Based on the following product details, generate a short commercial description in German.
|
||||
CRITICAL: Length MUST be between 250 and 450 characters.
|
||||
Ensure the text is complete and ends with a finished sentence.\n\n${baseContext}`;
|
||||
}
|
||||
} else if (field === 'shortEn') {
|
||||
if (formData.shortDe) {
|
||||
@@ -256,14 +257,15 @@ export function EditPanel({ row, rowIndex, onSave, onClose, onCaptureState }: Ed
|
||||
1. Translate everything, including any ALL CAPS phrases, maintaining the all-caps formatting.
|
||||
2. ENSURE the translation is complete and does not cut off mid-sentence.\n\n${formData.shortDe}`;
|
||||
} else if (formData.longEn) {
|
||||
const targetChars = Math.round(formData.longEn.length * 0.3);
|
||||
prompt = `Create a concise summary of the following English product description.
|
||||
The summary must be approximately ${targetChars} characters long (about 30% of the original).
|
||||
CRITICAL: The summary MUST be between 250 and 450 characters long.
|
||||
Preserve the most important commercial highlights and features in natural, professional English for B2B toy buyers.
|
||||
Do not use bullet points — write flowing prose.
|
||||
IMPORTANT: Ensure the summary is a complete thought and ends with a finished sentence.\n\nOriginal description:\n${formData.longEn}`;
|
||||
} else {
|
||||
prompt = `Based on the following product details, generate a short commercial description in English (2-4 sentences max). Ensure the text is complete and ends with a finished sentence.\n\n${baseContext}`;
|
||||
prompt = `Based on the following product details, generate a short commercial description in English.
|
||||
CRITICAL: Length MUST be between 250 and 450 characters.
|
||||
Ensure the text is complete and ends with a finished sentence.\n\n${baseContext}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user