Skip to content

Conversation

pescheck-bram
Copy link
Contributor

@pescheck-bram pescheck-bram commented Aug 13, 2025

What does this PR do?

Introduces major new features for smarter PO file processing, adds comprehensive configuration support, and fixes code quality issues.

Major Features Added

  • 🔧 Configuration System - Set defaults in pyproject.toml
  • 📁 Gitignore Support - Respects .gitignore when scanning files (⚠️ breaking change)
  • 🔍 Auto Language Detection - Detects languages from PO metadata and folder structure
  • ⏭️ Skip Translated Files - Saves API calls by skipping completed translations
  • 💾 Incremental Save - Saves progress during translation to prevent data loss
  • 🌐 Enhanced Django Support - Handles special codes and plural forms
  • 🔄 Duplicate Message Handling - Smart processing of repeated msgids
  • 🚫 English Fallback Prevention - Prevents using source text as translation

New Components Added

  • services/language_detector.py (222 lines)
  • utils/config_loader.py (298 lines)
  • utils/gitignore.py (233 lines)
  • utils/po_entry_helpers.py (48 lines)
  • 12+ new comprehensive test files

Code Quality Improvements

  • ✅ Fixed critical validate_translation() bug
  • ✅ Cleaned up imports and unused variables

⚠️ Breaking Change

Now respects .gitignore by default. Use --no-gitignore to process ignored files.

Type of change

  • Bug fix
  • Code quality improvement
  • New feature
  • Breaking change

@pescheck-bram pescheck-bram merged commit 364d42c into main Aug 13, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant