Skip to content

Translation Diff Checker

Actions
Compares two JSON translation files for missing keys and type mismatches
v1.0.0
Latest
Star (0)

Translation Diff Checker

A robust GitHub Action and CLI tool to compare two JSON translation files (Source vs Target) for missing keys and type mismatches.

Features

  • Recursive Check: Traverses deeply nested JSON structures.
  • Type Safety: Flags if value types do not match (e.g., String vs Array).
  • GitHub Actions Integration: Generates a detailed Markdown report in $GITHUB_STEP_SUMMARY.
  • Strict Mode: Optionally fails the CI pipeline if errors are found.

Usage (Local)

  1. Prerequisites: Python 3.x
  2. Setup:
    # No dependencies required for core logic, but if you add any:
    pip install -r requirements.txt
  3. Run:
    python src/main.py --source en.json --target tr.json --strict

Usage (GitHub Actions)

Add this to your workflow .yml file:

steps:
  - uses: actions/checkout@v3
  
  - name: Check Translations
    uses: hasanbeder/translation-diff-checker@main
    with:
      source_file: 'locales/en.json'
      target_file: 'locales/tr.json'
      strict_mode: 'true'

Inputs

Input Description Required Default
source_file Path to the source JSON file. Yes -
target_file Path to the target JSON file. Yes -
strict_mode Fail the build if differences are found (true/false). No true

Translation Diff Checker is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Compares two JSON translation files for missing keys and type mismatches
v1.0.0
Latest

Translation Diff Checker is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.