Skip to content

Remove compiled messages from source code#722

Merged
vincent-olivert-riera merged 1 commit intoline:masterfrom
hoangpn:chores/remove-compiled-messages-from-source
Apr 3, 2026
Merged

Remove compiled messages from source code#722
vincent-olivert-riera merged 1 commit intoline:masterfrom
hoangpn:chores/remove-compiled-messages-from-source

Conversation

@hoangpn
Copy link
Copy Markdown
Contributor

@hoangpn hoangpn commented Apr 1, 2026

Currently, every time we want to add or modify localized messages in Promgen, after editing the corresponding .po file, we compile it to create an .mo file which is a binary file, and then commit both files. This update removes .mo files from the repository to address several issues:

  1. Security: Binary files might contain malicious code.
  2. Transparency: Binary files are not human-readable, complicating change reviews.
  3. Efficiency: Git is optimized for text files, leading to better storage and diffs.
  4. Merge Conflicts: Binary files are difficult to merge, increasing error risks.

Therefore, we have removed the .mo files from the repository and ensured they are compiled at runtime. We have added a step in the Dockerfile to compile these files, so they're included in the Docker image. Additionally, the Makefile now includes instructions for running Promgen locally.

@hoangpn hoangpn force-pushed the chores/remove-compiled-messages-from-source branch from 7f5acab to be860de Compare April 1, 2026 02:45
Comment thread Dockerfile Outdated
Copy link
Copy Markdown
Contributor

@vincent-olivert-riera vincent-olivert-riera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Please squash the fixup commits.

@hoangpn hoangpn force-pushed the chores/remove-compiled-messages-from-source branch from 9dcc0bd to ae5baa9 Compare April 3, 2026 09:50
@hoangpn
Copy link
Copy Markdown
Contributor Author

hoangpn commented Apr 3, 2026

@vincent-olivert-riera
Do you want to try this for every time we want to squash the fixup commits? 👀
image

@vincent-olivert-riera
Copy link
Copy Markdown
Contributor

Do you want to try this for every time we want to squash the fixup commits? 👀

That option squashes all commits into a single one.

This time there is only one commit, so squashing the fixup into that commits it's OK.

But for other times, you have multiple commits and a few fixups, and you want to squash each fixup commit where it belongs, not everything into one.

@vincent-olivert-riera
Copy link
Copy Markdown
Contributor

license/claExpected — Waiting for status to be reported

And this thing doesn't run recently, and it's very annoying...

Could you rebase, squash and push? Let's see if it runs.

@hoangpn
Copy link
Copy Markdown
Contributor Author

hoangpn commented Apr 3, 2026

Oh I see. I thought the behavior was the same with --autosquash. 🙇

Currently, every time we want to add or modify localized messages in Promgen, after editing the
corresponding .po file, we compile it to create an .mo file which is a binary file, and then
commit both files. This update removes .mo files from the repository to address several issues:
1. Security: Binary files might contain malicious code.
2. Transparency: Binary files are not human-readable, complicating change reviews.
3. Efficiency: Git is optimized for text files, leading to better storage and diffs.
4. Merge Conflicts: Binary files are difficult to merge, increasing error risks.

Therefore, we have removed the .mo files from the repository and ensured they are compiled at
runtime. We have added a step in the Dockerfile to compile these files, so they're included in the
Docker image. Additionally, the Makefile now includes instructions for running Promgen locally.
@hoangpn hoangpn force-pushed the chores/remove-compiled-messages-from-source branch from ae5baa9 to b7a4017 Compare April 3, 2026 10:06
Copy link
Copy Markdown
Contributor

@vincent-olivert-riera vincent-olivert-riera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vincent-olivert-riera vincent-olivert-riera merged commit aac9ed2 into line:master Apr 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants