Use online through Google Colab
This is a patch for the Chinese-only versions Valeton GP-200 to add English language support. On such units, the language cannot be switched to English regardless of what firmware is uploaded. The solution is to do string-replacements to the firmware, so that Chinese-language strings are replaced with English-language ones.
This is already done for GP-50 by naturalfinder-os. However, unlike GP-50, GP-200 has checksumming logic for the firmware, as well as some weird handling of number strings. Since the GP-50 patch was in powershell, I also replicated GP-50 patching logic here for portability, but I haven't tested that part out.
I've only tested this with firmware version 1.8.0. Your mileage may vary.
The displayed strings don't match the official English firmware, as they have to fit in the same byte-length as the original Chinese strings, and in some cases preserve the position of numerical characters, but they're readable enough.
In the spirit of acknowledging that this is a hacky string-replacement patch rather than something that unlocks the original English-language support, I translate "中文" to "CN" rather than to "ENG".

uv must be available on the system.
https://docs.astral.sh/uv/getting-started/installation/
uv syncuv run poe scan "GP-200LT Firmware V1.8.0.bin"
uv run poe translate translations_gp200.json
uv run poe patch -i "GP-200LT Firmware V1.8.0.bin" -t translations_gp200.json
# The patched firmware will be saved as "GP-200LT Firmware V1.8.0-patched.bin"To extract Chinese strings from a firmware binary and generate an empty translations JSON template:
uv run poe scan firmware.binOr with a custom output filename:
uv run python3 valeton_gp200_english_patch/patch_firmware.py --scan firmware.bin --scan-output translations_custom.jsonTo fill the translations template up with pre-fitted English strings, run:
uv run poe translate translations_gp200.jsonOr specify a custom output file:
uv run python3 valeton_gp200_english_patch/generate_translations.py input.json output.jsonOnce you have a filled translations JSON file, apply it to create a patched firmware:
uv run poe patch -i firmware.bin -t translations_gp200.jsonAdditional options:
-o, --output FILE: Specify output filename (default:<input>-patched.bin)--device gp50|gp200|auto: Target device (default: auto-detect)--force: Skip version validation-r, --region START END: Patch only a specific hex region-v, --verbose: Enable verbose output
Example with custom output:
uv run python3 valeton_gp200_english_patch/patch_firmware.py -i firmware.bin -o patched_firmware.bin -t translations_gp200.jsonRun code quality checks:
poe lint # Run linter
poe format # Format code
poe typecheck # Run type checker
poe test # Run all checksSince I based some parts on the naturalfinder-os/valeton-english-patch, this project inherits the GPL license. GNU General Public License v3 (GPLv3).