diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-07-02 12:43:09 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-07-02 12:43:09 -0400 |
commit | 3ed4d6c37552cc97464444a65074f3b8ddf7d9f5 (patch) | |
tree | 5d8be200da5fcd3bc1d77f81f17e3b527622e960 /askbot/const | |
parent | 17ee9fe0f5de3489d35577a783748eb84602fa86 (diff) | |
parent | 33fb5deb70373f251788b257e9fa0cbe16849b95 (diff) | |
download | askbot-3ed4d6c37552cc97464444a65074f3b8ddf7d9f5.tar.gz askbot-3ed4d6c37552cc97464444a65074f3b8ddf7d9f5.tar.bz2 askbot-3ed4d6c37552cc97464444a65074f3b8ddf7d9f5.zip |
merged with the master and tag-editor branches
Diffstat (limited to 'askbot/const')
-rw-r--r-- | askbot/const/__init__.py | 11 | ||||
-rw-r--r-- | askbot/const/message_keys.py | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/askbot/const/__init__.py b/askbot/const/__init__.py index e693a63c..2633055f 100644 --- a/askbot/const/__init__.py +++ b/askbot/const/__init__.py @@ -139,11 +139,13 @@ UNANSWERED_QUESTION_MEANING_CHOICES = ( #however it will be hard to expect that people will type #correct regexes - plus this must be an anchored regex #to do full string match +#IMPRTANT: tag related regexes must be portable between js and python TAG_CHARS = r'\w+.#-' TAG_REGEX_BARE = r'[%s]+' % TAG_CHARS TAG_REGEX = r'^%s$' % TAG_REGEX_BARE TAG_SPLIT_REGEX = r'[ ,]+' TAG_SEP = ',' # has to be valid TAG_SPLIT_REGEX char and MUST NOT be in const.TAG_CHARS +#!!! see const.message_keys.TAG_WRONG_CHARS_MESSAGE EMAIL_REGEX = re.compile(r'\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b', re.I) TYPE_ACTIVITY_ASK_QUESTION = 1 @@ -288,10 +290,11 @@ TYPE_RESPONSE = { } POST_STATUS = { - 'closed' : _('[closed]'), - 'deleted' : _('[deleted]'), - 'default_version' : _('initial version'), - 'retagged' : _('retagged'), + 'closed': _('[closed]'), + 'deleted': _('[deleted]'), + 'default_version': _('initial version'), + 'retagged': _('retagged'), + 'private': _('[private]') } #choices used in email and display filters diff --git a/askbot/const/message_keys.py b/askbot/const/message_keys.py index 9ac82e57..74fcbf7f 100644 --- a/askbot/const/message_keys.py +++ b/askbot/const/message_keys.py @@ -36,6 +36,10 @@ _('click to see most voted questions') _('interesting') _('ignored') _('subscribed') +TAGS_ARE_REQUIRED_MESSAGE = _('tags are required') +TAG_WRONG_CHARS_MESSAGE = _( + 'please use letters, numbers and characters "-+.#"' +) def get_i18n_message(key): messages = { |