Show More
@@ -99,15 +99,15 b' class Tag(models.Model, Viewable):' | |||||
99 | def get_view(self): |
|
99 | def get_view(self): | |
100 | locale = get_language() |
|
100 | locale = get_language() | |
101 |
|
101 | |||
|
102 | localized_tag_name = '' | |||
102 | if self.aliases: |
|
103 | if self.aliases: | |
103 | match = re.search(REGEX_TAG_ALIAS.format(locale), self.aliases) |
|
104 | match = re.search(REGEX_TAG_ALIAS.format(locale), self.aliases) | |
104 | if match: |
|
105 | if match: | |
105 | localized_tag_name = match.group(1) |
|
106 | localized_tag_name = match.group(1) | |
106 | else: |
|
|||
107 | localized_tag_name = self.name |
|
|||
108 |
|
107 | |||
|
108 | name = '{} ({})'.format(self.name, localized_tag_name) if localized_tag_name else self.name | |||
109 | link = '<a class="tag" href="{}">{}</a>'.format( |
|
109 | link = '<a class="tag" href="{}">{}</a>'.format( | |
110 |
self.get_absolute_url(), |
|
110 | self.get_absolute_url(), name) | |
111 | if self.is_required(): |
|
111 | if self.is_required(): | |
112 | link = '<b>{}</b>'.format(link) |
|
112 | link = '<b>{}</b>'.format(link) | |
113 | return link |
|
113 | return link |
General Comments 0
You need to be logged in to leave comments.
Login now