الدرس ٥ من ٩٧ دقائق للقراءة
كتابة الإنجليزية التقنية
كتابة رسائل Commit وطلبات Pull
رسائل الـ commit وطلبات الـ pull هي تواصلك المكتوب مع المطورين الآخرين. الإنجليزية الواضحة والمنظمة هنا تجعلك تبدو محترفاً.
بنية رسالة Commit
رسالة commit جيدة تتبع هذا النمط:
<النوع>: <وصف قصير بصيغة الأمر>
<نص اختياري يشرح لماذا، وليس ماذا>
صيغة الأمر (Imperative Mood)
رسائل commit تستخدم صيغة الأمر — كأنك تعطي تعليمات:
| صحيح (أمر) | خطأ (ماضي) | خطأ (مضارع) |
|---|---|---|
| Add user authentication | Added user authentication | Adding user authentication |
| Fix login redirect bug | Fixed login redirect bug | Fixes login redirect bug |
| Update API documentation | Updated API documentation | Updates API documentation |
| Remove deprecated endpoint | Removed deprecated endpoint | Removing deprecated endpoint |
| Refactor database queries | Refactored database queries | Refactoring database queries |
فكر بها كالتالي: "إذا طُبّق، هذا الـ commit سوف [رسالتك]"
- "If applied, this commit will add user authentication" — صحيح!
بادئات Commit الشائعة
| البادئة | متى تُستخدم | مثال |
|---|---|---|
feat: | ميزة جديدة | feat: add dark mode toggle |
fix: | إصلاح خطأ | fix: resolve login timeout issue |
docs: | توثيق | docs: update API reference |
style: | تنسيق (بدون تغيير منطقي) | style: fix indentation in utils |
refactor: | إعادة هيكلة الكود | refactor: simplify auth middleware |
test: | اختبارات | test: add unit tests for UserService |
chore: | صيانة | chore: update dependencies |
أوصاف طلبات Pull
وصف PR جيد يحتوي على:
١. العنوان (قصير وواضح)
feat: add user profile page with avatar upload
٢. الملخص (ماذا ولماذا)
## Summary
Add user profile page where users can:
- View and edit their display name
- Upload a profile avatar (max 2MB, jpg/png)
- Update their email preferences
This was requested in issue #234.
٣. كيفية الاختبار
## How to Test
1. Navigate to /profile
2. Click "Edit Profile"
3. Upload an image and save
4. Verify the avatar appears in the navbar
عبارات مفيدة لطلبات PR
| الغرض | العبارة الإنجليزية |
|---|---|
| شرح السياق | "This PR addresses issue #123" — هذا الـ PR يعالج المشكلة #123 |
| ملاحظة القيود | "Note: this does not handle edge case X" — ملاحظة: هذا لا يعالج الحالة الحدية X |
| طلب مراجعة محددة | "Please pay attention to the auth logic in auth.ts" — يرجى الانتباه لمنطق المصادقة |
| شرح المفاضلات | "I chose approach A over B because..." — اخترت الطريقة A على B لأن... |
| تغييرات جذرية | "Breaking change: the API response format has changed" — تغيير جذري: تنسيق استجابة API تغير |