Spaces:
Running
Running
| export const TRANSLATION_PROMPT = (targetLanguage, options) => { | |
| const isBurmese = targetLanguage.toLowerCase() === 'burmese' || targetLanguage === 'မြန်မာဘာသာ'; | |
| const burmeseRules = isBurmese | |
| ? ` | |
| GLOBAL RULE FOR BURMESE: | |
| - PRE-ANALYSIS: Read and understand the ENTIRE source text first. Do not translate line-by-line. You must identify the subject's gender (Male/Female), size (Large/Small), and nature (Animal/Human/Spirit) from the overall context before starting. | |
| - NAMES & LOANWORDS (STRICT): | |
| * Keep personal names (e.g., John, Taylor, David) in English (Latin characters). | |
| * Keep marketing/technical loanwords (e.g., Premium, AI, Buy, App) in English (Latin characters) exactly as they appear. | |
| - INTELLIGENT IDENTIFIERS (MANDATORY): | |
| * Avoid literal labels. "The female" should be translated as "ဒီမြွေမကြီးက" or "ဒီမြွေမလေးက" depending on context, NEVER just a plain "အမ". | |
| * DO NOT use phrases like "ဒီတိရစ္ဆာန်မလေး" as it sounds unnatural and rude. | |
| * USE natural and respectful descriptors like "ဒီသက်ရှိလေး", "ဒီအကောင်လေး", or "ဒီသတ္တဝါလေး" when referring to animals. | |
| * Adjust based on the subject's status: Use "ဒီလူကြီးက", "ဒီလူငယ်က", "ဒီမြွေမကြီးက", "ဒီမြွေမက", "ဒီကြောင်လေးက" to add flavor and natural flow. | |
| - FLEXIBLE SPECIES NAMING: For specific species names that lack clear Burmese equivalents (e.g., Rattlesnakes, Walrus), use the format: "[English Name] လို့ခေါ်တဲ့ ဒီ[မျိုးစိတ်]တွေဟာ" or "ဒီ [English Name] လို့ခေါ်တဲ့ [မျိုးစိတ်]ကြီးတွေဟာ". | |
| - NO FORMAL ENDINGS: ABSOLUTELY FORBIDDEN to use formal literary markers like 'သည်', '၏', 'သော'. | |
| - CONVERSATIONAL FLOW: Use only natural conversational endings like 'ပါတယ်', 'တာပါ', 'တယ်', 'တာပေါ့'. | |
| - DYNAMIC ROTATION: Intelligently rotate endings to prevent repetition and sound like a professional documentary or cinematic script. | |
| - ADAPTABILITY: These are guidelines, not static formulas. Adapt the language to fit the specific scene and emotion of the content. | |
| ` : ""; | |
| const deepMeaningRules = options.meaning ? ` | |
| DEEP MEANING ANALYSIS RULES (REQUESTED): | |
| - Write in the same human-like conversational tone as the translation. | |
| - Analyze the essence and subtext. Do not just summarize. | |
| - FOR LONG CONTENT: Extract 3 to 4 key lessons, warnings, or philosophical insights. | |
| ` : "NOT REQUESTED. RETURN NULL."; | |
| return ` | |
| Task: Professional cinematic translation and analysis to ${targetLanguage}. | |
| ${burmeseRules} | |
| 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 script. | |
| INSTRUCTION: You MUST follow the request checklist below. If a feature is NOT requested, you MUST return null for its JSON field. | |
| REQUEST CHECKLIST: | |
| 1. Translation Script: REQUESTED (Full context-aware cinematic script. NO SUMMARIZATION). | |
| 2. Deep Meaning Analysis: ${deepMeaningRules} | |
| 3. Viral Title/Thumbnail Hooks: ${options.suggestions ? 'REQUESTED. Provide viral-ready text.' : 'NOT REQUESTED. RETURN NULL.'} | |
| FINAL OUTPUT RULES: | |
| - Provide the output in a structured JSON format. | |
| - Ensure the Burmese language remains graceful, context-aware, and conversational throughout. | |
| `; | |
| }; | |