diff --git a/CHANGELOG.txt b/CHANGELOG.txt index cd6db0faf7..4312b6e929 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,7 @@ Changelog * Fix: Now page chooser (in a rich text editor) opens up at the link's parent page, rather than at the page itself (Matt Westcott) * Fix: Reverted fix for explorer menu scrolling with page content, as it blocked access to menus that exceed screen height * Fix: Image listing in the image chooser no longer becomes unpaginated after an invalid upload form submission (Stephen Rice) + * Fix: Applied correct translation tags for 'permanent' / 'temporary' labels on redirects (Matt Westcott) 1.5 (31.05.2016) diff --git a/docs/releases/1.5.1.rst b/docs/releases/1.5.1.rst index 9e5afea1c4..4ea727f1c3 100644 --- a/docs/releases/1.5.1.rst +++ b/docs/releases/1.5.1.rst @@ -23,3 +23,4 @@ Bug fixes * Reverted fix for explorer menu scrolling with page content, as it blocked access to menus that exceed screen height * Image listing in the image chooser no longer becomes unpaginated after an invalid upload form submission (Stephen Rice) * Confirmation message on the ModelAdmin delete view no longer errors if the model's string representation depends on the primary key (Yannick Chabbert) + * Applied correct translation tags for 'permanent' / 'temporary' labels on redirects (Matt Westcott) diff --git a/wagtail/wagtailredirects/models.py b/wagtail/wagtailredirects/models.py index 5e535017b3..652b2f1baa 100644 --- a/wagtail/wagtailredirects/models.py +++ b/wagtail/wagtailredirects/models.py @@ -40,9 +40,9 @@ class Redirect(models.Model): def get_is_permanent_display(self): if self.is_permanent: - return "permanent" + return _("permanent") else: - return "temporary" + return _("temporary") @classmethod def get_for_site(cls, site=None): diff --git a/wagtail/wagtailredirects/templates/wagtailredirects/list.html b/wagtail/wagtailredirects/templates/wagtailredirects/list.html index 154df9055a..f319ed3057 100644 --- a/wagtail/wagtailredirects/templates/wagtailredirects/list.html +++ b/wagtail/wagtailredirects/templates/wagtailredirects/list.html @@ -36,7 +36,7 @@ {{ redirect.link }} {% endif %} </td> - <td class="type"><div class="status-tag {% if redirect.get_is_permanent_display == "permanent" %}{% trans "primary" %}{% endif %}">{{ redirect.get_is_permanent_display }}</div></td> + <td class="type"><div class="status-tag {% if redirect.is_permanent %}primary{% endif %}">{{ redirect.get_is_permanent_display }}</div></td> </tr> {% endfor %} </tbody>