Clean up compilemessages errors #11571

Closed
opened 2025-12-29 21:46:53 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Sep 4, 2025).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

When running the compilemessages management command (i.e. in preparation for a new release), several instances of the following error are currently raised:

Execution of msgfmt failed: /home/jstretch/projects/netbox/netbox/translations/fr/LC_MESSAGES/django.po:11123: 'msgstr' is not a valid Python format string, unlike 'msgid'. Reason: The string ends in the middle of a directive.
msgfmt: found 1 fatal error

The offending source string appears to be

#: netbox/ipam/models/ip.py:551
#, python-format
msgid "Report space as 100% utilized"

These errors should be addressed, presumably by escaping the % character.

Justification

Although these errors don't appear to impact the translation of other strings, they should be cleared up to avoid confusion.

Originally created by @jeremystretch on GitHub (Sep 4, 2025). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes When running the `compilemessages` management command (i.e. in preparation for a new release), several instances of the following error are currently raised: ``` Execution of msgfmt failed: /home/jstretch/projects/netbox/netbox/translations/fr/LC_MESSAGES/django.po:11123: 'msgstr' is not a valid Python format string, unlike 'msgid'. Reason: The string ends in the middle of a directive. msgfmt: found 1 fatal error ``` The offending source string appears to be ``` #: netbox/ipam/models/ip.py:551 #, python-format msgid "Report space as 100% utilized" ``` These errors should be addressed, presumably by escaping the `%` character. ### Justification Although these errors don't appear to impact the translation of other strings, they should be cleared up to avoid confusion.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 21:46:53 +01:00
adam closed this issue 2025-12-29 21:46:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11571