Skip to content

krzysztoff1/translation-check

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Translation Check Action

Coverage

Simple GitHub Action to check if all keys in the main translation file are present in other translation files.

Inputs

main_translation_path

Required The path to the main translation file (typically the English version). Default: './src/locales/en.json'

translation_paths

Required Comma-separated paths to the secondary translation files. Default: './src/locales/pl.json'

Supported Formats

  • JSON: .json
  • YAML: .yml or .yaml

Usage

To integrate this action into your workflow, add the following step:

- name: Check Translations
  uses: krzysztoff1/[email protected]
  with:
    main_translation_path: './src/locales/en.json'
    translation_paths: './src/locales/fr.json,./src/locales/de.yml,./src/locales/es.yaml'

Example

name: Translation Check

on:
  push:
    paths:
      - 'src/locales/**'
  pull_request:
    paths:
      - 'src/locales/**'

jobs:
  check-translations:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Check Translations
        uses: krzysztoff1/[email protected]
        with:
          main_translation_path: './src/locales/en.json'
          translation_paths: './src/locales/fr.json,./src/locales/de.json,./src/locales/es.json'