Skip to content

[i18n] Tracked .mo binaries conflict on every parallel i18n PR #4108

@skkzsh

Description

@skkzsh

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?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions