Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use gettext_lazy for model verbose names #203

Merged
merged 3 commits into from
Apr 10, 2024

Conversation

tidenhub
Copy link
Contributor

Hi,
model field verbose_names should use gettext_lazy, because it creates migrations based on user language settings.

manage.py makemigrations --dry-run
Migrations for 'djangocms_frontend':
  /home/x/lib/python3.9/site-packages/djangocms_frontend/migrations/0002_alter_frontenduiitem_options.py
    - Change Meta options on frontenduiitem
Migrations for 'listgroup':
  /home/x/lib/python3.9/site-packages/djangocms_frontend/contrib/listgroup/migrations/0002_alter_listgroup_options_alter_listgroupitem_options.py
    - Change Meta options on listgroup
    - Change Meta options on listgroupitem
Migrations for 'media':
  /home/x/lib/python3.9/site-packages/djangocms_frontend/contrib/media/migrations/0002_alter_media_options_alter_mediabody_options.py
    - Change Meta options on media
    - Change Meta options on mediabody
Migrations for 'tabs':
  /home/x/lib/python3.9/site-packages/djangocms_frontend/contrib/tabs/migrations/0002_alter_tab_options_alter_tabitem_options.py
    - Change Meta options on tab
    - Change Meta options on tabitem
Migrations for 'utilities':
  /home/x/lib/python3.9/site-packages/djangocms_frontend/contrib/utilities/migrations/0002_alter_heading_options_alter_spacing_options_and_more.py
    - Change Meta options on heading
    - Change Meta options on spacing
    - Change Meta options on tableofcontents

@tidenhub tidenhub changed the title Fix: Use gettext_lazy for model verbose names fix: Use gettext_lazy for model verbose names Apr 10, 2024
Copy link
Member

@fsbraun fsbraun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted! Thank you!

@fsbraun
Copy link
Member

fsbraun commented Apr 10, 2024

@tidenhub Can you fix the isort issue?

@tidenhub
Copy link
Contributor Author

pre-commit.ci autofix

Copy link

codecov bot commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.91%. Comparing base (f11feee) to head (b7527d6).
Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #203      +/-   ##
==========================================
- Coverage   86.93%   86.91%   -0.02%     
==========================================
  Files         120      120              
  Lines        3107     3119      +12     
  Branches      330      331       +1     
==========================================
+ Hits         2701     2711      +10     
+ Misses        304      303       -1     
- Partials      102      105       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fsbraun fsbraun merged commit e5f72b9 into django-cms:master Apr 10, 2024
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants