[Django] #34120: Changing translations of model options and attributes is not detected as change in making migrations

0 views
Skip to first unread message

Django

unread,
Oct 25, 2022, 9:53:21 AM10/25/22
to django-...@googlegroups.com
#34120: Changing translations of model options and attributes is not detected as
change in making migrations
-------------------------------------+-------------------------------------
Reporter: Sajjad | Owner: nobody
Sanikhani |
Type: Bug | Status: new
Component: | Version: 4.1
Migrations | Keywords: Translation,
Severity: Normal | Migrations, Models, Locale
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
After writing my models with its options, I made migrations.\\
Then I changed translation of model verbose name in *.po file and compiled
it.\\
After that I supposed that executing makemigrations, add new migration
file that contains new translated verbose name of that model. But it is
not happened.\\
This problem is only with gettext_lazy, because this function return
reference of translation in lazy mode. Thus it is not detected as change.

--
Ticket URL: <https://code.djangoproject.com/ticket/34120>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 25, 2022, 9:58:30 AM10/25/22
to django-...@googlegroups.com
#34120: Changing translations of model options and attributes is not detected as
change in making migrations
-------------------------------------+-------------------------------------
Reporter: Sajjad Sanikhani | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 4.1
Severity: Normal | Resolution:
Keywords: Translation, | Triage Stage:
Migrations, Models, Locale | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Sajjad Sanikhani:

Old description:

> After writing my models with its options, I made migrations.\\
> Then I changed translation of model verbose name in *.po file and
> compiled it.\\
> After that I supposed that executing makemigrations, add new migration
> file that contains new translated verbose name of that model. But it is
> not happened.\\
> This problem is only with gettext_lazy, because this function return
> reference of translation in lazy mode. Thus it is not detected as change.

New description:

After writing my model with its options, I made migrations.\\


Then I changed translation of model verbose name in *.po file and compiled
it.\\
After that I supposed that executing makemigrations, add new migration
file that contains new translated verbose name of that model. But it is
not happened.\\
This problem is only with gettext_lazy, because this function return
reference of translation in lazy mode. Thus it is not detected as change.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/34120#comment:1>

Django

unread,
Oct 25, 2022, 3:41:33 PM10/25/22
to django-...@googlegroups.com
#34120: Changing translations of model options and attributes is not detected as
change in making migrations
-------------------------------------+-------------------------------------
Reporter: Sajjad Sanikhani | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 4.1
Severity: Normal | Resolution: invalid

Keywords: Translation, | Triage Stage:
Migrations, Models, Locale | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* status: new => closed
* resolution: => invalid


Comment:

The migration system doesn't consider translations. It's done by design,
as translations shouldn't affect the database structure.

--
Ticket URL: <https://code.djangoproject.com/ticket/34120#comment:2>

Reply all
Reply to author
Forward
0 new messages