يمكنك إدخال إرشادات مخصصة لتحفيز عملية الترجمة. يمكن استخدام هذا لإضافة تعليمات إضافية أو مسرد أو توجيهات أخرى لتحسين جودة الترجمة بشكل عام.
تعليمات مضمنة
Section titled “تعليمات مضمنة”uses: pelikhan/action-continuous-translation@v0with: instructions: Use a casual tone.
تعليمات من ملف
Section titled “تعليمات من ملف”uses: pelikhan/action-continuous-translation@v0with: instructions_file: ./instructions.txt
تعليمات في المقدمة
Section titled “تعليمات في المقدمة”يمكنك أيضًا تحديد تعليمات الترجمة مباشرة في مقدمة المستندات الفردية. يكون هذا مفيدًا عندما تتطلب المستندات المختلفة نهجًا ترجمياً محددًا.
---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;}
ترتيب الأولوية
Section titled “ترتيب الأولوية”تُطبق التعليمات حسب ترتيب الأولوية التالي:
- معامل
instructions
(أعلى أولوية) - معامل
instructions_file
translator.instructions
من مقدمة المستند (أقل أولوية)
إذا تم استخدام عدة طرق، فسيتم تطبيق الطريقة ذات الأولوية القصوى فقط.