#24304 closed Uncategorized (duplicate)
Migrations are being created if you overwrite a translation
| Reported by: | Johannes Maron | Owned by: | nobody |
|---|---|---|---|
| Component: | Migrations | Version: | 1.7 |
| Severity: | Normal | Keywords: | i18n, migrations, makemigrations |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
How to reproduce:
Simply add a translation for 'email address' to a project that includes django.contrib.auth.
Run the makemigrations command and a migration for auth will be created, even tho it is a 3rd party app.
Problem
The problem occurs because the verbose_name and help_test get frozen using the compiled ugettest_lazy. I see that the step is necessary, to prevent the migrations from breaking if the translations changes. But both arguments are completely unrelated any database schema, therefore it might be a good idea to drop them, or to drop anything that relies on ugettext_lazy.
Current workaround:
Delete locale dir -> make migrations -> restore locale dir.
Change History (4)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Seems true, I will give it a spin later today and update/close the ticket.
comment:3 by , 11 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Thanks claudep,
Seems to be fixed in #24073
Just out of interest how do you decide on wether or not a bug will be fixed in a major or minor version?
I think that was fixed in 1.8 by entirely deactivating translations during most management commands (#24073). Maybe you can check your particular issue on 1.8?