Skip to content

GitHub Actions - process whole directory of languages (single files and subdirectories) into 1 file per language

License

Notifications You must be signed in to change notification settings

voxelite/translation-merge

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

Voxelite Translation Merger

GitHub Action to merge Voxelite's translations into single per-language JSON file. Based on voxelite/json-merge@v1.

Supported language formats:

  • language - en - 2 lower-case characters
  • language variant - en-US - 2 lower-case characters followed by - and 2 upper-case characters

Language variant requires - as the separator, _ is not valid. For more information about those language codes, look at RFC 5646 (example can be found here).

Inputs

in-directory

Required

Path to your directory containing all direct translation files (like en.json) and per-language directories (like en).

out-directory

Required

Directory to write language files (like en.json) into.

Outputs

languages

All mentioned languages, no matter how many translated keys they have.

Languages with no keys are ignored.

Example usage

- name: block.json merging
  uses: voxelite/json-merge@v1
  with:
    in-file: block.json
    in-directory: block
    out-file: out_block.json

For object format (block, item, entity...) look into official documentation.

About

GitHub Actions - process whole directory of languages (single files and subdirectories) into 1 file per language

Resources

License

Stars

Watchers

Forks

Packages

No packages published