Friction
#4092 reduced the .po-side merge conflicts, but all 14 .mo binaries still produce conflicts.
Because binaries can't be merged textually, parallel PRs that run compile_catalog conflict on the regenerated .mo files.
The fix is mechanical (re-run compile_catalog, re-stage) but the conflict recurs on every i18n PR.
Question
Is tracking .mo intentional?
It looks like they're tracked to be shipped via sdist/wheel:
|
recursive-include changedetectionio/translations * |
Possible direction
Meanwhile, the Dockerfile already runs pybabel compile on every build, so the tracked .mo files are overwritten there:
|
RUN pybabel compile -d /app/changedetectionio/translations |
With a compile_catalog step in CI, .mo would be generated at build time, mirroring Docker.
|
- name: Build a binary wheel and a source tarball |
|
run: python3 -m build |
Alternatively, hooking compile_catalog into BuildPyCommand.run() in setup.py might also work.
Could .mo then be untracked?
Friction
#4092 reduced the
.po-side merge conflicts, but all 14.mobinaries still produce conflicts.Because binaries can't be merged textually, parallel PRs that run
compile_catalogconflict on the regenerated.mofiles.The fix is mechanical (re-run
compile_catalog, re-stage) but the conflict recurs on every i18n PR.Question
Is tracking
.mointentional?It looks like they're tracked to be shipped via sdist/wheel:
changedetection.io/MANIFEST.in
Line 15 in 7831a49
Possible direction
Meanwhile, the
Dockerfilealready runspybabel compileon every build, so the tracked.mofiles are overwritten there:changedetection.io/Dockerfile
Line 123 in 7831a49
With a
compile_catalogstep in CI,.mowould be generated at build time, mirroring Docker.changedetection.io/.github/workflows/pypi-release.yml
Lines 21 to 22 in 7831a49
Alternatively, hooking
compile_catalogintoBuildPyCommand.run()insetup.pymight also work.Could
.mothen be untracked?