يمكنك إدخال إرشادات مخصصة لتحفيز عملية الترجمة. يمكن استخدام هذا لإضافة تعليمات إضافية أو مسرد أو توجيهات أخرى لتحسين جودة الترجمة بشكل عام.
Inline instructions
Section titled “Inline instructions”uses: pelikhan/action-continuous-translation@v0with: instructions: Use a casual tone.Instructions from a file
Section titled “Instructions from a file”uses: pelikhan/action-continuous-translation@v0with: instructions_file: ./instructions.txtInstructions in frontmatter
Section titled “Instructions in frontmatter”يمكنك أيضًا تحديد تعليمات الترجمة مباشرة في مقدمة المستندات الفردية. يكون هذا مفيدًا عندما تتطلب المستندات المختلفة نهجًا ترجمياً محددًا.
---title: "My Document"translator: instructions: | Use formal tone and preserve all technical terms in English.---
# My Document Content
This document will be translated using the instructions specified in the frontmatter.يتم تعريف أنواع translator في types.ts. يتم إزالتها من المقدمة قبل بدء الترجمة، لذا فهي لا تؤثر على النتيجة النهائية.
export interface TranslatorConfiguration { instructions?: string;}
export interface FrontmatterWithTranslator { translator?: TranslatorConfiguration;}Priority Order
Section titled “Priority Order”تُطبق التعليمات حسب ترتيب الأولوية التالي:
- معامل
instructions(أعلى أولوية) - معامل
instructions_file translator.instructionsمن مقدمة المستند (أقل أولوية)
إذا تم استخدام عدة طرق، فسيتم تطبيق الطريقة ذات الأولوية القصوى فقط.