[damned-lies] Refs #169 - Always show module 'pure' name beside a more verbose description
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Refs #169 - Always show module 'pure' name beside a more verbose description
- Date: Mon, 22 Mar 2021 21:54:02 +0000 (UTC)
commit f51d610b5db02fc85a1af1c1a452ddc39ddf07f3
Author: Claude Paroz <claude 2xlibre net>
Date: Mon Mar 22 22:52:10 2021 +0100
Refs #169 - Always show module 'pure' name beside a more verbose description
stats/models.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/stats/models.py b/stats/models.py
index 29eb845f..631c6611 100644
--- a/stats/models.py
+++ b/stats/models.py
@@ -116,7 +116,9 @@ class Module(models.Model):
return reverse('module', args=[self.name])
def get_description(self):
- return self.description and _(self.description) or self.name
+ if self.description:
+ return '{name} — {description}'.format(name=self.name, description=_(self.description))
+ return self.name
def get_comment(self):
comment = self.comment and _(self.comment) or ""
@@ -1425,7 +1427,7 @@ class Statistics(models.Model):
@property
def module_description(self):
- return self.branch.module.description or self.branch.module.name
+ return self.branch.module.get_description()
def has_reducedstat(self):
return bool(self.part_po is not None and self.part_po != self.full_po)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]