Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krzysztoff1/translation-check
GitHub action to detect missing translations
https://github.com/krzysztoff1/translation-check
internationalization localization next-intl
Last synced: 2 months ago
JSON representation
GitHub action to detect missing translations
- Host: GitHub
- URL: https://github.com/krzysztoff1/translation-check
- Owner: krzysztoff1
- License: mit
- Created: 2024-07-12T14:53:50.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-20T06:28:07.000Z (6 months ago)
- Last Synced: 2024-07-20T07:37:42.236Z (6 months ago)
- Topics: internationalization, localization, next-intl
- Language: TypeScript
- Homepage:
- Size: 481 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Translation Check Action
[![Coverage](./badges/coverage.svg)](./badges/coverage.svg)
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:
```yaml
- 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
```yaml
name: Translation Checkon:
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'
```