Spaces:
Running
Running
File size: 1,992 Bytes
cbca414 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
export const BOOK_RECAP_PROMPT = (targetLanguage) => {
const isBurmese = targetLanguage.toLowerCase().includes('burm') || targetLanguage.includes('ααΌααΊαα¬');
// Clean language name for the prompt
const cleanLanguage = targetLanguage.split(' (')[0];
// Dynamic Author Persona logic moved from the backend service to here
const authorPersona = isBurmese
? `You are a world-class Literary Translator and Novelist. Your task is to translate the provided text into beautiful, natural Burmese.`
: `You are a professional Book Translator and Author. Provide a complete, high-quality translation of this document into ${cleanLanguage}.`;
// Strict Burmese rules used specifically for high-quality literature
const burmeseRules = isBurmese ? `
STRICT BURMESE LITERARY RULES:
- STYLE: Literary and Elegant (Novel-like).
- TONE: Maintain the author's original emotional depth.
- PRONOUNS: Use contextually appropriate pronouns (e.g., "αα»α½ααΊαα±α¬αΊ", "αα»α½ααΊα", "αα°") based on character relationships.
- ENDINGS: Avoid rigid formal markers; use natural literary flow (e.g., 'αα«αααΊ', 'αα²α·αα«αααΊ', 'αα²α·αααΊ').
- FLOW: The translation must feel like a professionally published Burmese novel, not a literal translation.
` : "";
return `
Task: Professional literary translation and analysis into ${cleanLanguage}.
AUTHOR PERSONA:
${authorPersona}
STRICT RULE:
- NO SUMMARIZATION: Translate every single sentence. Do not shorten or skip content.
- DETAIL PRESERVATION: The output must contain the same level of detail as the original document.
- OUTPUT FORMAT: Provide ONLY the translated text.
${burmeseRules}
INSTRUCTIONS:
- Analyze the narrative style and tone of the source document.
- Adapt the language to fit the target culture while maintaining the original meaning.
- Translate the document COMPLETELY (100% length).
`;
}; |