Browse Source

fix topic filter and orderby

修复主题筛选
honmaple 8 years ago
parent
commit
d114c3eb3f

+ 1 - 1
forums/__init__.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2017-01-25 20:10:50 (CST)
-# Last Update:星期日 2017-4-2 12:23:43 (CST)
+# Last Update:星期日 2017-4-9 12:8:22 (CST)
 #          By:
 # Description:
 # **************************************************************************

+ 2 - 2
forums/api/forms.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2017-03-28 12:53:02 (CST)
-# Last Update:星期三 2017-3-29 22:51:17 (CST)
+# Last Update:星期日 2017-4-9 12:41:11 (CST)
 #          By:
 # Description:
 # **************************************************************************
@@ -77,7 +77,7 @@ class LoginForm(BaseForm):
 
 
 WITHIN = [(0, _('All Topics')), (1, _('One Day')), (2, _('One Week')),
-          (3, _('One Month'))]
+          (3, _('One Month')), (4, _('One Year'))]
 
 ORDERBY = [(0, _('Publish')), (1, _('Author'))]
 

+ 6 - 3
forums/api/forums/views.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2016-12-17 20:45:08 (CST)
-# Last Update:星期日 2017-4-2 11:50:57 (CST)
+# Last Update:星期日 2017-4-9 12:43:42 (CST)
 #          By:
 # Description:
 # **************************************************************************
@@ -16,6 +16,7 @@ from flask_babelex import gettext as _
 from forums.api.topic.models import Topic
 from forums.common.views import BaseMethodView as MethodView
 from forums.common.utils import (gen_filter_dict, gen_order_by)
+from forums.api.utils import gen_topic_filter, gen_topic_orderby
 
 from .models import Board
 
@@ -75,8 +76,10 @@ class BoardView(MethodView):
         query_dict = request.data
         page, number = self.page_info
         keys = ['title']
-        order_by = gen_order_by(query_dict, keys)
-        filter_dict = gen_filter_dict(query_dict, keys)
+        # order_by = gen_order_by(query_dict, keys)
+        # filter_dict = gen_filter_dict(query_dict, keys)
+        order_by = gen_topic_orderby(query_dict, keys)
+        filter_dict = gen_topic_filter(query_dict, keys)
         if has_children:
             topics = Topic.query.outerjoin(Board).filter_by(**filter_dict).or_(
                 Board.parent_id == boardId,

+ 15 - 3
forums/api/tag/views.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2016-12-15 22:07:04 (CST)
-# Last Update:星期一 2017-4-3 12:40:9 (CST)
+# Last Update:星期日 2017-4-9 12:46:47 (CST)
 #          By:
 # Description:
 # **************************************************************************
@@ -16,6 +16,7 @@ from flask import current_app, render_template, request, url_for
 from werkzeug.contrib.atom import AtomFeed
 
 from forums.api.topic.models import Topic
+from forums.api.utils import gen_topic_filter, gen_topic_orderby
 from forums.common.utils import gen_filter_dict, gen_order_by
 from forums.common.views import BaseMethodView as MethodView
 
@@ -41,11 +42,22 @@ class TagsView(MethodView):
     def get(self, name):
         page, number = self.page_info
         tag = Tags.query.filter_by(name=name).first_or_404()
-        topics = Topic.query.filter_by(tags__id=tag.id).paginate(page, number,
-                                                                 True)
+        topics = self.topics(tag)
         data = {'title': tag.name, 'tag': tag, 'topics': topics}
         return render_template('tag/tag.html', **data)
 
+    def topics(self, tag):
+        query_dict = request.data
+        page, number = self.page_info
+        keys = ['name']
+        # order_by = gen_order_by(query_dict, keys)
+        # filter_dict = gen_filter_dict(query_dict, keys)
+        order_by = gen_topic_orderby(query_dict, keys)
+        filter_dict = gen_topic_filter(query_dict, keys)
+        filter_dict.update(tags__id=tag.id)
+        return Topic.query.filter_by(
+            **filter_dict).order_by(*order_by).paginate(page, number, True)
+
 
 class TagFeedView(MethodView):
     def get(self, name):

+ 6 - 3
forums/api/topic/views.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2016-12-15 22:07:39 (CST)
-# Last Update:星期日 2017-4-2 14:49:1 (CST)
+# Last Update:星期日 2017-4-9 12:48:18 (CST)
 #          By:
 # Description:
 # **************************************************************************
@@ -21,6 +21,7 @@ from forums.api.forms import (CollectForm, ReplyForm, TopicForm,
                               form_board)
 from forums.api.forums.models import Board
 from forums.api.tag.models import Tags
+from forums.api.utils import gen_topic_filter, gen_topic_orderby
 from forums.common.serializer import Serializer
 from forums.common.utils import gen_filter_dict, gen_order_by
 from forums.common.views import BaseMethodView as MethodView
@@ -76,8 +77,10 @@ class TopicListView(MethodView):
         query_dict = request.data
         page, number = self.page_info
         keys = ['title']
-        order_by = gen_order_by(query_dict, keys)
-        filter_dict = gen_filter_dict(query_dict, keys)
+        # order_by = gen_order_by(query_dict, keys)
+        # filter_dict = gen_filter_dict(query_dict, keys)
+        order_by = gen_topic_orderby(query_dict, keys)
+        filter_dict = gen_topic_filter(query_dict, keys)
         title = _('All Topics')
         if request.path.endswith('good'):
             filter_dict.update(is_good=True)

+ 5 - 1
forums/api/user/models.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2016-12-15 21:09:08 (CST)
-# Last Update:星期六 2017-4-8 12:51:59 (CST)
+# Last Update:星期日 2017-4-9 12:16:21 (CST)
 #          By:
 # Description:
 # **************************************************************************
@@ -59,6 +59,10 @@ class User(db.Model, UserMixin, ModelMixin, MailMixin):
             user_follower.c.follower_id == user.id).exists()
 
     @property
+    def is_not_confirmed(self):
+        return (not self.is_confirmed and self.id == current_user.id)
+
+    @property
     def is_online(self):
         setting = self.setting
         if setting.online_status == UserSetting.STATUS_ALLOW_ALL:

+ 20 - 17
forums/api/utils.py

@@ -6,20 +6,30 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2017-03-29 13:33:03 (CST)
-# Last Update:星期三 2017-3-29 13:43:40 (CST)
+# Last Update:星期日 2017-4-9 12:42:56 (CST)
 #          By:
 # Description:
 # **************************************************************************
 from datetime import datetime, timedelta
 
 one_day = datetime.now() + timedelta(days=-1)
+one_week = datetime.now() + timedelta(days=-7)
 one_month = datetime.now() + timedelta(days=-30)
-one_year = datetime.now() + timedelta(years=-1)
+one_year = datetime.now() + timedelta(days=-365)
 
 
 def gen_topic_filter(query_dict=dict(), keys=[], equal_key=[], user=None):
     filter_dict = {}
     keys = list(set(keys) & set(query_dict.keys()))
+    within = query_dict.pop('within', None)
+    if within == '1':
+        filter_dict.update(created_at__gte=one_day)
+    elif within == '2':
+        filter_dict.update(created_at__gte=one_week)
+    elif within == '3':
+        filter_dict.update(created_at__gte=one_month)
+    elif within == '4':
+        filter_dict.update(created_at__gte=one_year)
     for k in keys:
         if k in equal_key:
             filter_dict.update(**{k: query_dict[k]})
@@ -28,25 +38,18 @@ def gen_topic_filter(query_dict=dict(), keys=[], equal_key=[], user=None):
             filter_dict.update(**{new_k: query_dict[k]})
     if user is not None and user.is_authenticated:
         filter_dict.update(user__id=user.id)
-    within = query_dict.pop('within', None)
-    if within is not None:
-        if within == 1:
-            filter_dict.update(created_at__gte=one_day)
-        elif within == 2:
-            filter_dict.update(created_at__gte=one_month)
-        elif within == 3:
-            filter_dict.update(created_at__gte=one_year)
     return filter_dict
 
 
 def gen_topic_orderby(query_dict=dict(), keys=[], date_key=True):
     keys.append('id')
-    if date_key:
-        keys += ['created_at', 'updated_at']
     order_by = ['id']
-    descent = query_dict.pop('orderby', None)
-    if descent is not None:
-        descent = descent.split(',')
-        descent = list(set(keys) & set(descent))
-        order_by = ['-%s' % i for i in descent]
+    orderby = query_dict.pop('orderby', None)
+    desc = query_dict.pop('desc', None)
+    if orderby == '0':
+        order_by = ['author_id']
+    elif orderby == '1':
+        order_by = ['created_at']
+    if desc == '0':
+        order_by = ['-%s' % i for i in order_by]
     return tuple(order_by)

+ 1 - 6
forums/filters.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2016-11-07 21:00:32 (CST)
-# Last Update:星期日 2017-4-2 15:30:0 (CST)
+# Last Update:星期日 2017-4-9 12:16:40 (CST)
 #          By:
 # Description:
 # **************************************************************************
@@ -87,10 +87,6 @@ def forums_count():
     return redis_data.hgetall(key)
 
 
-def is_not_confirmed(user):
-    return (not user.is_confirmed and user.id == current_user.id)
-
-
 def register_jinja2(app):
 
     app.jinja_env.globals['SITE'] = SITE
@@ -100,4 +96,3 @@ def register_jinja2(app):
     app.jinja_env.globals['forums_count'] = forums_count
     app.jinja_env.filters['timesince'] = timesince
     app.jinja_env.filters['safe_clean'] = safe_clean
-    app.jinja_env.filters['is_not_confirmed'] = is_not_confirmed

+ 1 - 1
templates/user/info.html

@@ -13,7 +13,7 @@
 {%- endmacro %}
 
 {% macro mine(user) -%}
-{% if g.user.is_authenticated and user | is_not_confirmed %}
+{% if g.user.is_authenticated and user.is_not_confirmed %}
 <div class="alert alert-info" style="padding:6px;font-size:12px;margin-top:10px;">
   <button type="button" class="close" data-dismiss="alert" aria-label="Close">
     <span aria-hidden="true">&times;</span>

BIN
translations/zh/LC_MESSAGES/messages.mo


+ 522 - 410
translations/zh/LC_MESSAGES/messages.po

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PROJECT VERSION\n"
 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2016-08-07 13:53+0800\n"
+"POT-Creation-Date: 2017-04-09 12:50+0800\n"
 "PO-Revision-Date: 2016-06-16 14:36+0800\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language: zh\n"
@@ -18,6 +18,248 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Generated-By: Babel 2.3.4\n"
 
