InteractiveChecklists icon indicating copy to clipboard operation
InteractiveChecklists copied to clipboard

Sub-Issue: Python Tool for Translation Coverage Detection

Open arn-c0de opened this issue 10 months ago • 1 comments

Create a Python tool that automatically detects missing, obsolete, and incomplete string translations across all language files.


Core Requirements

The tool must:

  • Parse values/strings.xml (English) as source of truth
  • Compare all values-XX/strings.xml files against the source
  • Detect:
    • Missing keys (in source but not in translation)
    • Obsolete keys (in translation but not in source)
    • Empty/placeholder values
  • Calculate coverage percentage per language
  • Generate actionable reports

Output Formats

Support at least:

  • Console output (human-readable, color-coded)
  • Markdown report (for GitHub issues/PRs)
  • JSON export (for CI/CD integration)

Each report should show:

  • Language, folder, coverage %
  • List of missing/obsolete keys
  • Timestamp

CLI Interface

# Basic usage
python check_translations.py

# Specific options
python check_translations.py --lang de --format markdown
python check_translations.py --ci --threshold 95  # Exit 1 if below threshold

Tasks

  • [x] Implement XML parser for strings.xml files
  • [x] Build comparison and analysis logic
  • [x] Create report generators (console, markdown, json)
  • [x] Add CLI argument handling
  • [x] Test with actual project structure
  • [x] Document usage and integration examples
  • [x] Provide CI/CD workflow example (GitHub Actions)

Definition of Done

  • [x] Tool detects all missing/obsolete keys correctly
  • [x] Coverage calculation is accurate
  • [x] Reports are clear and actionable
  • [x] Tool is documented and ready for team use
  • [x] CI integration example works

Optional Enhancements

  • Auto-generate skeleton files for new languages
  • YAML config file for language settings
  • Flag untranslated strings (identical to English)

arn-c0de avatar Jan 20 '26 15:01 arn-c0de

implemented in 1.0.25 - Add translation checker tool - a0cc1c4e2f879146b49ea8eb83fe32a8cbaa821a - Commit a0cc1c4

arn-c0de avatar Jan 22 '26 13:01 arn-c0de