Fix description when locked by system

pull/10616/head
Sébastien Corbin 2023-06-23 10:48:38 +02:00 zatwierdzone przez zerolab
rodzic d4eb3a2fb4
commit 5dcf8e4a27
Nie znaleziono w bazie danych klucza dla tego podpisu
4 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -27,6 +27,7 @@ Changelog
* Fix: Debounce and optimise live preview panel to prevent excessive requests (Sage Abdullah)
* Fix: Use constant-time comparison for image serve URL signatures (Jake Howard)
* Fix: Ensure taggit field type-ahead options show correctly in the dark mode theme (Sage Abdullah)
* Fix: Fix the lock description message missing the model_name variable when locked only by system (Sébastien Corbin)
* Docs: Document how to add non-ModelAdmin views to a `ModelAdminGroup` (Onno Timmerman)
* Docs: Document how to add StructBlock data to a StreamField (Ramon Wenger)
* Docs: Update ReadTheDocs settings to v2 to resolve urllib3 issue in linkcheck extension (Thibaud Colas)

Wyświetl plik

@ -720,6 +720,7 @@ Contributors
* Kevin Chung (kev-odin)
* valnuro
* Vitaly Babiy
* Sébastien Corbin
Translators
===========

Wyświetl plik

@ -56,6 +56,7 @@ Thank you to Damilola for his work, and to Google for sponsoring this project.
* Make it possible for speech recognition users to reveal chooser buttons (Thibaud Colas)
* Use constant-time comparison for image serve URL signatures (Jake Howard)
* Ensure taggit field type-ahead options show correctly in the dark mode theme (Sage Abdullah)
* Fix the lock description message missing the model_name variable when locked only by system (Sébastien Corbin)
### Documentation

Wyświetl plik

@ -53,7 +53,10 @@ class BaseLock:
"""
Returns a description of the lock to display to the given user.
"""
return capfirst(_("No one can make changes while the %(model_name)s is locked"))
return capfirst(
_("No one can make changes while the %(model_name)s is locked")
% {"model_name": self.model_name}
)
def get_context_for_user(self, user, parent_context=None):
"""