+#: forums/extension.py:66
+msgid "Please login to access this page."
+msgstr "这个页面要求登陆,请登陆"
+
+#: forums/api/auth/forms.py:22 forums/api/forms.py:48
+msgid "Username:"
+msgstr "用户名:"
+
+#: forums/api/auth/forms.py:25 forums/api/forms.py:51
+msgid "Password:"
+msgstr "密码:"
+
+#: forums/api/auth/forms.py:28 forums/api/forms.py:54
+msgid "Captcha:"
+msgstr "验证码:"
+
+#: forums/api/auth/forms.py:39 forums/api/forms.py:65
+msgid "The captcha is error"
+msgstr "验证码错误"
+
+#: forums/api/auth/forms.py:46 forums/api/forms.py:72
+msgid "Email:"
+msgstr "邮箱"
+
+#: forums/api/auth/forms.py:50 forums/api/forms.py:76
+msgid "Remember me"
+msgstr "记住我"
+
+#: forums/api/forms.py:79 forums/api/topic/views.py:84
+#: templates/topic/topic_good.html:13 templates/topic/topic_list.html:4
+#: templates/topic/topic_list.html:6 templates/topic/topic_list.html:8
+#: templates/topic/topic_top.html:13
+msgid "All Topics"
+msgstr "所有主题"
+
+#: forums/api/forms.py:79
+msgid "One Day"
+msgstr "一天之内"
+
+#: forums/api/forms.py:79
+msgid "One Week"
+msgstr "一周之内"
+
+#: forums/api/forms.py:80
+msgid "One Month"
+msgstr "一月之内"
+
+#: forums/api/forms.py:80
+msgid "One Year"
+msgstr "一年之内"
+
+#: forums/api/forms.py:82
+msgid "Publish"
+msgstr "发表时间"
+
+#: forums/api/forms.py:82 templates/forums/_macro.html:48
+#: templates/topic/_list_macro.html:13
+msgid "Author"
+msgstr "发表作者"
+
+#: forums/api/forms.py:84
+msgid "Desc"
+msgstr "降序"
+
+#: forums/api/forms.py:84
+msgid "Asc"
+msgstr "升序"
+
+#: forums/api/forms.py:88
+msgid "Choice"
+msgstr "选择"
+
+#: forums/api/forms.py:94
+msgid "search"
+msgstr "搜索"
+
+#: forums/api/forms.py:98
+msgid "message"
+msgstr "私信"
+
+#: forums/api/forms.py:102
+msgid "Title:"
+msgstr "标题:"
+
+#: forums/api/forms.py:103 forums/api/forms.py:111
+msgid "Content:"
+msgstr "内容:"
+
+#: forums/api/forms.py:104
+msgid "Category:"
+msgstr "分类:"
+
+#: forums/api/forms.py:105
+msgid "Tags:"
+msgstr "节点:"
+
+#: forums/api/forms.py:107
+msgid "ContentType"
+msgstr "标记语言"
+
+#: forums/api/forms.py:115
+msgid "Name:"
+msgstr "收藏夹名:"
+
+#: forums/api/forms.py:116
+msgid "Description:"
+msgstr "描述:"
+
+#: forums/api/forms.py:128
+msgid "Upload Avatar:"
+msgstr "上传头像"
+
+#: forums/api/forms.py:135
+msgid "Online status:"
+msgstr "在线状态:"
+
+#: forums/api/forms.py:136
+msgid "Topic List:"
+msgstr "主题列表:"
+
+#: forums/api/forms.py:138
+msgid "Reply List:"
+msgstr "回复列表:"
+
+#: forums/api/forms.py:139
+msgid "Notebook List:"
+msgstr "笔记列表:"
+
+#: forums/api/forms.py:140
+msgid "Collect List:"
+msgstr "收藏列表:"
+
+#: forums/api/forms.py:144
+msgid "Introduce:"
+msgstr "个人介绍:"
+
+#: forums/api/forms.py:145
+msgid "School:"
+msgstr "所在学校:"
+
+#: forums/api/forms.py:146
+msgid "Signature:"
+msgstr "个性签名:"
+
+#: forums/api/forms.py:151
+msgid "Old Password:"
+msgstr "原密码:"
+
+#: forums/api/forms.py:154
+msgid "New Password:"
+msgstr "新密码:"
+
+#: forums/api/forms.py:157
+msgid "New Password again:"
+msgstr "重复新密码:"
+
+#: forums/api/forms.py:161
+msgid "Timezone:"
+msgstr "时区设置:"
+
+#: forums/api/forms.py:162
+msgid "Locale:"
+msgstr "语言设置:"
+
+#: forums/api/auth/views.py:101
+msgid "Please confirm  your email!"
+msgstr "请验证你的邮箱!"
+
+#: forums/api/auth/views.py:146
+msgid "Please confirm  your email"
+msgstr "请验证你的邮箱!"
+
+#: forums/api/forums/views.py:37
+msgid "About - "
+msgstr "关于 - "
+
+#: forums/api/forums/views.py:43
+msgid "Help - "
+msgstr "帮助 - "
+
+#: forums/api/forums/views.py:49
+msgid "Contact - "
+msgstr "联系我 - "
+
+#: forums/api/topic/views.py:44
+msgid "Ask - "
+msgstr "提问 - "
+
+#: forums/api/topic/views.py:58
+msgid "Edit -"
+msgstr "编辑 - "
+
+#: forums/api/topic/views.py:87 templates/topic/topic_good.html:13
+#: templates/topic/topic_list.html:6
+msgid "Good Topics"
+msgstr "社区精华帖子"
+
+#: forums/api/topic/views.py:90 templates/topic/topic_list.html:4
+#: templates/topic/topic_top.html:13
+msgid "Top Topics"
+msgstr "精华文章"
+
+#: forums/common/response.py:34
+msgid "Username or Password Error"
+msgstr ""
+
+#: forums/common/response.py:35
+msgid "Captcha Error"
+msgstr ""
+
+#: forums/common/response.py:36
+msgid "The email has been registered!"
+msgstr ""
+
+#: forums/common/response.py:37
+msgid "The username has been registered!"
+msgstr ""
+
+#: forums/common/response.py:38
+msgid "The email is error"
+msgstr ""
+
+#: forums/common/response.py:40
+msgid "Your account has been confirmed,don't need again!"
+msgstr ""
+
+#: forums/common/response.py:42
+msgid "Token is out of time,please get token again!"
+msgstr ""
+
+#: forums/common/response.py:43
+msgid "Form validate error"
+msgstr ""
+
+#: forums/common/response.py:44
+msgid "You have no permission!"
+msgstr ""
+
+#: forums/common/response.py:45
+msgid "Other error"
+msgstr ""
+
 #: templates/auth/forget.html:1
 msgid "Forget Password - "
 msgstr "忘记密码 - "
@@ -31,7 +273,7 @@ msgid "Login - "
 msgstr "登陆 - "
 
 #: templates/auth/login.html:5 templates/auth/login.html:8
-#: templates/base/base.html:75 templates/topic/replies.html:93
+#: templates/base/base.html:70 templates/topic/reply/form.html:15
 msgid "Login"
 msgstr "登陆"
 
@@ -40,99 +282,101 @@ msgid "Register - "
 msgstr "注册 - "
 
 #: templates/auth/register.html:5 templates/auth/register.html:8
-#: templates/base/base.html:74
+#: templates/base/base.html:69
 msgid "Register"
 msgstr "注册"
 
-#: templates/base/base.html:29
-msgid "Forums"
-msgstr "社区"
-
-#: templates/base/base.html:30
-msgid "Wiki"
-msgstr "文档"
+#: templates/base/base.html:53
+msgid "Home Page"
+msgstr "主页"
 
-#: templates/base/base.html:31
-msgid "Blog"
-msgstr "博客"
-
-#: templates/base/base.html:32
-msgid "Good"
-msgstr "精华文章"
-
-#: templates/base/base.html:36
-msgid "search content"
-msgstr "搜索内容"
-
-#: templates/base/base.html:67
-msgid "My Page"
-msgstr "我的主页"
-
-#: templates/base/base.html:68
+#: templates/base/base.html:54
 msgid "Setting"
 msgstr "帐号设置"
 
-#: templates/base/base.html:70
+#: templates/base/base.html:56
 msgid "Logout"
 msgstr "注销"
 
-#: templates/base/base.html:77 templates/tag/tag.html:12
-#: templates/tag/tag_list.html:4 templates/tag/tag_list.html:9
-msgid "All Tags"
-msgstr "所有标签"
+#: templates/base/base.html:60
+msgid "NoticeList"
+msgstr "通知"
 
-#: templates/base/base.html:78 templates/forums/userlist.html:3
-#: templates/forums/userlist.html:8
-msgid "Userlist"
-msgstr "用户列表"
+#: templates/base/base.html:72 templates/base/link.html:10
+msgid "TagList"
+msgstr "节点"
 
-#: templates/base/base.html:80 templates/forums/notice.html:3
-#: templates/forums/notice.html:9
-msgid "Notices"
-msgstr "消息通知"
+#: templates/base/base.html:73 templates/base/link.html:2
+msgid "UserList"
+msgstr "用户列表"
 
 #: templates/base/form.html:14
 msgid "save"
 msgstr "保存"
 
 #: templates/base/head.html:4 templates/base/head.html:6
-#: templates/topic/content.html:16
 msgid "Index"
 msgstr "社区主页"
 
-#: templates/base/link.html:17
-msgid "My Created Collects"
-msgstr "我创建的收藏夹"
+#: templates/base/header.html:19 templates/forums/index.html:10
+msgid "Forums"
+msgstr "社区"
 
-#: templates/base/link.html:20 templates/base/link.html:32
-#: templates/follow/following_collect.html:3
-msgid "Following Collects"
-msgstr "关注的收藏"
+#: templates/base/header.html:20 templates/forums/index.html:11
+msgid "Wiki"
+msgstr "文档"
+
+#: templates/base/header.html:21 templates/forums/index.html:12
+msgid "Blog"
+msgstr "博客"
+
+#: templates/base/header.html:22 templates/forums/index.html:13
+msgid "Good"
+msgstr "精华文章"
 
-#: templates/base/link.html:23 templates/follow/following_tag.html:3
+#: templates/base/header.html:26
+msgid "search content"
+msgstr "搜索内容"
+
+#: templates/base/link.html:18
+msgid "TopicList"
+msgstr "所有主题"
+
+#: templates/base/link.html:27
+msgid "BoardList"
+msgstr ""
+
+#: templates/base/link.html:52 templates/follow/following_tags.html:4
 msgid "Following Tags"
 msgstr "关注的节点"
 
-#: templates/base/link.html:26 templates/follow/following_topic.html:3
+#: templates/base/link.html:55 templates/follow/following_topics.html:4
 msgid "Following Topics"
 msgstr "关注的主题"
 
-#: templates/base/link.html:29 templates/follow/following_user.html:3
+#: templates/base/link.html:58 templates/follow/following_users.html:4
 msgid "Following Users"
 msgstr "关注的用户"
 
+#: templates/base/link.html:61 templates/follow/following_collects.html:4
+msgid "Following Collects"
+msgstr "关注的收藏"
+
+#: templates/base/link.html:66
+msgid "CollectList"
+msgstr "收藏列表"
+
 #: templates/base/panel.html:5
 msgid "Ask Questions"
 msgstr "提问"
 
-#: templates/base/panel.html:10 templates/mine/collect.html:15
-#: templates/mine/collect_list.html:3
-msgid "My Collects"
-msgstr "我的收藏"
+#: templates/base/panel.html:10
+msgid "Collects"
+msgstr "收藏"
 
 #: templates/base/panel.html:13
-msgid "My Followings"
-msgstr "我的关注"
+msgid "Followings"
+msgstr "关注"
 
 #: templates/base/panel.html:24
 msgid "now register"
@@ -158,60 +402,131 @@ msgstr "最近增加的节点"
 msgid "Forums Count"
 msgstr "社区统计"
 
-#: templates/base/panel.html:94
+#: templates/base/panel.html:95
 msgid "Total number of registered users:"
 msgstr "社区会员:"
 
-#: templates/base/panel.html:95
+#: templates/base/panel.html:96
 msgid "Total number of topics:"
 msgstr "主题总数:"
 
-#: templates/base/panel.html:96
+#: templates/base/panel.html:97
 msgid "Total number of posts:"
 msgstr "回帖数:"
 
-#: templates/board/board.html:28
-msgid "Today:"
-msgstr "今日:"
-
-#: templates/board/board.html:30 templates/board/board_base.html:10
+#: templates/board/_macro.html:9
 msgid "Topics:"
 msgstr "主题:"
 
-#: templates/board/board.html:32
-msgid "Ranking:"
-msgstr "排名:"
-
-#: templates/board/board_base.html:12
+#: templates/board/_macro.html:11
 msgid "Posts:"
 msgstr "帖子:"
 
-#: templates/board/board_base.html:22
+#: templates/board/_macro.html:21
 #, python-format
 msgid "published by %(author)s"
 msgstr "由%(author)s发表"
 
-#: templates/board/board_base.html:26 templates/topic/topic_list.html:23
-#: templates/user/topic.html:39
+#: templates/board/_macro.html:25 templates/topic/_list_macro.html:100
+#: templates/user/user.html:37
 msgid "No Topic"
 msgstr "没有帖子"
 
-#: templates/follow/none.html:3
-msgid "No Following"
-msgstr "暂无关注"
-
-#: templates/forums/forums.html:3
+#: templates/board/board_list.html:4
 msgid "Board"
 msgstr "版块"
 
-#: templates/forums/notice.html:8
+#: templates/collect/collect.html:3 templates/collect/collect_list.html:3
+msgid "My Collects"
+msgstr "我的收藏"
+
+#: templates/collect/collect.html:12
+msgid "edit"
+msgstr "编辑"
+
+#: templates/collect/collect.html:13 templates/collect/collect.html:20
+msgid "delete"
+msgstr "删除"
+
+#: templates/collect/collect.html:25
+msgid "No Collect"
+msgstr "暂无收藏"
+
+#: templates/collect/collect_list.html:12 templates/collect/create.html:6
+msgid "Create Collect"
+msgstr "创建收藏"
+
+#: templates/collect/collect_list.html:18
+msgid "Privacy"
+msgstr "私有"
+
+#: templates/collect/collect_list.html:20
+msgid "Public"
+msgstr "公共"
+
+#: templates/collect/create.html:27 templates/collect/delete.html:13
+#: templates/collect/edit.html:26
+msgid "cancel"
+msgstr "取消"
+
+#: templates/collect/create.html:28 templates/collect/delete.html:14
+#: templates/collect/edit.html:27
+msgid "confirm"
+msgstr "确定"
+
+#: templates/collect/delete.html:6
+msgid "Delete this collect"
+msgstr "删除收藏"
+
+#: templates/collect/edit.html:6
+msgid "Edit the collect"
+msgstr "编辑收藏"
+
+#: templates/follow/none.html:3
+msgid "No Followings"
+msgstr ""
+
+#: templates/forums/_macro.html:10
+msgid "Office Source Code"
+msgstr ""
+
+#: templates/forums/_macro.html:41 templates/topic/_list_macro.html:6
+msgid "Choice:"
+msgstr "筛选:"
+
+#: templates/forums/_macro.html:43 templates/topic/_list_macro.html:8
+msgid "Order:"
+msgstr "排序:"
+
+#: templates/forums/_macro.html:51 templates/topic/_list_macro.html:16
+msgid "Replies/Read"
+msgstr "回复/阅读"
+
+#: templates/forums/_macro.html:54 templates/topic/_list_macro.html:19
+msgid "Last reply"
+msgstr "最后回复"
+
+#: templates/forums/index.html:26
+msgid "more good topics"
+msgstr "更多精华文章"
+
+#: templates/forums/message.html:3 templates/forums/message.html:9
+msgid "Notices"
+msgstr "消息通知"
+
+#: templates/forums/message.html:8
 msgid "mark all to is read"
 msgstr "全部标记为已读"
 
-#: templates/forums/notice.html:22
+#: templates/forums/message.html:25
 msgid "No Notices"
 msgstr "没有通知"
 
+#: templates/forums/userlist.html:3 templates/forums/userlist.html:8
+#: templates/user/user_list.html:3 templates/user/user_list.html:8
+msgid "Userlist"
+msgstr "用户列表"
+
 #: templates/maple/footer.html:23
 msgid "Help"
 msgstr "帮助"
@@ -244,445 +559,242 @@ msgstr "最高在线:"
 msgid "Time of highest online:"
 msgstr "最高在线时间:"
 
-#: templates/mine/collect.html:21
-msgid "edit"
-msgstr "编辑"
-
-#: templates/mine/collect.html:22 templates/mine/collect.html:30
-msgid "delete"
-msgstr "删除"
-
-#: templates/mine/collect.html:36 templates/user/collect.html:46
-msgid "No Collect"
-msgstr "暂无收藏"
-
-#: templates/mine/collect.html:51
-msgid "Edit the collect"
-msgstr "编辑收藏"
-
-#: templates/mine/collect.html:71 templates/mine/collect.html:90
-#: templates/mine/collect_list.html:57
-msgid "cancel"
-msgstr "取消"
-
-#: templates/mine/collect.html:72 templates/mine/collect.html:91
-#: templates/mine/collect_list.html:58
-msgid "confirm"
-msgstr "确定"
-
-#: templates/mine/collect.html:83
-msgid "Delete this collect"
-msgstr "删除收藏"
-
-#: templates/mine/collect_list.html:12 templates/mine/collect_list.html:36
-msgid "Create Collect"
-msgstr "创建收藏"
-
-#: templates/mine/collect_list.html:18
-msgid "Privacy"
-msgstr "私有"
-
-#: templates/mine/collect_list.html:20
-msgid "Public"
-msgstr "公共"
-
-#: templates/setting/babel.html:4 templates/setting/babel.html:20
-#: templates/setting/babel.html:26 templates/setting/password.html:11
-#: templates/setting/privacy.html:11 templates/setting/setting.html:17
-msgid "Timezone and Locale"
-msgstr "时区及语言设置"
-
-#: templates/setting/babel.html:17 templates/setting/password.html:8
-#: templates/setting/privacy.html:8 templates/setting/setting.html:4
-#: templates/setting/setting.html:14 templates/setting/setting.html:23
+#: templates/setting/_macro.html:4 templates/setting/setting.html:5
+#: templates/setting/setting.html:19
 msgid "Profile "
 msgstr "资料设置"
 
