1
0
mirror of synced 2024-11-23 23:31:02 +01:00

git: Added pull request template and renamed contributing guide (#1133)

This commit is contained in:
iTrooz 2023-06-11 13:10:30 +02:00 committed by GitHub
parent cac9a69ea2
commit f2509cda1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 21 deletions

18
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,18 @@
<!--
Please provide as much information as possible about what your PR aims to do.
PRs with no description will most likely be closed until more information is provided.
If you're planing on changing fundamental behaviour or add big new features, please open a GitHub Issue first before starting to work on it.
If it's not something big and you still want to contact us about it, feel free to do so !
-->
### Problem description
<!-- Describe the bug that you fixed/feature request that you implemented, or link to an existing issue describing it -->
### Implementation description
<!-- Explain what you did to correct the problem -->
### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally, make before/after sceenshots -->
### Additional things
<!-- Anything else you would like to say -->

View File

@ -1,9 +1,30 @@
# Hacking guide
# Contribution guide
## Introduction
This document is a guide for developers who want to contribute to ImHex in any way. It contains information about the codebase, the build process and the general workflow.
## Making Changes
### Adding new features
If you'd like to add new features, the best way to start is by joining our Discord and telling us about your idea. We can then discuss the best way to implement it and how it should be integrated into ImHex or if it should be done in a separate plugin.
There are standalone plugin templates that use ImHex as a submodule. You can find them here:
- https://github.com/WerWolv/ImHex-Cpp-Plugin-Template
- https://github.com/WerWolv/ImHex-Rust-Plugin-Template
### Adding a new language
If you'd like to support a new language in ImHex, the best way is by using the `dist/langtool.py` tool. It will create the necessary file for you and help you fill them out.
First, run the tool with `python3 dist/langtool.py create plugins/builtin/romfs/lang <iso_code>` where `<iso_code>` is the ISO 639-1 code of your language. This will create a new file in the language directory.
Afterwards follow the prompts of the program to populate the entire file. Once you're done, rerun cmake and rebuild ImHex. Your language should now be available in the settings.
### Updating an existing language
If you'd like to add missing keys to an existing language, you can also use the `dist/langtool.py` tool. Run it with `python3 dist/langtool.py translate plugins/builtin/romfs/lang <iso_code>` where `<iso_code>` is the ISO 639-1 code of the language.
This will one by one list all the missing translation keys that are present in the default translation file, and you can fill them in with the correct translation for your language.
## Codebase
ImHex is written in C++ and usually uses the latest compiler and standard library features available in gcc on all supported OSes. At the time of writing this is C++23.
@ -45,23 +66,3 @@ I personally use CLion for development since it makes configuring and building t
### macOS
- Install all dependencies using brew and the `dist/Brewfile` script.
## Making Changes
### Adding new features to ImHex
If you'd like to add new features, the best way to start is by joining our Discord and telling us about your idea. We can then discuss the best way to implement it and how it should be integrated into ImHex or if it should be done in a separate plugin.
There are standalone plugin templates that use ImHex as a submodule. You can find them here:
- https://github.com/WerWolv/ImHex-Cpp-Plugin-Template
- https://github.com/WerWolv/ImHex-Rust-Plugin-Template
### Adding a new language
If you'd like to support a new language in ImHex, the best way is by using the `dist/langtool.py` tool. It will create the necessary file for you and help you fill them out.
First, run the tool with `python3 dist/langtool.py create plugins/builtin/romfs/lang <iso_code>` where `<iso_code>` is the ISO 639-1 code of your language. This will create a new file in the language directory.
Afterwards follow the prompts of the program to populate the entire file. Once you're done, rerun cmake and rebuild ImHex. Your language should now be available in the settings.
### Updating an existing language
If you'd like to add missing keys to an existing language, you can also use the `dist/langtool.py` tool. Run it with `python3 dist/langtool.py translate plugins/builtin/romfs/lang <iso_code>` where `<iso_code>` is the ISO 639-1 code of the language.
This will one by one list all the missing translation keys that are present in the default translation file, and you can fill them in with the correct translation for your language.

View File

@ -168,6 +168,9 @@ All dependencies that aren't bundled, can be installed using the dependency inst
For more information, check out the [Compiling](/dist/compiling) guide.
## Contributing
See [Contributing](/CONTRIBUTING.md)
## Plugin development
To develop plugins for ImHex, use one of the following two templates projects to get started. You then have access to the entirety of libimhex as well as the ImHex API and the Content Registry to interact with ImHex or to add new content.