]> git.openstreetmap.org Git - osqa.git/commitdiff
Minor change to describe question and answer badges separately, so questions say...
authorrick <rick@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sun, 30 May 2010 12:57:18 +0000 (12:57 +0000)
committerrick <rick@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sun, 30 May 2010 12:57:18 +0000 (12:57 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@345 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum_modules/default_badges/badges.py

index 279f778f8785276aeb267086b9f2d313e7b19f2b..cb2ed2f69e052f24ea003aaaeb8f5fe01efbe486 100644 (file)
@@ -42,10 +42,6 @@ class NodeScoreBadge(AbstractBadge):
     abstract = True
     listen_to = (VoteAction,)
 
-    @property
-    def description(self):
-        return _('Answer voted up %s times') % str(self.expected_score)
-
     def award_to(self, action):
         if (action.node.node_type == self.node_type) and (action.node.score == int(self.expected_score)):
             return action.node.author
@@ -55,6 +51,10 @@ class QuestionScoreBadge(NodeScoreBadge):
     abstract = True
     node_type = "question"
 
+    @property
+    def description(self):
+        return _('Question voted up %s times') % str(self.expected_score)
+
 class NiceQuestion(QuestionScoreBadge):
     expected_score = settings.NICE_QUESTION_VOTES_UP
     name = _("Nice Question")
@@ -74,6 +74,10 @@ class AnswerScoreBadge(NodeScoreBadge):
     abstract = True
     node_type = "answer"
 
+    @property
+    def description(self):
+        return _('Answer voted up %s times') % str(self.expected_score)
+    
 class NiceAnswer(AnswerScoreBadge):
     expected_score = settings.NICE_ANSWER_VOTES_UP
     name = _("Nice Answer")