یہ کیسے کام کرتا ہے

TranslateBot آپ کے translations کو کیسے handle کرتا ہے اس کی تفصیل۔

Scan

آپ کی locale directories میں تمام .po فائلیں تلاش کرتا ہے

Diff

خالی msgstr values والی entries کی شناخت کرتا ہے

Translate

آپ کے منتخب کردہ AI model کو batches بھیجتا ہے

Write

آپ کی .po فائلوں کو translations کے ساتھ update کرتا ہے

Placeholder Preservation

Django dynamic values کے لیے خاص placeholders استعمال کرتا ہے۔ انہیں توڑنا آپ کا app crash کر دیتا ہے۔ TranslateBot انہیں intact رکھتا ہے۔

Input (msgid) Welcome back, %(username)s! You have %(count)d new messages.
Output (msgstr - French) Bon retour, %(username)s ! Vous avez %(count)d nouveaux messages.
%(name)s Named string
%(count)d Named integer
%s Positional string
{0} Format index

Dry Run کیوں؟

مکمل translation چلانے سے پہلے، --dry-run استعمال کریں تاکہ بالکل دیکھ سکیں کہ کیا translate ہوگا—بغیر کوئی API calls یا فائلوں میں تبدیلیاں کیے۔

$ python manage.py translate --target-lang nl --dry-run
ℹ️ 3 غیر ترجمہ شدہ entries ملیں
🔍 Dry run mode: LLM translation skip کر رہا ہے

✓ 'Welcome to our platform' کا ترجمہ کرے گا
✓ 'Save changes' کا ترجمہ کرے گا
✓ 'Delete account' کا ترجمہ کرے گا

Dry run مکمل: 3 entries کا ترجمہ ہوگا
کوئی API costs نہیں
دیکھیں کہ کیا translation چاہیے
کوئی file changes نہیں

اپنے translations کو automate کرنے کے لیے تیار ہیں؟