This repository manages all multilingual translations for the project in a single JSON file: translations.generated.json
. The centralized structure ensures consistency and simplifies updates by consolidating all languages in one place.
The translations.generated.json
file organizes translations in a nested structure:
- Keys represent the unique identifiers for each translatable string, generated automatically from the file structure.
- Sub-keys represent the supported language codes (e.g.,
en
,de
,fr
). - Values are the localized translations for each language.
{
"de": "Party erstellen",
"en": "Create party",
"fr": "Créer une partie",
"it": "Crea una partita",
"pl": "Utwórz grupę",
"ru": "Создать группу",
"zh": "创建队伍"
}
- Ensure you have Node.js installed.
- Add or modify translation files: Place JSON translation files in the appropriate directory structure under the
merged
folder. - Run the generator:
This will produce the
node generator.js
translations.generated.json
file in the root directory, containing all the translations consolidated into a single JSON object.
We welcome contributions to improve or expand translations. Please follow these steps:
- Fork the repository.
- Create a new branch for your changes.
- Update or add translation files:
- Place your JSON files in the appropriate folder structure under
merged
. - Run the
generator.js
script to regenerate thetranslations.generated.json
file.
- Place your JSON files in the appropriate folder structure under
- Submit a pull request with a clear description of your changes.
If you have questions or suggestions, feel free to open an issue in the repository.