Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#35161 closed Cleanup/optimization (wontfix)

makemessages - make comments with line numbers look the same in all operating systems

Reported by: אורי Owned by: nobody
Component: Internationalization Version: dev
Severity: Normal Keywords:
Cc: Claude Paroz Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi,

I'm using Django on Windows and I run python manage.py makemessages --all to create my *.po files. I'm using Windows and the comments before the msgid look like:

#: .\accounts\models.py:85
msgid "username"
msgstr "nom d’utilisateur"

My fellow developer uses Linux and when he runs the same command on his machine, the comments change (I'm not sure exactly but I think to #: accounts/models.py:85). So we both can't work on the same files otherwise the comments change all the time. Can you make all these comments be in Linux format also on Windows? It will save many problems since then we can work each on his machine, and the comments will not change. Also, I think it's better to have a canonical format for the source files in *.po files which do not depend on the developer's operating system.

Thanks,
Uri.

Change History (2)

comment:1 by Natalia Bidart, 10 months ago

Cc: Claude Paroz added
Component: UncategorizedInternationalization
Resolution: wontfix
Status: newclosed
Type: UncategorizedCleanup/optimization
Version: dev

Hello Uri! Thanks for your report. I understand your issue and I'm sorry you are running into these discrepancies, but there is little to nothing that Django can do. Django uses GNU gettext to generate translations files (po files), so it's really up to the tool how the .po files are generated.

Having said that, I do see that there is a postprocess_messages helper in the makemessages command (see source), but in order to evaluate a possible change in this logic, we would need community consensus. To that effect, you could consider starting a new conversation on the Django Forum - Internalization category, where you'll reach a wider audience and likely get extra feedback.

I'll close the ticket for now, but if there is a community agreement for this feature/change request, you are welcome to come back to the ticket and point to the forum topic, so we can then re-open it. For more details, please see the documented guidelines for requesting features.

comment:2 by אורי, 10 months ago

OK, thank you.

Note: See TracTickets for help on using tickets.
Back to Top