Translation Workflow
This guide explains the complete translation workflow for the Arabic OS Platform documentation. Follow these steps to contribute professional-quality Arabic translations.
Workflow Overview
The translation process follows a professional gettext workflow:
Content Creation - English documentation written in .rst files
Message Extraction - Sphinx extracts translatable strings to .pot files
Translation Assignment - .po files created and assigned to translators
Translation Work - Professional translation using specialized tools
Quality Review - Peer review and quality assurance validation
Integration - Approved translations integrated into builds
Publication - Bilingual documentation published to production
Step-by-Step Process
Step 1: Environment Setup
For Translators:
# Clone documentation repository
git clone https://github.com/arabic-os/documentation
cd documentation/docs
# Set up virtual environment
python3 -m venv sphinx-env
source sphinx-env/bin/activate
pip install -r requirements.txt
For Project Maintainers:
# Extract translatable messages
sphinx-build -M gettext source build/gettext
# Initialize Arabic translation files
sphinx-intl update -p build/gettext/gettext -l ar
Step 2: Working with Translation Files
File Structure:
locales/ar/LC_MESSAGES/
├── index.po # Main index page
├── user-guide/
│ ├── index.po # User guide index
│ └── tools/
│ ├── cp1256-explorer.po # CP1256 tool
│ ├── utf8-visualizer.po # UTF-8 tool
│ └── [other tools].po
├── developer-guide/
│ └── [developer sections].po
└── educator-guide/
└── [educator sections].po
Translation File Format:
# Header information
msgid ""
msgstr ""
"Project-Id-Version: Arabic OS Platform 2.0\n"
"Language: ar\n"
"Content-Type: text/plain; charset=utf-8\n"
# Individual translation pairs
#: ../../../source/user-guide/tools/cp1256-explorer.rst:2
msgid "CP1256 Character Encoding Explorer"
msgstr "مستكشف ترميز الأحرف CP1256"
#: ../../../source/user-guide/tools/cp1256-explorer.rst:4
msgid ""
"The CP1256 Character Encoding Explorer is an interactive "
"educational tool designed to help you understand the CP1256 "
"character encoding system."
msgstr ""
"مستكشف ترميز الأحرف CP1256 هو أداة تعليمية تفاعلية مصممة "
"لمساعدتك على فهم نظام ترميز الأحرف CP1256."
Step 3: Translation Assignment Process
Project Coordinator Tasks:
Create Work Assignments
# Generate translation statistics msgfmt --statistics locales/ar/LC_MESSAGES/*.po # Identify files needing translation find locales/ar/LC_MESSAGES -name "*.po" -exec msgfmt --statistics {} \;
Assign Translation Tasks
Create GitHub issues for each translation assignment:
**Translation Assignment: CP1256 Tool Documentation** **File**: `locales/ar/LC_MESSAGES/user-guide/tools/cp1256-explorer.po` **Status**: 45 strings, 12 translated, 33 untranslated **Priority**: High **Estimated Time**: 4-6 hours **Deadline**: [Date] **Requirements**: - Technical accuracy for character encoding concepts - Follow Arabic Style Guide - Review existing translations for consistency **Translator**: @username **Reviewer**: @reviewer-username
Step 4: Professional Translation Work
Using Poedit (Recommended):
Install Poedit
# Ubuntu/Debian sudo apt install poedit # macOS brew install --cask poedit # Windows: Download from https://poedit.net
Configure Poedit for Arabic
File → Preferences → General
Set Default language to Arabic (ar)
Enable Right-to-left language support
Configure Arabic fonts (Amiri, Noto Sans Arabic)
Translation Process
Open .po file in Poedit
Review source text and context comments
Enter Arabic translation in target field
Use Translation Memory for consistency
Save frequently to preserve work
Using Web-Based Tools:
Tool |
Type |
Advantages |
Best For |
|---|---|---|---|
Poedit |
Desktop |
Full features, offline work |
Professional translators |
Weblate |
Web-based |
Collaborative, built-in QA |
Team projects |
Lokalize |
Desktop (KDE) |
Advanced CAT features |
Technical translators |
Transifex |
Web-based |
Project management |
Large teams |
Step 5: Quality Review Process
Self-Review Checklist:
Before submitting translations, verify:
□ All strings translated (no empty msgstr entries)
□ Technical terminology consistent with style guide
□ Arabic grammar and syntax correct
□ Cultural appropriateness maintained
□ No untranslated English text
□ Proper Arabic punctuation used
□ RTL text flow considered
□ Context preserved from source
Peer Review Process:
Create Pull Request
git add locales/ar/LC_MESSAGES/ git commit -m "Add Arabic translation for CP1256 tool documentation" git push origin feature/translate-cp1256-tool
Request Review
Assign Arabic language reviewer
Include translation statistics
Reference style guide compliance
Note any translation challenges
Review Criteria
- Technical Accuracy
Correct translation of technical concepts
Consistent terminology usage
Preservation of meaning
- Language Quality
Natural, fluent Arabic
Appropriate register for audience
Grammar and syntax accuracy
- Cultural Sensitivity
Respectful language use
Culturally appropriate examples
Regional considerations
Step 6: Testing and Validation
Build Testing:
# Test English build
sphinx-build -b html source build/html
# Test Arabic build
sphinx-build -b html -D language=ar source build/html-ar
# Validate no build errors
echo "Build Status: $([ $? -eq 0 ] && echo 'SUCCESS' || echo 'FAILED')"
Translation Validation:
# Check translation completeness for individual files
msgfmt --statistics locales/ar/LC_MESSAGES/user-guide/tools/cp1256-explorer.po
# Validate .po file syntax
msgfmt --check-format locales/ar/LC_MESSAGES/user-guide/tools/cp1256-explorer.po
# Generate comprehensive translation assessment (recommended)
python3 translation_assessment.py
# Quick status check for all files
python3 translation_assessment.py --simple
Translation Assessment Tool:
For comprehensive translation monitoring, use the Translation Assessment Tool:
Project Overview:
python3 translation_assessment.py- Detailed report with prioritiesQuick Status:
python3 translation_assessment.py --simple- One-line summary per fileProgress Tracking: Regular use helps identify translation bottlenecks and priorities
See Translation Assessment Tool for complete usage documentation.
Step 7: Integration and Publication
Maintainer Integration Process:
Final Quality Check
# Run comprehensive validation ./scripts/validate-translations.sh # Build all formats make all # Test both language versions ./scripts/test-builds.sh
Merge and Deploy
# Merge approved translation git checkout main git merge feature/translate-cp1256-tool # Trigger automated deployment git push origin main
Publication Verification
English: https://docs.arabic-os.org/en/
Arabic: https://docs.arabic-os.org/ar/
Download Formats: PDF, EPUB availability
Workflow Automation
GitHub Actions Integration:
Our repository includes automated workflows:
# .github/workflows/translation-check.yml
name: Translation Validation
on:
pull_request:
paths: ['locales/**/*.po']
jobs:
validate-translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install gettext
run: sudo apt-get install gettext
- name: Validate .po files
run: |
find locales -name "*.po" -exec msgfmt --check {} \;
- name: Test Arabic build
run: |
pip install -r requirements.txt
sphinx-build -D language=ar source build/html-ar
Translation Statistics Dashboard:
Automated reporting provides:
Translation Progress: Percentage complete per section
Quality Metrics: Review status and approval tracking
Contributor Recognition: Translation contribution statistics
Release Planning: Translation readiness for upcoming releases
Common Issues and Solutions
Issue: Fuzzy Translations
# Problem: msgid changed, translation marked fuzzy
#, fuzzy
msgid "Updated English text"
msgstr "Old Arabic translation"
# Solution: Review and update translation, remove #, fuzzy
Issue: Encoding Problems
# Problem: Arabic text appears as question marks
# Solution: Ensure .po file has correct charset
"Content-Type: text/plain; charset=utf-8\n"
Issue: Build Failures
# Problem: Arabic build fails
# Solution: Check .po file syntax
msgfmt --check locales/ar/LC_MESSAGES/problematic-file.po
Issue: Missing Context
# Problem: Ambiguous source text
msgid "File"
# Could mean: computer file, document file, or filing system
# Solution: Check source context comments
#: ../../../source/user-guide/tools/file-manager.rst:15
#: Context: computer file management
msgid "File"
msgstr "ملف"
Best Practices
For Translators:
Read Source Context - Always review the source .rst file for context
Maintain Consistency - Use consistent terminology across translations
Consider Audience - Technical content for educational purposes
Test Your Work - Build and review the Arabic documentation
Collaborate - Discuss challenging translations with team
For Reviewers:
Technical Expertise - Understand both languages and technical concepts
Cultural Sensitivity - Ensure cultural appropriateness
Constructive Feedback - Provide specific, actionable review comments
Timely Reviews - Maintain project momentum with prompt reviews
Recognition - Acknowledge quality translation work
For Project Maintainers:
Clear Assignments - Provide context and expectations for translators
Resource Support - Maintain glossaries and style guides
Quality Standards - Enforce consistent quality requirements
Community Building - Foster collaborative translation community
Process Improvement - Continuously refine workflow efficiency
The professional translation workflow ensures our documentation serves the global Arabic-speaking community with the highest quality bilingual technical content.