]> git.openstreetmap.org Git - osqa.git/blob - forum/const.py
deleting the test file
[osqa.git] / forum / const.py
1 # encoding:utf-8
2 from django.utils.translation import ugettext as _
3 """
4 All constants could be used in other modules
5 For reasons that models, views can't have unicode text in this project, all unicode text go here.
6 """
7 CLOSE_REASONS = (
8     (1, _('duplicate question')),
9     (2, _('question is off-topic or not relevant')),
10     (3, _('too subjective and argumentative')),
11     (4, _('is not an answer to the question')),
12     (5, _('the question is answered, right answer was accepted')),
13     (6, _('problem is not reproducible or outdated')),
14     #(7, u'太局部、本地化的问题',)
15     (7, _('question contains offensive inappropriate, or malicious remarks')),
16     (8, _('spam or advertising')),
17 )
18
19 TYPE_REPUTATION = (
20     (1, 'gain_by_upvoted'),
21     (2, 'gain_by_answer_accepted'),
22     (3, 'gain_by_accepting_answer'),
23     (4, 'gain_by_downvote_canceled'),
24     (5, 'gain_by_canceling_downvote'),
25     (-1, 'lose_by_canceling_accepted_answer'),
26     (-2, 'lose_by_accepted_answer_cancled'),
27     (-3, 'lose_by_downvoted'),
28     (-4, 'lose_by_flagged'),
29     (-5, 'lose_by_downvoting'),
30     (-6, 'lose_by_flagged_lastrevision_3_times'),
31     (-7, 'lose_by_flagged_lastrevision_5_times'),
32     (-8, 'lose_by_upvote_canceled'),
33 )
34
35 TYPE_ACTIVITY_ASK_QUESTION=1
36 TYPE_ACTIVITY_ANSWER=2
37 TYPE_ACTIVITY_COMMENT_QUESTION=3
38 TYPE_ACTIVITY_COMMENT_ANSWER=4
39 TYPE_ACTIVITY_UPDATE_QUESTION=5
40 TYPE_ACTIVITY_UPDATE_ANSWER=6
41 TYPE_ACTIVITY_PRIZE=7
42 TYPE_ACTIVITY_MARK_ANSWER=8
43 TYPE_ACTIVITY_VOTE_UP=9
44 TYPE_ACTIVITY_VOTE_DOWN=10
45 TYPE_ACTIVITY_CANCEL_VOTE=11
46 TYPE_ACTIVITY_DELETE_QUESTION=12
47 TYPE_ACTIVITY_DELETE_ANSWER=13
48 TYPE_ACTIVITY_MARK_OFFENSIVE=14
49 TYPE_ACTIVITY_UPDATE_TAGS=15
50 TYPE_ACTIVITY_FAVORITE=16
51 TYPE_ACTIVITY_USER_FULL_UPDATED = 17
52 TYPE_ACTIVITY_QUESTION_EMAIL_UPDATE_SENT = 18
53 #TYPE_ACTIVITY_EDIT_QUESTION=17
54 #TYPE_ACTIVITY_EDIT_ANSWER=18
55
56 TYPE_ACTIVITY = (
57     (TYPE_ACTIVITY_ASK_QUESTION, _('question')),
58     (TYPE_ACTIVITY_ANSWER, _('answer')),
59     (TYPE_ACTIVITY_COMMENT_QUESTION, _('commented question')),
60     (TYPE_ACTIVITY_COMMENT_ANSWER, _('commented answer')),
61     (TYPE_ACTIVITY_UPDATE_QUESTION, _('edited question')),
62     (TYPE_ACTIVITY_UPDATE_ANSWER, _('edited answer')),
63     (TYPE_ACTIVITY_PRIZE, _('received award')),
64     (TYPE_ACTIVITY_MARK_ANSWER, _('marked best answer')),
65     (TYPE_ACTIVITY_VOTE_UP, _('upvoted')),
66     (TYPE_ACTIVITY_VOTE_DOWN, _('downvoted')),
67     (TYPE_ACTIVITY_CANCEL_VOTE, _('canceled vote')),
68     (TYPE_ACTIVITY_DELETE_QUESTION, _('deleted question')),
69     (TYPE_ACTIVITY_DELETE_ANSWER, _('deleted answer')),
70     (TYPE_ACTIVITY_MARK_OFFENSIVE, _('marked offensive')),
71     (TYPE_ACTIVITY_UPDATE_TAGS, _('updated tags')),
72     (TYPE_ACTIVITY_FAVORITE, _('selected favorite')),
73     (TYPE_ACTIVITY_USER_FULL_UPDATED, _('completed user profile')),
74     (TYPE_ACTIVITY_QUESTION_EMAIL_UPDATE_SENT, _('email update sent to user')),
75 )
76
77 TYPE_RESPONSE = {
78     'QUESTION_ANSWERED' : 'question_answered',
79     'QUESTION_COMMENTED': 'question_commented',
80     'ANSWER_COMMENTED'  : 'answer_commented',
81     'ANSWER_ACCEPTED'   : 'answer_accepted',
82 }
83
84 CONST = {
85     'closed'            : _('[closed]'),
86         'deleted'           : _('[deleted]'),
87     'default_version'   : _('initial version'),
88     'retagged'          : _('retagged'),
89 }
90
91 #how to filter questions by tags in email digests?
92 TAG_EMAIL_FILTER_CHOICES = (('ignored', _('exclude ignored tags')),('interesting',_('allow only selected tags')))