diff --git a/.gitignore b/.gitignore index 47204c91e..0a998a7f7 100644 --- a/.gitignore +++ b/.gitignore @@ -60,4 +60,5 @@ media/ .env venv_bootcamp/ -staticfiles \ No newline at end of file +staticfiles +.idea \ No newline at end of file diff --git a/bootcamp/core/templates/core/profile.html b/bootcamp/core/templates/core/profile.html index ca931c9a5..521457617 100644 --- a/bootcamp/core/templates/core/profile.html +++ b/bootcamp/core/templates/core/profile.html @@ -54,13 +54,13 @@

{{ page_user.profile.get_screen_name }} {% if page_user.get_full_name %} diff --git a/bootcamp/core/views.py b/bootcamp/core/views.py index 3dc7e6f78..5b40159c3 100644 --- a/bootcamp/core/views.py +++ b/bootcamp/core/views.py @@ -1,7 +1,8 @@ import os import json -from django.shortcuts import get_object_or_404 +from PIL import Image + from django.conf import settings as django_settings from django.contrib import messages from django.db.models import Q @@ -9,7 +10,7 @@ from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator -from django.shortcuts import redirect, render +from django.shortcuts import get_object_or_404, redirect, render from bootcamp.core.forms import ChangePasswordForm, ProfileForm from bootcamp.feeds.views import FEEDS_NUM_PAGES, feeds @@ -19,8 +20,6 @@ from bootcamp.activities.models import Activity from bootcamp.messenger.models import Message -from PIL import Image - def home(request): if request.user.is_authenticated(): diff --git a/bootcamp/feeds/static/js/feeds.js b/bootcamp/feeds/static/js/feeds.js index 84a3d233b..c0539cdb8 100644 --- a/bootcamp/feeds/static/js/feeds.js +++ b/bootcamp/feeds/static/js/feeds.js @@ -5,7 +5,7 @@ $(function () { $(".stream-update").hide(); $(".stream-update .new-posts").text(""); $(document).attr("title", page_title); - }; + } $("body").keydown(function (evt) { var keyCode = evt.which?evt.which:evt.keyCode; diff --git a/bootcamp/locale/zh_CN/LC_MESSAGES/django.po b/bootcamp/locale/zh_CN/LC_MESSAGES/django.po index 3084b1500..0fb2fa464 100644 --- a/bootcamp/locale/zh_CN/LC_MESSAGES/django.po +++ b/bootcamp/locale/zh_CN/LC_MESSAGES/django.po @@ -153,7 +153,7 @@ msgstr "写第一条评论" #: bootcamp/articles/templates/articles/write.html:35 msgid "Preview" -msgstr "" +msgstr "预览" #: bootcamp/authentication/templates/authentication/signup.html:12 #: bootcamp/core/templates/core/cover.html:41 @@ -274,7 +274,7 @@ msgstr "已解决" #: bootcamp/core/templates/core/profile.html:46 msgid "Global Interactions" -msgstr "" +msgstr "全局交互" #: bootcamp/core/templates/core/profile.html:71 #, fuzzy @@ -348,16 +348,16 @@ msgstr "写第一条评论" #: bootcamp/messenger/models.py:20 msgid "Message" -msgstr "" +msgstr "消息" #: bootcamp/messenger/models.py:21 msgid "Messages" -msgstr "" +msgstr "消息" #: bootcamp/messenger/templates/messenger/inbox.html:4 #: bootcamp/messenger/templates/messenger/inbox.html:6 msgid "Inbox" -msgstr "" +msgstr "收件箱" #: bootcamp/messenger/templates/messenger/inbox.html:15 msgid "This is the begining of a great new conversation." @@ -365,7 +365,7 @@ msgstr "" #: bootcamp/messenger/templates/messenger/inbox.html:16 msgid "Let's get started now!" -msgstr "" +msgstr "让我们开始吧!" #: bootcamp/questions/templates/questions/ask.html:7 #: bootcamp/questions/templates/questions/questions.html:15 @@ -424,11 +424,11 @@ msgstr "没有问题显示" #: bootcamp/search/templates/search/partial_articles_results.html:24 msgid "No article found" -msgstr "" +msgstr "没有文章" #: bootcamp/search/templates/search/partial_feed_results.html:23 msgid "No feed found" -msgstr "" +msgstr "没有Feed" #: bootcamp/search/templates/search/partial_questions_results.html:22 #, fuzzy @@ -445,17 +445,17 @@ msgstr "用户名" #: bootcamp/search/templates/search/partial_users_results.html:19 msgid "No user found" -msgstr "" +msgstr "没有用户" #: bootcamp/search/templates/search/results.html:17 #: bootcamp/search/templates/search/search.html:22 msgid "Search" -msgstr "" +msgstr "搜索" #: bootcamp/search/templates/search/results.html:23 #: bootcamp/search/templates/search/search.html:19 msgid "Search Feed, Articles, Questions and Users" -msgstr "" +msgstr "搜索Feed、文章、问答和用户" #: bootcamp/templates/base.html:47 msgid "Q&A" diff --git a/bootcamp/settings.py b/bootcamp/settings.py index 09a75f7cf..d71090c4e 100644 --- a/bootcamp/settings.py +++ b/bootcamp/settings.py @@ -90,7 +90,8 @@ LANGUAGES = ( ('en', 'English'), ('pt-br', 'Portuguese'), - ('es', 'Spanish') + ('es', 'Spanish'), + ('zh-cn', 'Chinese'), ) LOCALE_PATHS = (PROJECT_DIR.child('locale'), ) diff --git a/bootcamp/static/js/bootcamp.markdown.js b/bootcamp/static/js/bootcamp.markdown.js index 5b01b6f30..76be8e258 100644 --- a/bootcamp/static/js/bootcamp.markdown.js +++ b/bootcamp/static/js/bootcamp.markdown.js @@ -61,7 +61,7 @@ $(function () { } $(_textarea).selection("replace", {text: selection_list_result}); break; - }; + } }); diff --git a/bootcamp/templates/400.html b/bootcamp/templates/400.html index c65ade4a9..87a3dd378 100644 --- a/bootcamp/templates/400.html +++ b/bootcamp/templates/400.html @@ -2,7 +2,7 @@ {% block main %} -

Hey you! My friend, it appears to me than you did something wrong. :(

+

Hey you! My friend, it appears to me that you did something wrong. :(

{% endblock main %} diff --git a/bootcamp/templates/403.html b/bootcamp/templates/403.html index 42a4eceff..2c3223c18 100644 --- a/bootcamp/templates/403.html +++ b/bootcamp/templates/403.html @@ -4,5 +4,5 @@ -

Hey you!

+

Hey you! Seems like you do not have permission to access this page. Please let us know otherwise.

{% endblock main %} \ No newline at end of file diff --git a/bootcamp/templates/500.html b/bootcamp/templates/500.html index 6aabf4e60..ac9d2e94f 100644 --- a/bootcamp/templates/500.html +++ b/bootcamp/templates/500.html @@ -4,5 +4,5 @@ -

Ooops! Something went wrong. That's all we know.

+

Oops! Something went wrong. That's all we know.

{% endblock main %} \ No newline at end of file diff --git a/bootcamp/templates/base.html b/bootcamp/templates/base.html index fc13618ad..2a7b287d5 100644 --- a/bootcamp/templates/base.html +++ b/bootcamp/templates/base.html @@ -1,4 +1,5 @@ -{% load staticfiles i18n %} +{% load staticfiles i18n %} + @@ -64,7 +65,7 @@ $(function() { $("#auto-search").autocomplete({ source: "{% url 'autocomplete' %}", - minLength: 2, + minLength: 2 }); });