Skip to content

Simplify working with the .po files#806

Open
ddabble wants to merge 3 commits intomainfrom
simpler-po-files
Open

Simplify working with the .po files#806
ddabble wants to merge 3 commits intomainfrom
simpler-po-files

Conversation

@ddabble
Copy link
Member

@ddabble ddabble commented Mar 24, 2026

Proposed changes

  • Stop generating #: comments in .po files (d07e521)
    • They were more hassle (causing merge conflicts all the time) than useful (it's not too cumbersome to just search the codebase for the msgid strings anyway), so decided to remove them.
  • Stop generating fuzzy translations (d2df573)
    • We don't have any dedicated translators for whom the pre-filled #, fuzzy msgstrs could help, and since the matching is so often very wrong - which can cause a lot of user confusion if not caught - it's easier for us to just not do any fuzzy matching and instead always generate new, blank translations. This does mean that if you run makemessages after changing e.g. one character in an existing message in the code, the previous msgstr will be wiped - albeit with the previous msgid and msgstr commented out with #~ and moved to the bottom of the .po file.
  • Fixed makemessages not ignoring the JS lib folder (09699e3)

Review guidance

Checklist

(If any of the points are not relevant, mark them as checked, so that it's easy to see which points you've handled or not)

  • I've run makemigrations, makemessages and compilemessages
  • I've written tests that fail without these changes (if relevant/possible)
  • I've manually tested the website UI with different device layouts
    • Most common is to test with typical screen sizes for mobile (320-425 px), tablet (768 px) and desktop (1024+ px), which can easily be done with your browser's dev tools
  • I've manually tested with different users locally
    • This can be e.g. anonymous users (i.e. not being logged in), "normal" non-member users, members of different committees, and superusers
  • I've made sure that my code conforms to the code style guides
    • It's not intended that you read through this whole document, but that you get yourself an overview over its contents, and that you use it as a reference guide / checklist while taking a second look at your code before opening a pull request
  • I've attempted to minimize the number of common code smells
    • See the comment for the previous checkbox
  • I've added documentation
    • E.g. comments, docstrings, or in the README
  • I've added my changes to the "Unreleased" section of the changelog, together with a link to this PR
    • Mainly the changes that are of particular interest to users and/or developers, if any
  • I've added a "Deployment notes" section above and labelled the PR with has-deployment-notes
    • ...if anything out of the ordinary should be done when deploying these changes to the server (e.g. adding/removing an environment variable, manually creating/changing some objects, running a management command, etc.)
  • I've structured my commits reasonably

ddabble added 3 commits March 24, 2026 23:21
They were more hassle (causing merge conflicts all the time) than
useful (it's not too cumbersome to just search the codebase for
the `msgid` strings anyway), so decided to remove them.
@ddabble ddabble requested a review from TheStrgamer March 24, 2026 22:24
@ddabble ddabble added the ⚡Quick review⚡ This PR is short and can be reviewed quickly. label Mar 24, 2026
@make-bot make-bot bot added this to web Mar 24, 2026
@make-bot make-bot bot moved this to Ready for Review in web Mar 24, 2026
@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.16%. Comparing base (4d8d244) to head (d2df573).

Files with missing lines Patch % Lines
src/web/management/commands/makemessages.py 0.00% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #806      +/-   ##
==========================================
+ Coverage   88.00%   88.16%   +0.15%     
==========================================
  Files         153      153              
  Lines        6246     6235      -11     
==========================================
  Hits         5497     5497              
+ Misses        749      738      -11     
Files with missing lines Coverage Δ
src/web/management/commands/makemessages.py 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ddabble ddabble mentioned this pull request Mar 24, 2026
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚡Quick review⚡ This PR is short and can be reviewed quickly.

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

1 participant