better title and subtitle for custom locations
This commit is contained in:
parent
73072d6268
commit
d979a298c2
1 changed files with 3 additions and 11 deletions
|
@ -308,20 +308,12 @@ class CustomLocation:
|
|||
|
||||
@cached_property
|
||||
def title(self):
|
||||
if self.space:
|
||||
if self.space.can_describe:
|
||||
return _('Coordinates in %(space)s') % {'space': self.space.title}
|
||||
else:
|
||||
return _('Coordinates on %(level)s') % {'level': self.level.title}
|
||||
return _('Unreachable coordinates')
|
||||
return _('Custom Location')
|
||||
|
||||
@cached_property
|
||||
def subtitle(self):
|
||||
if self.space and self.space.can_describe:
|
||||
return format_lazy(_('{category}, {space}, {level}'),
|
||||
category=_('Custom location'),
|
||||
return format_lazy(_('{space}, {level}'),
|
||||
space=self.space.title,
|
||||
level=self.level.title)
|
||||
return format_lazy(_('{category}, {level}'),
|
||||
category=_('Custom location'),
|
||||
level=self.level.title)
|
||||
return self.level.title
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue