A utility for analyzing translation completeness across different language versions of Keep a Changelog.
This tool helps maintainers track which sections have been translated in each language and identify missing translations. It analyzes the HAML files across all language directories and versions, comparing them against the English baseline.
- Section-by-section analysis for versions with explicit section IDs (1.0.0+)
- Section count comparison for markdown-based versions (0.3.0)
- Multiple output formats: text (default), JSON, CSV
- Filter by version or specific language
- Visual indicators for translation completeness:
- ✓ = 100% complete
- ● = 75-99% complete
- ◐ = 50-74% complete
- ○ = 0-49% complete
Show coverage for all versions and languages:
ruby translation_coverage.rbAnalyze a specific version:
ruby translation_coverage.rb --version 1.1.0
ruby translation_coverage.rb --version 1.0.0
ruby translation_coverage.rb --version 0.3.0Analyze a specific language across all versions:
ruby translation_coverage.rb --language fr
ruby translation_coverage.rb --language es-ES
ruby translation_coverage.rb --language zh-CNCheck a specific language in a specific version:
ruby translation_coverage.rb --version 1.1.0 --language pt-BRInclude section-by-section breakdown and list missing sections:
ruby translation_coverage.rb --details
ruby translation_coverage.rb --version 1.1.0 --detailsPerfect for importing into spreadsheets:
ruby translation_coverage.rb --format csv > coverage.csvOutput format:
Version,Language,Complete,Missing,Total,Coverage %
1.1.0,cs,20,0,20,100.0
1.1.0,da,20,0,20,100.0
...For programmatic processing:
ruby translation_coverage.rb --format json > coverage.jsonHuman-readable report with statistics:
ruby translation_coverage.rb --format textThese versions use HAML with explicit section IDs. The tool can identify exactly which sections are missing.
Sections in 1.1.0 (20 total):
- what, why, who, how, principles, types, effort
- bad-practices, log-diffs, ignoring-deprecations, confusing-dates, inconsistent-changes
- frequently-asked-questions, standard, filename, github-releases, automatic, yanked, rewrite, contribute
Sections in 1.0.0 (19 total):
Same as 1.1.0 but without inconsistent-changes
This version uses markdown blocks with translated headings, so sections cannot be compared by ID. The tool compares section counts instead:
Sections in 0.3.0 (14 total): All headings are translated, so coverage is based on whether the translation has the same number of sections as English.
================================================================================
TRANSLATION COVERAGE REPORT
Generated: 2026-01-07 18:55:49 UTC
================================================================================
--------------------------------------------------------------------------------
VERSION: 1.1.0
--------------------------------------------------------------------------------
Baseline (English) has 20 sections
COVERAGE SUMMARY:
--------------------------------------------------------------------------------
Language Complete Missing Coverage
--------------------------------------------------------------------------------
cs 20 0 100.0% ✓
da 20 0 100.0% ✓
de 20 0 100.0% ✓
...
--------------------------------------------------------------------------------
STATISTICS:
Total translations: 22
Complete (100%): 22
Partial: 0
Average coverage: 100.0%
-
Run the tool for the latest version:
ruby translation_coverage.rb --version 1.1.0
-
Look for languages with coverage < 100%
-
Use
--detailsto see exactly which sections are missing:ruby translation_coverage.rb --version 1.1.0 --details
Export to CSV and track over time:
ruby translation_coverage.rb --format csv > coverage_$(date +%Y%m%d).csvCheck all versions to see which languages need updates:
ruby translation_coverage.rb --language frThis shows French translation status across all versions, helping identify if a language needs updates when new sections are added.
| Option | Short | Description |
|---|---|---|
--version VERSION |
-v |
Filter by specific version (1.1.0, 1.0.0, or 0.3.0) |
--language LANG |
-l |
Filter by specific language code (e.g., es-ES, fr, de) |
--format FORMAT |
-f |
Output format: text (default), json, or csv |
--details |
-d |
Show detailed section-by-section breakdown |
--help |
-h |
Show help message |
- Ruby (any version with standard library)
- No external gems required
The tool works by:
- Scanning the
source/directory for all language/version combinations - Extracting section identifiers from HAML files:
- For 1.0.0+: Extracts heading IDs from
%h3#section-idand%h4#section-id - For 0.3.0: Extracts markdown headings from
:markdownblocks
- For 1.0.0+: Extracts heading IDs from
- Comparing each language's sections against the English baseline
- Calculating coverage percentages and identifying missing sections
- Reporting results in the requested format
If you find issues or have suggestions for improving this tool, please open an issue or pull request.