The SplashKit Translator is a tool designed to convert the SplashKit Core C++ library into multiple programming languages, creating the necessary files and structures to make SplashKit accessible across different languages. This tool also generates the api.json
file, which is used by SKM (SplashKit Manager) and the SplashKit website to provide API documentation and assist with managing the SDK.
splashkit/splashkit-translator:
thoth-tech/splashkit-translator *
* SplashKit Development in Thoth Tech
Thoth Tech is a people-focused educational technology company within Deakin University's capstone program which provides real-world learning opportunities and allows students to contribute significantly to projects like SplashKit, enhancing its capabilities and resources.
The SplashKit Translator simplifies the process of making the SplashKit library available in various programming languages by automating the translation of its C++ source code. Currently, it supports translation into the following languages:
- YAML
- SKLIBC
- CPP (C++)
- Additional Languages (Specify as needed)
This translator is essential for expanding the reach of SplashKit, enabling developers to use the SDK in their preferred language while maintaining consistency in functionality and API documentation.
- Multi-Language Translation: Converts SplashKit’s C++ codebase into multiple languages, ensuring compatibility and ease of use for developers in various environments.
- Automated API Generation: Creates an
api.json
file that serves as the core for SKM and the SplashKit website, providing a comprehensive reference for all available functions and classes. - Docker Support: Easily set up and run the translator on any platform with Docker, simplifying the development and testing processes.
For detailed instructions on setting up, building, and running the translator, refer to the CONTRIBUTING.md file. This file contains:
- Instructions for setting up dependencies across different operating systems.
- Details on running the translator with Docker for cross-platform compatibility.
- Documentation guidelines for maintaining consistent and comprehensive comments and attributes within the SplashKit codebase.
To translate SplashKit, navigate to the appropriate directory and run the translator with the desired input and output settings. Here’s a quick overview:
-
Validate a Header File:
./translate --validate --input /path/to/splashkit/coresdk/src/coresdk/audio.h
-
Translate into Multiple Languages:
./translate -i /path/to/splashkit -o ~/Desktop/translated -g YAML,SKLIBC,CPP
For a complete list of options and additional usage details, check the CONTRIBUTING.md file.
Contributions are welcome! If you would like to add support for additional languages, improve the translation accuracy, or enhance functionality, please follow the guidelines in CONTRIBUTING.md. Here, you’ll find information on:
- Code structure and organization
- Guidelines for documenting and structuring functions, enums, structs, and more
- Known issues and troubleshooting tips for contributors