-#: templates/setting/babel.html:18 templates/setting/password.html:4
-#: templates/setting/password.html:9 templates/setting/privacy.html:9
-#: templates/setting/setting.html:15
+#: templates/setting/_macro.html:5 templates/setting/password.html:5
 msgid "Password "
 msgstr "密码修改"
 
-#: templates/setting/babel.html:19 templates/setting/password.html:10
-#: templates/setting/privacy.html:4 templates/setting/privacy.html:10
-#: templates/setting/privacy.html:17 templates/setting/setting.html:16
+#: templates/setting/_macro.html:6 templates/setting/privacy.html:5
+#: templates/setting/privacy.html:13
 msgid "Privacy "
 msgstr "隐私设置"
 
-#: templates/setting/password.html:17
-msgid "Account"
-msgstr "账户修改"
+#: templates/setting/_macro.html:7 templates/setting/babel.html:5
+#: templates/setting/babel.html:22
+msgid "Timezone and Locale"
+msgstr "时区及语言设置"
 
-#: templates/setting/setting.html:42
+#: templates/setting/_macro.html:26
 msgid "confirm upload"
 msgstr "确认上传"
 
-#: templates/tag/tag_list.html:19
-msgid "No Tag"
+#: templates/setting/password.html:13
+msgid "Account"
+msgstr "账户修改"
+
+#: templates/tag/tag.html:4 templates/tag/tag_list.html:3
+#: templates/tag/tag_list.html:8
+msgid "All Tags"
+msgstr "所有标签"
+
+#: templates/tag/tag_list.html:15
+msgid "No Tags"
 msgstr "暂无标签"
 
-#: templates/topic/ask.html:16 templates/topic/ask.html:18
+#: templates/topic/ask.html:10 templates/topic/ask.html:12
 msgid "Ask"
 msgstr "提问"
 
-#: templates/topic/content.html:36
+#: templates/topic/edit.html:13
+msgid "Edit"
+msgstr "编辑"
+
+#: templates/topic/item/_macro.html:14
 #, python-format
 msgid "published at %(time)s"
 msgstr "于%(time)s发布"
 
-#: templates/topic/content.html:38
+#: templates/topic/item/_macro.html:16
 #, python-format
 msgid "The last reply published by %(author)s at %(time)s"
 msgstr "最后由%(author)s于%(time)s发布"
 
-#: templates/topic/edit.html:19
-msgid "Edit"
-msgstr "编辑"
-
-#: templates/topic/replies.html:24
-#, python-format
-msgid "Received %(total)s replies"
-msgstr "共收到%(total)s条回复"
-
-#: templates/topic/replies.html:26 templates/user/follower.html:7
-#: templates/user/follower.html:10 templates/user/reply.html:7
-#: templates/user/reply.html:10 templates/user/topic.html:7
-#: templates/user/topic.html:10
-msgid "time"
-msgstr "时间"
-
-#: templates/topic/replies.html:27 templates/user/reply.html:8
-#: templates/user/reply.html:11
-msgid "likers"
-msgstr "点赞"
-
-#: templates/topic/replies.html:74
+#: templates/topic/reply/_macro.html:18
 msgid "no reply"
 msgstr "暂无回复"
 
-#: templates/topic/replies.html:81
+#: templates/topic/reply/form.html:3
 msgid "Reply this topic"
 msgstr "回帖"
 
-#: templates/topic/replies.html:86
+#: templates/topic/reply/form.html:8
 msgid "Post reply"
 msgstr "发表回复"
 
-#: templates/topic/replies.html:93
+#: templates/topic/reply/form.html:15
 msgid "You need"
 msgstr "你需要"
 
-#: templates/topic/replies.html:93
+#: templates/topic/reply/form.html:15
 msgid "before you can reply."
 msgstr "后才能发表回复"
 
-#: maple/forums/forms.py:23 templates/topic/topic.html:13
-#: templates/topic/topic_good.html:13
-msgid "All Topics"
-msgstr "所有主题"
+#: templates/topic/reply/itemlist.html:4
+#, python-format
+msgid "Received %(total)s replies"
+msgstr "共收到%(total)s条回复"
 
-#: templates/topic/topic_good.html:13 templates/topic/topic_list.html:36
-msgid "Good Topics"
-msgstr "社区精华帖子"
+#: templates/topic/reply/itemlist.html:6 templates/user/followers.html:12
+#: templates/user/replies.html:12 templates/user/user.html:12
+msgid "time"
+msgstr "时间"
 
-#: maple/forums/forms.py:27 templates/topic/topic_list.html:39
-#: templates/topic/topic_list.html:70
-msgid "Author"
-msgstr "发表作者"
+#: templates/topic/reply/itemlist.html:7 templates/user/followers.html:13
+#: templates/user/replies.html:13
+msgid "likers"
+msgstr "点赞"
 
