﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33068	makemessages is inconvenient when overriding default django translations	Satyajeet Kanetkar	nobody	"By default, `makemessages` will remove/comment out translations from the `BASE_DIR / ""locale/<locale>/LC_MESSAGES/django.po` file if a `msgid` is not used anywhere in the project.

This makes it very inconvenient to override the default django translations. Here's a very simple example:

`django/conf/locale/mr/LC_MESSAGES/django.po` has:
{{{
#: utils/dates.py:6
msgid ""Monday""
msgstr """"
}}}

I override this in `BASE_DIR / ""locale/mr/LC_MESSAGES/django.po""` with:
{{{
msgid ""Monday""
msgstr ""सोमवार""
}}}

And this works fine; until someone else comes along and runs `./manage.py makemessages -l mr`, causing the above translation which is used, to be commented out!

{{{
#~ msgid ""Monday""
#~ msgstr ""सोमवार""
}}}

I feel that `makemessages` should not delete/comment translations that are overriding default django translations, otherwise the utility of that command is severely reduced.

A current workaround is to explicitly copy over all strings that are overriden into a file in the project so that gettext can pick them up, but it creates unnecessary boilerplate.
A possible solution could be to change the `makemessages` command to also scan the `django` source code, in addition to the app's source, although I am not sure of the complications here.

In addition, the documentation could also be improved by adding a recommended way of overriding the default translations that ship with django, that works well with the `makemessages` command."	Bug	closed	Internationalization	3.2	Normal	invalid	makemessages	Claude Paroz	Unreviewed	0	0	0	0	0	0
