Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 1.34 KB

README.md

File metadata and controls

60 lines (44 loc) · 1.34 KB

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'