From d979a298c246b25501d5cee7b7a88c894b646a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Sat, 16 Dec 2017 19:46:32 +0100 Subject: [PATCH] better title and subtitle for custom locations --- src/c3nav/mapdata/utils/locations.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/c3nav/mapdata/utils/locations.py b/src/c3nav/mapdata/utils/locations.py index 13c1aad6..30d57da1 100644 --- a/src/c3nav/mapdata/utils/locations.py +++ b/src/c3nav/mapdata/utils/locations.py @@ -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