-#: templates/topic/topic_list.html:42 templates/topic/topic_list.html:73
-msgid "Replies/Read"
-msgstr "回复/阅读"
+#: templates/user/_macro.html:5
+msgid "Due to user's setting,the list have been hidden."
+msgstr "由于用户设置,列表被隐藏。"
 
-#: templates/topic/topic_list.html:45 templates/topic/topic_list.html:76
-msgid "Last reply"
-msgstr "最后回复"
+#: templates/user/base.html:12
+#, python-format
+msgid "topics of %(n)s"
+msgstr "%(n)s的主题"
 
-#: templates/topic/topic_list.html:63
-msgid "Choice:"
-msgstr "筛选:"
+#: templates/user/base.html:13
+#, python-format
+msgid "replies of %(n)s"
+msgstr "%(n)s的回复"
 
-#: templates/topic/topic_list.html:65
-msgid "Order:"
-msgstr "排序:"
+#: templates/user/base.html:14
+#, python-format
+msgid "collects of %(n)s"
+msgstr "%(n)s的收藏"
 
-#: templates/user/collect.html:40 templates/user/reply.html:34
-#: templates/user/topic.html:33
-msgid "Due to user's setting,the list have been hidden."
-msgstr "由于用户设置,列表被隐藏。"
+#: templates/user/base.html:15
+#, python-format
+msgid "followers of %(n)s"
+msgstr "%(n)s的粉丝"
 
-#: templates/user/follower.html:4 templates/user/reply.html:4
-#: templates/user/topic.html:4
+#: templates/user/followers.html:10 templates/user/replies.html:10
+#: templates/user/user.html:10
 msgid "Sort:"
 msgstr "排序:"
 
-#: templates/user/follower.html:8 templates/user/follower.html:11
-msgid "score"
-msgstr "积分"
-
-#: templates/user/follower.html:25
+#: templates/user/followers.html:23
 msgid "No Follower"
 msgstr "暂无关注者"
 
-#: maple/topic/permission.py:29 maple/topic/permission.py:80
-#: maple/topic/permission.py:117 templates/user/infor.html:22
+#: templates/user/info.html:21
 msgid "You haven't confirm your account,Please confirmed"
 msgstr "你的账户未验证,请尽快验证!"
 
-#: templates/user/infor.html:23
+#: templates/user/info.html:22
 msgid "Activate  Account"
 msgstr "验证帐户"
 
-#: templates/user/infor.html:39
+#: templates/user/info.html:29
 msgid "ONLINE"
 msgstr "在线"
 
-#: templates/user/infor.html:41
+#: templates/user/info.html:31
 msgid "OUTLINE"
 msgstr "离线"
 
-#: templates/user/reply.html:21
+#: templates/user/replies.html:29
 #, python-format
 msgid "replied %(title)s created by %(author)s"
 msgstr "回复了%(author)s创建的主题%(title)s"
 
-#: templates/user/reply.html:25
+#: templates/user/replies.html:33
 msgid "replied time:"
 msgstr "回复时间:"
 
-#: templates/user/reply.html:40
+#: templates/user/replies.html:38
 msgid "No Reply"
 msgstr "暂无回复"
 
-#: templates/user/topic.html:8 templates/user/topic.html:11
+#: templates/user/user.html:13
 msgid "vote"
 msgstr "投票"
 
-#: templates/user/topic.html:23
+#: templates/user/user.html:31
 msgid "create time:"
 msgstr "创建时间:"
 
-#: templates/user/topic.html:24
+#: templates/user/user.html:32
 #, python-format
 msgid "the last reply published by %(author)s"
 msgstr "最后回复来自%(author)s"
 
-#: templates/user/user.html:31
-msgid "me"
-msgstr "我"
-
-#: templates/user/user.html:45
-#, python-format
-msgid "topics of %(n)s"
-msgstr "%(n)s的主题"
-
-#: templates/user/user.html:46
-#, python-format
-msgid "replies of %(n)s"
-msgstr "%(n)s的回复"
-
-#: templates/user/user.html:47
-#, python-format
-msgid "collects of %(n)s"
-msgstr "%(n)s的收藏"
-
-#: templates/user/user.html:48
-#, python-format
-msgid "followers of %(n)s"
-msgstr "%(n)s的粉丝"
-
-#: maple/extensions.py:130
-msgid "Please login to access this page."
-msgstr "这个页面要求登陆,请登陆"
-
-#: maple/settings.py:16
-msgid "I love freedom more than life."
-msgstr "爱生活,更爱自由"
-
-#: maple/auth/views.py:69
-msgid "Your account has been confirmed,don't need again"
-msgstr "你的账户已经验证,不能重复验证"
-
-#: maple/auth/views.py:75
-msgid "An email has been sent to your.Please receive"
-msgstr "验证邮件已发送到你的邮箱,请及时查收!"
-
-#: maple/forums/forms.py:21
-msgid "Choice"
-msgstr "选择"
-
-#: maple/forums/forms.py:23
-msgid "One Day"
-msgstr "一天之内"
-
-#: maple/forums/forms.py:23
-msgid "One Week"
-msgstr "一周之内"
-
-#: maple/forums/forms.py:24
-msgid "One Month"
-msgstr "一月之内"
-
-#: maple/forums/forms.py:27
-msgid "Publish"
-msgstr "发表时间"
-
-#: maple/forums/forms.py:30
-msgid "Desc"
-msgstr "降序"
-
-#: maple/forums/forms.py:30
-msgid "Asc"
-msgstr "升序"
-
-#: maple/forums/forms.py:34
-msgid "search"
-msgstr "搜索"
-
-#: maple/forums/forms.py:38
-msgid "message"
-msgstr "私信"
-
-#: maple/forums/views.py:42
-msgid "Index - "
-msgstr "首页 - "
-
-#: maple/forums/views.py:59
-msgid "Notice - "
-msgstr "消息提醒 - "
-
-#: maple/forums/views.py:68
-msgid "Userlist - "
-msgstr "用户列表 - "
-
-#: maple/forums/views.py:83
-msgid "send succeccfully"
-msgstr "成功发送"
-
-#: maple/forums/views.py:93
-msgid "About - "
-msgstr "关于 - "
-
-#: maple/forums/views.py:99
-msgid "Help - "
-msgstr "帮助 - "
-
-#: maple/forums/views.py:105
-msgid "Contact - "
-msgstr "联系我 - "
-
-#: maple/mine/forms.py:21
-msgid "Name:"
-msgstr "收藏夹名:"
-
-#: maple/mine/forms.py:22
-msgid "Description:"
-msgstr "描述:"
-
-#: maple/setting/forms.py:19
-msgid "Everybody"
-msgstr "所有人"
-
-#: maple/setting/forms.py:19
-msgid "Logined User"
-msgstr "已登录用户"
-
-#: maple/setting/forms.py:19
-msgid "Only Self"
-msgstr "仅自己"
+#~ msgid "Office Source Code"
+#~ msgstr "官方网站源码"
 
