kopia lustrzana https://github.com/wagtail/wagtail
Make 'permanent' / 'temporary' label on redirects translatable; don't translate the classname
Thanks to leo_naeka for reporting!pull/2691/head
rodzic
b34f920832
commit
aaceb9b08f
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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>
|
||||
|
|
Ładowanie…
Reference in New Issue