-#: maple/setting/forms.py:24
-msgid "Login status:"
-msgstr "登陆状态:"
+#~ msgid "more good topics"
+#~ msgstr "查看更多精华文章"
 
-#: maple/setting/forms.py:26
-msgid "Topic List:"
-msgstr "主题列表:"
+#~ msgid "My Page"
+#~ msgstr "我的主页"
 
-#: maple/setting/forms.py:28
-msgid "Reply List:"
-msgstr "回复列表:"
+#~ msgid "My Created Collects"
+#~ msgstr "我创建的收藏夹"
 
-#: maple/setting/forms.py:29
-msgid "Notebook List:"
-msgstr "笔记列表:"
+#~ msgid "My Followings"
+#~ msgstr "我的关注"
 
-#: maple/setting/forms.py:30
-msgid "Collect List:"
-msgstr "收藏列表:"
+#~ msgid "Today:"
+#~ msgstr "今日:"
 
-#: maple/setting/forms.py:34
-msgid "Introduce:"
-msgstr "个人介绍:"
+#~ msgid "Ranking:"
+#~ msgstr "排名:"
 
-#: maple/setting/forms.py:35
-msgid "School:"
-msgstr "所在学校:"
+#~ msgid "No Following"
+#~ msgstr "暂无关注"
 
-#: maple/setting/forms.py:36
-msgid "Signature:"
-msgstr "个性签名:"
+#~ msgid "No Tag"
+#~ msgstr "暂无标签"
 
-#: maple/setting/forms.py:41
-msgid "Old Password:"
-msgstr "原密码:"
+#~ msgid "score"
+#~ msgstr "积分"
 
-#: maple/setting/forms.py:43
-msgid "New Password:"
-msgstr "新密码:"
+#~ msgid "me"
+#~ msgstr "我"
 
-#: maple/setting/forms.py:45
-msgid "New Password again:"
-msgstr "重复新密码:"
+#~ msgid "I love freedom more than life."
+#~ msgstr "爱生活,更爱自由"
 
-#: maple/setting/forms.py:50
-msgid "Timezone:"
-msgstr "时区设置:"
+#~ msgid "Your account has been confirmed,don't need again"
+#~ msgstr "你的账户已经验证,不能重复验证"
 
-#: maple/setting/forms.py:52
-msgid "Locale:"
-msgstr "语言设置:"
+#~ msgid "An email has been sent to your.Please receive"
+#~ msgstr "验证邮件已发送到你的邮箱,请及时查收!"
 
-#: maple/setting/forms.py:53
-msgid "English"
-msgstr "英文"
+#~ msgid "Index - "
+#~ msgstr "首页 - "
 
-#: maple/setting/forms.py:53
-msgid "Chinese"
-msgstr "中文"
+#~ msgid "Notice - "
+#~ msgstr "消息提醒 - "
 
-#: maple/topic/forms.py:21
-msgid "Title:"
-msgstr "标题:"
+#~ msgid "Userlist - "
+#~ msgstr "用户列表 - "
 
-#: maple/topic/forms.py:22 maple/topic/forms.py:35
-msgid "Content:"
-msgstr "内容:"
+#~ msgid "send succeccfully"
+#~ msgstr "成功发送"
 
-#: maple/topic/forms.py:24
-msgid "Category:"
-msgstr "分类:"
+#~ msgid "Everybody"
+#~ msgstr "所有人"
 
-#: maple/topic/forms.py:28
-msgid "Tags:"
-msgstr "节点:"
+#~ msgid "Logined User"
+#~ msgstr "已登录用户"
 
-#: maple/topic/permission.py:45 maple/topic/permission.py:94
-msgid "You have no permission"
-msgstr "你没有权限!"
+#~ msgid "Only Self"
+#~ msgstr "仅自己"
 
-#: maple/topic/views.py:53
-msgid "Edit -"
-msgstr "编辑 - "
+#~ msgid "Login status:"
+#~ msgstr "登陆状态:"
 
-#: maple/upload/forms.py:20
-msgid "Upload Avatar:"
-msgstr "上传头像"
+#~ msgid "English"
+#~ msgstr "英文"
 
-#~ msgid "Office Source Code"
-#~ msgstr "官方网站源码"
+#~ msgid "Chinese"
+#~ msgstr "中文"
 
-#~ msgid "more good topics"
-#~ msgstr "查看更多精华文章"
+#~ msgid "You have no permission"
+#~ msgstr "你没有权限!"