summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--LICENSE20
-rw-r--r--cnprog.wsgi8
-rw-r--r--django_authopenid/forms.py18
-rw-r--r--django_authopenid/models.py4
-rw-r--r--django_authopenid/util.py4
-rw-r--r--forum/const.py74
-rw-r--r--forum/feed.py12
-rw-r--r--forum/forms.py87
-rw-r--r--forum/management/commands/once_award_badges.py37
-rw-r--r--forum/managers.py55
-rw-r--r--forum/models.py12
-rw-r--r--forum/templatetags/extra_tags.py72
-rw-r--r--forum/user.py43
-rw-r--r--forum/views.py143
-rw-r--r--junk7
-rw-r--r--lanai.psproj557
-rw-r--r--locale/en/LC_MESSAGES/django.po2540
-rw-r--r--locale/zh-cn/LC_MESSAGES/django.mobin0 -> 39094 bytes
-rw-r--r--locale/zh-cn/LC_MESSAGES/django.po1430
-rw-r--r--log/cnprog.log0
-rw-r--r--settings.py97
-rw-r--r--templates/404.html27
-rw-r--r--templates/500.html28
-rw-r--r--templates/about.html68
-rw-r--r--templates/allfiles30
-rw-r--r--templates/answer_edit.html83
-rw-r--r--templates/answer_edit_tips.html54
-rw-r--r--templates/ask.html87
-rw-r--r--templates/authopenid/changeemail.html4
-rw-r--r--templates/authopenid/complete.html37
-rw-r--r--templates/authopenid/htmlfiles8
-rw-r--r--templates/authopenid/sendpw.html17
-rw-r--r--templates/authopenid/settings.html10
-rw-r--r--templates/authopenid/signin.html47
-rw-r--r--templates/authopenid/signup.html25
-rw-r--r--templates/badge.html13
-rw-r--r--templates/badges.html33
-rw-r--r--templates/base.html34
-rw-r--r--templates/base_content.html34
-rw-r--r--templates/book.html52
-rw-r--r--templates/close.html18
-rw-r--r--templates/content/js/com.cnprog.i18n.js90
-rw-r--r--templates/content/js/com.cnprog.post.js111
-rw-r--r--templates/content/js/com.cnprog.utils.js24
-rw-r--r--templates/content/js/jquery.i18n.js133
-rw-r--r--templates/content/js/wmd/wmd.js34
-rw-r--r--templates/content/style/default.css12
-rw-r--r--templates/content/style/openid.css2
-rw-r--r--templates/content/style/style.css99
-rw-r--r--templates/faq.html89
-rw-r--r--templates/footer.html21
-rw-r--r--templates/header.html37
-rw-r--r--templates/index.html49
-rw-r--r--templates/logout.html10
-rw-r--r--templates/okfiles30
-rw-r--r--templates/pagesize.html7
-rw-r--r--templates/paginator.html16
-rw-r--r--templates/privacy.html37
-rw-r--r--templates/question.html165
-rw-r--r--templates/question_edit.html85
-rw-r--r--templates/question_edit_tips.html51
-rw-r--r--templates/questions.html73
-rw-r--r--templates/reopen.html15
-rw-r--r--templates/revisions_answer.html18
-rw-r--r--templates/revisions_question.html21
-rw-r--r--templates/tags.html19
-rw-r--r--templates/template.list18
-rw-r--r--templates/tough/faq.html110
-rw-r--r--templates/tough/question_retag.html107
-rw-r--r--templates/tough/unanswered.html115
-rw-r--r--templates/unanswered.html55
-rwxr-xr-xtemplates/upfiles/1245715031297631.pngbin0 -> 3863 bytes
-rwxr-xr-xtemplates/upfiles/12457157052552259.pngbin0 -> 3863 bytes
-rw-r--r--templates/user.html3
-rw-r--r--templates/user_edit.html19
-rw-r--r--templates/user_favorites.html4
-rw-r--r--templates/user_footer.html3
-rw-r--r--templates/user_info.html34
-rw-r--r--templates/user_preferences.html15
-rw-r--r--templates/user_recent.html4
-rw-r--r--templates/user_reputation.html3
-rw-r--r--templates/user_responses.html6
-rw-r--r--templates/user_stats.html27
-rw-r--r--templates/user_tabs.html30
-rw-r--r--templates/user_votes.html9
-rw-r--r--templates/users.html23
-rw-r--r--templates/users_questions.html22
-rw-r--r--urls.py1
88 files changed, 6544 insertions, 1241 deletions
diff --git a/LICENSE b/LICENSE
index cb24f678..e23e4b67 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,14 +1,12 @@
-Copyright (C) 2009. Chen Gang
+版权所有(c) 2008 CNProg.com
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+根据2.0版本Apache许可证("许可证")授权;
+根据本许可证,用户可以不使用此文件。
+用户可从下列网址获得许可证副本:
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+http://www.apache.org/licenses/LICENSE-2.0
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
+除非因适用法律需要或书面同意,
+根据许可证分发的软件是基于"按原样"基础提供,
+无任何明示的或暗示的保证或条件。
+详见根据许可证许可下,特定语言的管辖权限和限制。 \ No newline at end of file
diff --git a/cnprog.wsgi b/cnprog.wsgi
new file mode 100644
index 00000000..a1bd8039
--- /dev/null
+++ b/cnprog.wsgi
@@ -0,0 +1,8 @@
+import os
+import sys
+
+sys.path.append('/var/www/vhosts')
+os.environ['DJANGO_SETTINGS_MODULE'] = 'cnprog.settings'
+
+import django.core.handlers.wsgi
+application = django.core.handlers.wsgi.WSGIHandler()
diff --git a/django_authopenid/forms.py b/django_authopenid/forms.py
index 9c519d74..09fa76b1 100644
--- a/django_authopenid/forms.py
+++ b/django_authopenid/forms.py
@@ -155,11 +155,11 @@ class OpenidRegisterForm(forms.Form):
""" test if username is valid and exist in database """
if 'username' in self.cleaned_data:
if not username_re.search(self.cleaned_data['username']):
- raise forms.ValidationError(u"鐢ㄦ埛鍚嶅彧鑳藉寘鍚嫳鏂囧瓧姣嶃佹暟瀛楀拰涓嬪垝绾")
+ raise forms.ValidationError(_('invalid user name'))
if self.cleaned_data['username'] in RESERVED_NAMES:
- raise forms.ValidationError(u'瀵逛笉璧凤紝鎮ㄤ笉鑳芥敞鍐岃鐢ㄦ埛鍚嶏紝璇锋崲涓涓瘯璇')
+ raise forms.ValidationError(_('sorry, this name can not be used, please try another'))
if len(self.cleaned_data['username']) < 3:
- raise forms.ValidationError(u'鐢ㄦ埛鍚嶅お鐭紝璇蜂娇鐢ㄤ笁涓垨涓変釜浠ヤ笂瀛楃')
+ raise forms.ValidationError(_('username too short'))
try:
user = User.objects.get(
username__exact = self.cleaned_data['username']
@@ -167,8 +167,8 @@ class OpenidRegisterForm(forms.Form):
except User.DoesNotExist:
return self.cleaned_data['username']
except User.MultipleObjectsReturned:
- raise forms.ValidationError(u'璇ョ敤鎴峰悕宸茶娉ㄥ唽锛岃鎹竴涓瘯璇')
- raise forms.ValidationError(u'璇ョ敤鎴峰悕宸茶娉ㄥ唽锛岃鎹釜璇曡瘯')
+ raise forms.ValidationError(_('this name is already in use - please try anoter'))
+ raise forms.ValidationError(_('this name is already in use - please try anoter'))
def clean_email(self):
"""For security reason one unique email in database"""
@@ -250,13 +250,13 @@ class RegistrationForm(forms.Form):
required=False)
username = forms.CharField(max_length=30,
widget=forms.TextInput(attrs=attrs_dict),
- label=u'Username')
+ label=_('choose a username'))
email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_dict,
- maxlength=200)), label=u'Email address')
+ maxlength=200)), label=_('your email address'))
password1 = forms.CharField(widget=forms.PasswordInput(attrs=attrs_dict),
- label=u'Password')
+ label=_('choose password'))
password2 = forms.CharField(widget=forms.PasswordInput(attrs=attrs_dict),
- label=u'Password (again, to catch typos)')
+ label=_('retype password'))
def clean_username(self):
"""
diff --git a/django_authopenid/models.py b/django_authopenid/models.py
index e6fb8111..9826c452 100644
--- a/django_authopenid/models.py
+++ b/django_authopenid/models.py
@@ -3,7 +3,7 @@ from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
-import hashlib, random, sys, os, time
+import md5, random, sys, os, time
__all__ = ['Nonce', 'Association', 'UserAssociation',
'UserPasswordQueueManager', 'UserPasswordQueue']
@@ -47,7 +47,7 @@ class UserPasswordQueueManager(models.Manager):
# The random module is seeded when this Apache child is created.
# Use SECRET_KEY as added salt.
while 1:
- confirm_key = hashlib.md5("%s%s%s%s" % (
+ confirm_key = md5.new("%s%s%s%s" % (
random.randint(0, sys.maxint - 1), os.getpid(),
time.time(), settings.SECRET_KEY)).hexdigest()
try:
diff --git a/django_authopenid/util.py b/django_authopenid/util.py
index 54c1246b..841a81c7 100644
--- a/django_authopenid/util.py
+++ b/django_authopenid/util.py
@@ -15,7 +15,7 @@ try:
except:
from yadis import xri
-import time, base64, hashlib, operator
+import time, base64, md5, operator
import urllib
from models import Association, Nonce
@@ -128,7 +128,7 @@ class DjangoOpenIDStore(OpenIDStore):
def getAuthKey(self):
# Use first AUTH_KEY_LEN characters of md5 hash of SECRET_KEY
- return hashlib.md5(settings.SECRET_KEY).hexdigest()[:self.AUTH_KEY_LEN]
+ return md5.new(settings.SECRET_KEY).hexdigest()[:self.AUTH_KEY_LEN]
def isDumb(self):
return False
diff --git a/forum/const.py b/forum/const.py
index d285de7d..f6649cc4 100644
--- a/forum/const.py
+++ b/forum/const.py
@@ -1,18 +1,19 @@
-锘# encoding:utf-8
+# encoding:utf-8
+from django.utils.translation import ugettext as _
"""
All constants could be used in other modules
For reasons that models, views can't have unicode text in this project, all unicode text go here.
"""
CLOSE_REASONS = (
- (1, u'瀹屽叏閲嶅鐨勯棶棰'),
- (2, u'涓嶆槸缂栫▼鎶鏈棶棰'),
- (3, u'澶富瑙傛с佸紩璧蜂簤鍚电殑闂'),
- (4, u'涓嶆槸涓涓彲浠ュ洖绛旂殑鈥滈棶棰樷'),
- (5, u'闂宸茬粡瑙e喅锛屽凡寰楀埌姝g‘绛旀'),
- (6, u'宸茬粡杩囨椂銆佷笉鍙噸鐜扮殑闂'),
- (7, u'澶眬閮ㄣ佹湰鍦板寲鐨勯棶棰'),
- (8, u'鎭舵剰瑷璁'),
- (9, u'鍨冨溇骞垮憡'),
+ (1, _('duplicate question')),
+ (2, _('question if off-topic or not relevant')),
+ (3, _('too subjective and argumentative')),
+ (4, _('is not an answer to the question')),
+ (5, _('the question is answered, right answer was accepted')),
+ (6, _('problem is not reproducible or outdated')),
+ #(7, u'澶眬閮ㄣ佹湰鍦板寲鐨勯棶棰',)
+ (7, _('question contains offensive inappropriate, or malicious remarks')),
+ (8, _('spam or advertising')),
)
TYPE_REPUTATION = (
@@ -52,38 +53,35 @@ TYPE_ACTIVITY_USER_FULL_UPDATED = 17
#TYPE_ACTIVITY_EDIT_ANSWER=18
TYPE_ACTIVITY = (
- (TYPE_ACTIVITY_ASK_QUESTION, u'鎻愰棶'),
- (TYPE_ACTIVITY_ANSWER, u'鍥炵瓟'),
- (TYPE_ACTIVITY_COMMENT_QUESTION, u'璇勮闂'),
- (TYPE_ACTIVITY_COMMENT_ANSWER, u'璇勮鍥炵瓟'),
- (TYPE_ACTIVITY_UPDATE_QUESTION, u'淇敼闂'),
- (TYPE_ACTIVITY_UPDATE_ANSWER, u'淇敼鍥炵瓟'),
- (TYPE_ACTIVITY_PRIZE, u'鑾峰'),
- (TYPE_ACTIVITY_MARK_ANSWER, u'鏍囪鏈浣崇瓟妗'),
- (TYPE_ACTIVITY_VOTE_UP, u'鎶曡禐鎴愮エ'),
- (TYPE_ACTIVITY_VOTE_DOWN, u'鎶曞弽瀵圭エ'),
- (TYPE_ACTIVITY_CANCEL_VOTE, u'鎾ら攢鎶曠エ'),
- (TYPE_ACTIVITY_DELETE_QUESTION, u'鍒犻櫎闂'),
- (TYPE_ACTIVITY_DELETE_ANSWER, u'鍒犻櫎鍥炵瓟'),
- (TYPE_ACTIVITY_MARK_OFFENSIVE, u'鏍囪鍨冨溇甯'),
- (TYPE_ACTIVITY_UPDATE_TAGS, u'鏇存柊鏍囩'),
- (TYPE_ACTIVITY_FAVORITE, u'鏀惰棌'),
- (TYPE_ACTIVITY_USER_FULL_UPDATED, u'瀹屾垚涓汉鎵鏈夎祫鏂'),
- #(TYPE_ACTIVITY_EDIT_QUESTION, u'缂栬緫闂'),
- #(TYPE_ACTIVITY_EDIT_ANSWER, u'缂栬緫绛旀'),
+ (TYPE_ACTIVITY_ASK_QUESTION, _('question')),
+ (TYPE_ACTIVITY_ANSWER, _('answer')),
+ (TYPE_ACTIVITY_COMMENT_QUESTION, _('commented question')),
+ (TYPE_ACTIVITY_COMMENT_ANSWER, _('commented answer')),
+ (TYPE_ACTIVITY_UPDATE_QUESTION, _('edited question')),
+ (TYPE_ACTIVITY_UPDATE_ANSWER, _('edited answer')),
+ (TYPE_ACTIVITY_PRIZE, _('received award')),
+ (TYPE_ACTIVITY_MARK_ANSWER, _('marked best answer')),
+ (TYPE_ACTIVITY_VOTE_UP, _('upvoted')),
+ (TYPE_ACTIVITY_VOTE_DOWN, _('downvoted')),
+ (TYPE_ACTIVITY_CANCEL_VOTE, _('canceled vote')),
+ (TYPE_ACTIVITY_DELETE_QUESTION, _('deleted question')),
+ (TYPE_ACTIVITY_DELETE_ANSWER, _('deleted answer')),
+ (TYPE_ACTIVITY_MARK_OFFENSIVE, _('marked offensive')),
+ (TYPE_ACTIVITY_UPDATE_TAGS, _('updated tags')),
+ (TYPE_ACTIVITY_FAVORITE, _('selected favorite')),
+ (TYPE_ACTIVITY_USER_FULL_UPDATED, _('completed user profile')),
)
TYPE_RESPONSE = {
- 'QUESTION_ANSWERED' : u'鍥炵瓟闂',
- 'QUESTION_COMMENTED': u'闂璇勮',
- 'ANSWER_COMMENTED' : u'鍥炵瓟璇勮',
- 'ANSWER_ACCEPTED' : u'鏈浣崇瓟妗',
+ 'QUESTION_ANSWERED' : 'question_answered',
+ 'QUESTION_COMMENTED': 'question_commented',
+ 'ANSWER_COMMENTED' : 'answer_commented',
+ 'ANSWER_ACCEPTED' : 'answer_accepted',
}
CONST = {
- 'closed' : u' [宸插叧闂璢',
- 'deleted' : u' [宸插垹闄',
- 'default_version' : u'鍒濆鐗堟湰',
- 'retagged' : u'鏇存柊浜嗘爣绛',
-
+ 'closed' : _('[closed]'),
+ 'deleted' : _('[deleted]'),
+ 'default_version' : _('initial version'),
+ 'retagged' : _('retagged'),
}
diff --git a/forum/feed.py b/forum/feed.py
index d75f3be6..a4218630 100644
--- a/forum/feed.py
+++ b/forum/feed.py
@@ -11,13 +11,15 @@
# Licence: GPL V2
#-------------------------------------------------------------------------------
from django.contrib.syndication.feeds import Feed, FeedDoesNotExist
+from django.utils.translation import ugettext as _
from models import Question
class RssLastestQuestionsFeed(Feed):
- title = u"CNProg绋嬪簭鍛橀棶绛旂ぞ鍖-鏈鏂伴棶棰"
- link = u"http://www.cnprog.com/questions/"
- description = u"涓浗绋嬪簭鍛樼殑缂栫▼鎶鏈棶绛旂ぞ鍖恒傛垜浠仛涓撲笟鐨勩佸彲鍗忎綔缂栬緫鐨勬妧鏈棶绛旂ぞ鍖恒"
+ title = _('site title') + _(' - ') + _('site slogan') + _(' - ')+ _('latest questions')
+ #EDIT!!!
+ link = 'http://where.com/questions/'
+ description = _('meta site content')
#ttl = 10
- copyright = u'Copyright(c)2009.CNPROG.COM'
+ copyright = _('copyright message')
def item_link(self, item):
return '/questions/%s/' % item.id
@@ -38,4 +40,4 @@ def main():
pass
if __name__ == '__main__':
- main() \ No newline at end of file
+ main()
diff --git a/forum/forms.py b/forum/forms.py
index 70a44f28..1b811ad9 100644
--- a/forum/forms.py
+++ b/forum/forms.py
@@ -1,8 +1,9 @@
-锘縤mport re
+import re
from datetime import date
from django import forms
from models import *
from const import *
+from django.utils.translation import ugettext as _
class TitleField(forms.CharField):
def __init__(self, *args, **kwargs):
@@ -10,13 +11,13 @@ class TitleField(forms.CharField):
self.required = True
self.widget = forms.TextInput(attrs={'size' : 70, 'autocomplete' : 'off'})
self.max_length = 255
- self.label = u'鏍囬'
- self.help_text = u'璇疯緭鍏ュ闂鍏锋湁鎻忚堪鎬ц川鐨勬爣棰 - 鈥滃府蹇欙紒绱фユ眰鍔╋紒鈥濅笉鏄缓璁殑鎻愰棶鏂瑰紡銆'
+ self.label = _('title')
+ self.help_text = _('please enter a descriptive title for your question')
self.initial = ''
def clean(self, value):
if len(value) < 10:
- raise forms.ValidationError(u"鏍囬鐨勯暱搴﹀繀椤诲ぇ浜10")
+ raise forms.ValidationError(_('title must be > 10 characters'))
return value
@@ -25,13 +26,13 @@ class EditorField(forms.CharField):
super(EditorField, self).__init__(*args, **kwargs)
self.required = True
self.widget = forms.Textarea(attrs={'id':'editor'})
- self.label = u'鍐呭'
+ self.label = _('content')
self.help_text = u''
self.initial = ''
def clean(self, value):
if len(value) < 10:
- raise forms.ValidationError(u"鍐呭鑷冲皯瑕10涓瓧绗")
+ raise forms.ValidationError(_('question content must be > 10 characters'))
return value
@@ -41,39 +42,37 @@ class TagNamesField(forms.CharField):
self.required = True
self.widget = forms.TextInput(attrs={'size' : 50, 'autocomplete' : 'off'})
self.max_length = 255
- self.label = u'鏍囩'
- self.help_text = u'澶氫釜鏍囩璇风敤绌烘牸闂撮殧-鏈澶5涓爣绛俱傦紙浼樺厛浣跨敤鑷姩鍖归厤鐨勮嫳鏂囨爣绛俱傦級'
+ self.label = _('tags')
+ self.help_text = _('please use space to separate tags (this enables autocomplete feature)')
self.initial = ''
- def clean(self, value):
- value = super(TagNamesField, self).clean(value)
- data = value.strip()
- if len(data) < 1:
- raise forms.ValidationError(u'鏍囩涓嶈兘涓虹┖')
- list = data.split(' ')
- list_temp = []
- if len(list) > 5:
- raise forms.ValidationError(u'鏈澶氬彧鑳芥湁5涓爣绛')
- for tag in list:
- if len(tag) > 20:
- raise forms.ValidationError(u'姣忎釜鏍囩鐨勯暱搴︿笉瓒呰繃20')
-
- #TODO: regex match not allowed characters here
-
- if tag.find('/') > -1 or tag.find('\\') > -1 or tag.find('<') > -1 or tag.find('>') > -1 or tag.find('&') > -1 or tag.find('\'') > -1 or tag.find('"') > -1:
- #if not tagname_re.match(tag):
- raise forms.ValidationError(u'鏍囩璇蜂娇鐢ㄨ嫳鏂囧瓧姣嶏紝涓枃鎴栬呮暟瀛楀瓧绗︿覆锛. - _ # 涔熷彲浠ワ級')
- # only keep one same tag
- if tag not in list_temp and len(tag.strip()) > 0:
- list_temp.append(tag)
- return u' '.join(list_temp)
+ def clean(self, value):
+ value = super(TagNamesField, self).clean(value)
+ data = value.strip()
+ if len(data) < 1:
+ raise forms.ValidationError(_('tags are required'))
+ list = data.split(' ')
+ list_temp = []
+ if len(list) > 5:
+ raise forms.ValidationError(_('please use 5 tags or less'))
+ for tag in list:
+ if len(tag) > 20:
+ raise forms.ValidationError(_('tags must be shorter than 20 characters'))
+ #take tag regex from settings
+ tagname_re = re.compile(r'[a-z0-9]+')
+ if not tagname_re.match(tag):
+ raise forms.ValidationError(_('please use following characters in tags: letters \'a-z\', numbers, and characters \'.-_#\''))
+ # only keep one same tag
+ if tag not in list_temp and len(tag.strip()) > 0:
+ list_temp.append(tag)
+ return u' '.join(list_temp)
class WikiField(forms.BooleanField):
def __init__(self, *args, **kwargs):
super(WikiField, self).__init__(*args, **kwargs)
self.required = False
- self.label = u'绀惧尯wiki妯″紡'
- self.help_text = u'閫夋嫨绀惧尯wiki妯″紡锛岄棶绛斾笉璁$畻绉垎锛岀鍚嶄篃涓嶆樉绀轰綔鑰呬俊鎭'
+ self.label = _('community wiki')
+ self.help_text = _('if you choose community wiki option, the question and answer do not generate points and name of author will not be shown')
class SummaryField(forms.CharField):
@@ -82,8 +81,8 @@ class SummaryField(forms.CharField):
self.required = False
self.widget = forms.TextInput(attrs={'size' : 50, 'autocomplete' : 'off'})
self.max_length = 300
- self.label = u'鏇存柊姒傝锛'
- self.help_text = u'杈撳叆鏈淇敼鐨勭畝鍗曟杩帮紙濡傦細淇敼浜嗗埆瀛楋紝淇浜嗚娉曪紝鏀硅繘浜嗘牱寮忕瓑銆傞潪蹇呭~椤广傦級'
+ self.label = _('update summary:')
+ self.help_text = _('enter a brief summary of your revision (e.g. fixed spelling, grammar, improved style, this field is optional)')
class AskForm(forms.Form):
title = TitleField()
@@ -158,12 +157,12 @@ class EditAnswerForm(forms.Form):
self.fields['text'].initial = revision.text
class EditUserForm(forms.Form):
- email = forms.EmailField(label=u'Email', help_text=u'涓嶄細鍏紑锛岀敤浜庡ご鍍忔樉绀烘湇鍔', required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 35}))
- realname = forms.CharField(label=u'鐪熷疄濮撳悕', required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 35}))
- website = forms.URLField(label=u'涓汉缃戠珯', required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 35}))
- city = forms.CharField(label=u'鍩庡競', required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 35}))
- birthday = forms.DateField(label=u'鐢熸棩', help_text=u'涓嶄細鍏紑锛屽彧浼氭樉绀烘偍鐨勫勾榫勶紝鏍煎紡涓猴細YYYY-MM-DD', required=True, widget=forms.TextInput(attrs={'size' : 35}))
- about = forms.CharField(label=u'涓汉绠浠', required=False, widget=forms.Textarea(attrs={'cols' : 60}))
+ email = forms.EmailField(label=u'Email', help_text=_('this email does not have to be linked to gravatar'), required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 35}))
+ realname = forms.CharField(label=_('Real name'), required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 35}))
+ website = forms.URLField(label=_('Website'), required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 35}))
+ city = forms.CharField(label=_('Location'), required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 35}))
+ birthday = forms.DateField(label=_('Date of birth'), help_text=_('will not be shown, used to calculate age, format: YYYY-MM-DD'), required=False, widget=forms.TextInput(attrs={'size' : 35}))
+ about = forms.CharField(label=_('Profile'), required=False, widget=forms.Textarea(attrs={'cols' : 60}))
def __init__(self, user, *args, **kwargs):
super(EditUserForm, self).__init__(*args, **kwargs)
@@ -173,7 +172,7 @@ class EditUserForm(forms.Form):
self.fields['city'].initial = user.location
if user.date_of_birth is not None:
- self.fields['birthday'].initial = user.date_of_birth.date()
+ self.fields['birthday'].initial = user.date_of_birth
else:
self.fields['birthday'].initial = '1990-01-01'
self.fields['about'].initial = user.about
@@ -188,7 +187,7 @@ class EditUserForm(forms.Form):
except User.DoesNotExist:
return self.cleaned_data['email']
except User.MultipleObjectsReturned:
- raise forms.ValidationError(u'璇ョ數瀛愰偖浠跺凡琚敞鍐岋紝璇烽夋嫨鍙︿竴涓啀璇曘')
- raise forms.ValidationError("璇ョ數瀛愰偖浠跺笎鍙峰凡琚敞鍐岋紝璇烽夋嫨鍙︿竴涓啀璇曘")
+ raise forms.ValidationError(_('this email has already been registered, please use another one'))
+ raise forms.ValidationError(_('this email has already been registered, please use another one'))
else:
- return self.cleaned_data['email'] \ No newline at end of file
+ return self.cleaned_data['email']
diff --git a/forum/management/commands/once_award_badges.py b/forum/management/commands/once_award_badges.py
index c26251d7..011c28fd 100644
--- a/forum/management/commands/once_award_badges.py
+++ b/forum/management/commands/once_award_badges.py
@@ -157,8 +157,7 @@ class Command(BaseCommand):
"""
activity_types = ','.join('%s' % item for item in BADGE_AWARD_TYPE_FIRST.keys())
# ORDER BY user_id, activity_type
- query = "SELECT id, user_id, activity_type, content_type_id, object_id "+
- "FROM activity WHERE is_auditted = 0 AND activity_type IN (%s) ORDER BY user_id, activity_type" % activity_types
+ query = "SELECT id, user_id, activity_type, content_type_id, object_id FROM activity WHERE is_auditted = 0 AND activity_type IN (%s) ORDER BY user_id, activity_type" % activity_types
cursor = connection.cursor()
try:
@@ -206,10 +205,7 @@ class Command(BaseCommand):
(13, '瀛︾敓', 3, '瀛︾敓', '绗竴娆℃彁闂苟涓旀湁涓娆′互涓婅禐鎴愮エ', 0, 0),
"""
- query = "SELECT act.user_id, q.vote_up_count, act.object_id FROM "+
- "activity act, question q WHERE act.activity_type = %s AND "+
- "act.object_id = q.id AND "+
- "act.user_id NOT IN (SELECT distinct user_id FROM award WHERE badge_id = %s)" % (TYPE_ACTIVITY_ASK_QUESTION, 13)
+ query = "SELECT act.user_id, q.vote_up_count, act.object_id FROM activity act, question q WHERE act.activity_type = %s AND act.object_id = q.id AND act.user_id NOT IN (SELECT distinct user_id FROM award WHERE badge_id = %s)" % (TYPE_ACTIVITY_ASK_QUESTION, 13)
cursor = connection.cursor()
try:
cursor.execute(query)
@@ -236,10 +232,7 @@ class Command(BaseCommand):
(15, '鏁欏笀', 3, '鏁欏笀', '绗竴娆″洖绛旈棶棰樺苟涓斿緱鍒颁竴涓互涓婅禐鎴愮エ', 0, 0),
"""
- query = "SELECT act.user_id, a.vote_up_count, act.object_id FROM "+
- "activity act, answer a WHERE act.activity_type = %s AND "+
- "act.object_id = a.id AND "+
- "act.user_id NOT IN (SELECT distinct user_id FROM award WHERE badge_id = %s)" % (TYPE_ACTIVITY_ANSWER, 15)
+ query = "SELECT act.user_id, a.vote_up_count, act.object_id FROM activity act, answer a WHERE act.activity_type = %s AND act.object_id = a.id AND act.user_id NOT IN (SELECT distinct user_id FROM award WHERE badge_id = %s)" % (TYPE_ACTIVITY_ANSWER, 15)
cursor = connection.cursor()
try:
cursor.execute(query)
@@ -264,11 +257,7 @@ class Command(BaseCommand):
"""
(32, '瀛﹂棶瀹', 2, '瀛﹂棶瀹', '绗竴娆″洖绛旇鎶曡禐鎴愮エ10娆′互涓', 0, 0)
"""
- query = "SELECT act.user_id, act.object_id FROM "+
- "activity act, answer a WHERE act.object_id = a.id AND "+
- "act.activity_type = %s AND "+
- "a.vote_up_count >= 10 AND "+
- "act.user_id NOT IN (SELECT user_id FROM award WHERE badge_id = %s)" % (TYPE_ACTIVITY_ANSWER, 32)
+ query = "SELECT act.user_id, act.object_id FROM activity act, answer a WHERE act.object_id = a.id AND act.activity_type = %s AND a.vote_up_count >= 10 AND act.user_id NOT IN (SELECT user_id FROM award WHERE badge_id = %s)" % (TYPE_ACTIVITY_ANSWER, 32)
cursor = connection.cursor()
try:
cursor.execute(query)
@@ -292,11 +281,7 @@ class Command(BaseCommand):
"""
(26, '浼樼甯傛皯', 2, '浼樼甯傛皯', '鎶曠エ300娆′互涓', 0, 0)
"""
- query = "SELECT count(*) vote_count, user_id FROM activity WHERE "+
- "activity_type = %s OR "+
- "activity_type = %s AND "+
- "user_id NOT IN (SELECT user_id FROM award WHERE badge_id = %s) "+
- "GROUP BY user_id HAVING vote_count >= 300" % (TYPE_ACTIVITY_VOTE_UP, TYPE_ACTIVITY_VOTE_DOWN, 26)
+ query = "SELECT count(*) vote_count, user_id FROM activity WHERE activity_type = %s OR activity_type = %s AND user_id NOT IN (SELECT user_id FROM award WHERE badge_id = %s) GROUP BY user_id HAVING vote_count >= 300" % (TYPE_ACTIVITY_VOTE_UP, TYPE_ACTIVITY_VOTE_DOWN, 26)
self.__award_for_count_num(query, 26)
@@ -304,11 +289,7 @@ class Command(BaseCommand):
"""
(27, '缂栬緫涓讳换', 2, '缂栬緫涓讳换', '缂栬緫浜100涓笘瀛', 0, 0)
"""
- query = "SELECT count(*) vote_count, user_id FROM activity WHERE "+
- "activity_type = %s OR "+
- "activity_type = %s AND "+
- "user_id NOT IN (SELECT user_id FROM award WHERE badge_id = %s) "+
- "GROUP BY user_id HAVING vote_count >= 100" % (TYPE_ACTIVITY_UPDATE_QUESTION, TYPE_ACTIVITY_UPDATE_ANSWER, 27)
+ query = "SELECT count(*) vote_count, user_id FROM activity WHERE activity_type = %s OR activity_type = %s AND user_id NOT IN (SELECT user_id FROM award WHERE badge_id = %s) GROUP BY user_id HAVING vote_count >= 100" % (TYPE_ACTIVITY_UPDATE_QUESTION, TYPE_ACTIVITY_UPDATE_ANSWER, 27)
self.__award_for_count_num(query, 27)
@@ -316,11 +297,7 @@ class Command(BaseCommand):
"""
(5, '璇勮瀹', 3, '璇勮瀹', '璇勮10娆′互涓', 0, 0),
"""
- query = "SELECT count(*) vote_count, user_id FROM activity WHERE "+
- "activity_type = %s OR "+
- "activity_type = %s AND "+
- "user_id NOT IN (SELECT user_id FROM award WHERE badge_id = %s) "+
- "GROUP BY user_id HAVING vote_count >= 10" % (TYPE_ACTIVITY_COMMENT_QUESTION, TYPE_ACTIVITY_COMMENT_ANSWER, 5)
+ query = "SELECT count(*) vote_count, user_id FROM activity WHERE activity_type = %s OR activity_type = %s AND user_id NOT IN (SELECT user_id FROM award WHERE badge_id = %s) GROUP BY user_id HAVING vote_count >= 10" % (TYPE_ACTIVITY_COMMENT_QUESTION, TYPE_ACTIVITY_COMMENT_ANSWER, 5)
self.__award_for_count_num(query, 5)
def __award_for_count_num(self, query, badge):
diff --git a/forum/managers.py b/forum/managers.py
index 0f22c59c..94f58ea7 100644
--- a/forum/managers.py
+++ b/forum/managers.py
@@ -4,29 +4,8 @@ from django.contrib.auth.models import User, UserManager
from django.db import connection, models, transaction
from django.db.models import Q
from forum.models import *
-from urllib import quote, unquote
class QuestionManager(models.Manager):
- def get_translation_questions(self, orderby, page_size):
- questions = self.filter(deleted=False, author__id__in=[28,29]).order_by(orderby)[:page_size]
- return questions
-
- def get_questions_by_pagesize(self, orderby, page_size):
- questions = self.filter(deleted=False).order_by(orderby)[:page_size]
- return questions
-
- def get_questions_by_tag(self, tagname, orderby):
- questions = self.filter(deleted=False, tags__name = unquote(tagname)).order_by(orderby)
- return questions
-
- def get_unanswered_questions(self, orderby):
- questions = self.filter(deleted=False, answer_count=0).order_by(orderby)
- return questions
-
- def get_questions(self, orderby):
- questions = self.filter(deleted=False).order_by(orderby)
- return questions
-
def update_tags(self, question, tagnames, user):
"""
Updates Tag associations for a question to match the given
@@ -113,12 +92,7 @@ class TagManager(models.Manager):
'WHERE tag_id = tag.id'
') '
'WHERE id IN (%s)')
-
- def get_valid_tags(self, page_size):
- from forum.models import Tag
- tags = Tag.objects.all().filter(deleted=False).exclude(used_count=0).order_by("-id")[:page_size]
- return tags
-
+
def get_or_create_multiple(self, names, user):
"""
Fetches a list of Tags with the given names, creating any Tags
@@ -149,19 +123,6 @@ class TagManager(models.Manager):
query = self.UPDATE_USED_COUNTS_QUERY % ','.join(['%s'] * len(tags))
cursor.execute(query, [tag.id for tag in tags])
transaction.commit_unless_managed()
-
- def get_tags_by_questions(self, questions):
- question_ids = []
- for question in questions:
- question_ids.append(question.id)
-
- question_ids_str = ','.join([str(id) for id in question_ids])
- related_tags = self.extra(
- tables=['tag', 'question_tags'],
- where=["tag.id = question_tags.tag_id AND question_tags.question_id IN (" + question_ids_str + ")"]
- ).distinct()
-
- return related_tags
class AnswerManager(models.Manager):
GET_ANSWERS_FROM_USER_QUESTIONS = u'SELECT answer.* FROM answer INNER JOIN question ON answer.question_id = question.id WHERE question.author_id =%s AND answer.author_id <> %s'
@@ -244,16 +205,4 @@ class ReputeManager(models.Manager):
return row[0]
else:
- return 0
-class AwardManager(models.Manager):
- def get_recent_awards(self):
- awards = super(AwardManager, self).extra(
- select={'badge_id': 'badge.id', 'badge_name':'badge.name',
- 'badge_description': 'badge.description', 'badge_type': 'badge.type',
- 'user_id': 'auth_user.id', 'user_name': 'auth_user.username'
- },
- tables=['award', 'badge', 'auth_user'],
- order_by=['-awarded_at'],
- where=['auth_user.id=award.user_id AND badge_id=badge.id'],
- ).values('badge_id', 'badge_name', 'badge_description', 'badge_type', 'user_id', 'user_name')
- return awards
+ return 0 \ No newline at end of file
diff --git a/forum/models.py b/forum/models.py
index 290c9d56..aba2bf0b 100644
--- a/forum/models.py
+++ b/forum/models.py
@@ -10,6 +10,7 @@ from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.template.defaultfilters import slugify
from django.db.models.signals import post_delete, post_save, pre_save
+from django.utils.translation import ugettext as _
import django.dispatch
from forum.managers import *
@@ -312,9 +313,9 @@ class Badge(models.Model):
SILVER = 2
BRONZE = 3
TYPE_CHOICES = (
- (GOLD, u'閲戠墝'),
- (SILVER, u'閾剁墝'),
- (BRONZE, u'閾滅墝'),
+ (GOLD, _('gold')),
+ (SILVER, _('silver')),
+ (BRONZE, _('bronze')),
)
name = models.CharField(max_length=50)
@@ -350,8 +351,7 @@ class Award(models.Model):
content_object = generic.GenericForeignKey('content_type', 'object_id')
awarded_at = models.DateTimeField(default=datetime.datetime.now)
notified = models.BooleanField(default=False)
- objects = AwardManager()
-
+
def __unicode__(self):
return u'[%s] is awarded a badge [%s] at %s' % (self.user.username, self.badge.name, self.awarded_at)
@@ -650,4 +650,4 @@ mark_offensive.connect(record_mark_offensive, sender=Question)
mark_offensive.connect(record_mark_offensive, sender=Answer)
tags_updated.connect(record_update_tags, sender=Question)
post_save.connect(record_favorite_question, sender=FavoriteQuestion)
-user_updated.connect(record_user_full_updated, sender=User) \ No newline at end of file
+user_updated.connect(record_user_full_updated, sender=User)
diff --git a/forum/templatetags/extra_tags.py b/forum/templatetags/extra_tags.py
index 7c53c2cb..de853135 100644
--- a/forum/templatetags/extra_tags.py
+++ b/forum/templatetags/extra_tags.py
@@ -1,4 +1,4 @@
-锘縤mport time
+import time
import datetime
import math
import re
@@ -8,6 +8,7 @@ from django.utils.encoding import smart_unicode
from django.utils.safestring import mark_safe
from django.utils.timesince import timesince
from forum.const import *
+from django.utils.translation import ugettext as _
register = template.Library()
@@ -49,10 +50,10 @@ def tag_font_size(max_size, min_size, current_size):
weight = 0
return MIN_FONTSIZE + round((MAX_FONTSIZE - MIN_FONTSIZE) * weight)
-
+
LEADING_PAGE_RANGE_DISPLAYED = TRAILING_PAGE_RANGE_DISPLAYED = 5
LEADING_PAGE_RANGE = TRAILING_PAGE_RANGE = 4
-NUM_PAGES_OUTSIDE_RANGE = 1
+NUM_PAGES_OUTSIDE_RANGE = 1
ADJACENT_PAGES = 2
@register.inclusion_tag("paginator.html")
def cnprog_paginator(context):
@@ -64,10 +65,10 @@ def cnprog_paginator(context):
" Initialize variables "
in_leading_range = in_trailing_range = False
pages_outside_leading_range = pages_outside_trailing_range = range(0)
-
+
if (context["pages"] <= LEADING_PAGE_RANGE_DISPLAYED):
in_leading_range = in_trailing_range = True
- page_numbers = [n for n in range(1, context["pages"] + 1) if n > 0 and n <= context["pages"]]
+ page_numbers = [n for n in range(1, context["pages"] + 1) if n > 0 and n <= context["pages"]]
elif (context["page"] <= LEADING_PAGE_RANGE):
in_leading_range = True
page_numbers = [n for n in range(1, LEADING_PAGE_RANGE_DISPLAYED + 1) if n > 0 and n <= context["pages"]]
@@ -76,11 +77,11 @@ def cnprog_paginator(context):
in_trailing_range = True
page_numbers = [n for n in range(context["pages"] - TRAILING_PAGE_RANGE_DISPLAYED + 1, context["pages"] + 1) if n > 0 and n <= context["pages"]]
pages_outside_trailing_range = [n + 1 for n in range(0, NUM_PAGES_OUTSIDE_RANGE)]
- else:
+ else:
page_numbers = [n for n in range(context["page"] - ADJACENT_PAGES, context["page"] + ADJACENT_PAGES + 1) if n > 0 and n <= context["pages"]]
pages_outside_leading_range = [n + context["pages"] for n in range(0, -NUM_PAGES_OUTSIDE_RANGE, -1)]
pages_outside_trailing_range = [n + 1 for n in range(0, NUM_PAGES_OUTSIDE_RANGE)]
-
+
extend_url = context.get('extend_url', '')
return {
"base_url": context["base_url"],
@@ -110,23 +111,23 @@ def cnprog_pagesize(context):
"pagesize" : context["pagesize"],
"is_paginated": context["is_paginated"]
}
-
+
@register.simple_tag
def get_score_badge(user):
- BADGE_TEMPLATE = '<span class="score" title="%(reputation)s鐢ㄦ埛绉垎">%(reputation)s</span>'
+ BADGE_TEMPLATE = '<span class="score" title="%(reputation)s %(reputationword)s">%(reputation)s</span>'
if user.gold > 0 :
- BADGE_TEMPLATE = '%s%s' % (BADGE_TEMPLATE, ' <span title="%(gold)s鏋氶噾鐗">'
- '<span class="badge1">鈼</span>'
+ BADGE_TEMPLATE = '%s%s' % (BADGE_TEMPLATE, '<span title="%(gold)s %(badgesword)s">'
+ '<span class="badge1">&#9679;</span>'
'<span class="badgecount">%(gold)s</span>'
'</span>')
if user.silver > 0:
- BADGE_TEMPLATE = '%s%s' % (BADGE_TEMPLATE, ' <span title="%(silver)s鏋氶摱鐗">'
- '<span class="silver">鈼</span>'
+ BADGE_TEMPLATE = '%s%s' % (BADGE_TEMPLATE, '<span title="%(silver)s %(badgesword)s">'
+ '<span class="silver">&#9679;</span>'
'<span class="badgecount">%(silver)s</span>'
'</span>')
if user.bronze > 0:
- BADGE_TEMPLATE = '%s%s' % (BADGE_TEMPLATE, ' <span title="%(bronze)s鏋氶摐鐗">'
- '<span class="bronze">鈼</span>'
+ BADGE_TEMPLATE = '%s%s' % (BADGE_TEMPLATE, '<span title="%(bronze)s %(badgesword)s">'
+ '<span class="bronze">&#9679;</span>'
'<span class="badgecount">%(bronze)s</span>'
'</span>')
BADGE_TEMPLATE = smart_unicode(BADGE_TEMPLATE, encoding='utf-8', strings_only=False, errors='strict')
@@ -135,24 +136,26 @@ def get_score_badge(user):
'gold' : user.gold,
'silver' : user.silver,
'bronze' : user.bronze,
+ 'badgesword' : _('badges'),
+ 'reputationword' : _('reputation points'),
})
-
+
@register.simple_tag
def get_score_badge_by_details(rep, gold, silver, bronze):
- BADGE_TEMPLATE = '<span class="reputation-score" title="%(reputation)s鐢ㄦ埛绉垎">%(reputation)s</span>'
+ BADGE_TEMPLATE = '<span class="reputation-score" title="%(reputation)s %(repword)s">%(reputation)s</span>'
if gold > 0 :
- BADGE_TEMPLATE = '%s%s' % (BADGE_TEMPLATE, '<span title="%(gold)s鏋氶噾鐗">'
- '<span class="badge1">鈼</span>'
+ BADGE_TEMPLATE = '%s%s' % (BADGE_TEMPLATE, '<span title="%(gold)s %(badgeword)s">'
+ '<span class="badge1">&#9679;</span>'
'<span class="badgecount">%(gold)s</span>'
'</span>')
if silver > 0:
- BADGE_TEMPLATE = '%s%s' % (BADGE_TEMPLATE, '<span title="%(silver)s鏋氶摱鐗">'
- '<span class="badge2">鈼</span>'
+ BADGE_TEMPLATE = '%s%s' % (BADGE_TEMPLATE, '<span title="%(silver)s %(badgeword)s">'
+ '<span class="badge2">&#9679;</span>'
'<span class="badgecount">%(silver)s</span>'
'</span>')
if bronze > 0:
- BADGE_TEMPLATE = '%s%s' % (BADGE_TEMPLATE, '<span title="%(bronze)s鏋氶摐鐗">'
- '<span class="badge3">鈼</span>'
+ BADGE_TEMPLATE = '%s%s' % (BADGE_TEMPLATE, '<span title="%(bronze)s %(badgeword)s">'
+ '<span class="badge3">&#9679;</span>'
'<span class="badgecount">%(bronze)s</span>'
'</span>')
BADGE_TEMPLATE = smart_unicode(BADGE_TEMPLATE, encoding='utf-8', strings_only=False, errors='strict')
@@ -161,19 +164,24 @@ def get_score_badge_by_details(rep, gold, silver, bronze):
'gold' : gold,
'silver' : silver,
'bronze' : bronze,
- })
-
+ 'repword' : _('reputation points'),
+ 'badgeword' : _('badges'),
+ })
+
@register.simple_tag
def get_user_vote_image(dic, key, arrow):
if dic.has_key(key):
if int(dic[key]) == int(arrow):
return '-on'
return ''
-
+
@register.simple_tag
def get_age(birthday):
current_time = datetime.datetime(*time.localtime()[0:6])
- diff = current_time - birthday
+ year = birthday.year
+ month = birthday.month
+ day = birthday.day
+ diff = current_time - datetime.datetime(year,month,day,0,0,0)
return diff.days / 365
@register.simple_tag
@@ -197,12 +205,12 @@ def format_number(value):
m = re.match(pattern, strValue)
return first + result
-@register.simple_tag
+@register.simple_tag
def convert2tagname_list(question):
question['tagnames'] = [name for name in question['tagnames'].split(u' ')]
return ''
-@register.simple_tag
+@register.simple_tag
def diff_date(date, limen=2):
current_time = datetime.datetime(*time.localtime()[0:6])
diff = current_time - date
@@ -210,8 +218,8 @@ def diff_date(date, limen=2):
if diff_days > limen:
return date
else:
- return timesince(date) + u'鍓'
-
+ return timesince(date) + _(' ago')
+
@register.simple_tag
def get_latest_changed_timestamp():
try:
@@ -229,4 +237,4 @@ def get_latest_changed_timestamp():
timestr = strftime("%H:%M %b-%d-%Y %Z", localtime(latest))
except:
timestr = ''
- return timestr \ No newline at end of file
+ return timestr
diff --git a/forum/user.py b/forum/user.py
index 2461e073..13e9be30 100644
--- a/forum/user.py
+++ b/forum/user.py
@@ -1,4 +1,3 @@
-锘# coding=utf-8
from django.utils.translation import ugettext as _
class UserView:
def __init__(self, id, tab_title, tab_description, page_title, view_name, template_file, data_size=0):
@@ -14,61 +13,61 @@ class UserView:
USER_TEMPLATE_VIEWS = (
UserView(
id = 'stats',
- tab_title = _("Overview"),
- tab_description = _('User overview'),
- page_title = _('Overview - User Profile'),
+ tab_title = _('overview'),
+ tab_description = _('user profile'),
+ page_title = _('user profile overview'),
view_name = 'user_stats',
template_file = 'user_stats.html'
),
UserView(
id = 'recent',
- tab_title = _('Recent'),
- tab_description = _("Recent activities"),
- page_title = _('Recent - User Profile'),
+ tab_title = _('recent activity'),
+ tab_description = _('recent user activity'),
+ page_title = _('profile - recent activity'),
view_name = 'user_recent',
template_file = 'user_recent.html',
data_size = 50
),
UserView(
id = 'responses',
- tab_title = _("Response"),
- tab_description = _("Responses from others"),
- page_title = _("Response - User Profile"),
+ tab_title = _('responses'),
+ tab_description = _('comments and answers to others questions'),
+ page_title = _('profile - responses'),
view_name = 'user_responses',
template_file = 'user_responses.html',
data_size = 50
),
UserView(
id = 'reputation',
- tab_title = _("Reputation"),
- tab_description = _("Community reputation"),
- page_title = _("Reputation - User Profile"),
+ tab_title = _('reputation'),
+ tab_description = _('user reputation in the community'),
+ page_title = _('profile - user reputation'),
view_name = 'user_reputation',
template_file = 'user_reputation.html'
),
UserView(
id = 'favorites',
- tab_title = _("Favorites"),
- tab_description = _("User's favorite questions"),
- page_title = _("Favorites - User Profile"),
+ tab_title = _('favorite questions'),
+ tab_description = _('users favorite questions'),
+ page_title = _('profile - favorite questions'),
view_name = 'user_favorites',
template_file = 'user_favorites.html',
data_size = 50
),
UserView(
id = 'votes',
- tab_title = _("Votes"),
- tab_description = _("Votes history"),
- page_title = _("Votes - User Profile"),
+ tab_title = _('casted votes'),
+ tab_description = _('user vote record'),
+ page_title = _('profile - votes'),
view_name = 'user_votes',
template_file = 'user_votes.html',
data_size = 50
),
UserView(
id = 'preferences',
- tab_title = _("Preferences"),
- tab_description = _("User preferences"),
- page_title = _("Preferences - User Profile"),
+ tab_title = _('preferences'),
+ tab_description = _('user preference settings'),
+ page_title = _('profile - user preferences'),
view_name = 'user_preferences',
template_file = 'user_preferences.html'
)
diff --git a/forum/views.py b/forum/views.py
index 8252304e..25574e0b 100644
--- a/forum/views.py
+++ b/forum/views.py
@@ -15,6 +15,7 @@ from django.utils import simplejson
from django.core import serializers
from django.db import transaction
from django.contrib.contenttypes.models import ContentType
+from django.utils.translation import ugettext as _
from utils.html import sanitize_html
from markdown2 import Markdown
@@ -76,17 +77,29 @@ def index(request):
orderby = "-last_activity_at"
# group questions by author_id of 28,29
if view_id == 'trans':
- questions = Question.objects.get_translation_questions(orderby, INDEX_PAGE_SIZE)
+ questions = Question.objects.filter(deleted=False, author__id__in=[28,29]).order_by(orderby)[:INDEX_PAGE_SIZE]
else:
- questions = Question.objects.get_questions_by_pagesize(orderby, INDEX_PAGE_SIZE)
+ questions = Question.objects.filter(deleted=False).order_by(orderby)[:INDEX_PAGE_SIZE]
# RISK - inner join queries
- questions = questions.select_related()
- tags = Tag.objects.get_valid_tags(INDEX_TAGS_SIZE)
+ questions = questions.select_related();
+ tags = Tag.objects.all().filter(deleted=False).exclude(used_count=0).order_by("-id")[:INDEX_TAGS_SIZE]
- awards = Award.objects.get_recent_awards()
+ awards = Award.objects.extra(
+ select={'badge_id': 'badge.id', 'badge_name':'badge.name',
+ 'badge_description': 'badge.description', 'badge_type': 'badge.type',
+ 'user_id': 'auth_user.id', 'user_name': 'auth_user.username'
+ },
+ tables=['award', 'badge', 'auth_user'],
+ order_by=['-awarded_at'],
+ where=['auth_user.id=award.user_id AND badge_id=badge.id'],
+ ).values('badge_id', 'badge_name', 'badge_description', 'badge_type', 'user_id', 'user_name')
+
+ class testvar:
+ content = 'haha'
return render_to_response('index.html', {
"questions" : questions,
+ 'testvar':testvar,
"tab_id" : view_id,
"tags" : tags,
"awards" : awards[:INDEX_AWARD_SIZE],
@@ -114,11 +127,29 @@ def questions(request, tagname=None, unanswered=False):
# Set flag to False by default. If it is equal to True, then need to be saved.
pagesize_changed = False
# get pagesize from session, if failed then get default value
- pagesize = request.session.get("pagesize")
+ user_page_size = request.session.get("pagesize", QUESTIONS_PAGE_SIZE)
+ # set pagesize equal to logon user specified value in database
+ if request.user.is_authenticated() and request.user.questions_per_page > 0:
+ user_page_size = request.user.questions_per_page
+
try:
page = int(request.GET.get('page', '1'))
+ # get new pagesize from UI selection
+ pagesize = int(request.GET.get('pagesize', user_page_size))
+ if pagesize <> user_page_size:
+ pagesize_changed = True
+
except ValueError:
page = 1
+ pagesize = user_page_size
+
+ # save this pagesize to user database
+ if pagesize_changed:
+ request.session["pagesize"] = pagesize
+ if request.user.is_authenticated():
+ user = request.user
+ user.questions_per_page = pagesize
+ user.save()
view_id = request.GET.get('sort', None)
view_dic = {"latest":"-added_at", "active":"-last_activity_at", "hottest":"-answer_count", "mostvoted":"-score" }
@@ -130,24 +161,29 @@ def questions(request, tagname=None, unanswered=False):
# check if request is from tagged questions
if tagname is not None:
- objects = Question.objects.get_questions_by_tag(tagname, orderby)
+ #print datetime.datetime.now()
+ objects = Question.objects.filter(deleted=False, tags__name = unquote(tagname)).order_by(orderby)
+ #print datetime.datetime.now()
elif unanswered:
#check if request is from unanswered questions
template_file = "unanswered.html"
- objects = Question.objects.get_unanswered_questions(orderby)
+ objects = Question.objects.filter(deleted=False, answer_count=0).order_by(orderby)
else:
- objects = Question.objects.get_questions(orderby)
+ objects = Question.objects.filter(deleted=False).order_by(orderby)
# RISK - inner join queries
- objects = objects.select_related(depth=1);
+ objects = objects.select_related();
objects_list = Paginator(objects, pagesize)
questions = objects_list.page(page)
# Get related tags from this page objects
- if questions.object_list.count() > 0:
- related_tags = Tag.objects.get_tags_by_questions(questions.object_list)
- else:
- related_tags = None
+ related_tags = []
+ for question in questions.object_list:
+ tags = list(question.tags.all())
+ for tag in tags:
+ if tag not in related_tags:
+ related_tags.append(tag)
+
return render_to_response(template_file, {
"questions" : questions,
"tab_id" : view_id,
@@ -986,7 +1022,6 @@ def user_stats(request, user_id, user_view):
'title',
'author_id',
'accepted',
- 'vote_count',
'answer_count',
'vote_up_count',
'vote_down_count')[:100]
@@ -1055,8 +1090,7 @@ def user_recent(request, user_id, user_view):
'activity_type' : 'activity.activity_type'
},
tables=['activity', 'question'],
- where=['activity.content_type_id = %s AND activity.object_id = ' +
- 'question.id AND activity.user_id = %s AND activity.activity_type = %s'],
+ where=['activity.content_type_id = %s AND activity.object_id = question.id AND activity.user_id = %s AND activity.activity_type = %s'],
params=[question_type_id, user_id, TYPE_ACTIVITY_ASK_QUESTION],
order_by=['-activity.active_at']
).values(
@@ -1080,8 +1114,8 @@ def user_recent(request, user_id, user_view):
'activity_type' : 'activity.activity_type'
},
tables=['activity', 'answer', 'question'],
- where=['activity.content_type_id = %s AND activity.object_id = answer.id AND ' +
- 'answer.question_id=question.id AND activity.user_id=%s AND activity.activity_type=%s'],
+ where=['activity.content_type_id = %s AND activity.object_id = answer.id '
+ 'AND answer.question_id=question.id AND activity.user_id=%s AND activity.activity_type=%s'],
params=[answer_type_id, user_id, TYPE_ACTIVITY_ANSWER],
order_by=['-activity.active_at']
).values(
@@ -1106,9 +1140,7 @@ def user_recent(request, user_id, user_view):
},
tables=['activity', 'question', 'comment'],
- where=['activity.content_type_id = %s AND activity.object_id = comment.id AND '+
- 'activity.user_id = comment.user_id AND comment.object_id=question.id AND '+
- 'comment.content_type_id=%s AND activity.user_id = %s AND activity.activity_type=%s'],
+ where=['activity.content_type_id = %s AND activity.object_id = comment.id AND activity.user_id = comment.user_id AND comment.object_id=question.id AND comment.content_type_id=%s AND activity.user_id = %s AND activity.activity_type=%s'],
params=[comment_type_id, question_type_id, user_id, TYPE_ACTIVITY_COMMENT_QUESTION],
order_by=['-comment.added_at']
).values(
@@ -1134,10 +1166,7 @@ def user_recent(request, user_id, user_view):
},
tables=['activity', 'question', 'answer', 'comment'],
- where=['activity.content_type_id = %s AND activity.object_id = comment.id AND '+
- 'activity.user_id = comment.user_id AND comment.object_id=answer.id AND '+
- 'comment.content_type_id=%s AND question.id = answer.question_id AND '+
- 'activity.user_id = %s AND activity.activity_type=%s'],
+ where=['activity.content_type_id = %s AND activity.object_id = comment.id AND activity.user_id = comment.user_id AND comment.object_id=answer.id AND comment.content_type_id=%s AND question.id = answer.question_id AND activity.user_id = %s AND activity.activity_type=%s'],
params=[comment_type_id, answer_type_id, user_id, TYPE_ACTIVITY_COMMENT_ANSWER],
order_by=['-comment.added_at']
).values(
@@ -1163,9 +1192,7 @@ def user_recent(request, user_id, user_view):
'summary' : 'question_revision.summary'
},
tables=['activity', 'question_revision'],
- where=['activity.content_type_id = %s AND activity.object_id = question_revision.id AND '+
- 'activity.user_id = question_revision.author_id AND activity.user_id = %s AND '+
- 'activity.activity_type=%s'],
+ where=['activity.content_type_id = %s AND activity.object_id = question_revision.id AND activity.user_id = question_revision.author_id AND activity.user_id = %s AND activity.activity_type=%s'],
params=[question_revision_type_id, user_id, TYPE_ACTIVITY_UPDATE_QUESTION],
order_by=['-activity.active_at']
).values(
@@ -1193,10 +1220,7 @@ def user_recent(request, user_id, user_view):
},
tables=['activity', 'answer_revision', 'question', 'answer'],
- where=['activity.content_type_id = %s AND activity.object_id = answer_revision.id AND '+
- 'activity.user_id = answer_revision.author_id AND activity.user_id = %s AND '+
- 'answer_revision.answer_id=answer.id AND answer.question_id = question.id AND '+
- 'activity.activity_type=%s'],
+ where=['activity.content_type_id = %s AND activity.object_id = answer_revision.id AND activity.user_id = answer_revision.author_id AND activity.user_id = %s AND answer_revision.answer_id=answer.id AND answer.question_id = question.id AND activity.activity_type=%s'],
params=[answer_revision_type_id, user_id, TYPE_ACTIVITY_UPDATE_ANSWER],
order_by=['-activity.active_at']
).values(
@@ -1222,9 +1246,7 @@ def user_recent(request, user_id, user_view):
'activity_type' : 'activity.activity_type',
},
tables=['activity', 'answer', 'question'],
- where=['activity.content_type_id = %s AND activity.object_id = answer.id AND '+
- 'activity.user_id = question.author_id AND activity.user_id = %s AND '+
- 'answer.question_id=question.id AND activity.activity_type=%s'],
+ where=['activity.content_type_id = %s AND activity.object_id = answer.id AND activity.user_id = question.author_id AND activity.user_id = %s AND answer.question_id=question.id AND activity.activity_type=%s'],
params=[answer_type_id, user_id, TYPE_ACTIVITY_MARK_ANSWER],
order_by=['-activity.active_at']
).values(
@@ -1245,8 +1267,7 @@ def user_recent(request, user_id, user_view):
'activity_type' : 'activity.activity_type'
},
tables=['activity', 'award', 'badge'],
- where=['activity.user_id = award.user_id AND activity.user_id = %s AND '+
- 'award.badge_id=badge.id AND activity.object_id=award.id AND activity.activity_type=%s'],
+ where=['activity.user_id = award.user_id AND activity.user_id = %s AND award.badge_id=badge.id AND activity.object_id=award.id AND activity.activity_type=%s'],
params=[user_id, TYPE_ACTIVITY_PRIZE],
order_by=['-activity.active_at']
).values(
@@ -1299,8 +1320,7 @@ def user_responses(request, user_id, user_view):
},
select_params=[user_id],
tables=['answer', 'question', 'auth_user'],
- where=['answer.question_id = question.id AND answer.deleted=0 AND question.deleted = 0 AND '+
- 'question.author_id = %s AND answer.author_id <> %s AND answer.author_id=auth_user.id'],
+ where=['answer.question_id = question.id AND answer.deleted=0 AND question.deleted = 0 AND question.author_id = %s AND answer.author_id <> %s AND answer.author_id=auth_user.id'],
params=[user_id, user_id],
order_by=['-answer.id']
).values(
@@ -1329,8 +1349,7 @@ def user_responses(request, user_id, user_view):
'user_id' : 'auth_user.id'
},
tables=['question', 'auth_user', 'comment'],
- where=['question.deleted = 0 AND question.author_id = %s AND comment.object_id=question.id AND '+
- 'comment.content_type_id=%s AND comment.user_id <> %s AND comment.user_id = auth_user.id'],
+ where=['question.deleted = 0 AND question.author_id = %s AND comment.object_id=question.id AND comment.content_type_id=%s AND comment.user_id <> %s AND comment.user_id = auth_user.id'],
params=[user_id, question_type_id, user_id],
order_by=['-comment.added_at']
).values(
@@ -1359,9 +1378,7 @@ def user_responses(request, user_id, user_view):
'user_id' : 'auth_user.id'
},
tables=['answer', 'auth_user', 'comment', 'question'],
- where=['answer.deleted = 0 AND answer.author_id = %s AND comment.object_id=answer.id AND '+
- 'comment.content_type_id=%s AND comment.user_id <> %s AND comment.user_id = auth_user.id '+
- 'AND question.id = answer.question_id'],
+ where=['answer.deleted = 0 AND answer.author_id = %s AND comment.object_id=answer.id AND comment.content_type_id=%s AND comment.user_id <> %s AND comment.user_id = auth_user.id AND question.id = answer.question_id'],
params=[user_id, answer_type_id, user_id],
order_by=['-comment.added_at']
).values(
@@ -1392,8 +1409,7 @@ def user_responses(request, user_id, user_view):
},
select_params=[user_id],
tables=['answer', 'question', 'auth_user'],
- where=['answer.question_id = question.id AND answer.deleted=0 AND question.deleted = 0 AND '+
- 'answer.author_id = %s AND answer.accepted=1 AND question.author_id=auth_user.id'],
+ where=['answer.question_id = question.id AND answer.deleted=0 AND question.deleted = 0 AND answer.author_id = %s AND answer.accepted=1 AND question.author_id=auth_user.id'],
params=[user_id],
order_by=['-answer.id']
).values(
@@ -1437,8 +1453,7 @@ def user_votes(request, user_id, user_view):
},
select_params=[user_id],
tables=['vote', 'question', 'auth_user'],
- where=['vote.content_type_id = %s AND vote.user_id = %s AND vote.object_id = question.id '+
- 'AND vote.user_id=auth_user.id'],
+ where=['vote.content_type_id = %s AND vote.user_id = %s AND vote.object_id = question.id AND vote.user_id=auth_user.id'],
params=[question_type_id, user_id],
order_by=['-vote.id']
).values(
@@ -1461,8 +1476,7 @@ def user_votes(request, user_id, user_view):
},
select_params=[user_id],
tables=['vote', 'answer', 'question', 'auth_user'],
- where=['vote.content_type_id = %s AND vote.user_id = %s AND vote.object_id = answer.id '+
- 'AND answer.question_id = question.id AND vote.user_id=auth_user.id'],
+ where=['vote.content_type_id = %s AND vote.user_id = %s AND vote.object_id = answer.id AND answer.question_id = question.id AND vote.user_id=auth_user.id'],
params=[answer_type_id, user_id],
order_by=['-vote.id']
).values(
@@ -1487,8 +1501,7 @@ def user_votes(request, user_id, user_view):
def user_reputation(request, user_id, user_view):
user = get_object_or_404(User, id=user_id)
reputation = Repute.objects.extra(
- select={'positive': 'sum(positive)', 'negative': 'sum(negative)', 'question_id':'question_id',
- 'title': 'question.title'},
+ select={'positive': 'sum(positive)', 'negative': 'sum(negative)', 'question_id':'question_id', 'title': 'question.title'},
tables=['repute', 'question'],
order_by=['-reputed_at'],
where=['user_id=%s AND question_id=question.id'],
@@ -1497,7 +1510,6 @@ def user_reputation(request, user_id, user_view):
reputation.query.group_by = ['question_id']
-
rep_list = []
for rep in Repute.objects.filter(user=user).order_by('reputed_at'):
dic = '[%s,%s]' % (calendar.timegm(rep.reputed_at.timetuple()) * 1000, rep.reputation)
@@ -1519,8 +1531,7 @@ def user_favorites(request, user_id, user_view):
questions = Question.objects.extra(
select={
'vote_count' : 'question.vote_up_count + question.vote_down_count',
- 'favorited_myself' : 'SELECT count(*) FROM favorite_question f WHERE f.user_id = %s '+
- 'AND f.question_id = question.id',
+ 'favorited_myself' : 'SELECT count(*) FROM favorite_question f WHERE f.user_id = %s AND f.question_id = question.id',
'la_user_id' : 'auth_user.id',
'la_username' : 'auth_user.username',
'la_user_gold' : 'auth_user.gold',
@@ -1530,8 +1541,7 @@ def user_favorites(request, user_id, user_view):
},
select_params=[user_id],
tables=['question', 'auth_user', 'favorite_question'],
- where=['question.deleted = 0 AND question.last_activity_by_id = auth_user.id '+
- 'AND favorite_question.question_id = question.id AND favorite_question.user_id = %s'],
+ where=['question.deleted = 0 AND question.last_activity_by_id = auth_user.id AND favorite_question.question_id = question.id AND favorite_question.user_id = %s'],
params=[user_id],
order_by=['-vote_count', '-question.id']
).values('vote_count',
@@ -1662,12 +1672,7 @@ def badges(request):
def badge(request, id):
badge = get_object_or_404(Badge, id=id)
awards = Award.objects.extra(
- select={'id': 'auth_user.id',
- 'name': 'auth_user.username',
- 'rep':'auth_user.reputation',
- 'gold': 'auth_user.gold',
- 'silver': 'auth_user.silver',
- 'bronze': 'auth_user.bronze'},
+ select={'id': 'auth_user.id', 'name': 'auth_user.username', 'rep':'auth_user.reputation', 'gold': 'auth_user.gold', 'silver': 'auth_user.silver', 'bronze': 'auth_user.bronze'},
tables=['award', 'auth_user'],
where=['badge_id=%s AND user_id=auth_user.id'],
params=[id]
@@ -1722,13 +1727,13 @@ def upload(request):
result = xml_template % ('Good', '', default_storage.url(new_file_name))
except UploadPermissionNotAuthorized:
- result = xml_template % ('', u"涓婁紶鍥剧墖鍙檺浜庣Н鍒+60浠ヤ笂娉ㄥ唽鐢ㄦ埛!", '')
+ result = xml_template % ('', _('uploading images is limited to users with >60 reputation points'), '')
except FileTypeNotAllow:
- result = xml_template % ('', u"鍙厑璁镐笂浼'jpg', 'jpeg', 'gif', 'bmp', 'png', 'tiff'绫诲瀷鐨勬枃浠讹紒", '')
+ result = xml_template % ('', _("allowed file types are 'jpg', 'jpeg', 'gif', 'bmp', 'png', 'tiff'"), '')
except FileSizeNotAllow:
- result = xml_template % ('', u"鍙厑璁镐笂浼%sK澶у皬鐨勬枃浠讹紒" % settings.ALLOW_MAX_FILE_SIZE / 1024, '')
- except Exception:
- result = xml_template % ('', u"鍦ㄦ枃浠朵笂浼犺繃绋嬩腑浜х敓浜嗛敊璇紝璇疯仈绯荤鐞嗗憳锛岃阿璋_^", '')
+ result = xml_template % ('', _("maximum upload file size is %sK") % settings.ALLOW_MAX_FILE_SIZE / 1024, '')
+ except Exception as e:
+ result = xml_template % ('', _('Error uploading file. Please contact the site administrator. Thank you. %s' % e), '')
return HttpResponse(result, mimetype="application/xml")
diff --git a/junk b/junk
new file mode 100644
index 00000000..3f3226d6
--- /dev/null
+++ b/junk
@@ -0,0 +1,7 @@
+/branches/beta2/forum/feed.py r110 line 17:
+/branches/beta2/forum/feed.py r110 line 20:
+/branches/beta2/forum/forms.py r110 line 63:
+/branches/beta2/templates/question.html r120 line 237:
+/branches/beta2/templates/question.html r120 line 57:
+/branches/beta2/templates/question.html r120 line 456:
+/branches/beta2/forum/views.py r127 line 1088:
diff --git a/lanai.psproj b/lanai.psproj
new file mode 100644
index 00000000..7f44d7ff
--- /dev/null
+++ b/lanai.psproj
@@ -0,0 +1,557 @@
+[PyScripter]
+Version=1.9.9.3
+
+[Project]
+ClassName=TProjectRootNode
+StoreRelativePaths=FALSE
+ShowFileExtensions=FALSE
+
+[Project\ChildNodes]
+Count=2
+
+[Project\ChildNodes\Node0]
+ClassName=TProjectFilesNode
+
+[Project\ChildNodes\Node0\ChildNodes]
+Count=1
+
+[Project\ChildNodes\Node0\ChildNodes\Node0]
+ClassName=TProjectFolderNode
+Name=src
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes]
+Count=10
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0]
+ClassName=TProjectFolderNode
+Name=django_authopenid
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0\ChildNodes]
+Count=9
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\django_authopenid\__init__.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\django_authopenid\admin.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\django_authopenid\forms.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\django_authopenid\middleware.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\django_authopenid\mimeparse.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node5]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\django_authopenid\models.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node6]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\django_authopenid\urls.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node7]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\django_authopenid\util.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node8]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\django_authopenid\views.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1]
+ClassName=TProjectFolderNode
+Name=forum
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes]
+Count=12
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node0]
+ClassName=TProjectFolderNode
+Name=management
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node0\ChildNodes]
+Count=2
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node0]
+ClassName=TProjectFolderNode
+Name=commands
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node0\ChildNodes]
+Count=3
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\management\commands\__init__.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\management\commands\mark_offensive_cron.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\management\commands\sample_command.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node1]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\management\__init__.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node1]
+ClassName=TProjectFolderNode
+Name=templatetags
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node1\ChildNodes]
+Count=3
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node1\ChildNodes\Node0]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\templatetags\__init__.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node1\ChildNodes\Node1]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\templatetags\extra_filters.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node1\ChildNodes\Node2]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\templatetags\extra_tags.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node2]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\__init__.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node3]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\admin.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node4]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\auth.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node5]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\const.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node6]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\diff.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node7]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\forms.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node8]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\managers.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node9]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\models.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node10]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\user.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1\ChildNodes\Node11]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\forum\views.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2]
+ClassName=TProjectFolderNode
+Name=sql_scripts
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2\ChildNodes]
+Count=6
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2\ChildNodes\Node0]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\sql_scripts\cnprog_new_install.sql
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2\ChildNodes\Node1]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\sql_scripts\update_2009_01_13_001.sql
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2\ChildNodes\Node2]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\sql_scripts\update_2009_01_13_002.sql
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2\ChildNodes\Node3]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\sql_scripts\update_2009_12_24_001.sql
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2\ChildNodes\Node4]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\sql_scripts\update_2009_12_27_001.sql
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2\ChildNodes\Node5]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\sql_scripts\update_2009_12_27_002.sql
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3]
+ClassName=TProjectFolderNode
+Name=templates
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes]
+Count=44
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node0]
+ClassName=TProjectFolderNode
+Name=authopenid
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node0\ChildNodes]
+Count=10
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node0\ChildNodes\Node0]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\authopenid\changeemail.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node0\ChildNodes\Node1]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\authopenid\changeopenid.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node0\ChildNodes\Node2]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\authopenid\changepw.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node0\ChildNodes\Node3]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\authopenid\complete.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node0\ChildNodes\Node4]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\authopenid\delete.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node0\ChildNodes\Node5]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\authopenid\failure.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node0\ChildNodes\Node6]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\authopenid\sendpw.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node0\ChildNodes\Node7]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\authopenid\settings.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node0\ChildNodes\Node8]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\authopenid\signin.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node0\ChildNodes\Node9]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\authopenid\signup.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1]
+ClassName=TProjectFolderNode
+Name=content
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes]
+Count=2
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0]
+ClassName=TProjectFolderNode
+Name=js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes]
+Count=10
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node0]
+ClassName=TProjectFolderNode
+Name=wmd
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node0\ChildNodes]
+Count=3
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\js\wmd\showdown.js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\js\wmd\wmd-base.js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\js\wmd\wmd-plus.js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node1]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\js\com.cnprog.editor.js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node2]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\js\com.cnprog.post.js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node3]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\js\com.cnprog.utils.js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node4]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\js\excanvas.pack.js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node5]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\js\jquery.flot.pack.js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node6]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\js\jquery.openid.js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node7]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\js\jquery.validate.pack.js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node8]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\js\jquery-1.2.6.js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node0\ChildNodes\Node9]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\js\jquery-1.2.6.min.js
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node1]
+ClassName=TProjectFolderNode
+Name=style
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node1\ChildNodes]
+Count=4
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node1\ChildNodes\Node0]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\style\default.css
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node1\ChildNodes\Node1]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\style\jquery.autocomplete.css
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node1\ChildNodes\Node2]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\style\openid.css
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node1\ChildNodes\Node1\ChildNodes\Node3]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\content\style\prettify.css
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node2]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\404.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node3]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\500.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node4]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\about.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node5]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\answer_edit.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node6]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\ask.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node7]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\badge.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node8]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\badges.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node9]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\base.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node10]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\base_content.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node11]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\close.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node12]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\faq.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node13]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\footer.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node14]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\header.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node15]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\index.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node16]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\logout.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node17]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\pagesize.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node18]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\paginator.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node19]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\privacy.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node20]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\question.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node21]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\question_edit.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node22]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\question_retag.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node23]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\questions.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node24]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\reopen.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node25]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\revisions_answer.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node26]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\revisions_question.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node27]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\sidebar.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node28]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\tags.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node29]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\unanswered.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node30]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\user.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node31]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\user_edit.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node32]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\user_favorites.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node33]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\user_footer.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node34]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\user_info.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node35]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\user_preferences.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node36]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\user_recent.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node37]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\user_reputation.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node38]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\user_responses.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node39]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\user_stats.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node40]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\user_tabs.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node41]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\user_votes.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node42]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\users.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3\ChildNodes\Node43]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\templates\users_questions.html
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4]
+ClassName=TProjectFolderNode
+Name=utils
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4\ChildNodes]
+Count=4
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4\ChildNodes\Node0]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\utils\__init__.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4\ChildNodes\Node1]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\utils\cache.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4\ChildNodes\Node2]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\utils\html.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4\ChildNodes\Node3]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\utils\lists.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node5]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\__init__.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node6]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\manage.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node7]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\settings.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node8]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\test.py
+
+[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node9]
+ClassName=TProjectFileNode
+FileName=C:\Projects\Lanai\src\urls.py
+
+[Project\ChildNodes\Node1]
+ClassName=TProjectRunConfiguationsNode
+
+[Project\ExtraPythonPath]
+Count=0
+
diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po
new file mode 100644
index 00000000..c4c1e674
--- /dev/null
+++ b/locale/en/LC_MESSAGES/django.po
@@ -0,0 +1,2540 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-06-22 20:40-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: settings.py:32
+msgid "account/"
+msgstr ""
+
+#: settings.py:32 django_authopenid/urls.py:9 django_authopenid/urls.py:11
+msgid "signin/"
+msgstr ""
+
+#: django_authopenid/forms.py:67 django_authopenid/views.py:93
+msgid "i-names are not supported"
+msgstr ""
+
+#: django_authopenid/forms.py:102 django_authopenid/forms.py:207
+msgid ""
+"Usernames can only contain letters, numbers and "
+"underscores"
+msgstr ""
+
+#: django_authopenid/forms.py:109
+msgid ""
+"This username does not exist in our database. Please "
+"choose another."
+msgstr ""
+
+#: django_authopenid/forms.py:126 django_authopenid/forms.py:231
+msgid ""
+"Please enter a valid username and password. Note that "
+"both fields are case-sensitive."
+msgstr ""
+
+#: django_authopenid/forms.py:130 django_authopenid/forms.py:235
+msgid "This account is inactive."
+msgstr ""
+
+#: django_authopenid/forms.py:158
+msgid "invalid user name"
+msgstr ""
+
+#: django_authopenid/forms.py:160
+msgid "sorry, this name can not be used, please try another"
+msgstr ""
+
+#: django_authopenid/forms.py:162
+msgid "username too short"
+msgstr ""
+
+#: django_authopenid/forms.py:170 django_authopenid/forms.py:171
+msgid "this name is already in use - please try anoter"
+msgstr ""
+
+#: django_authopenid/forms.py:184
+msgid ""
+"This email is already registered in our database. Please "
+"choose another."
+msgstr ""
+
+#: django_authopenid/forms.py:214
+msgid ""
+"This username don't exist. Please choose another."
+msgstr ""
+
+#: django_authopenid/forms.py:253
+msgid "choose a username"
+msgstr ""
+
+#: django_authopenid/forms.py:255 templates/authopenid/signup.html:36
+msgid "your email address"
+msgstr ""
+
+#: django_authopenid/forms.py:257 templates/authopenid/signup.html:37
+msgid "choose password"
+msgstr ""
+
+#: django_authopenid/forms.py:259 templates/authopenid/signup.html:38
+msgid "retype password"
+msgstr ""
+
+#: django_authopenid/forms.py:330
+msgid ""
+"Old password is incorrect. Please enter the correct "
+"password."
+msgstr ""
+
+#: django_authopenid/forms.py:342
+msgid "new passwords do not match"
+msgstr ""
+
+#: django_authopenid/forms.py:434
+msgid "Incorrect username."
+msgstr ""
+
+#: django_authopenid/urls.py:10
+msgid "signout/"
+msgstr ""
+
+#: django_authopenid/urls.py:11
+msgid "complete/"
+msgstr ""
+
+#: django_authopenid/urls.py:13
+msgid "register/"
+msgstr ""
+
+#: django_authopenid/urls.py:14
+msgid "signup/"
+msgstr ""
+
+#: django_authopenid/urls.py:16
+msgid "sendpw/"
+msgstr ""
+
+#: django_authopenid/urls.py:26
+msgid "delete/"
+msgstr ""
+
+#: django_authopenid/views.py:99
+#, python-format
+msgid "闈炴硶OpenID鍦板潃锛 %s"
+msgstr ""
+
+#: django_authopenid/views.py:366
+msgid "Welcome"
+msgstr ""
+
+#: django_authopenid/views.py:456
+msgid "Password changed."
+msgstr ""
+
+#: django_authopenid/views.py:488
+msgid "Email changed."
+msgstr ""
+
+#: django_authopenid/views.py:519 django_authopenid/views.py:671
+#, python-format
+msgid "No OpenID %s found associated in our database"
+msgstr ""
+
+#: django_authopenid/views.py:523 django_authopenid/views.py:678
+#, python-format
+msgid "The OpenID %s isn't associated to current user logged in"
+msgstr ""
+
+#: django_authopenid/views.py:531
+msgid "Email Changed."
+msgstr ""
+
+#: django_authopenid/views.py:606
+msgid "This OpenID is already associated with another account."
+msgstr ""
+
+#: django_authopenid/views.py:611
+#, python-format
+msgid "OpenID %s is now associated with your account."
+msgstr ""
+
+#: django_authopenid/views.py:681
+msgid "Account deleted."
+msgstr ""
+
+#: django_authopenid/views.py:721
+msgid "Request for new password"
+msgstr ""
+
+#: django_authopenid/views.py:734
+msgid "A new password has been sent to your email address."
+msgstr ""
+
+#: django_authopenid/views.py:764
+#, python-format
+msgid ""
+"Could not change password. Confirmation key '%s' is not "
+"registered."
+msgstr ""
+
+#: django_authopenid/views.py:773
+msgid ""
+"Can not change password. User don't exist anymore in our "
+"database."
+msgstr ""
+
+#: django_authopenid/views.py:782
+#, python-format
+msgid "Password changed for %s. You may now sign in."
+msgstr ""
+
+#: forum/const.py:8
+msgid "duplicate question"
+msgstr ""
+
+#: forum/const.py:9
+msgid "question if off-topic or not relevant"
+msgstr ""
+
+#: forum/const.py:10
+msgid "too subjective and argumentative"
+msgstr ""
+
+#: forum/const.py:11
+msgid "is not an answer to the question"
+msgstr ""
+
+#: forum/const.py:12
+msgid "the question is answered, right answer was accepted"
+msgstr ""
+
+#: forum/const.py:13
+msgid "problem is not reproducible or outdated"
+msgstr ""
+
+#: forum/const.py:15
+msgid "question contains offensive inappropriate, or malicious remarks"
+msgstr ""
+
+#: forum/const.py:16
+msgid "spam or advertising"
+msgstr ""
+
+#: forum/const.py:56
+msgid "question"
+msgstr ""
+
+#: forum/const.py:57 templates/book.html:110 templates/backup/book.html:110
+msgid "answer"
+msgstr ""
+
+#: forum/const.py:58
+msgid "commented question"
+msgstr ""
+
+#: forum/const.py:59
+msgid "commented answer"
+msgstr ""
+
+#: forum/const.py:60
+msgid "edited question"
+msgstr ""
+
+#: forum/const.py:61
+msgid "edited answer"
+msgstr ""
+
+#: forum/const.py:62
+msgid "received award"
+msgstr ""
+
+#: forum/const.py:63
+msgid "marked best answer"
+msgstr ""
+
+#: forum/const.py:64
+msgid "upvoted"
+msgstr ""
+
+#: forum/const.py:65
+msgid "downvoted"
+msgstr ""
+
+#: forum/const.py:66
+msgid "canceled vote"
+msgstr ""
+
+#: forum/const.py:67
+msgid "deleted question"
+msgstr ""
+
+#: forum/const.py:68
+msgid "deleted answer"
+msgstr ""
+
+#: forum/const.py:69
+msgid "marked offensive"
+msgstr ""
+
+#: forum/const.py:70
+msgid "updated tags"
+msgstr ""
+
+#: forum/const.py:71
+msgid "selected favorite"
+msgstr ""
+
+#: forum/const.py:72
+msgid "completed user profile"
+msgstr ""
+
+#: forum/const.py:83
+msgid "[closed]"
+msgstr ""
+
+#: forum/const.py:84
+msgid "[deleted]"
+msgstr ""
+
+#: forum/const.py:85
+msgid "initial version"
+msgstr ""
+
+#: forum/const.py:86
+msgid "retagged"
+msgstr ""
+
+#: forum/feed.py:17 templates/base.html:7 templates/base_content.html:6
+#: templates/faq.html:25 templates/faq.html.py:108
+#: templates/backup/base.html:7 templates/backup/base_content.html:6
+#: templates/backup/faq.html:25 templates/backup/faq.html.py:108
+#: templates/tough/faq.html:23 templates/tough/faq.html.py:106
+#: templates/tough/question_retag.html:89
+msgid "site title"
+msgstr ""
+
+#: forum/feed.py:17
+msgid " - "
+msgstr ""
+
+#: forum/feed.py:17 templates/base.html:7 templates/base_content.html:6
+#: templates/backup/base.html:7 templates/backup/base_content.html:6
+msgid "site slogan"
+msgstr ""
+
+#: forum/feed.py:17
+msgid "latest questions"
+msgstr ""
+
+#: forum/feed.py:19 templates/index.html:8 templates/backup/index.html:8
+msgid "meta site content"
+msgstr ""
+
+#: forum/feed.py:21
+msgid "copyright message"
+msgstr ""
+
+#: forum/forms.py:14 templates/answer_edit_tips.html:34
+#: templates/answer_edit_tips.html.py:39 templates/question_edit_tips.html:31
+#: templates/question_edit_tips.html:36
+#: templates/backup/answer_edit_tips.html:33
+#: templates/backup/answer_edit_tips.html:38
+#: templates/backup/question_edit_tips.html:29
+#: templates/backup/question_edit_tips.html:34
+msgid "title"
+msgstr ""
+
+#: forum/forms.py:15
+msgid "please enter a descriptive title for your question"
+msgstr ""
+
+#: forum/forms.py:20
+msgid "title must be > 10 characters"
+msgstr ""
+
+#: forum/forms.py:29
+msgid "content"
+msgstr ""
+
+#: forum/forms.py:35
+msgid "question content must be > 10 characters"
+msgstr ""
+
+#: forum/forms.py:45 templates/header.html:30 templates/header.html.py:61
+#: templates/backup/header.html:30 templates/backup/header.html.py:59
+msgid "tags"
+msgstr ""
+
+#: forum/forms.py:46
+msgid "please use space to separate tags (this enables autocomplete feature)"
+msgstr ""
+
+#: forum/forms.py:53
+msgid "tags are required"
+msgstr ""
+
+#: forum/forms.py:57
+msgid "please use 5 tags or less"
+msgstr ""
+
+#: forum/forms.py:60
+msgid "tags must be shorter than 20 characters"
+msgstr ""
+
+#: forum/forms.py:64
+msgid ""
+"please use following characters in tags: letters 'a-z', numbers, and "
+"characters '.-_#'"
+msgstr ""
+
+#: forum/forms.py:74 templates/index.html:56 templates/question.html:196
+#: templates/question.html.py:377 templates/questions.html:58
+#: templates/questions.html.py:70 templates/unanswered.html:48
+#: templates/unanswered.html.py:60 templates/backup/index.html:56
+#: templates/backup/question.html:195 templates/backup/question.html.py:367
+#: templates/backup/questions.html:57 templates/backup/questions.html.py:69
+#: templates/backup/unanswered.html:47 templates/backup/unanswered.html:59
+#: templates/tough/unanswered.html:46 templates/tough/unanswered.html.py:58
+msgid "community wiki"
+msgstr ""
+
+#: forum/forms.py:75
+msgid ""
+"if you choose community wiki option, the question and answer do not generate "
+"points and name of author will not be shown"
+msgstr ""
+
+#: forum/forms.py:84
+msgid "update summary:"
+msgstr ""
+
+#: forum/forms.py:85
+msgid ""
+"enter a brief summary of your revision (e.g. fixed spelling, grammar, "
+"improved style, this field is optional)"
+msgstr ""
+
+#: forum/forms.py:160
+msgid "this email does not have to be linked to gravatar"
+msgstr ""
+
+#: forum/forms.py:161
+msgid "Real name"
+msgstr ""
+
+#: forum/forms.py:162
+msgid "Website"
+msgstr ""
+
+#: forum/forms.py:163
+msgid "Location"
+msgstr ""
+
+#: forum/forms.py:164
+msgid "Date of birth"
+msgstr ""
+
+#: forum/forms.py:164
+msgid "will not be shown, used to calculate age, format: YYYY-MM-DD"
+msgstr ""
+
+#: forum/forms.py:165 templates/authopenid/settings.html:20
+msgid "Profile"
+msgstr ""
+
+#: forum/forms.py:190 forum/forms.py:191
+msgid "this email has already been registered, please use another one"
+msgstr ""
+
+#: forum/models.py:316 templates/badges.html:52
+#: templates/backup/badges.html:52
+msgid "gold"
+msgstr ""
+
+#: forum/models.py:317 templates/badges.html:62
+#: templates/backup/badges.html:62
+msgid "silver"
+msgstr ""
+
+#: forum/models.py:318 templates/badges.html:70
+#: templates/backup/badges.html:70
+msgid "bronze"
+msgstr ""
+
+#: forum/user.py:16 templates/user_tabs.html:7
+#: templates/backup/user_tabs.html:6
+msgid "overview"
+msgstr ""
+
+#: forum/user.py:17
+msgid "user profile"
+msgstr ""
+
+#: forum/user.py:18
+msgid "user profile overview"
+msgstr ""
+
+#: forum/user.py:24 templates/user_tabs.html:9
+#: templates/backup/user_tabs.html:8
+msgid "recent activity"
+msgstr ""
+
+#: forum/user.py:25
+msgid "recent user activity"
+msgstr ""
+
+#: forum/user.py:26
+msgid "profile - recent activity"
+msgstr ""
+
+#: forum/user.py:33 templates/user_tabs.html:13
+#: templates/backup/user_tabs.html:12
+msgid "responses"
+msgstr ""
+
+#: forum/user.py:34 templates/user_tabs.html:12
+#: templates/backup/user_tabs.html:11
+msgid "comments and answers to others questions"
+msgstr ""
+
+#: forum/user.py:35
+msgid "profile - responses"
+msgstr ""
+
+#: forum/user.py:42 templates/user_info.html:23 templates/users.html:26
+#: templates/backup/user_info.html:22 templates/backup/users.html:25
+msgid "reputation"
+msgstr ""
+
+#: forum/user.py:43
+msgid "user reputation in the community"
+msgstr ""
+
+#: forum/user.py:44
+msgid "profile - user reputation"
+msgstr ""
+
+#: forum/user.py:50
+msgid "favorite questions"
+msgstr ""
+
+#: forum/user.py:51
+msgid "users favorite questions"
+msgstr ""
+
+#: forum/user.py:52
+msgid "profile - favorite questions"
+msgstr ""
+
+#: forum/user.py:59 templates/user_tabs.html:20
+#: templates/backup/user_tabs.html:19
+msgid "casted votes"
+msgstr "votes"
+
+#: forum/user.py:60 templates/user_tabs.html:20
+#: templates/backup/user_tabs.html:19
+msgid "user vote record"
+msgstr ""
+
+#: forum/user.py:61
+msgid "profile - votes"
+msgstr ""
+
+#: forum/user.py:68
+msgid "preferences"
+msgstr ""
+
+#: forum/user.py:69 templates/user_tabs.html:28
+#: templates/backup/user_tabs.html:27
+msgid "user preference settings"
+msgstr ""
+
+#: forum/user.py:70
+msgid "profile - user preferences"
+msgstr ""
+
+#: forum/views.py:1730
+msgid "uploading images is limited to users with >60 reputation points"
+msgstr ""
+
+#: forum/views.py:1732
+msgid "allowed file types are 'jpg', 'jpeg', 'gif', 'bmp', 'png', 'tiff'"
+msgstr ""
+
+#: forum/views.py:1734
+#, python-format
+msgid "maximum upload file size is %sK"
+msgstr ""
+
+#: forum/views.py:1736
+#, python-format
+msgid ""
+"Error uploading file. Please contact the site administrator. Thank you. %s"
+msgstr ""
+
+#: forum/templatetags/extra_tags.py:139 forum/templatetags/extra_tags.py:168
+#: templates/header.html:33 templates/backup/header.html:33
+msgid "badges"
+msgstr ""
+
+#: forum/templatetags/extra_tags.py:140 forum/templatetags/extra_tags.py:167
+msgid "reputation points"
+msgstr ""
+
+#: forum/templatetags/extra_tags.py:221
+msgid " ago"
+msgstr ""
+
+#: templates/404.html:24 templates/backup/404.html:24
+msgid "Sorry, could not find the page you requested."
+msgstr ""
+
+#: templates/404.html:26 templates/backup/404.html:26
+msgid "This might have happened for the following reasons:"
+msgstr ""
+
+#: templates/404.html:28 templates/backup/404.html:28
+msgid "this question or answer has been deleted;"
+msgstr ""
+
+#: templates/404.html:29 templates/backup/404.html:29
+msgid "url has error - please check it;"
+msgstr ""
+
+#: templates/404.html:30 templates/backup/404.html:30
+msgid ""
+"the page you tried to visit is protected or you don't have sufficient "
+"points, see"
+msgstr ""
+
+#: templates/404.html:31 templates/backup/404.html:31
+msgid "if you believe this error 404 should not have occured, please"
+msgstr ""
+
+#: templates/404.html:32 templates/backup/404.html:32
+msgid "report this problem"
+msgstr ""
+
+#: templates/404.html:41 templates/500.html:27 templates/backup/404.html:41
+#: templates/backup/500.html:27
+msgid "back to previous page"
+msgstr ""
+
+#: templates/404.html:42 templates/backup/404.html:42
+msgid "see all questions"
+msgstr ""
+
+#: templates/404.html:43 templates/backup/404.html:43
+msgid "see all tags"
+msgstr ""
+
+#: templates/500.html:24 templates/backup/500.html:24
+msgid "system error log is recorded, error will be fixed as soon as possible"
+msgstr ""
+
+#: templates/500.html:25 templates/backup/500.html:25
+msgid "please report the error to the site administrators if you wish"
+msgstr ""
+
+#: templates/500.html:28 templates/backup/500.html:28
+msgid "see latest questions"
+msgstr ""
+
+#: templates/500.html:29 templates/backup/500.html:29
+msgid "see tags"
+msgstr ""
+
+#: templates/about.html:6 templates/about.html.py:11
+#: templates/backup/about.html:6 templates/backup/about.html.py:11
+msgid "About"
+msgstr ""
+
+#: templates/answer_edit.html:4 templates/answer_edit.html.py:47
+#: templates/backup/answer_edit.html:3 templates/backup/answer_edit.html:46
+msgid "Edit answer"
+msgstr ""
+
+#: templates/answer_edit.html:24 templates/answer_edit.html.py:27
+#: templates/ask.html:25 templates/ask.html.py:28 templates/question.html:37
+#: templates/question.html.py:40 templates/question_edit.html:27
+#: templates/backup/answer_edit.html:23 templates/backup/answer_edit.html:26
+#: templates/backup/ask.html:24 templates/backup/ask.html.py:27
+#: templates/backup/question.html:36 templates/backup/question.html.py:39
+#: templates/backup/question_edit.html:25
+msgid "hide preview"
+msgstr ""
+
+#: templates/answer_edit.html:27 templates/ask.html:28
+#: templates/question.html:40 templates/question_edit.html:27
+#: templates/backup/answer_edit.html:26 templates/backup/ask.html:27
+#: templates/backup/question.html:39 templates/backup/question_edit.html:25
+msgid "show preview"
+msgstr ""
+
+#: templates/answer_edit.html:47 templates/question_edit.html:65
+#: templates/revisions_answer.html:36 templates/revisions_question.html:36
+#: templates/backup/answer_edit.html:46 templates/backup/question_edit.html:63
+#: templates/backup/revisions_answer.html:35
+#: templates/backup/revisions_question.html:34
+#: templates/tough/question_retag.html:51
+msgid "back"
+msgstr ""
+
+#: templates/answer_edit.html:52 templates/question_edit.html:70
+#: templates/revisions_answer.html:47 templates/revisions_question.html:47
+#: templates/backup/answer_edit.html:51 templates/backup/question_edit.html:68
+#: templates/backup/revisions_answer.html:46
+#: templates/backup/revisions_question.html:45
+msgid "revision"
+msgstr ""
+
+#: templates/answer_edit.html:55 templates/question_edit.html:74
+#: templates/backup/answer_edit.html:54 templates/backup/question_edit.html:72
+msgid "select revision"
+msgstr ""
+
+#: templates/answer_edit.html:62 templates/ask.html:81
+#: templates/question.html:447 templates/question_edit.html:91
+#: templates/backup/answer_edit.html:61 templates/backup/ask.html:80
+#: templates/backup/question.html:437 templates/backup/question_edit.html:89
+msgid "Toggle the real time Markdown editor preview"
+msgstr ""
+
+#: templates/answer_edit.html:62 templates/ask.html:81
+#: templates/question.html:447 templates/question_edit.html:91
+#: templates/backup/answer_edit.html:61 templates/backup/ask.html:80
+#: templates/backup/question.html:437 templates/backup/question_edit.html:89
+msgid "toggle preview"
+msgstr ""
+
+#: templates/answer_edit.html:73 templates/question_edit.html:119
+#: templates/backup/answer_edit.html:72
+#: templates/backup/question_edit.html:117
+msgid "Save edit"
+msgstr ""
+
+#: templates/answer_edit.html:74 templates/close.html:29
+#: templates/question_edit.html:120 templates/reopen.html:30
+#: templates/user_edit.html:83 templates/backup/answer_edit.html:73
+#: templates/backup/close.html:29 templates/backup/question_edit.html:118
+#: templates/backup/reopen.html:28 templates/backup/user_edit.html:81
+#: templates/tough/question_retag.html:75
+msgid "Cancel"
+msgstr ""
+
+#: templates/answer_edit_tips.html:4
+msgid "answer tips"
+msgstr "Tips"
+
+#: templates/answer_edit_tips.html:7 templates/backup/answer_edit_tips.html:6
+msgid "please make your answer relevant to this community"
+msgstr ""
+
+#: templates/answer_edit_tips.html:10 templates/backup/answer_edit_tips.html:9
+msgid "try to give an answer, rather than engage into a discussion"
+msgstr ""
+
+#: templates/answer_edit_tips.html:13
+#: templates/backup/answer_edit_tips.html:12
+msgid "please try to provide details"
+msgstr ""
+
+#: templates/answer_edit_tips.html:16 templates/question_edit_tips.html:13
+#: templates/backup/answer_edit_tips.html:15
+#: templates/backup/question_edit_tips.html:11
+msgid "be clear and concise"
+msgstr ""
+
+#: templates/answer_edit_tips.html:19 templates/question_edit_tips.html:16
+#: templates/backup/answer_edit_tips.html:18
+#: templates/backup/question_edit_tips.html:14
+msgid "see frequently asked questions"
+msgstr ""
+
+#: templates/answer_edit_tips.html:25 templates/question_edit_tips.html:22
+#: templates/backup/answer_edit_tips.html:24
+#: templates/backup/question_edit_tips.html:20
+msgid "Markdown tips"
+msgstr "Markdown basics"
+
+#: templates/answer_edit_tips.html:28 templates/question_edit_tips.html:25
+#: templates/backup/answer_edit_tips.html:27
+#: templates/backup/question_edit_tips.html:23
+msgid "*italic* or __italic__"
+msgstr ""
+
+#: templates/answer_edit_tips.html:31 templates/question_edit_tips.html:28
+#: templates/backup/answer_edit_tips.html:30
+#: templates/backup/question_edit_tips.html:26
+msgid "**bold** or __bold__"
+msgstr ""
+
+#: templates/answer_edit_tips.html:34 templates/question_edit_tips.html:31
+#: templates/backup/answer_edit_tips.html:33
+#: templates/backup/question_edit_tips.html:29
+msgid "link"
+msgstr ""
+
+#: templates/answer_edit_tips.html:34 templates/answer_edit_tips.html.py:39
+#: templates/question_edit_tips.html:31 templates/question_edit_tips.html:36
+#: templates/backup/answer_edit_tips.html:33
+#: templates/backup/answer_edit_tips.html:38
+#: templates/backup/question_edit_tips.html:29
+#: templates/backup/question_edit_tips.html:34
+msgid "text"
+msgstr ""
+
+#: templates/answer_edit_tips.html:39 templates/question_edit_tips.html:36
+#: templates/backup/answer_edit_tips.html:38
+#: templates/backup/question_edit_tips.html:34
+msgid "image"
+msgstr ""
+
+#: templates/answer_edit_tips.html:43 templates/question_edit_tips.html:40
+#: templates/backup/answer_edit_tips.html:42
+#: templates/backup/question_edit_tips.html:38
+msgid "numbered list:"
+msgstr ""
+
+#: templates/answer_edit_tips.html:48 templates/question_edit_tips.html:45
+#: templates/backup/answer_edit_tips.html:47
+#: templates/backup/question_edit_tips.html:43
+msgid "basic HTML tags are also supported"
+msgstr ""
+
+#: templates/answer_edit_tips.html:51 templates/question_edit_tips.html:48
+#: templates/backup/answer_edit_tips.html:50
+#: templates/backup/question_edit_tips.html:46
+msgid "learn more about Markdown"
+msgstr ""
+
+#: templates/ask.html:4 templates/ask.html.py:60 templates/backup/ask.html:3
+#: templates/backup/ask.html.py:59
+msgid "Ask a question"
+msgstr ""
+
+#: templates/ask.html:106 templates/backup/ask.html:105
+msgid "Use"
+msgstr ""
+
+#: templates/ask.html:106 templates/backup/ask.html:105
+msgid "learn more about OpenID"
+msgstr ""
+
+#: templates/ask.html:106 templates/authopenid/signin.html:34
+#: templates/authopenid/signin.html:60 templates/backup/ask.html:105
+msgid "Login"
+msgstr ""
+
+#: templates/ask.html:109 templates/backup/ask.html:108
+msgid "Get your own "
+msgstr ""
+
+#: templates/ask.html:117 templates/authopenid/sendpw.html:27
+#: templates/backup/ask.html:116
+msgid "User name"
+msgstr ""
+
+#: templates/ask.html:120 templates/backup/ask.html:119
+msgid "Email: (won't be shown to anyone)"
+msgstr ""
+
+#: templates/ask.html:127 templates/backup/ask.html:126
+msgid "Ask your question"
+msgstr ""
+
+#: templates/badge.html:6 templates/badge.html.py:17
+#: templates/backup/badge.html:5 templates/backup/badge.html.py:16
+msgid "Badge"
+msgstr ""
+
+#: templates/badge.html:26 templates/backup/badge.html:25
+msgid "The users have been awarded with badges:"
+msgstr ""
+
+#: templates/badges.html:6 templates/backup/badges.html:6
+msgid "Badges summary"
+msgstr ""
+
+#: templates/badges.html:17 templates/user_stats.html:113
+#: templates/backup/badges.html:17 templates/backup/user_stats.html:112
+msgid "Badges"
+msgstr ""
+
+#: templates/badges.html:21 templates/backup/badges.html:21
+msgid "Community gives you awards for your questions, answers and votes."
+msgstr ""
+
+#: templates/badges.html:22 templates/backup/badges.html:22
+msgid ""
+"Below is the list of available badges and number of times each type of badge "
+"has been awarded."
+msgstr ""
+
+#: templates/badges.html:49 templates/backup/badges.html:49
+msgid "Community badges"
+msgstr ""
+
+#: templates/badges.html:55 templates/backup/badges.html:55
+msgid "Gold badge is very rare."
+msgstr ""
+
+#: templates/badges.html:56 templates/backup/badges.html:56
+msgid ""
+"To obtain it you have to show profound knowledge and ability in addition to "
+"actively participating in the community."
+msgstr ""
+
+#: templates/badges.html:57 templates/backup/badges.html:57
+msgid "Gold badge is the highest award in this community."
+msgstr ""
+
+#: templates/badges.html:65 templates/backup/badges.html:65
+msgid "Obtaining silver badge requires significant patience."
+msgstr ""
+
+#: templates/badges.html:66 templates/backup/badges.html:66
+msgid "If you got one, you've very significantly contributed to this community"
+msgstr ""
+
+#: templates/badges.html:69 templates/backup/badges.html:69
+msgid "bronze badge: often given as a special honor"
+msgstr ""
+
+#: templates/badges.html:73 templates/backup/badges.html:73
+msgid ""
+"If you are active in this community, you will will get this medal - still it "
+"is a special honor."
+msgstr ""
+
+#: templates/base.html:59 templates/base_content.html:60
+#: templates/backup/base.html:59 templates/backup/base_content.html:57
+msgid "congratulations, community gave you a badge"
+msgstr ""
+
+#: templates/base.html:61 templates/base_content.html:62
+#: templates/backup/base.html:61 templates/backup/base_content.html:59
+msgid "profile"
+msgstr ""
+
+#: templates/base_content.html:61 templates/backup/base_content.html:58
+msgid "see"
+msgstr ""
+
+#: templates/book.html:7 templates/backup/book.html:7
+msgid "reading channel"
+msgstr ""
+
+#: templates/book.html:26 templates/backup/book.html:26
+msgid "[author]"
+msgstr ""
+
+#: templates/book.html:30 templates/backup/book.html:30
+msgid "[publisher]"
+msgstr ""
+
+#: templates/book.html:34 templates/backup/book.html:34
+msgid "[publication date]"
+msgstr ""
+
+#: templates/book.html:38 templates/backup/book.html:38
+msgid "[price]"
+msgstr ""
+
+#: templates/book.html:39 templates/backup/book.html:39
+msgid "currency unit"
+msgstr ""
+
+#: templates/book.html:42 templates/backup/book.html:42
+msgid "[pages]"
+msgstr ""
+
+#: templates/book.html:43 templates/backup/book.html:43
+msgid "pages abbreviation"
+msgstr ""
+
+#: templates/book.html:46 templates/backup/book.html:46
+msgid "[tags]"
+msgstr ""
+
+#: templates/book.html:56 templates/backup/book.html:56
+msgid "author blog"
+msgstr ""
+
+#: templates/book.html:62 templates/backup/book.html:62
+msgid "book directory"
+msgstr ""
+
+#: templates/book.html:66 templates/backup/book.html:66
+msgid "buy online"
+msgstr ""
+
+#: templates/book.html:79 templates/backup/book.html:79
+msgid "reader questions"
+msgstr ""
+
+#: templates/book.html:82 templates/backup/book.html:82
+msgid "ask the author"
+msgstr ""
+
+#: templates/book.html:88 templates/book.html.py:93
+#: templates/users_questions.html:17 templates/backup/book.html:88
+#: templates/backup/book.html.py:93 templates/backup/users_questions.html:16
+msgid "this question was selected as favorite"
+msgstr ""
+
+#: templates/book.html:88 templates/book.html.py:93
+#: templates/users_questions.html:11 templates/users_questions.html.py:17
+#: templates/backup/book.html:88 templates/backup/book.html.py:93
+#: templates/backup/users_questions.html:10
+#: templates/backup/users_questions.html:16
+msgid "number of times"
+msgstr ""
+
+#: templates/book.html:105 templates/index.html:47 templates/questions.html:46
+#: templates/unanswered.html:37 templates/users_questions.html:30
+#: templates/backup/book.html:105 templates/backup/index.html:47
+#: templates/backup/questions.html:45 templates/backup/unanswered.html:36
+#: templates/backup/users_questions.html:29 templates/tough/unanswered.html:35
+msgid "votes"
+msgstr ""
+
+#: templates/book.html:108 templates/backup/book.html:108
+msgid "the answer has been accepted to be correct"
+msgstr ""
+
+#: templates/book.html:115 templates/index.html:48 templates/questions.html:47
+#: templates/unanswered.html:38 templates/users_questions.html:40
+#: templates/backup/book.html:115 templates/backup/index.html:48
+#: templates/backup/questions.html:46 templates/backup/unanswered.html:37
+#: templates/backup/users_questions.html:39 templates/tough/unanswered.html:36
+msgid "views"
+msgstr ""
+
+#: templates/book.html:125 templates/index.html:68 templates/question.html:112
+#: templates/question.html.py:479 templates/questions.html:84
+#: templates/questions.html.py:149 templates/tags.html:47
+#: templates/unanswered.html:75 templates/unanswered.html.py:109
+#: templates/users_questions.html:52 templates/backup/book.html:125
+#: templates/backup/index.html:68 templates/backup/index.html.py:93
+#: templates/backup/question.html:111 templates/backup/question.html.py:469
+#: templates/backup/questions.html:83 templates/backup/questions.html:148
+#: templates/backup/tags.html:46 templates/backup/unanswered.html:74
+#: templates/backup/unanswered.html:108
+#: templates/backup/users_questions.html:51 templates/tough/unanswered.html:72
+#: templates/tough/unanswered.html:105
+msgid "using tags"
+msgstr ""
+
+#: templates/book.html:147 templates/backup/book.html:147
+msgid "subscribe to book RSS feed"
+msgstr ""
+
+#: templates/book.html:147 templates/index.html:116
+#: templates/backup/book.html:147 templates/backup/index.html:115
+msgid "subscribe to the questions feed"
+msgstr ""
+
+#: templates/close.html:6 templates/close.html.py:16
+#: templates/backup/close.html:6 templates/backup/close.html.py:16
+msgid "Close question"
+msgstr ""
+
+#: templates/close.html:19 templates/backup/close.html:19
+msgid "Close the question"
+msgstr ""
+
+#: templates/close.html:25 templates/backup/close.html:25
+msgid "Reasons"
+msgstr ""
+
+#: templates/close.html:28 templates/backup/close.html:28
+msgid "OK to close"
+msgstr ""
+
+#: templates/faq.html:11 templates/backup/faq.html:11
+#: templates/tough/faq.html:9
+msgid "Frequently Asked Questions "
+msgstr ""
+
+#: templates/faq.html:15 templates/backup/faq.html:15
+#: templates/tough/faq.html:13
+msgid "What kinds of questions can I ask here?"
+msgstr ""
+
+#: templates/faq.html:16 templates/backup/faq.html:16
+#: templates/tough/faq.html:14
+msgid ""
+"Most importanly - questions should be <strong>relevant</strong> to this "
+"community."
+msgstr ""
+
+#: templates/faq.html:17 templates/backup/faq.html:17
+#: templates/tough/faq.html:15
+msgid ""
+"Before asking the question - please make sure to use search to see whether "
+"your question has alredy been answered."
+msgstr ""
+
+#: templates/faq.html:20 templates/backup/faq.html:20
+#: templates/tough/faq.html:18
+msgid "What questions should I avoid asking?"
+msgstr ""
+
+#: templates/faq.html:21 templates/backup/faq.html:21
+#: templates/tough/faq.html:19
+msgid ""
+"Please avoid asking questions that are not relevant to this community, too "
+"subjective and argumentative."
+msgstr ""
+
+#: templates/faq.html:24 templates/backup/faq.html:24
+#: templates/tough/faq.html:22
+msgid "What should I avoid in my answers?"
+msgstr ""
+
+#: templates/faq.html:25 templates/backup/faq.html:25
+#: templates/tough/faq.html:23
+msgid ""
+"is a Q&A site, not a discussion group. Therefore - please avoid having "
+"discussions in your answers, comment facility allows some space for brief "
+"discussions."
+msgstr ""
+
+#: templates/faq.html:28 templates/backup/faq.html:28
+#: templates/tough/faq.html:26
+msgid "Who moderates this community?"
+msgstr ""
+
+#: templates/faq.html:29 templates/backup/faq.html:29
+#: templates/tough/faq.html:27
+msgid "The short answer is: <strong>you</strong>."
+msgstr ""
+
+#: templates/faq.html:30 templates/backup/faq.html:30
+#: templates/tough/faq.html:28
+msgid "This website is moderated by the users."
+msgstr ""
+
+#: templates/faq.html:31 templates/backup/faq.html:31
+#: templates/tough/faq.html:29
+msgid ""
+"The reputation system allows users earn the authorization to perform a "
+"variety of moderation tasks."
+msgstr ""
+
+#: templates/faq.html:34 templates/backup/faq.html:34
+#: templates/tough/faq.html:32
+msgid "How does reputation system work?"
+msgstr ""
+
+#: templates/faq.html:35 templates/backup/faq.html:35
+#: templates/tough/faq.html:33
+msgid ""
+"Anyone can ask questions and give answers, points are not necessary for that."
+msgstr ""
+
+#: templates/faq.html:36 templates/backup/faq.html:36
+#: templates/tough/faq.html:34
+msgid ""
+"As we've said before, users help running this site. Point system helps "
+"select users who can administer this community."
+msgstr ""
+
+#: templates/faq.html:37 templates/backup/faq.html:37
+#: templates/tough/faq.html:35
+msgid ""
+"Reputation points roughly measure how community trusts you. These points are "
+"given to you directly by other members of the community."
+msgstr ""
+
+#: templates/faq.html:40 templates/backup/faq.html:40
+#: templates/tough/faq.html:38
+msgid ""
+"For example, if you ask an interesting question or give a helpful answer, "
+"your input will be upvoted and you will gain more trust in the community."
+msgstr ""
+
+#: templates/faq.html:41 templates/backup/faq.html:41
+#: templates/tough/faq.html:39
+msgid ""
+"If on the other hand someone gives a misleading answer, the answer will be "
+"voted down and he/she loses some points."
+msgstr ""
+
+#: templates/faq.html:42 templates/backup/faq.html:42
+#: templates/tough/faq.html:40
+msgid ""
+"Each vote in favor will generate <strong>10</strong> points, each vote "
+"against will subtract <strong>2</strong> points."
+msgstr ""
+
+#: templates/faq.html:43 templates/backup/faq.html:43
+#: templates/tough/faq.html:41
+msgid ""
+"Through the votes of other people you can accumulate a maximum of "
+"<strong>200</strong> points."
+msgstr ""
+
+#: templates/faq.html:44 templates/backup/faq.html:44
+msgid "After accumulating certain number of points, you can do more:"
+msgstr ""
+
+#: templates/faq.html:52 templates/user_votes.html:14
+#: templates/backup/faq.html:52 templates/backup/user_votes.html:13
+#: templates/tough/faq.html:50
+msgid "upvote"
+msgstr ""
+
+#: templates/faq.html:56 templates/backup/faq.html:56
+#: templates/tough/faq.html:54
+msgid "use tags"
+msgstr ""
+
+#: templates/faq.html:60 templates/backup/faq.html:60
+#: templates/tough/faq.html:58
+msgid "add comments"
+msgstr ""
+
+#: templates/faq.html:64 templates/user_votes.html:16
+#: templates/backup/faq.html:64 templates/backup/user_votes.html:15
+#: templates/tough/faq.html:62
+msgid "downvote"
+msgstr ""
+
+#: templates/faq.html:71 templates/backup/faq.html:71
+#: templates/tough/faq.html:69
+msgid "retag questions"
+msgstr ""
+
+#: templates/faq.html:75 templates/backup/faq.html:75
+#: templates/tough/faq.html:73
+msgid "edit community wiki questions"
+msgstr ""
+
+#: templates/faq.html:79 templates/backup/faq.html:79
+#: templates/tough/faq.html:77
+msgid "edit any answer"
+msgstr ""
+
+#: templates/faq.html:83 templates/backup/faq.html:83
+#: templates/tough/faq.html:81
+msgid "open any closed question"
+msgstr ""
+
+#: templates/faq.html:87 templates/backup/faq.html:87
+#: templates/tough/faq.html:85
+msgid "delete any comment"
+msgstr ""
+
+#: templates/faq.html:91 templates/backup/faq.html:91
+#: templates/tough/faq.html:89
+msgid "delete any questions and answers and perform other moderation tasks"
+msgstr ""
+
+#: templates/faq.html:98 templates/backup/faq.html:98
+msgid "To register, do I need to create new password?"
+msgstr ""
+
+#: templates/faq.html:99 templates/backup/faq.html:99
+#: templates/tough/faq.html:97
+msgid ""
+"No, you don't have to. You can login through any service that supports "
+"OpenID, e.g. Google, Yahoo, AOL, etc."
+msgstr ""
+
+#: templates/faq.html:100 templates/backup/faq.html:100
+#: templates/tough/faq.html:98
+msgid "Login now!"
+msgstr ""
+
+#: templates/faq.html:103 templates/backup/faq.html:103
+#: templates/tough/faq.html:101
+msgid "Why other people can edit my questions/answers?"
+msgstr ""
+
+#: templates/faq.html:104 templates/backup/faq.html:104
+#: templates/tough/faq.html:102
+msgid "Goal of this site is..."
+msgstr ""
+
+#: templates/faq.html:104 templates/backup/faq.html:104
+#: templates/tough/faq.html:102
+msgid ""
+"So questions and answers can be edited like wiki pages by experienced users "
+"of this site and this improves the overall quality of the knowledge base "
+"content."
+msgstr ""
+
+#: templates/faq.html:105 templates/backup/faq.html:105
+#: templates/tough/faq.html:103
+msgid "If this approach is not for you, we respect your choice."
+msgstr ""
+
+#: templates/faq.html:107 templates/backup/faq.html:107
+#: templates/tough/faq.html:105
+msgid "Still have questions?"
+msgstr ""
+
+#: templates/faq.html:108 templates/backup/faq.html:108
+msgid "Please ask your question, help make our community better!"
+msgstr ""
+
+#: templates/faq.html:108 templates/header.html:29 templates/header.html.py:60
+#: templates/backup/faq.html:108 templates/backup/header.html:29
+#: templates/backup/header.html.py:58 templates/tough/faq.html:106
+msgid "questions"
+msgstr ""
+
+#: templates/faq.html:108 templates/index.html:121
+#: templates/backup/faq.html:108 templates/backup/index.html:120
+#: templates/tough/faq.html:106
+msgid "."
+msgstr ""
+
+#: templates/footer.html:7 templates/header.html:12 templates/index.html:83
+#: templates/backup/footer.html:7 templates/backup/header.html:12
+#: templates/backup/index.html:83
+msgid "about"
+msgstr ""
+
+#: templates/footer.html:8 templates/header.html:13 templates/index.html:84
+#: templates/backup/footer.html:8 templates/backup/header.html:13
+#: templates/backup/index.html:84
+msgid "faq"
+msgstr ""
+
+#: templates/footer.html:9 templates/backup/footer.html:9
+msgid "blog"
+msgstr ""
+
+#: templates/footer.html:10 templates/backup/footer.html:10
+msgid "contact us"
+msgstr ""
+
+#: templates/footer.html:11 templates/backup/footer.html:11
+msgid "privacy policy"
+msgstr ""
+
+#: templates/footer.html:12 templates/backup/footer.html:12
+msgid "give feedback"
+msgstr ""
+
+#: templates/footer.html:18 templates/backup/footer.html:18
+msgid "current revision"
+msgstr ""
+
+#: templates/header.html:8 templates/backup/header.html:8
+msgid "logout"
+msgstr ""
+
+#: templates/header.html:10 templates/authopenid/signup.html:39
+#: templates/backup/header.html:10
+msgid "login"
+msgstr ""
+
+#: templates/header.html:23 templates/backup/header.html:23
+msgid "back to home page"
+msgstr ""
+
+#: templates/header.html:31 templates/header.html.py:62
+#: templates/backup/header.html:31 templates/backup/header.html.py:60
+msgid "users"
+msgstr ""
+
+#: templates/header.html:32 templates/backup/header.html:32
+msgid "books"
+msgstr ""
+
+#: templates/header.html:34 templates/index.html:121
+#: templates/backup/header.html:34 templates/backup/index.html:120
+msgid "unanswered questions"
+msgstr "unanswered"
+
+#: templates/header.html:38 templates/backup/header.html:37
+msgid "my profile"
+msgstr ""
+
+#: templates/header.html:42 templates/backup/header.html:40
+msgid "ask a question"
+msgstr ""
+
+#: templates/header.html:57 templates/backup/header.html:55
+msgid "search"
+msgstr ""
+
+#: templates/index.html:6 templates/backup/index.html:6
+msgid "Home"
+msgstr ""
+
+#: templates/index.html:7 templates/backup/index.html:7
+msgid "meta site keywords, comma separated"
+msgstr ""
+
+#: templates/index.html:21 templates/questions.html:7
+#: templates/backup/index.html:21 templates/backup/questions.html:6
+msgid "Questions"
+msgstr ""
+
+#: templates/index.html:23 templates/backup/index.html:23
+msgid "last updated questions"
+msgstr ""
+
+#: templates/index.html:23 templates/questions.html:25
+#: templates/unanswered.html:20 templates/backup/index.html:23
+#: templates/backup/questions.html:24 templates/backup/unanswered.html:19
+#: templates/tough/unanswered.html:18
+msgid "newest"
+msgstr ""
+
+#: templates/index.html:24 templates/questions.html:27
+#: templates/backup/index.html:24 templates/backup/questions.html:26
+msgid "hottest questions"
+msgstr ""
+
+#: templates/index.html:24 templates/questions.html:27
+#: templates/backup/index.html:24 templates/backup/questions.html:26
+msgid "hottest"
+msgstr ""
+
+#: templates/index.html:25 templates/questions.html:28
+#: templates/backup/index.html:25 templates/backup/questions.html:27
+msgid "most voted questions"
+msgstr ""
+
+#: templates/index.html:25 templates/questions.html:28
+#: templates/backup/index.html:25 templates/backup/questions.html:27
+msgid "most voted"
+msgstr ""
+
+#: templates/index.html:26 templates/backup/index.html:26
+msgid "all questions"
+msgstr ""
+
+#: templates/index.html:46 templates/questions.html:45
+#: templates/unanswered.html:36 templates/users_questions.html:35
+#: templates/backup/index.html:46 templates/backup/questions.html:44
+#: templates/backup/unanswered.html:35
+#: templates/backup/users_questions.html:34 templates/tough/unanswered.html:34
+msgid "answers"
+msgstr ""
+
+#: templates/index.html:68 templates/question.html:112
+#: templates/question.html.py:479 templates/questions.html:84
+#: templates/questions.html.py:149 templates/tags.html:47
+#: templates/unanswered.html:75 templates/unanswered.html.py:109
+#: templates/users_questions.html:52 templates/backup/index.html:68
+#: templates/backup/index.html.py:93 templates/backup/question.html:111
+#: templates/backup/question.html.py:469 templates/backup/questions.html:83
+#: templates/backup/questions.html:148 templates/backup/tags.html:46
+#: templates/backup/unanswered.html:74 templates/backup/unanswered.html:108
+#: templates/backup/users_questions.html:51 templates/tough/unanswered.html:72
+#: templates/tough/unanswered.html:105
+msgid "see questions tagged"
+msgstr ""
+
+#: templates/index.html:79 templates/backup/index.html:79
+msgid "welcome to website"
+msgstr ""
+
+#: templates/index.html:81 templates/backup/index.html:81
+msgid "what is this website"
+msgstr ""
+
+#: templates/index.html:82 templates/backup/index.html:82
+msgid "what can one do on this website"
+msgstr ""
+
+#: templates/index.html:89 templates/backup/index.html:89
+msgid "Recent tags"
+msgstr ""
+
+#: templates/index.html:94
+#, python-format
+msgid "see questions tagged '%(tagname)s'"
+msgstr ""
+
+#: templates/index.html:97 templates/index.html.py:121
+#: templates/backup/index.html:96 templates/backup/index.html.py:120
+msgid "popular tags"
+msgstr ""
+
+#: templates/index.html:101 templates/backup/index.html:100
+msgid "Recent awards"
+msgstr ""
+
+#: templates/index.html:107 templates/backup/index.html:106
+msgid "given to"
+msgstr ""
+
+#: templates/index.html:112 templates/backup/index.html:111
+msgid "all awards"
+msgstr ""
+
+#: templates/index.html:116 templates/backup/index.html:115
+msgid "subscribe to last 30 questions by RSS"
+msgstr ""
+
+#: templates/index.html:121 templates/backup/index.html:120
+msgid "Still looking for more? See"
+msgstr ""
+
+#: templates/index.html:121 templates/backup/index.html:120
+msgid "complete list of quesionts"
+msgstr ""
+
+#: templates/index.html:121 templates/backup/index.html:120
+msgid "or"
+msgstr ""
+
+#: templates/index.html:121 templates/backup/index.html:120
+msgid "Please help us answer"
+msgstr ""
+
+#: templates/logout.html:6 templates/logout.html.py:17
+#: templates/backup/logout.html:6 templates/backup/logout.html.py:17
+msgid "Logout"
+msgstr ""
+
+#: templates/logout.html:20 templates/backup/logout.html:20
+msgid ""
+"As a registered user you can login with your OpenID, log out of the site or "
+"permanently remove your account."
+msgstr ""
+
+#: templates/logout.html:21 templates/backup/logout.html:21
+msgid "Logout now"
+msgstr ""
+
+#: templates/pagesize.html:6 templates/backup/pagesize.html:6
+msgid "posts per page"
+msgstr ""
+
+#: templates/paginator.html:6 templates/paginator.html.py:7
+#: templates/backup/paginator.html:5 templates/backup/paginator.html.py:6
+msgid "previous"
+msgstr ""
+
+#: templates/paginator.html:20 templates/backup/paginator.html:19
+msgid "current page"
+msgstr ""
+
+#: templates/paginator.html:23 templates/paginator.html.py:30
+#: templates/backup/paginator.html:22 templates/backup/paginator.html.py:29
+msgid "page number "
+msgstr ""
+
+#: templates/paginator.html:23 templates/paginator.html.py:30
+#: templates/backup/paginator.html:22 templates/backup/paginator.html.py:29
+msgid "number - make blank in english"
+msgstr ""
+
+#: templates/paginator.html:34 templates/backup/paginator.html:33
+msgid "next page"
+msgstr ""
+
+#: templates/privacy.html:6 templates/privacy.html.py:11
+#: templates/backup/privacy.html:5 templates/backup/privacy.html.py:10
+msgid "Privacy policy"
+msgstr ""
+
+#: templates/privacy.html:15 templates/backup/privacy.html:14
+msgid "general message about privacy"
+msgstr ""
+
+#: templates/privacy.html:18 templates/backup/privacy.html:17
+msgid "Site Visitors"
+msgstr ""
+
+#: templates/privacy.html:20 templates/backup/privacy.html:19
+msgid "what technical information is collected about visitors"
+msgstr ""
+
+#: templates/privacy.html:23 templates/backup/privacy.html:22
+msgid "Personal Information"
+msgstr ""
+
+#: templates/privacy.html:25 templates/backup/privacy.html:24
+msgid "details on personal information policies"
+msgstr ""
+
+#: templates/privacy.html:28 templates/backup/privacy.html:27
+msgid "Other Services"
+msgstr ""
+
+#: templates/privacy.html:30 templates/backup/privacy.html:29
+msgid "details on sharing data with third parties"
+msgstr ""
+
+#: templates/privacy.html:35 templates/backup/privacy.html:34
+msgid "cookie policy details"
+msgstr ""
+
+#: templates/privacy.html:37 templates/backup/privacy.html:36
+msgid "Policy Changes"
+msgstr ""
+
+#: templates/privacy.html:38 templates/backup/privacy.html:37
+msgid "how privacy policies can be changed"
+msgstr ""
+
+#: templates/question.html:66 templates/question.html.py:78
+#: templates/backup/question.html:65 templates/backup/question.html.py:77
+msgid "i like this post (click again to cancel)"
+msgstr ""
+
+#: templates/question.html:68 templates/question.html.py:80
+#: templates/question.html:273 templates/backup/question.html:67
+#: templates/backup/question.html.py:79 templates/backup/question.html:272
+msgid "current number of votes"
+msgstr ""
+
+#: templates/question.html:73 templates/question.html.py:84
+#: templates/backup/question.html:72 templates/backup/question.html.py:83
+msgid "i dont like this post (click again to cancel)"
+msgstr ""
+
+#: templates/question.html:90 templates/backup/question.html:89
+msgid "mark this question as favorite (click again to cancel)"
+msgstr ""
+
+#: templates/question.html:96 templates/backup/question.html:95
+msgid "remove favorite mark from this question (click again to restore mark)"
+msgstr ""
+
+#: templates/question.html:121 templates/question.html.py:304
+#: templates/revisions_answer.html:53 templates/revisions_question.html:53
+#: templates/backup/question.html:120 templates/backup/question.html.py:303
+#: templates/backup/revisions_answer.html:52
+#: templates/backup/revisions_question.html:51
+msgid "edit"
+msgstr ""
+
+#: templates/question.html:125 templates/question.html.py:314
+#: templates/backup/question.html:124 templates/backup/question.html.py:307
+msgid "delete"
+msgstr ""
+
+#: templates/question.html:130 templates/backup/question.html:129
+msgid "reopen"
+msgstr ""
+
+#: templates/question.html:135 templates/backup/question.html:134
+msgid "close"
+msgstr ""
+
+#: templates/question.html:141 templates/question.html.py:327
+#: templates/backup/question.html:140 templates/backup/question.html.py:317
+msgid ""
+"report as offensive (i.e containing spam, advertising, malicious text, etc.)"
+msgstr ""
+
+#: templates/question.html:142 templates/question.html.py:328
+#: templates/backup/question.html:141 templates/backup/question.html.py:318
+msgid "flag offensive"
+msgstr ""
+
+#: templates/question.html:154 templates/question.html.py:337
+#: templates/revisions_answer.html:65 templates/revisions_question.html:65
+#: templates/backup/question.html:153 templates/backup/question.html.py:327
+#: templates/backup/revisions_answer.html:64
+#: templates/backup/revisions_question.html:63
+msgid "updated"
+msgstr ""
+
+#: templates/question.html:203 templates/question.html.py:384
+#: templates/revisions_answer.html:63 templates/revisions_question.html:63
+#: templates/backup/question.html:202 templates/backup/question.html.py:374
+#: templates/backup/revisions_answer.html:62
+#: templates/backup/revisions_question.html:61
+msgid "asked"
+msgstr ""
+
+#: templates/question.html:233 templates/question.html.py:411
+#: templates/backup/question.html:232 templates/backup/question.html.py:401
+msgid "comments"
+msgstr ""
+
+#: templates/question.html:234 templates/question.html.py:412
+#: templates/backup/question.html:233 templates/backup/question.html.py:402
+msgid "add comment"
+msgstr ""
+
+#: templates/question.html:247 templates/backup/question.html:246
+#, python-format
+msgid ""
+"The question has been closed for the following reason \"%(question."
+"get_close_reason_display)s\" by"
+msgstr ""
+
+#: templates/question.html:249 templates/backup/question.html:248
+#, python-format
+msgid "close date %(question.closed_at)s"
+msgstr ""
+
+#: templates/question.html:256 templates/user_stats.html:28
+#: templates/backup/question.html:255 templates/backup/user_stats.html:27
+msgid "Answers"
+msgstr " Answers"
+
+#: templates/question.html:258 templates/backup/question.html:257
+msgid "oldest answers will be shown first"
+msgstr ""
+
+#: templates/question.html:258 templates/backup/question.html:257
+msgid "oldest answers"
+msgstr "oldest"
+
+#: templates/question.html:259 templates/backup/question.html:258
+msgid "newest answers will be shown first"
+msgstr ""
+
+#: templates/question.html:259 templates/backup/question.html:258
+msgid "newest answers"
+msgstr "newest"
+
+#: templates/question.html:260 templates/backup/question.html:259
+msgid "most voted answers will be shown first"
+msgstr ""
+
+#: templates/question.html:260 templates/backup/question.html:259
+msgid "popular answers"
+msgstr "most voted"
+
+#: templates/question.html:272 templates/backup/question.html:271
+msgid "i like this answer (click again to cancel)"
+msgstr ""
+
+#: templates/question.html:278 templates/backup/question.html:277
+msgid "i dont like this answer (click again to cancel)"
+msgstr ""
+
+#: templates/question.html:284 templates/backup/question.html:283
+msgid "mark this answer as favorite (click again to undo)"
+msgstr ""
+
+#: templates/question.html:289 templates/backup/question.html:288
+msgid "the author of the question has selected this answer as correct"
+msgstr ""
+
+#: templates/question.html:311
+msgid "undelete"
+msgstr ""
+
+#: templates/question.html:321 templates/backup/question.html:311
+msgid "answer permanent link"
+msgstr ""
+
+#: templates/question.html:322 templates/backup/question.html:312
+msgid "permanent link"
+msgstr ""
+
+#: templates/question.html:436 templates/backup/question.html:426
+msgid "Your answer"
+msgstr ""
+
+#: templates/question.html:460 templates/backup/question.html:450
+msgid "Answer the question"
+msgstr ""
+
+#: templates/question.html:462 templates/backup/question.html:452
+msgid "Login to answer"
+msgstr ""
+
+#: templates/question.html:474 templates/backup/question.html:464
+msgid "Question tags"
+msgstr "Tags"
+
+#: templates/question.html:484 templates/backup/question.html:474
+msgid "question asked"
+msgstr "Asked"
+
+#: templates/question.html:484 templates/question.html.py:490
+#: templates/user_info.html:51 templates/backup/question.html:474
+#: templates/backup/question.html.py:480 templates/backup/user_info.html:50
+msgid "ago"
+msgstr ""
+
+#: templates/question.html:487 templates/backup/question.html:477
+msgid "question was seen"
+msgstr "Seen"
+
+#: templates/question.html:487 templates/backup/question.html:477
+msgid "times"
+msgstr ""
+
+#: templates/question.html:490 templates/backup/question.html:480
+msgid "last updated"
+msgstr "Last updated"
+
+#: templates/question.html:495 templates/backup/question.html:485
+msgid "Related questions"
+msgstr ""
+
+#: templates/question_edit.html:4 templates/question_edit.html.py:65
+#: templates/backup/question_edit.html:2
+#: templates/backup/question_edit.html:63
+msgid "Edit question"
+msgstr ""
+
+#: templates/question_edit_tips.html:4
+msgid "question tips"
+msgstr "Tips"
+
+#: templates/question_edit_tips.html:7
+#: templates/backup/question_edit_tips.html:5
+msgid "please ask a relevant question"
+msgstr ""
+
+#: templates/question_edit_tips.html:10
+#: templates/backup/question_edit_tips.html:8
+msgid "please try provide enough details"
+msgstr "provide enough details"
+
+#: templates/questions.html:23 templates/backup/questions.html:22
+msgid "Found by tags"
+msgstr "Tagged questions"
+
+#: templates/questions.html:23 templates/backup/questions.html:22
+msgid "Found by title"
+msgstr ""
+
+#: templates/questions.html:23 templates/backup/questions.html:22
+msgid "All questions"
+msgstr ""
+
+#: templates/questions.html:25 templates/unanswered.html:20
+#: templates/backup/questions.html:24 templates/backup/unanswered.html:19
+#: templates/tough/unanswered.html:18
+msgid "most recently asked questions"
+msgstr ""
+
+#: templates/questions.html:26 templates/backup/questions.html:25
+msgid "most recently updated questions"
+msgstr ""
+
+#: templates/questions.html:26 templates/backup/questions.html:25
+msgid "active"
+msgstr ""
+
+#: templates/questions.html:109
+#, python-format
+msgid ""
+"\n"
+"\t\t\thave total %(q_num)s questions tagged %(tagname)s\n"
+"\t\t\t"
+msgid_plural ""
+"\n"
+"\t\t\thave total %(q_num)s questions tagged %(tagname)s\n"
+"\t\t\t"
+msgstr[0] ""
+"\n"
+"<div class=\"questions-count\">%(q_num)s</div><p>question tagged</p><p><span "
+"class=\"tag\">%(tagname)s</span></p>"
+msgstr[1] ""
+"\n"
+"<div class=\"questions-count\">%(q_num)s</div><p>questions tagged</"
+"p><p><span class=\"tag\">%(tagname)s</span></p>"
+
+#: templates/questions.html:116
+#, python-format
+msgid ""
+"\n"
+"\t\t\thave total %(q_num)s questions containing %(searchtitle)s\n"
+"\t\t\t"
+msgid_plural ""
+"\n"
+"\t\t\thave total %(q_num)s questions containing %(searchtitle)s\n"
+"\t\t\t"
+msgstr[0] ""
+"\n"
+"<div class=\"questions-count\">%(q_num)s</div><p>question with title "
+"containing <strong><span class=\"darkred\">%(searchtitle)s</span></strong></"
+"p>"
+msgstr[1] ""
+"\n"
+"<div class=\"questions-count\">%(q_num)s</div><p>questions with title "
+"containing <strong><span class=\"darkred\">%(searchtitle)s</span></strong></"
+"p>"
+
+#: templates/questions.html:124
+msgid "latest questions info"
+msgstr "<strong>Newest</strong> questions are shown first."
+
+#: templates/questions.html:128 templates/backup/questions.html:127
+msgid "Questions are sorted by the <strong>time of last update</strong>."
+msgstr ""
+
+#: templates/questions.html:129 templates/backup/questions.html:128
+msgid "Most recently answered ones are shown first."
+msgstr ""
+
+#: templates/questions.html:133 templates/backup/questions.html:132
+msgid "Questions sorted by <strong>number of responses</strong>."
+msgstr ""
+
+#: templates/questions.html:134 templates/backup/questions.html:133
+msgid "Most answered questions are shown first."
+msgstr ""
+
+#: templates/questions.html:138 templates/backup/questions.html:137
+msgid "Questions are sorted by the <strong>number of votes</strong>."
+msgstr ""
+
+#: templates/questions.html:139 templates/backup/questions.html:138
+msgid "Most voted questions are shown first."
+msgstr ""
+
+#: templates/questions.html:146 templates/unanswered.html:105
+#: templates/backup/questions.html:145 templates/backup/unanswered.html:104
+#: templates/tough/unanswered.html:101
+msgid "Related tags"
+msgstr "Tags"
+
+#: templates/reopen.html:6 templates/reopen.html.py:16
+#: templates/backup/reopen.html:4 templates/backup/reopen.html.py:14
+msgid "Reopen question"
+msgstr ""
+
+#: templates/reopen.html:19 templates/backup/reopen.html:17
+msgid "Open the previously closed question"
+msgstr ""
+
+#: templates/reopen.html:22 templates/backup/reopen.html:20
+msgid "The question was closed for the following reason "
+msgstr ""
+
+#: templates/reopen.html:22 templates/backup/reopen.html:20
+msgid "reason - leave blank in english"
+msgstr ""
+
+#: templates/reopen.html:22 templates/backup/reopen.html:20
+msgid "on "
+msgstr ""
+
+#: templates/reopen.html:22 templates/backup/reopen.html:20
+msgid "date closed"
+msgstr ""
+
+#: templates/reopen.html:29 templates/backup/reopen.html:27
+msgid "Reopen this question"
+msgstr ""
+
+#: templates/revisions_answer.html:7 templates/revisions_answer.html.py:36
+#: templates/revisions_question.html:8 templates/revisions_question.html:36
+#: templates/backup/revisions_answer.html:6
+#: templates/backup/revisions_answer.html:35
+#: templates/backup/revisions_question.html:6
+#: templates/backup/revisions_question.html:34
+msgid "Revision history"
+msgstr ""
+
+#: templates/tags.html:6 templates/tags.html.py:29
+#: templates/backup/tags.html:5 templates/backup/tags.html.py:28
+msgid "Tag list"
+msgstr ""
+
+#: templates/tags.html:31 templates/backup/tags.html:30
+msgid "sorted alphabetically"
+msgstr ""
+
+#: templates/tags.html:31 templates/backup/tags.html:30
+msgid "by name"
+msgstr ""
+
+#: templates/tags.html:32 templates/backup/tags.html:31
+msgid "sorted by frequency of tag use"
+msgstr ""
+
+#: templates/tags.html:32 templates/backup/tags.html:31
+msgid "by popularity"
+msgstr ""
+
+#: templates/tags.html:38 templates/backup/tags.html:37
+msgid "All tags matching query"
+msgstr ""
+
+#: templates/tags.html:38 templates/backup/tags.html:37
+msgid "all tags - make this empty in english"
+msgstr ""
+
+#: templates/tags.html:41 templates/backup/tags.html:40
+msgid "Nothing found"
+msgstr ""
+
+#: templates/unanswered.html:7 templates/unanswered.html.py:18
+#: templates/backup/unanswered.html:6 templates/backup/unanswered.html:17
+#: templates/tough/unanswered.html:5 templates/tough/unanswered.html.py:16
+msgid "Unanswered questions"
+msgstr ""
+
+#: templates/unanswered.html:97
+#, python-format
+msgid "have %(num_q)s unanswered questions"
+msgstr ""
+"<div class=\"questions-count\">%(num_q)s</div><strong>unanswered</strong> "
+"questions"
+
+#: templates/unanswered.html:99 templates/backup/questions.html:107
+#: templates/backup/unanswered.html:97
+msgid "Have a total of"
+msgstr ""
+
+#: templates/user_edit.html:6 templates/backup/user_edit.html:4
+msgid "Edit user profile"
+msgstr ""
+
+#: templates/user_edit.html:19 templates/backup/user_edit.html:17
+msgid "edit profile"
+msgstr ""
+
+#: templates/user_edit.html:31 templates/backup/user_edit.html:29
+msgid "image associated with your email address"
+msgstr ""
+
+#: templates/user_edit.html:31 templates/backup/user_edit.html:29
+msgid "avatar"
+msgstr ""
+
+#: templates/user_edit.html:36 templates/user_info.html:31
+#: templates/backup/user_edit.html:34 templates/backup/user_info.html:30
+msgid "Registered user"
+msgstr ""
+
+#: templates/user_edit.html:82 templates/backup/user_edit.html:80
+msgid "Update"
+msgstr ""
+
+#: templates/user_info.html:34 templates/backup/user_info.html:33
+msgid "update profile"
+msgstr ""
+
+#: templates/user_info.html:40 templates/backup/user_info.html:39
+msgid "real name"
+msgstr ""
+
+#: templates/user_info.html:45
+msgid "member for"
+msgstr ""
+
+#: templates/user_info.html:50 templates/backup/user_info.html:49
+msgid "last seen"
+msgstr ""
+
+#: templates/user_info.html:56 templates/backup/user_info.html:55
+msgid "user website"
+msgstr ""
+
+#: templates/user_info.html:62 templates/backup/user_info.html:61
+msgid "location"
+msgstr ""
+
+#: templates/user_info.html:69 templates/backup/user_info.html:68
+msgid "age"
+msgstr ""
+
+#: templates/user_info.html:70 templates/backup/user_info.html:69
+msgid "age unit"
+msgstr ""
+
+#: templates/user_info.html:75 templates/backup/user_info.html:74
+msgid "todays unused votes"
+msgstr ""
+
+#: templates/user_info.html:76 templates/backup/user_info.html:75
+msgid "votes left"
+msgstr ""
+
+#: templates/user_stats.html:15 templates/backup/user_stats.html:14
+msgid "User questions"
+msgstr ""
+
+#: templates/user_stats.html:37
+#, python-format
+msgid "the answer has been voted for %(vote_count)s times"
+msgstr ""
+
+#: templates/user_stats.html:37 templates/backup/user_stats.html:36
+msgid "this answer has been selected as correct"
+msgstr ""
+
+#: templates/user_stats.html:43 templates/backup/user_stats.html:42
+#, python-format
+msgid "the answer has been commented %(answered_question.comment_count)s times"
+msgstr ""
+
+#: templates/user_stats.html:56 templates/backup/user_stats.html:55
+msgid "votes total"
+msgstr "Votes"
+
+#: templates/user_stats.html:65 templates/backup/user_stats.html:64
+msgid "user has voted up this many times"
+msgstr ""
+
+#: templates/user_stats.html:70 templates/backup/user_stats.html:69
+msgid "user voted down this many times"
+msgstr ""
+
+#: templates/user_stats.html:84 templates/backup/user_stats.html:83
+msgid "Tags"
+msgstr ""
+
+#: templates/user_stats.html:94 templates/backup/user_stats.html:93
+#, python-format
+msgid "see other questions tagged '%(tag)s' "
+msgstr ""
+
+#: templates/user_tabs.html:7 templates/backup/user_tabs.html:6
+msgid "User profile"
+msgstr ""
+
+#: templates/user_tabs.html:16 templates/backup/user_tabs.html:15
+msgid "graph of user reputation"
+msgstr ""
+
+#: templates/user_tabs.html:17 templates/backup/user_tabs.html:16
+msgid "reputation history"
+msgstr ""
+
+#: templates/user_tabs.html:24 templates/backup/user_tabs.html:23
+msgid "favorites"
+msgstr ""
+
+#: templates/user_tabs.html:29 templates/backup/user_tabs.html:28
+msgid "settings"
+msgstr ""
+
+#: templates/users.html:6 templates/users.html.py:24
+#: templates/backup/users.html:5 templates/backup/users.html.py:23
+msgid "Users"
+msgstr ""
+
+#: templates/users.html:27 templates/backup/users.html:26
+msgid "recent"
+msgstr ""
+
+#: templates/users.html:28 templates/backup/users.html:27
+msgid "oldest"
+msgstr ""
+
+#: templates/users.html:29 templates/backup/users.html:28
+msgid "by username"
+msgstr ""
+
+#: templates/users.html:35 templates/backup/users.html:34
+#, python-format
+msgid "users matching query %(suser)s:"
+msgstr ""
+
+#: templates/users.html:39 templates/backup/users.html:38
+msgid "Nothing found."
+msgstr ""
+
+#: templates/users_questions.html:11 templates/backup/users_questions.html:10
+msgid "this questions was selected as favorite"
+msgstr ""
+
+#: templates/users_questions.html:33 templates/backup/users_questions.html:32
+msgid "this answer has been accepted to be correct"
+msgstr ""
+
+#: templates/authopenid/changeemail.html:6
+msgid "Account: change email"
+msgstr ""
+
+#: templates/authopenid/changeemail.html:9
+msgid ""
+"This is where you can change the email address associated with your account. "
+"Please keep this email address up to date so we can send you a password-"
+"reset email if you request one."
+msgstr ""
+
+#: templates/authopenid/changeemail.html:11
+#: templates/authopenid/changeopenid.html:13
+#: templates/authopenid/changepw.html:18 templates/authopenid/delete.html:14
+#: templates/authopenid/delete.html:24
+msgid "Please correct errors below:"
+msgstr ""
+
+#: templates/authopenid/changeemail.html:28
+msgid "Email"
+msgstr ""
+
+#: templates/authopenid/changeemail.html:29
+#: templates/authopenid/signin.html:59
+msgid "Password"
+msgstr ""
+
+#: templates/authopenid/changeemail.html:31
+msgid "Change email"
+msgstr ""
+
+#: templates/authopenid/changeopenid.html:7
+msgid "Account: change OpenID URL"
+msgstr ""
+
+#: templates/authopenid/changeopenid.html:11
+msgid ""
+"This is where you can change your OpenID URL. Make sure you remember it!"
+msgstr ""
+
+#: templates/authopenid/changeopenid.html:28
+msgid "OpenID URL:"
+msgstr ""
+
+#: templates/authopenid/changeopenid.html:29
+msgid "Change OpenID"
+msgstr ""
+
+#: templates/authopenid/changepw.html:13
+msgid "Account: change password"
+msgstr ""
+
+#: templates/authopenid/changepw.html:16
+msgid "This is where you can change your password. Make sure you remember it!"
+msgstr ""
+
+#: templates/authopenid/changepw.html:26
+msgid "Current password"
+msgstr ""
+
+#: templates/authopenid/changepw.html:27
+msgid "New password"
+msgstr ""
+
+#: templates/authopenid/changepw.html:28
+msgid "New password again"
+msgstr ""
+
+#: templates/authopenid/changepw.html:29 templates/authopenid/settings.html:28
+msgid "Change password"
+msgstr ""
+
+#: templates/authopenid/complete.html:4
+msgid "Connect your OpenID with this site"
+msgstr ""
+
+#: templates/authopenid/complete.html:7
+msgid "Connect your OpenID with your account on this site"
+msgstr ""
+
+#: templates/authopenid/complete.html:10
+msgid "Your OpenID is accepted. Please complete this to finish registration."
+msgstr ""
+
+#: templates/authopenid/complete.html:11
+msgid "This account already exists, please use another."
+msgstr ""
+
+#: templates/authopenid/complete.html:16 templates/authopenid/complete.html:29
+#: templates/authopenid/signin.html:42
+msgid "Sorry, looks like we have some errors:"
+msgstr ""
+
+#: templates/authopenid/complete.html:45
+msgid "New account"
+msgstr ""
+
+#: templates/authopenid/complete.html:46
+msgid "User name (<i>will be shown to others, cannot be modified</i>)"
+msgstr ""
+
+#: templates/authopenid/complete.html:47
+msgid "Email (<i>not shared with anyone</i>)"
+msgstr ""
+
+#: templates/authopenid/complete.html:48
+msgid "create account"
+msgstr ""
+
+#: templates/authopenid/complete.html:56
+msgid "Existing account"
+msgstr ""
+
+#: templates/authopenid/complete.html:57
+msgid "user name"
+msgstr ""
+
+#: templates/authopenid/complete.html:58
+msgid "password"
+msgstr ""
+
+#: templates/authopenid/complete.html:61
+msgid "Register"
+msgstr ""
+
+#: templates/authopenid/complete.html:62 templates/authopenid/signin.html:61
+msgid "Forgot your password?"
+msgstr ""
+
+#: templates/authopenid/delete.html:8
+msgid "Account: delete account"
+msgstr ""
+
+#: templates/authopenid/delete.html:12
+msgid ""
+"Note: After deleting your account, anyone will be able to register this "
+"username."
+msgstr ""
+
+#: templates/authopenid/delete.html:16
+msgid "Check confirm box, if you want delete your account."
+msgstr ""
+
+#: templates/authopenid/delete.html:19
+msgid "Password:"
+msgstr ""
+
+#: templates/authopenid/delete.html:31
+msgid "I am sure I want to delete my account."
+msgstr ""
+
+#: templates/authopenid/delete.html:32
+msgid "Password/OpenID URL"
+msgstr ""
+
+#: templates/authopenid/delete.html:32
+msgid "(required for your security)"
+msgstr ""
+
+#: templates/authopenid/delete.html:34
+msgid "Delete account permanently"
+msgstr ""
+
+#: templates/authopenid/sendpw.html:3 templates/authopenid/sendpw.html.py:7
+msgid "Send new password"
+msgstr ""
+
+#: templates/authopenid/sendpw.html:11
+msgid "Lost your password? No problem - here you can reset it."
+msgstr ""
+
+#: templates/authopenid/sendpw.html:12
+msgid ""
+"Please enter your username below and new password will be sent to your "
+"registered e-mail"
+msgstr ""
+
+#: templates/authopenid/sendpw.html:29
+msgid "Reset password"
+msgstr ""
+
+#: templates/authopenid/sendpw.html:29
+msgid "return to login"
+msgstr ""
+
+#: templates/authopenid/sendpw.html:32
+msgid ""
+"Note: your new password will be activated only after you click the "
+"activation link in the email message"
+msgstr ""
+
+#: templates/authopenid/settings.html:29
+msgid "Give your account a new password."
+msgstr ""
+
+#: templates/authopenid/settings.html:30
+msgid "Change email "
+msgstr ""
+
+#: templates/authopenid/settings.html:31
+msgid "Add or update the email address associated with your account."
+msgstr ""
+
+#: templates/authopenid/settings.html:34
+msgid "Change openid associated to your account"
+msgstr ""
+
+#: templates/authopenid/settings.html:37
+msgid "Delete account"
+msgstr ""
+
+#: templates/authopenid/settings.html:38
+msgid "Erase your username and all your data from website"
+msgstr ""
+
+#: templates/authopenid/signin.html:3 templates/authopenid/signin.html:16
+msgid "User login"
+msgstr ""
+
+#: templates/authopenid/signin.html:21
+msgid "we support two login modes"
+msgstr ""
+"You can log in either through one of these services or traditionally - using "
+"local username/password."
+
+#: templates/authopenid/signin.html:26 templates/authopenid/signup.html:49
+msgid "Login with your OpenID"
+msgstr ""
+
+#: templates/authopenid/signin.html:28
+msgid "select openid provider"
+msgstr "1) Please select your id service provider."
+
+#: templates/authopenid/signin.html:32
+msgid "verify openid link and login"
+msgstr ""
+"2) Please verify the OpenID URL (type your login name over {username}, if present)"
+" and then log in."
+
+#: templates/authopenid/signin.html:57
+msgid "Use login name and password"
+msgstr ""
+
+#: templates/authopenid/signin.html:58
+msgid "Login name"
+msgstr ""
+
+#: templates/authopenid/signin.html:62
+msgid "Create new acccount"
+msgstr ""
+
+#: templates/authopenid/signin.html:71
+msgid "Why use OpenID?"
+msgstr ""
+
+#: templates/authopenid/signin.html:75
+msgid "with openid it is easier"
+msgstr "With the OpenID you don't need to create new username and password."
+
+#: templates/authopenid/signin.html:78
+msgid "reuse openid"
+msgstr "You can safely re-use the same login for all OpenID-enabled websites."
+
+#: templates/authopenid/signin.html:81
+msgid "openid is widely adopted"
+msgstr ""
+"There are > 160,000,000 OpenID account in use. Over 10,000 sites are OpenID-"
+"enabled."
+
+#: templates/authopenid/signin.html:84
+msgid "openid is supported open standard"
+msgstr "OpenID is based on an open standard, supported by many organizations."
+
+#: templates/authopenid/signin.html:88
+msgid "Find out more"
+msgstr ""
+
+#: templates/authopenid/signin.html:89
+msgid "Get OpenID"
+msgstr ""
+
+#: templates/authopenid/signup.html:2 templates/authopenid/signup.html.py:6
+msgid "Signup"
+msgstr ""
+
+#: templates/authopenid/signup.html:10
+msgid ""
+"We support two types of user registration: conventional username/password, "
+"and"
+msgstr ""
+
+#: templates/authopenid/signup.html:10
+msgid "the OpenID method"
+msgstr ""
+
+#: templates/authopenid/signup.html:15
+msgid "Sorry, looks like we have some errors"
+msgstr ""
+
+#: templates/authopenid/signup.html:33
+msgid "Conventional registration"
+msgstr ""
+
+#: templates/authopenid/signup.html:34
+msgid "choose a user name"
+msgstr ""
+
+#: templates/authopenid/signup.html:40
+msgid "back to login"
+msgstr ""
+
+#: templates/authopenid/signup.html:46
+msgid "Register with your OpenID"
+msgstr ""
+
+#
+#: templates/backup/answer_edit_tips.html:3
+#: templates/backup/question_edit_tips.html:2
+msgid "editing tips"
+msgstr "Tips"
+
+#: templates/backup/questions.html:108
+msgid "number of questions"
+msgstr ""
+
+#: templates/backup/questions.html:110
+msgid "tagged with"
+msgstr ""
+
+#: templates/backup/questions.html:116
+msgid "whose title contains"
+msgstr ""
+
+#: templates/backup/questions.html:121
+msgid "number of questions end of sentence."
+msgstr ""
+
+#: templates/backup/questions.html:123
+msgid "Questions are sorted by <strong>entry date</strong>."
+msgstr ""
+
+#: templates/backup/questions.html:123
+msgid "Newest questions shown first."
+msgstr ""
+"Questions are sorted by <strong>entry date</strong>.Newest questions shown "
+"first."
+
+#: templates/backup/unanswered.html:98 templates/tough/unanswered.html:95
+msgid "number of <strong>unanswered</strong> questions"
+msgstr ""
+
+#: templates/backup/user_info.html:44
+msgid "member since"
+msgstr ""
+
+#: templates/backup/user_stats.html:36
+#, python-format
+msgid "the answer has been voted for %(answered_question.vote_count)s times"
+msgstr ""
+
+#: templates/tough/question_retag.html:2
+msgid "Revise tags"
+msgstr ""
+
+#: templates/tough/question_retag.html:37
+msgid "tags are requried"
+msgstr ""
+
+#: templates/tough/question_retag.html:38
+msgid "up to 5 tags, less than 20 characters each"
+msgstr ""
+
+#: templates/tough/question_retag.html:51
+msgid "Change tags"
+msgstr ""
+
+#: templates/tough/question_retag.html:74
+msgid "Change now"
+msgstr ""
+
+#: templates/tough/question_retag.html:85
+msgid "Why use and modify tags?"
+msgstr ""
+
+#: templates/tough/question_retag.html:96
+msgid "tag editors receive special awards from the community"
+msgstr ""
diff --git a/locale/zh-cn/LC_MESSAGES/django.mo b/locale/zh-cn/LC_MESSAGES/django.mo
new file mode 100644
index 00000000..8b8f5bb9
--- /dev/null
+++ b/locale/zh-cn/LC_MESSAGES/django.mo
Binary files differ
diff --git a/locale/zh-cn/LC_MESSAGES/django.po b/locale/zh-cn/LC_MESSAGES/django.po
new file mode 100644
index 00000000..5cad5b51
--- /dev/null
+++ b/locale/zh-cn/LC_MESSAGES/django.po
@@ -0,0 +1,1430 @@
+#author Evgeny Fadeev (evgeny.fadeev@gmail.com)
+#site-specific messages
+msgid "site title"
+msgstr "CNProg.com"
+
+msgid "site slogan"
+msgstr "绋嬪簭鍛橀棶绛旂ぞ鍖"
+
+msgid "meta site keywords, comma separated"
+msgstr "鎶鏈棶绛旂ぞ鍖猴紝涓浗绋嬪簭鍛橈紝缂栫▼鎶鏈ぞ鍖猴紝绋嬪簭鍛樼ぞ鍖猴紝绋嬪簭鍛樿鍧涳紝绋嬪簭鍛榳iki锛岀▼搴忓憳鍗氬"
+
+msgid "meta site content"
+msgstr "涓浗绋嬪簭鍛樼殑缂栫▼鎶鏈棶绛旂ぞ鍖恒傛垜浠仛涓撲笟鐨勩佸彲鍗忎綔缂栬緫鐨勬妧鏈棶绛旂ぞ鍖恒"
+
+msgid "copyright message"
+msgstr "Copyright(c)2009.CNPROG.COM"
+
+msgid "Connect your OpenID with this site"
+msgstr "缁戝畾OpenID"
+
+msgid "Connect your OpenID with your account on this site"
+msgstr "缁戝畾OpenID甯愬彿"
+
+msgid "Your OpenID is accepted. Please complete this to finish the registration. "
+msgstr "鎮ㄧ殑OpenID甯愬彿宸茬粡楠岃瘉閫氳繃! 璇峰畬鎴愭渶鍚庝竴姝 - 缁戝畾OpenID鍒版偍鐨勫笎鍙枫"
+
+#minimal length of user name may be language specific
+msgid "username too short"
+msgstr "鐢ㄦ埛鍚嶅お鐭紝璇蜂娇鐢ㄤ笁涓垨涓変釜浠ヤ笂瀛楃"
+
+#translation and user name validation are language-specific
+msgid "invalid user name"
+msgstr "鐢ㄦ埛鍚嶅彧鑳藉寘鍚嫳鏂囧瓧姣嶃佹暟瀛楀拰涓嬪垝绾"
+
+#chinese translation is domain specific
+msgid "question if off-topic or not relevant"
+msgstr "涓嶆槸缂栫▼鎶鏈棶棰"
+
+msgid "Login name"
+msgstr "鐢ㄦ埛鍚"
+
+msgid "welcome to website!"
+msgstr "CNProg娆㈣繋鎮!"
+
+msgid "what is this website"
+msgstr "CNProg鏄竴涓<strong>闈㈠悜绋嬪簭鍛</strong>鐨勫彲鍗忎綔缂栬緫鐨<strong>寮鏀炬簮浠g爜闂瓟绀惧尯</strong>銆"
+
+msgid "what can one do on this website"
+msgstr "鎮ㄥ彲浠ュ湪杩欓噷鎻愰棶鍚勭被<strong>绋嬪簭鎶鏈棶棰</strong> - 闂涓嶅垎璇█鍜屽钩鍙般 鍚屾椂涔熷笇鏈涙偍瀵瑰姏鎵鑳藉強鐨勯棶棰橈紝缁欎簣鎮ㄧ殑瀹濊吹绛旀銆"
+
+msgid "Goal of this site is..."
+msgstr "CNProg 鏄负浜嗗府鍔╃▼搴忓憳瑙e喅鏇村闂锛屾洿鍔犳柟渚跨殑瑙e喅闂銆"
+
+msgid "how privacy policy can be changed"
+msgstr "鎴戜滑鍙兘鍦ㄤ簨鍏堥氱煡鎴栦笉閫氱煡鐨勬儏鍐典笅闅忔椂鏇存敼姝'闅愮鏀跨瓥'锛屾垜浠缓璁敤鎴锋椂甯告煡鐪婥NProg闅愮鏀跨瓥鐨勬敼鍔紝鍦ㄤ换浣曟敼鍔ㄧ敓鏁堝悗鎮ㄧ殑缁х画璁块棶鍜屼娇鐢ㄦ湰绔欙紝鎴戜滑鍋囪鎮ㄥ凡鍚屾剰浜咰NProg浠ヤ笂鐨勬墍鏈夋潯娆俱"
+
+msgid "general message about privacy"
+msgstr "CNProg鎵胯鐢ㄦ埛闅愮鐨勯噸瑕佹с傛湰鏂囦欢姒傝堪鍦ㄦ偍娴忚CNProg杩囩▼涓墍鎺ユ敹鍜屾敹闆嗙殑涓汉淇℃伅鐨勭绫伙紝浠ュ強CNProg鎵閲囧彇鐨勪繚鎶や俊鎭殑涓浜涙帾鏂姐侰NProg甯屾湜杩欏皢鏈夊姪浜庢偍鍦ㄧ煡鎯呯殑鎯呭喌涓嬶紝灏卞拰鎴戜滑 鍏变韩涓汉淇℃伅鐨勯棶棰樹綔鍑哄喅瀹氥"
+
+msgid "cookie policy details"
+
+msgstr "璁块棶CNProg鏃讹紝鎴戜滑浼氬悜鎮ㄧ殑璁$畻鏈哄彂閫佷竴涓垨澶氫釜涓撻棬鐢ㄤ簬璇嗗埆鎮ㄧ殑娴忚鍣ㄧ殑Cookie锛堝寘鍚竴涓瓧绗︿覆鐨勫皬鏂囦欢锛夈 "
+"浣跨敤 Cookie 鐨勭洰鐨勬槸閫氳繃鍌ㄥ瓨鐢ㄦ埛鍋忓ソ銆佽窡韪敤鎴峰惧悜锛堜緥濡傛悳绱"
+"鏂规硶锛夋潵鎻愰珮鎴戜滑鐨勬湇鍔¤川閲忋傚ぇ澶氭暟娴忚鍣ㄧ殑鍒濆璁剧疆鍧囦负鎺ュ彈 Cookie锛屼絾涔熷彲浠ュ皢鍏堕噸缃负鎷掔粷鎵鏈 Cookie 鎴栧湪鏀跺埌 Cookie 鏃舵彁绀恒備笉杩囷紝濡傛灉绂佺敤 Cookie锛屾煇浜涘姛鑳藉拰鏈嶅姟鍙兘鏃犳硶姝e父杩愯銆"
+
+msgid "details on sharing data with third parties"
+msgstr "CNProg鍙兘浼氭敹闆嗗拰缁熻鐢ㄦ埛璁块棶鏈珯鐨勬鍐垫暟鎹備緥濡傦紝CNProg鍙兘浼氭娴嬬綉绔欐渶娴佽鐨勯儴鍒嗗姛鑳姐侰NProg鍙兘浼氬叕寮鏄剧ず鎴栬呮彁渚涚粰绗笁鏂逛娇鐢ㄨ鏁版嵁銆備絾鏄紝CNProg涓嶄細鍏紑鎮ㄧ殑韬唤淇℃伅銆"
+
+msgid "details on personal information policies"
+msgstr "鍦ㄧ櫥褰曚娇鐢–NProg鐨勬彁闂拰鍥炵瓟鍔熻兘鏃讹紝鎴戜滑瑕佹眰浣跨敤鑰呮彁渚涚敤鎴峰悕銆佸瘑鐮併佺數瀛愰偖浠剁瓑淇℃伅銆侰NProg鏀堕泦杩欑被鍏充簬涓汉韬唤鐨勪俊鎭彧鏄负浜嗙櫥褰曠郴缁熻幏寰椾娇鐢ㄥ姛鑳界殑鐩殑銆傛垜浠笉浼氬悜浠讳綍鍏朵粬绀惧尯鐢 鎴枫佷釜浜烘垨绗笁鏂归忛湶鎮ㄧ殑瀵嗙爜鎴栬呯數瀛愰偖浠朵俊鎭傜敤鎴峰彲浠ラ夋嫨鎬у湴濉啓鐢ㄦ埛璧勬枡銆佷釜浜虹綉绔欍佸勾榫勩佸煄甯傜瓑淇℃伅锛屾垜浠敹闆嗚繖浜涘唴瀹逛负浜嗕娇鐢ㄦ埛鑳藉鏇村鏄撳拰鏇存弧鎰忓湴浣跨敤CNProg鎻愪緵鐨勭綉椤靛拰鏈嶅姟銆"
+
+msgid "Community gives you awards for your questions, answers and votes."
+msgstr "鎻愬嚭闂锛岀粰浜堝洖绛旓紝鎶曞嚭浣犵殑绁 - CNProg 浼氶拡瀵逛綘鍦ㄧぞ鍖虹殑琛ㄧ幇锛屾巿浜堜綘鍚勭被濂栫墝銆"
+
+msgid "what technical information is collected about visitors"
+msgstr "褰撴偍璁块棶鏈綉绔欐垨浣跨敤鎴戜滑鐨勬煇浜涘湪绾挎湇鍔℃椂锛屾湇鍔″櫒浼氳嚜鍔ㄨ褰曚俊鎭紝鍖呮嫭浣嗕笉闄愪簬URL銆両P鍦板潃銆佹祻瑙堝櫒鐨勭被鍨嬨佸睆骞曞垎杈ㄧ巼銆佺郴缁熺被鍨嬪拰浣跨敤鐨勮瑷浠ュ強璁块棶鏃ユ湡鍜屾椂闂淬傛垜浠殑鐩殑鏄负浜嗗悜鎮>鎻愪緵鏇村ソ鐨勭敤鎴锋湇鍔★紝鍖呮嫭鍙兘涓烘偍鎻愪緵瀹氬埗鐨勫湪绾挎湇鍔°"
+
+msgid "please make your answer relevant to this community"
+msgstr "鎮ㄧ殑闂涓庣紪绋嬬浉鍏冲悧锛"
+
+
+#templates/book.html 78
+msgid "reading channel"
+msgstr "璇讳功棰戦亾"
+
+msgid "[author]"
+msgstr "銆愪綔鑰呫"
+
+msgid "[publisher]"
+msgstr "銆愬嚭鐗堢ぞ銆"
+
+msgid "[publication date]"
+msgstr "銆愬嚭鐗堟棩鏈熴"
+
+msgid "[price]"
+msgstr "銆愪环鏍笺"
+
+msgid "[pages]"
+msgstr "銆愰〉鏁般"
+
+msgid "[tags]"
+msgstr "銆愭爣绛俱"
+
+msgid "author blog"
+msgstr "浣滆呭崥瀹"
+
+msgid "book directory"
+msgstr "涔︾睄鐩綍"
+
+msgid "buy online"
+msgstr "缃戜笂璐拱"
+
+msgid "book technical Q&A"
+msgstr "鍥句功鐩稿叧鐨勬妧鏈瓟鐤"
+
+msgid "reader questions"
+msgstr "绛旇鑰呴棶"
+
+msgid "ask the author"
+msgstr "鍚戜綔鑰呮彁闂"
+
+msgid "this question was selected as favorite"
+msgstr "杩欎釜闂琚"
+
+msgid "number of times"
+msgstr "浣嶇敤鎴锋敹钘"
+
+msgid "votes"
+msgstr "绁"
+
+msgid "the answer has been accepted to be correct"
+msgstr "鏈夌瓟妗堝凡琚帴鍙椾负姝g‘绛旀"
+
+msgid "views"
+msgstr "娴忚"
+
+#must have extra space after in english
+msgid "see questions tagged"
+msgstr "鏌ョ湅鏈夊叧"
+
+#book.html line 123 must be empty in english
+msgid "using tags"
+msgstr "鐨勯棶棰"
+
+#this is how above two are supposed to be
+msgid "see questions tagged '%s'"
+msgstr "鏌ョ湅鏈夊叧'%s'鐨勯棶棰"
+
+msgid "subscribe to book RSS feed"
+msgstr "RSS璁㈤槄璇ュ浘涔︽渶鏂伴棶棰"
+
+msgid "subscribe to the questions feed"
+msgstr "璁㈤槄鏈>鏂伴棶棰"
+
+#base_content.html
+msgid "congratulations, community gave you a badge"
+msgstr "鎭枩鎮紝绀惧尯缁欐偍棰佸彂浜嗗鐗"
+
+msgid "see"
+msgstr "鏌ョ湅"
+
+msgid "profile"
+msgstr "涓汉璧勬枡"
+
+#close.html
+msgid "Close question"
+msgstr "鍏抽棴闂"
+
+msgid "Close the question"
+msgstr "鐢变簬浠ヤ笅鍘熷洜锛屼綘瑕佸叧闂繖涓棶棰"
+
+msgid "Reasons"
+msgstr "鍘熷洜"
+
+msgid "OK to close"
+msgstr "纭畾鍏抽棴"
+
+msgid "Cancel"
+msgstr "鍙栨秷"
+
+#footer.html
+msgid "about"
+msgstr "鍏充簬鏈珯"
+
+msgid "faq"
+msgstr "甯歌闂"
+
+msgid "blog"
+msgstr "Blog"
+
+msgid "contact us"
+msgstr "鑱旂郴鎴戜滑"
+
+msgid "privacy policy"
+msgstr "闅愮鏀跨瓥"
+
+msgid "give feedback"
+msgstr "闂鍙嶉"
+
+msgid "current revision"
+msgstr "褰撳墠鐗堟湰"
+
+#index.html
+msgid "community wiki"
+msgstr "绀惧尯Wiki"
+
+msgid "Home"
+msgstr "棣栭〉"
+
+msgid "Questions"
+msgstr "闂鍒楄〃"
+
+msgid "User questions"
+msgstr "涓棶棰"
+
+msgid "newest"
+msgstr "鏈鏂伴棶棰"
+
+msgid "latest questions"
+msgstr "鏈鏂伴棶棰"
+
+msgid " - "
+msgstr "-"
+
+msgid "last updated questions"
+msgstr "鏈鏂版洿鏂扮殑闂"
+
+msgid "hottest"
+msgstr "鐑棬闂"
+
+msgid "hottest questions"
+msgstr "琚洖澶嶆渶澶氱殑闂"
+
+msgid "most voted"
+msgstr "鏈鏈変环鍊肩殑闂"
+
+msgid "most voted questions"
+msgstr "鎶曠エ娆℃暟鏈澶氱殑闂"
+
+msgid "all questions"
+msgstr "鍏ㄩ儴闂"
+
+msgid "answers"
+msgstr "鍥炵瓟"
+
+msgid "Answers"
+msgstr "涓洖绛"
+
+msgid "number of votes"
+msgstr "绁ㄦ暟"
+
+msgid "Recent tags"
+msgstr "鏈鏂版爣绛"
+
+msgid "popular tags"
+msgstr "鍙楁杩庣殑鏍囩"
+
+msgid "Recent awards"
+msgstr "鏈鏂板鐗"
+
+msgid "given to"
+msgstr "鎺堜簣"
+
+msgid "all awards"
+msgstr "鎵鏈夊鐗"
+
+msgid "subscribe to last 30 questions by RSS"
+msgstr "RSS璁㈤槄鏈鏂30涓棶棰"
+
+msgid "Still looking for more? See"
+msgstr "鍦ㄥ鎵炬洿澶氶棶棰樺悧锛熻鏌ラ槄"
+
+msgid "complete list of questions"
+msgstr "鍏ㄩ儴闂鍒楄〃"
+
+msgid "or"
+msgstr "鎴栬"
+
+msgid "."
+msgstr "銆"
+
+msgid "Please help us answer"
+msgstr "璇峰府鍔╂垜浠洖绛"
+
+msgid "unanswered questions"
+msgstr "娌℃湁鍥炵瓟鐨勯棶棰"
+
+msgid "Unanswered questions"
+msgstr "娌℃湁鍥炵瓟鐨勯棶棰"
+
+#revisions_answer.html
+msgid "Revision history"
+msgstr "鐗堟湰鍘嗗彶"
+
+msgid "back"
+msgstr "杩斿洖"
+
+msgid "revision"
+msgstr "鐗堟湰"
+
+msgid "edit"
+msgstr "缂栬緫"
+
+msgid "asked"
+msgstr "鎻愰棶浜"
+
+msgid "updated"
+msgstr "鏇存柊浜"
+
+msgid "Tag list"
+msgstr "鏍囩鍒楄〃"
+
+msgid "by name"
+msgstr "鎸夊悕绉版帓搴"
+
+msgid "sorted alphabetically"
+msgstr "鎸夊悕绉扮殑瀛楁瘝鍏堝悗椤哄簭鎺掑簭"
+
+msgid "by polularity"
+msgstr "鎸夋祦琛岀▼搴︽帓搴"
+
+msgid "sorted by frequency of tag use"
+msgstr "鎸夋爣绛捐浣跨敤鐨勬鏁版帓搴"
+
+msgid "All tags matching query"
+msgstr "鍖归厤鏌ヨ"
+
+msgid "all tags - make this empty in english"
+msgstr "鐨勬墍鏈夋爣绛"
+
+msgid "Nothing found."
+msgstr "娌℃湁鎵惧埌鐩稿叧鏁版嵁銆"
+
+#paginator.html
+msgid "previous"
+msgstr "涓婁竴椤"
+
+msgid "current page"
+msgstr "褰撳墠椤"
+
+msgid "next page"
+msgstr "涓嬩竴椤"
+
+msgid "page number "
+msgstr "绗"
+
+msgid "number - make blank in english"
+msgstr "椤"
+
+msgid "Change tags"
+msgstr "淇敼闂鏍囩"
+
+msgid "tags are required"
+msgstr "鏍囩涓嶈兘涓虹┖銆"
+
+msgid "please use 5 tags or less"
+msgstr "鏈澶氬彧鑳芥湁5涓爣绛"
+
+#todo: remove magic numbers from this file
+msgid "up to 5 tags, less than 20 characters each"
+msgstr "鏈澶5涓爣绛撅紝姣忎釜鏍囩闀垮害灏忎簬20涓瓧绗︺"
+
+msgid "Change now"
+msgstr "鐜板湪淇敼"
+
+#synonym of above in Edit question
+msgid "Save edit"
+msgstr "鐜板湪淇敼"
+
+msgid "uses tags for the classification of questions"
+msgstr "鐢ㄦ爣绛炬潵鍒嗙被绯荤粺鐨勪俊鎭"
+
+msgid "tag editors receive special awards from the community"
+msgstr "淇敼鏍囩鐨勭敤鎴峰皢鎺堜簣鐗规畩鐨勭ぞ鍖哄鐗"
+
+msgid "Why use and modify tags?"
+msgstr "涓轰粈涔堟垜鍙兘淇敼闂鏍囩锛"
+
+msgid "Found by tag"
+msgstr "鏍囩闂"
+
+msgid "Found by title"
+msgstr "鏌ヨ缁撴灉"
+
+msgid "All questions"
+msgstr "鎵鏈夐棶棰"
+
+msgid "active"
+msgstr "娲昏穬闂"
+
+msgid "most recently asked questions"
+msgstr "鏈鏂板姞鍏ョ郴缁熺殑闂"
+
+msgid "most recently updated questions"
+msgstr "鏈杩戣鏇存柊鐨勯棶棰"
+
+msgid "latest questions info"
+msgstr ""
+"闂鎸<strong>鎻愰棶鏃堕棿</strong>鏄剧ず鎺掑簭銆"
+"鏂板姞鍏ョ殑闂灏嗘樉绀哄湪鏈鍓嶉潰銆"
+
+#: templates/questions.html:109
+#, python-format
+msgid ""
+"\n"
+"\t\t\thave total %(q_num)s questions tagged %(tagname)s\n"
+"\t\t\t"
+msgid_plural ""
+"\n"
+"\t\t\thave total %(q_num)s questions tagged %(tagname)s\n"
+"\t\t\t"
+msgstr[0] ""
+"\n"
+"鎮ㄦ鍦ㄦ祻瑙堟墍鏈"
+"<div class=\"questions-count\">%(q_num)s</div>"
+"涓爣璁颁负<span class=\"tag\">%(tagname)s</span></p>"
+msgstr[1] ""
+"\n"
+"鎮ㄦ鍦ㄦ祻瑙堟墍鏈"
+"<div class=\"questions-count\">%(q_num)s</div>"
+"涓爣璁颁负<span class=\"tag\">%(tagname)s</span></p>"
+
+#: templates/questions.html:109
+#, python-format
+msgid ""
+"\n"
+"\t\t\thave total %(q_num)s questions containing %(searchtitle)s\n"
+"\t\t\t"
+msgid_plural ""
+"\n"
+"\t\t\thave total %(q_num)s questions containing %(searchtitle)s\n"
+"\t\t\t"
+msgstr[0] ""
+"\n"
+"鎮ㄦ鍦ㄦ祻瑙堟墍鏈"
+"<div class=\"questions-count\">%(q_num)s</div>"
+"涓爣棰樺惈鏈<span class=\"tag\">%(searchtitle)s</span></p>"
+msgstr[1] ""
+"\n"
+"鎮ㄦ鍦ㄦ祻瑙堟墍鏈"
+"<div class=\"questions-count\">%(q_num)s</div>"
+"涓爣棰樺惈鏈<span class=\"tag\">%(searchtitle)s</span></p>"
+
+#in unanswered.html and somewhere else
+msgid "Have a total of"
+msgstr "鎮ㄦ鍦ㄦ祻瑙堟墍鏈"
+
+msgid "number of questions"
+msgstr "涓"
+
+msgid "number of <strong>unanswered</strong> questions"
+msgstr "涓 <span class=\"darkred\"><strong>娌℃湁鍥炵瓟鐨</strong></span> 闂銆"
+
+msgid "tagged with"
+msgstr "鏍囪涓"
+
+msgid "whose title contains"
+msgstr "鏍囬鍚湁"
+
+msgid "number of questions end of sentence"
+msgstr "鐨勯棶棰樸"
+
+msgid "Questions are sorted by the <strong>time of last update</strong>."
+msgstr "闂鎸<strong>鏈鍚庢洿鏂版椂闂</strong>鏄剧ず鎺掑簭銆"
+
+msgid "Most recently answered ones are shown first."
+msgstr "鏈鍚庤鍥炵瓟鎴栬>鏇存柊鐨勯棶棰樺皢鏄剧ず鍦ㄦ渶鍓嶉潰銆"
+
+msgid "Questions sorted by <strong>number of responses</strong>."
+msgstr "闂鎸<strong>鍥炲鏁伴噺</strong>鏄剧ず鎺掑簭銆"
+
+msgid "Most answered questions are shown first"
+msgstr "鍥炲鏈澶氱殑闂灏嗘樉绀哄湪鏈鍓嶉潰銆"
+
+msgid "Questions are sorted by the <strong>number of votes</strong>."
+msgstr "闂鎸<strong>鎶曠エ鏁伴噺</strong>鏄剧ず鎺掑簭銆"
+
+msgid "Most voted questions are shown first"
+msgstr "鎶曠エ鏈澶氱殑闂灏嗘樉绀哄湪鏈鍓嶉潰銆"
+
+msgid "Related tags"
+msgstr "鐩稿叧鏍囩"
+
+msgid "Reopen question"
+msgstr "閲嶈闂"
+
+msgid "Open the previously closed question"
+msgstr "浣犲皢鎵撳紑杩欎釜宸茬粡琚叧闂殑闂"
+
+msgid "The question was closed for the following reason"
+msgstr "闂鏇句互"
+
+msgid "reason - leave blank in english"
+msgstr "鐨勫師鍥犺"
+
+msgid "on"
+msgstr "浜"
+
+msgid "date closed"
+msgstr "鍏抽棴"
+
+msgid "reopen this question"
+msgstr "纭畾鎵撳紑杩欎釜闂"
+
+msgid "Edit user profile"
+msgstr "淇敼涓汉璧勬枡"
+
+msgid "edit profile"
+msgstr "淇敼璧勬枡"
+
+msgid "image associated with your email address"
+msgstr "鍜屾偍鐨勯偖浠跺湴鍧鏄粦瀹氱殑"
+
+msgid "avatar"
+msgstr "淇敼澶村儚"
+
+msgid "Registered user"
+msgstr "娉ㄥ唽鐢ㄦ埛"
+
+msgid "Update"
+msgstr "鏇存柊"
+
+msgid "User profile"
+msgstr "鐢ㄦ埛姒傝"
+
+msgid "overview"
+msgstr "姒傝"
+
+msgid "recent activity"
+msgstr "鏈杩戞椿鍔"
+
+msgid "comments and answers to others questions"
+msgstr "鍏朵粬鐢ㄦ埛鐨勫洖澶嶅拰璇勮"
+
+msgid "responses"
+msgstr "鍥炲簲"
+
+msgid "reputation history"
+msgstr "绉垎"
+
+msgid "reputation"
+msgstr "绉垎"
+
+msgid "graph of user reputation"
+msgstr "鐢ㄦ埛鐨勭ぞ鍖虹Н鍒嗗巻鍙"
+
+msgid "user vote record"
+msgstr "鐢ㄦ埛鎵鏈夋姇绁"
+
+msgid "casted votes"
+msgstr "鎶曠エ"
+
+msgid "questions that user selected as his/her favorite"
+msgstr "鐢ㄦ埛鏀惰棌鐨勯棶棰"
+
+msgid "users favorite questions"
+msgstr "鐢ㄦ埛鏀惰棌鐨勯棶棰"
+
+msgid "favorites"
+msgstr "鏀惰棌"
+
+msgid "favorite-questions"
+msgstr "鏀惰棌"
+
+msgid "user preference settings"
+msgstr "鐢ㄦ埛鍙傛暟鐨勮缃"
+
+msgid "settings"
+msgstr "璁剧疆"
+
+msgid "preferences"
+msgstr "璁剧疆"
+
+msgid "About"
+msgstr "鍏充簬鏈珯"
+
+msgid "logout"
+msgstr "閫鍑虹櫥褰"
+
+msgid "Logout"
+msgstr "閫鍑虹櫥褰"
+
+msgid "As a registered user you can login with your OpenID, log out of the site or permanently remove your account."
+msgstr "鎮ㄦ槸绯荤粺鐨<strong class=\"darkred\">娉ㄥ唽</strong>鐢ㄦ埛锛屽彲浠ラ殢鏃朵娇鐢∣penID甯愬彿鐧诲綍绯荤粺鎴栬呮敞閿鐧诲綍銆"
+
+msgid "Logout now"
+msgstr "鐐瑰嚮閫鍑虹櫥褰"
+
+msgid "Frequently Asked Questions "
+msgstr "甯歌闂"
+
+msgid "What kinds of questions can I ask here?"
+msgstr "鎴戝彲浠ュ湪杩欓噷鎻愰棶浠涔堟牱鐨勯棶棰橈紵"
+
+msgid "What questions should I avoid asking?"
+msgstr "浠涔堟牱鐨勯棶棰樻垜涓嶈鍦ㄨ繖閲屾彁闂紵"
+
+msgid "Most importanly - questions should be <strong>relevant</strong> to this community."
+msgstr "姣棤鐤戦棶锛岄鍏堝繀椤绘槸<span class=\"yellowbg\">鎶鏈紪绋嬮棶棰橈紒</span>"
+
+msgid "Before asking the question - please make sure to use search to see whether your question has alredy been answered."
+msgstr "鎻愰棶涔嬪墠锛屽厖鍒嗗埄鐢ㄧ郴缁熺殑鑷姩鏌ユ壘銆佹爣绛惧拰鎼滅储锛岀湅鐪嬫槸鍚﹀凡缁忔湁涓鏍风殑闂骞舵湁浜嗙瓟妗堛"
+
+msgid "What should I avoid in my answers?"
+msgstr "浠涔堟牱鐨勫洖绛旀槸涓嶅彈娆㈣繋鐨勶紵"
+
+msgid "Who moderates this community?"
+msgstr "璋佹槸绀惧尯鐨勭鐞嗗憳锛"
+
+msgid "Please avoid asking questions that are not relevant to this community, too subjective and argumentative."
+msgstr "<span class=\"yellowbg\">涓庣▼搴忓憳鎴栨妧鏈棤鍏崇殑锛屽紩璧蜂簤鍚垫垨澶繃浜庝富瑙傛х瓑杩濊儗绀惧尯瀹楁棬鐨勫唴瀹广</span>鏈珯寤虹珛鏄负浜嗗府鍔╁ぇ浼楃▼搴忓憳瑙e喅瀹為檯鎶鏈棶棰橈紝鎴戜滑闇瑕佸疄闄呯殑闂锛"
+
+msgid "is a Q&A site, not a discussion group. Therefore - please avoid having discussions in your answers, comment facility allows some space for brief discussions."
+msgstr "甯屾湜鐢ㄦ埛鎻愪緵閽堝鎻愰棶鐨勬妧鏈洖绛旓紝鍙互鏄繘涓姝ヤ簡瑙i棶棰樺疄璐紝缁欎簣鍙傝冩柟妗堬紝鎴栧畬鍏ㄨВ鍐抽棶棰樼殑鍥炵瓟銆傛垜浠笇鏈涢氳繃闂瓟鐨勫舰寮忚В鍐崇敤鎴风殑瀹為檯闂銆傚洜姝わ紝<span class=\"yellowbg\">鎴戜滑涓>娆㈣繋鍦ㄥ洖绛斾腑鍑虹幇涓嶆槸鍥炵瓟闂鐨勫唴瀹癸紝鍖呮嫭閽堝浠栦汉鍥炵瓟鐨勮璁猴紝鍜屽叾浠栨棤鎰忎箟鐨勬氮璐圭綉缁滆祫婧愯涓</span>銆侰NProg寤鸿鎮ㄤ娇鐢<span class=\"yellowbg\">璇勮</span>鍔熻兘鏉ヨ璁轰綘鐨勬剰瑙佸拰鎯虫硶銆"
+
+msgid "The short answer is: <strong>you</strong>."
+msgstr "绛旀鏄細<span class=\"yellowbg\">姣忎釜鐢ㄦ埛銆</span>"
+
+msgid "The reputation system allows users earn the authorization to perform a variety of moderation tasks."
+msgstr "閫氳繃绉垎杩愪綔锛<span class=\"yellowbg\">姣忎釜鐢ㄦ埛閮芥湁鏉冮檺鍒涘缓鏍囩锛岃繘琛屽鎵鏈夐棶棰樸佸洖绛旂殑鎶曠エ銆佺紪杈戙佸叧闂瓑鎿嶄綔銆</span>"
+
+msgid "This website is moderated by the users."
+msgstr "绀惧尯娌℃湁涓ユ牸鎰忎箟涓婄殑绠$悊鍛樿韩浠"
+
+msgid "How does reputation system work?"
+msgstr "浠涔堟槸绀惧尯绉垎锛"
+
+msgid "Anyone can ask questions and give answers, points are not necessary for that."
+msgstr "瀵逛簬姝e父浣跨敤绀惧尯杩涜鎻愰棶銆佸洖绛旇岃█锛岀Н鍒嗕笉鏄繀椤荤殑銆"
+
+msgid "As we've said before, users help running this site. Point system helps select users who can administer this community."
+msgstr "鎴戜滑涓鍐嶅0鏄庯紝CNProg鐢变綘鏉ヨ繍琛屽拰缁存姢銆傚鏋滀綘鎯冲府鍔╂垜浠潵杩愪綔CNProg锛屼綘闇瑕佷竴瀹氱殑绉垎绛夌骇銆"
+
+msgid "Reputation points roughly measure how community trusts you. These points are given to you directly by other members of the community."
+msgstr "<span class=\"yellowbg\">绉垎鏄竴绉嶇敤鏉ョ矖鐣ヨ 閲忕ぞ鍖哄浣犳湁澶氫俊浠荤殑鏁版嵁銆</span>绉垎涓嶆槸鏈夎皝鏉ユ敮浠樻垨鐩存帴缁欎簣浣犵殑锛岃屾槸浣犻氳繃鑾峰緱鍏朵粬鐢ㄦ埛鐨勬敮鎸佸拰淇′换鈥滆禋寰椻濈殑銆"
+
+msgid "For example, if you ask an interesting question or give a helpful answer, your input will be upvoted and you will gain more trust in the community."
+msgstr "涓句緥鏉ヨ锛屽鏋滀綘鎻愪簡涓涓潪甯告湁甯姪鐨勯棶棰樻垨鑰呭仛浜嗗緢鏈夌敤鐨勫洖绛旓紝浣犲皢浼氳鍏朵粬鐢ㄦ埛鎶曡禐鎴愮エ銆"
+
+msgid "If on the other hand someone gives a misleading answer, the answer will be voted down and he/she loses some points."
+msgstr "鐩稿弽锛屼綘鎻愪簡涓嶅彈娆㈣繋鐨勯棶棰橈紝鎴栬呰瀵肩敤鎴风殑鍥炵瓟锛屼綘灏嗗彲鑳借鍏朵粬鐢ㄦ埛鎶曞弽瀵圭エ銆傛瘡涓禐鎴"
+
+msgid "Each vote in favor will generate <strong>10</strong> points, each vote against will subtract <strong>2</strong> points."
+msgstr "绁ㄤ細甯綘浜х敓<strong>10</strong>涓ぞ鍖虹Н鍒嗭紝姣忎釜鍙嶅绁ㄤ細鐩稿簲鎵i櫎浣<strong>2</strong>涓Н鍒嗐"
+
+msgid "Through the votes of other people you can accumulate a maximum of <strong>200</strong> points."
+msgstr "姣忓ぉ閫氳繃鍒汉鎶曡禐鎴愮エ锛屼綘鏈澶氬彧鑳戒骇鐢<strong>200</strong>涓Н鍒嗭紝杩欐槸涓婇檺銆"
+
+msgid "After accumulating certain number of points, you can do more:"
+msgstr "褰撲綘绱鍒颁竴瀹>绉垎锛屼綘鍙互鍦ㄧぞ鍖哄仛鏇村鐨勪簨鎯咃細"
+
+msgid "upvote"
+msgstr "鎶曡禐鎴愮エ"
+
+msgid "use tags"
+msgstr "鏍囪鍨冨溇甯"
+
+msgid "add comment"
+msgstr "娣诲姞璇勮"
+
+#todo - check if it's indeed plural
+msgid "add comments"
+msgstr "娣诲姞璇勮"
+
+msgid "comments"
+msgstr "璇勮"
+
+msgid "downvote"
+msgstr "鎶曞弽瀵圭エ"
+
+msgid "retag questions"
+msgstr "缁欎换浣曢棶棰樻暣鐞嗘爣绛"
+
+msgid "edit community wiki questions"
+msgstr "缂栬緫wiki绫婚棶棰"
+
+msgid "edit any answer"
+msgstr "缂栬緫浠讳綍闂鎴栫瓟妗"
+
+msgid "reopen any closed questions"
+msgstr "鎵撳紑鍏抽棴浠讳綍浜虹殑闂"
+
+msgid "delete any comment"
+msgstr "鍒犻櫎浠讳綍涓涓瘎璁"
+
+msgid "delete any questions and answers and perform other moderation tasks"
+msgstr "鍒犻櫎浠讳綍涓涓棶棰樻垨绛旀锛屽強鍏朵粬绠$悊鍔熻兘"
+
+msgid "To register, do I need to create new password?"
+msgstr "鎴戦渶瑕佹敞鍐屼竴涓柊鐢ㄦ埛鍚楋紵"
+
+msgid "Why other people can edit my questions/answers?"
+msgstr "涓轰粈涔堝叾浠栦汉鍙互淇敼鎴戠殑闂/鍥炵瓟锛"
+
+msgid "Still have questions?"
+msgstr "杩樻湁鍏朵粬闂锛"
+
+msgid "Please ask your question, help make our community better!"
+msgstr "濡傛灉鎮ㄥ绀惧尯杩樻湁鍏朵粬鐤戦棶锛岃涓璧锋潵瀹屽杽鎴戜滑鐨"
+
+msgid "No, you don't have to. You can login through any service that supports OpenID, e.g. Google, Yahoo, AOL, etc."
+msgstr "涓嶉渶瑕併傜ぞ鍖烘彁渚涗簡OpenID鐨勭櫥褰曟敮鎸侊紝浣犺鐢℅oogle銆乊ahoo绛変换浣曟敮鎸丱penID鐧诲綍鐨勫笎鍙峰氨鍙互浣跨敤绯荤粺銆"
+
+msgid "Login now!"
+msgstr "椹笂鐧诲綍"
+
+msgid "Login"
+msgstr "鐧诲綍"
+
+msgid "So questions and answers can be edited like wiki pages by experienced users of this site and this improves the overall quality of the knowledge base content."
+msgstr "鎵浠ラ棶棰樺拰绛旀閮芥槸濡俉iki涓鏍峰彲缂栬緫鐨勶紝鎴戜滑甯屾湜绀惧尯鑳藉府鍔╃敤鎴锋矇娣銆佺Н绱洿澶氭湁鐢ㄧ殑鐭ヨ瘑鍜岀粡楠屻"
+
+msgid "If this approach is not for you, we respect your choice."
+msgstr "濡傛灉鎮ㄤ笉鍠滄杩欑鏂瑰紡锛屾垜浠皧閲嶄綘鐨勯夋嫨銆"
+
+msgid "Privacy policy"
+msgstr "闅愮鏀跨瓥"
+
+msgid "Site Visitors"
+msgstr "缃戠珯璁块棶鑰"
+
+msgid "Personal Information"
+msgstr "涓汉韬唤淇℃伅"
+
+msgid "Other Services"
+msgstr "鍏朵粬鏈嶅姟"
+
+msgid "Policy Changes"
+msgstr "鏀跨瓥鏇存敼"
+
+msgid "Sorry, could not find the page you requested."
+msgstr "瀵逛笉璧凤紝娌℃湁鎵惧埌鎮ㄨ姹傜殑椤甸潰锛"
+
+msgid "This might have happened for the following reasons:"
+msgstr "鏈夊彲鑳芥槸浠ヤ笅鍘熷洜瀵艰嚧锛"
+
+msgid "this question or answer has been deleted;"
+msgstr "浣犳鍦ㄦ煡鐪嬬殑闂鎴栬呭洖绛斿凡缁忚鍒犻櫎锛"
+
+msgid "url has error - please check it;"
+msgstr "璇锋眰鐨勫湴鍧鏈夎 - 璇锋牳瀹炲師濮婾RL鍦板潃锛"
+
+msgid "the page you tried to visit is protected or you don't have sufficient points, see"
+msgstr "璁块棶鐨勯〉闈㈣淇濇姢鎴栦綘鐨勭Н鍒嗕笉澶燂紝鍙傝"
+
+msgid "if you believe this error 404 should not have occured, please"
+msgstr "濡傛灉浣犵‘淇′笉璇ュ嚭鐜404閿欒锛岃"
+
+msgid "report this problem"
+msgstr "鎶ュ憡杩欎釜闂"
+
+msgid "back to previous page"
+msgstr "杩斿洖鍓嶉〉"
+
+msgid "see all questions"
+msgstr "鏌ョ湅鏈鏂伴棶棰"
+
+msgid "see all tags"
+msgstr "鏌ョ湅鏍囩鍒楄〃"
+
+msgid "Edit answer"
+msgstr "淇敼鍥炵瓟"
+
+msgid "hide preview"
+msgstr "绂佺敤棰勮"
+
+msgid "show preview"
+msgstr "鍚敤棰勮"
+
+msgid "select revision"
+msgstr "閫夋嫨鐗堟湰"
+
+msgid "Toggle the real time Markdown editor preview"
+msgstr "鎵撳紑鎴栬呭叧闂璏arkdown缂栬緫鍣ㄧ殑瀹炴椂棰勮"
+
+msgid "toggle preview"
+msgstr "棰勮寮鍏"
+
+msgid "question tips"
+msgstr "鍙楁杩庣殑鎻愰棶"
+
+msgid "answer tips"
+msgstr "鍙楁杩庣殑鎻愰棶"
+
+msgid "try to give an answer, rather than engage into a discussion"
+msgstr "寤鸿鎮ㄦ彁鐨勯棶棰樻槸鍙互琚瓟澶嶇殑锛岃屼笉浠呬粎鏄彲浠ヨ璁恒"
+
+msgid "please try to provide details"
+msgstr "璇疯缁嗘弿杩版偍鐨勯棶棰樸"
+
+msgid "be clear and concise"
+msgstr "鎴戜滑鎺ㄨ崘鎮ㄤ娇鐢ㄤ腑鏂囨弿杩伴棶棰橈紝杩欐牱鍙互寰楀埌鏇村鐨勭瓟澶嶆満浼氥"
+
+msgid "see frequently asked questions"
+msgstr "鏌ョ湅甯歌闂"
+
+msgid "learn more about Markdown"
+msgstr "鏈夊叧Markdown璇︾粏璇存槑"
+
+msgid "basic HTML tags are also supported"
+msgstr "鍩烘湰鐨凥TML鏍囩涔熸槸鏀寔鐨"
+
+msgid "numbered list:"
+msgstr "鍒楄〃锛"
+
+msgid "image"
+msgstr "鍥剧墖"
+
+msgid "text"
+msgstr "鏂囨湰"
+
+msgid "title"
+msgstr "鏍囬"
+
+msgid "Markdown tips"
+msgstr "Markdown蹇熷弬鑰"
+
+msgid "*italic* or _italic_"
+msgstr "*鏂滀綋* 鎴栬 _鏂滀綋_"
+
+msgid "**bold** or __bold__"
+msgstr "**鍔犵矖** 鎴栬 __鍔犵矖__ "
+
+msgid "link"
+msgstr "閾炬帴"
+
+msgid "Badge"
+msgstr "濂栫墝"
+
+msgid "The users have been awarded with badges:"
+msgstr "鐢ㄦ埛宸茶鎺堜簣璇ュ鐗岋細"
+
+msgid "posts per page"
+msgstr "姣忛〉鏄剧ず"
+
+msgid "i like this post (click again to cancel)"
+msgstr "杩欑瘒甯栧瓙鏈変环鍊硷紙鍐嶆鐐瑰嚮鍙栨秷鎿嶄綔锛"
+
+msgid "i like this answer (click again to cancel)"
+msgstr "杩欑瘒甯栧瓙鏈変环鍊硷紙鍐嶆鐐瑰嚮鍙栨秷鎿嶄綔锛"
+
+msgid "current number of votes"
+msgstr "褰撳墠鎬荤エ鏁"
+
+msgid "i dont like this post (click again to cancel)"
+msgstr "杩欑瘒甯栧瓙娌℃湁浠峰硷紙鍐嶆鐐瑰嚮鍙栨秷鎿嶄綔锛"
+
+msgid "i dont like this answer (click again to cancel)"
+msgstr "杩欑瘒甯栧瓙娌℃湁浠峰硷紙鍐嶆鐐瑰嚮鍙栨秷鎿嶄綔锛"
+
+msgid "mark this question as favorite (click again to cancel)"
+msgstr "鎴戣鏀惰棌杩欎釜闂锛堝啀娆$偣鍑诲彇娑堟搷浣滐級"
+
+msgid "remove favorite mark from this question (click again to restore mark)"
+msgstr "鎴戣鏀惰棌杩欎釜闂锛堝啀娆$偣鍑诲彇娑堟搷浣滐級"
+
+msgid "delete"
+msgstr "鍒犻櫎"
+
+#todo please check this in chinese
+msgid "undelete"
+msgstr "鍙栨秷"
+
+#: templates/unanswered.html:98
+#, python-format
+msgid "have %(num_q)s unanswered questions"
+msgstr ""
+"鎮ㄦ鍦ㄦ祻瑙堟墍鏈<br>"
+"<div class=\"questions-count\">%(num_q)s</div>"
+"涓<p>闂鎸 <strong>闂鍒涘缓鏃堕棿</strong> 鎺掑簭銆傛渶鏂板姞鍏ョ殑闂灏嗘樉绀哄湪鏈鍓嶉潰銆</p>"
+
+msgid "Change password"
+msgstr "淇敼瀵嗙爜"
+
+msgid "Change email"
+msgstr "鏇存崲鐢靛瓙閭欢"
+
+msgid "Change OpenID"
+msgstr "鏇存崲OpenID鍦板潃"
+
+msgid "Delete account"
+msgstr "鍒犻櫎甯愬彿"
+
+msgid "User login"
+msgstr "鐢ㄦ埛鐧诲綍"
+
+msgid "we support two login modes"
+msgstr "CNProg鏀寔<b>涓ょ</b>鐧诲綍妯″紡銆傛偍鍙互浣跨敤甯愬彿銆佸瘑鐮佺櫥褰曪紝鎴栬呬娇鐢∣penID鐧诲綍銆"
+
+msgid "Login with your OpenID"
+msgstr "浣跨敤OpenID鐧诲綍"
+
+msgid "select openid provider"
+msgstr "1)璇烽夋嫨鎮ㄧ殑甯愬彿绫伙細"
+
+msgid "verify openid link and login"
+msgstr "2)鍨嬪苟瀹屾垚姝g‘鐨凮penID鍦板潃锛堝锛氭浛鎹⑩渰username}鈥濅负鎮ㄧ殑瀵瑰簲甯愬彿锛夛細"
+
+msgid "reopen"
+msgstr "鎵撳紑"
+
+msgid "close"
+msgstr "鍏抽棴"
+
+msgid "report as offensive (i.e containing spam, advertising, malicious text, etc.)"
+msgstr "妫涓捐甯栦负鍨冣滄按甯栤濓紙鍚箍鍛娿佷汉韬敾鍑汇佹伓鎰忚█璁虹瓑锛"
+
+msgid "flag offensive"
+msgstr "鍨冨溇甯栵紵"
+
+msgid "login"
+msgstr "鐧诲綍"
+
+msgid "back to home page"
+msgstr "鍥炲埌棣栭〉"
+
+msgid "questions"
+msgstr "闂"
+
+msgid "tags"
+msgstr "鏍囩"
+
+msgid "users"
+msgstr "鐢ㄦ埛"
+
+msgid "books"
+msgstr "璇讳功"
+
+msgid "badges"
+msgstr "濂栫墝姒"
+
+msgid "my profile"
+msgstr "鎴戠殑璧勬枡"
+
+msgid "ask a question"
+msgstr "鎴戣鎻愰棶"
+
+msgid "Ask a question"
+msgstr "鎴戣鎻愰棶"
+
+msgid "search"
+msgstr "鎼滅储"
+
+msgid "update profile"
+msgstr "鏇存柊鎴戠殑璧勬枡"
+
+msgid "real name"
+msgstr "濮撳悕"
+
+msgid "member for"
+msgstr "宸插姞鍏"
+
+msgid "ago"
+msgstr "鍓"
+
+msgid "last seen"
+msgstr "涓婃娲诲姩鏃堕棿"
+
+msgid "user website"
+msgstr "涓汉缃戠珯"
+
+msgid "location"
+msgstr "鍩庡競"
+
+#user_info.html
+msgid "age"
+msgstr "骞撮緞"
+
+msgid "age unit"
+msgstr "宀"
+
+msgid "todays unused votes"
+msgstr "浠婃棩鍓╀綑鎶曠エ鏁"
+
+msgid "votes left"
+msgstr "绁"
+
+msgid "this answer has been selected as correct"
+msgstr "璇ュ洖绛斿凡琚涓烘渶浣崇瓟妗"
+
+msgid "the answer has been voted for %d times"
+msgstr "璇ュ洖绛旀诲叡鏈%d涓姇绁"
+
+msgid "the answer has been commented %d times"
+msgstr "璇ュ洖绛旀湁%d鏉¤瘎璁"
+
+msgid "votes total"
+msgstr "涓姇绁"
+
+msgid "user has voted up this many times"
+msgstr "璇ョ敤鎴锋姇鐨勮禐鎴愮エ鎬绘暟"
+
+msgid "user has voted down this many times"
+msgstr "鐢ㄦ埛鎶曠殑鍙嶅绁ㄦ绘暟"
+
+msgid "Tags"
+msgstr "涓爣绛"
+
+msgid "see other questions tagged '%s'"
+msgstr "鏌ョ湅鏈夊叧'%s'鐨勯棶棰"
+
+msgid "Badges"
+msgstr "鏋氬鐗"
+
+msgid "Badge summary"
+msgstr "濂栫墝鍒楄〃"
+
+msgid "Users"
+msgstr "鐢ㄦ埛鍒楄〃"
+
+msgid "recent"
+msgstr "鏈鏂板姞鍏"
+
+msgid "oldest"
+msgstr "鏈鍏堝姞鍏"
+
+msgid "by username"
+msgstr "鐢ㄦ埛鍚"
+
+msgid "user name"
+msgstr "鐢ㄦ埛鍚"
+
+msgid "users matching query %s:"
+msgstr "鍖归厤鏌ヨ '<span class=\"darkred\"><strong>%s</strong></span>' 鐨勬墍鏈夌敤鎴峰悕锛"
+
+msgid "Below is the list of available badges and number of times each type of badge has been awarded."
+msgstr "杩欓噷鍒楀嚭绀惧尯鎵鏈夌殑濂栫墝锛屼互鍙婂埌鐩墠涓烘锛屾瘡涓鐗岃鎺堜簣鐨勭敤鎴蜂汉鏁般"
+
+msgid "Community badges"
+msgstr "绀惧尯濂栫墝"
+
+msgid "gold badge: the highest honor and is very rare"
+msgstr "閲戠墝:鍗佸垎缃曡涔嬫渶楂樿崳鑰"
+
+msgid "silver badge: occasionally awarded for the very high quality contributions"
+msgstr "閾剁墝:鍋跺皵棰佸彂涔嬩紭璐ㄥ绔"
+
+msgid "gold"
+msgstr "閲戠墝"
+
+msgid "Gold badge is very rare."
+msgstr "閲戠墝鏄崄鍒嗙綍瑙佺殑銆"
+
+msgid "To obtain it you have to show profound knowledge and ability in addition to actively participating in the community."
+msgstr "浣犱笉浠呰鍙備笌绀惧尯鐨勬彁闂佸洖绛斻佹姇绁ㄧ瓑娲诲姩锛岃屼笖闇瑕佹湁楂樻繁鐨勭煡璇嗗拰鑳藉姏鎵嶈兘鑾峰緱銆"
+
+msgid "Gold badge is the highest award in this community."
+msgstr "鑾峰緱閲戠墝鎰忓懗鐫浣犲湪鏌愪釜灞傛涓婂凡缁忚揪鍒颁簡椤跺嘲銆"
+
+msgid "silver"
+msgstr "閾剁墝"
+
+msgid "Obtaining silver badge requires significant patience."
+msgstr "閾剁墝闇瑕佺粡杩囬暱鏃堕棿鐨勫鏂楁墠鑳借幏寰椼"
+
+msgid "If you got one, you have very significantly contributed to this community"
+msgstr "瀹冩槸涓嶅悓瀵诲父鐨勮崳瑾夛紝鍙浣犱粯鍑鸿冻澶熺殑鍔姏灏变細寰楀埌銆"
+
+msgid "bronze badge: often given as a special honor"
+msgstr "閾滅墝:鏃跺父鎺堜簣涔嬬壒娈婅崳瑾"
+
+msgid "If you are active in this community, you will will get this medal - still it is a special honor."
+msgstr "閾滅墝浼氬湪浣犳椿璺冧簬绀惧尯鏃朵骇鐢燂紝瀹冪浉瀵瑰鏄撹幏寰楋紝浣嗕篃鏄竴绉嶇壒娈婄殑鑽h獕銆"
+
+msgid "Use"
+msgstr "浣跨敤"
+
+msgid "learn more about OpenID"
+msgstr "浜嗚В鏇村鏈夊叧OpenID鐨勪俊鎭"
+
+msgid "Get your own"
+msgstr "鑾峰彇鎮ㄨ嚜宸辩殑"
+
+msgid "User name"
+msgstr "鎮ㄧ殑澶у悕"
+
+msgid "Email: (won't be shown to anyone)"
+msgstr "鐢靛瓙閭欢:锛堜笉浼氬叕寮鏄剧ず锛"
+
+msgid "Ask your question"
+msgstr "鐜板湪鎻愰棶"
+
+#page title
+msgid "Edit question"
+msgstr "淇敼闂"
+
+msgid "The question has been closed for the following reason \"%s\" by"
+msgstr "闂浠モ%s鈥濈殑鍘熷洜宸茶"
+
+msgid "%s ago"
+msgstr "浜%s<font class=\"darkred\">鍏抽棴</font>"
+
+msgid "oldest answers"
+msgstr "鏈鍏堝洖绛"
+
+msgid "newest answers"
+msgstr "鏈杩戝洖绛"
+
+msgid "popular answers"
+msgstr "鎶曠エ鏈澶"
+
+msgid "oldest answers will be shown first"
+msgstr "鏈鍏堝洖绛旀樉绀哄湪鏈鍓嶉潰"
+
+msgid "newest answers will be shown first"
+msgstr "鏈鏅氬洖绛旀樉绀哄湪鏈鍓嶉潰"
+
+msgid "most voted answers will be shown first"
+msgstr "鎶曠エ娆℃暟鏈澶氱殑鏄剧ず鍦ㄦ渶鍓嶉潰"
+
+msgid "mark this answer as favorite (click again to undo)"
+msgstr "鏈浣崇瓟妗堬紙鍐嶆鐐瑰嚮鍙栨秷鎿嶄綔锛"
+
+msgid "the author of the question has selected this answer as correct"
+msgstr "杩欎釜绛旀宸茬粡琚彁闂綔鑰呮爣璁颁负鏈浣崇瓟妗"
+
+msgid "answer permanent link"
+msgstr "璇ュ洖绛旂殑閾炬帴鍦板潃"
+
+msgid "permanent link"
+msgstr "姘镐箙閾炬帴"
+
+msgid "Your answer"
+msgstr "鎮ㄧ殑鍥炵瓟"
+
+msgid "Answer the question"
+msgstr "鍥炵瓟璇ラ棶棰"
+
+msgid "Login to answer"
+msgstr "鐧诲綍骞跺洖绛旇闂"
+
+msgid "Question tags"
+msgstr "鎮ㄦ鍦ㄦ祻瑙堢殑闂鍚湁浠ヤ笅鏍囩"
+
+msgid "Question asked"
+msgstr "鎻愰棶鏃堕棿"
+
+msgid "question was seen"
+msgstr "鐩墠娴忚鏁伴噺"
+
+msgid "times"
+msgstr "娆"
+
+msgid "last updated"
+msgstr "鏈鍚庢洿鏂版椂闂"
+
+msgid "related questions"
+msgstr "鐩镐技鐨勯棶棰"
+
+msgid "profile - responses"
+msgstr "鍥炲簲 - 鐢ㄦ埛璧勬枡"
+
+msgid "user reputation in the community"
+msgstr "鐢ㄦ埛绀惧尯绉垎"
+
+msgid "profile - user reputation"
+msgstr "绉垎 - 鐢ㄦ埛璧勬枡"
+
+msgid "profile - favorite questions"
+msgstr "鏀惰棌 - 鐢ㄦ埛璧勬枡"
+
+msgid "profile - votes"
+msgstr "鎶曠エ - 鐢ㄦ埛璧勬枡"
+
+msgid "profile - user preferences"
+msgstr "璁剧疆 - 鐢ㄦ埛璧勬枡"
+
+msgid "uploading images is limited to users with >60 reputation points"
+msgstr "涓婁紶鍥剧墖鍙檺浜庣Н鍒+60浠ヤ笂娉ㄥ唽鐢ㄦ埛!"
+
+#todo take these out of settings
+msgid "allowed file types are 'jpg', 'jpeg', 'gif', 'bmp', 'png', 'tiff'"
+msgstr "鍙厑璁镐笂浼'jpg', 'jpeg', 'gif', 'bmp', 'png', 'tiff'绫诲瀷鐨勬枃浠讹紒"
+
+msgid "maximum upload file size is %sK"
+msgstr "鍙厑璁镐笂浼%sK澶у皬鐨勬枃浠讹紒"
+
+msgid "Error uploading file. Please contact the site administrator. Thank you."
+msgstr "鍦ㄦ枃浠朵笂浼犺繃绋嬩腑浜х敓浜嗛敊璇紝璇疯仈绯荤鐞嗗憳锛岃阿璋_^"
+
+msgid "please enter a descriptive title for your question"
+msgstr "璇疯緭鍏ュ闂鍏锋湁鎻忚堪鎬ц川鐨勬爣棰 - 鈥滃府蹇欙紒绱фユ眰鍔╋紒鈥濅笉鏄缓璁殑鎻愰棶鏂瑰紡銆"
+
+msgid "title must be > 10 characters"
+msgstr "鏍囬鐨勯暱搴﹀繀椤诲ぇ浜10"
+
+msgid "content"
+msgstr "鍐呭"
+
+msgid "question content must be > 10 characters"
+msgstr "鍐呭鑷冲皯瑕10涓瓧绗"
+
+msgid "please use space to separate tags (this enables autocomplete feature)"
+msgstr "澶氫釜鏍囩璇风敤绌烘牸闂撮殧-鏈澶5涓爣绛俱傦紙浼樺厛浣跨敤鑷姩鍖归厤鐨勮嫳鏂囨爣绛俱傦級"
+
+msgid "tags must be shorter than 20 characters"
+msgstr "姣忎釜鏍囩鐨勯暱搴︿笉瓒呰繃20"
+
+msgid "please use following characters in tags: letters 'a-z', numbers, and characters '.-_#'"
+msgstr "鏍囩璇蜂娇鐢ㄨ嫳鏂囧瓧姣嶏紝涓枃鎴栬呮暟瀛楀瓧绗︿覆锛. - _ # 涔熷彲浠ワ級"
+
+msgid "if you choose community wiki option, the question and answer do not generate points and name of author will not be shown"
+msgstr "閫夋嫨绀惧尯wiki妯″紡锛岄棶绛斾笉璁$畻绉垎锛岀鍚嶄篃涓嶆樉绀轰綔鑰呬俊鎭"
+
+msgid "update summary:"
+msgstr "鏇存柊姒傝锛"
+
+msgid "enter a brief summary of your revision (e.g. fixed spelling, grammar, improved style, this field is optional)"
+msgstr "杈撳叆鏈淇敼鐨勭畝鍗曟杩帮紙濡傦細淇敼浜嗗埆瀛楋紝淇浜嗚娉曪紝鏀硅繘浜嗘牱寮忕瓑銆傞潪蹇呭~椤广傦級"
+
+msgid "this email does not have to be linked to gravatar"
+msgstr "涓嶄細鍏紑锛岀敤浜庡ご鍍忔樉绀烘湇鍔"
+
+msgid "Real name"
+msgstr "鐪熷疄濮撳悕"
+
+msgid "Website"
+msgstr "涓汉缃戠珯"
+
+msgid "Location"
+msgstr "鍩庡競"
+
+msgid "Date of birth"
+msgstr "鐢熸棩"
+
+msgid "will not be shown, used to calculate age, format: YYYY-MM-DD"
+msgstr "涓嶄細鍏紑锛屽彧浼氭樉绀烘偍鐨勫勾榫勶紝鏍煎紡涓猴細YYYY-MM-DD"
+
+msgid "Profile"
+msgstr "涓汉绠浠"
+
+msgid "this email has already been registered, please use another one"
+msgstr "璇ョ數瀛愰偖浠跺凡琚敞鍐岋紝璇烽夋嫨鍙︿竴涓啀璇曘"
+
+msgid "duplicate question"
+msgstr "瀹屽叏閲嶅鐨勯棶棰"
+
+msgid "too subjective and argumentative"
+msgstr "澶富瑙傛с佸紩璧蜂簤鍚电殑闂"
+
+msgid "is not an answer to the question"
+msgstr "涓嶆槸涓涓彲浠ュ洖绛旂殑鈥滈棶棰樷"
+
+msgid "the question is answered, right answer was accepted"
+msgstr "闂宸茬粡瑙e喅锛屽凡寰楀埌姝g‘绛旀"
+
+msgid "problem is not reproducible or outdated"
+msgstr "宸茬粡杩囨椂銆佷笉鍙噸鐜扮殑闂"
+
+msgid "question contains offensive inappropriate, or malicious remarks"
+msgstr "鎭舵剰瑷璁"
+
+msgid "spam or advertising"
+msgstr "鍨冨溇骞垮憡"
+
+msgid "question"
+msgstr "鎻愰棶"
+
+msgid "answer"
+msgstr "鍥炵瓟"
+
+msgid "commented question"
+msgstr "璇勮闂"
+
+msgid "edited question"
+msgstr "淇敼闂"
+
+msgid "edited answer"
+msgstr "淇敼鍥炵瓟"
+
+msgid "received award"
+msgstr "鑾峰"
+
+msgid "marked best answer"
+msgstr "鏍囪鏈浣崇瓟妗"
+
+msgid "upvoted"
+msgstr "鎶曡禐鎴愮エ"
+
+msgid "downvoted"
+msgstr "鎶曞弽瀵圭エ"
+
+msgid "canceled vote"
+msgstr "鎾ら攢鎶曠エ"
+
+msgid "deleted question"
+msgstr "鍒犻櫎闂"
+
+msgid "deleted answer"
+msgstr "鍒犻櫎鍥炵瓟"
+
+msgid "marked offensive"
+msgstr "鏍囪鍨冨溇甯"
+
+msgid "updated tags"
+msgstr "鏇存柊鏍囩"
+
+msgid "selected favorite"
+msgstr "鏀惰棌"
+
+msgid "completed user profile"
+msgstr "瀹屾垚涓汉鎵鏈夎祫鏂"
+
+msgid "[closed]"
+msgstr "[宸插叧闂璢"
+
+msgid "[deleted]"
+msgstr "[宸插垹闄"
+
+msgid "initial version"
+msgstr "鍒濆鐗堟湰"
+
+msgid "retagged"
+msgstr "鏇存柊浜嗘爣绛"
+
+#todo: review this message may be confusing user
+msgid "This account already exists, please use another."
+msgstr "杈撳叆鎮ㄧ殑鏂板笎鍙锋垨鑰呮寚瀹氬凡缁忓瓨鍦ㄧ殑甯愬彿銆"
+
+msgid "Sorry, looks like we have some errors:"
+msgstr "璇锋敞鎰忎互涓嬮敊璇細"
+
+msgid "New account"
+msgstr "鏂板笎鍙"
+
+msgid "Use login name and password"
+msgstr "浣跨敤甯愬彿瀵嗙爜鐧诲綍"
+
+msgid "User name (<i>will be shown to others, cannot be modified</i>)"
+msgstr "鐢ㄦ埛鍚嶏紙<i>鍦ㄧぞ鍖烘樉绀哄弸濂藉悕绉帮紝涓嶅彲鏇存敼</i>锛"
+
+msgid "Email (<i>not shared with anyone</i>)"
+msgstr "鐢靛瓙閭欢锛<i>鐢ㄤ簬澶村儚鏄剧ず鏈嶅姟</i>锛"
+
+msgid "create account"
+msgstr "鍒涘缓甯愬彿"
+
+msgid "Existing account"
+msgstr "宸茬粡瀛樺湪鐨勭敤鎴"
+
+msgid "password"
+msgstr "瀵嗙爜"
+
+msgid "Password"
+msgstr "瀵嗙爜"
+
+msgid "Register"
+msgstr "纭"
+
+msgid "Forgot your password?"
+msgstr "蹇樿瀵嗙爜锛"
+
+msgid "Create new account"
+msgstr "娉ㄥ唽鏂板笎鍙"
+
+msgid "Send new password"
+msgstr "鍙戦佹柊瀵嗙爜"
+
+msgid "Lost your password? No problem - here you can reset it."
+msgstr "涓㈠け浜嗘偍鐨勫瘑鐮侊紵 浣犲彲浠ュ湪杩欓噷閲嶈瀵嗙爜銆"
+
+msgid "Please enter your username below and new password will be sent to your registered e-mail"
+msgstr "璇疯緭鍏ョ敤鎴峰悕锛屾柊鐨勫瘑鐮佷細鍙戦佸埌浣犳敞鍐屾椂鍊欏~鍐欑殑鐢靛瓙閭欢銆"
+
+msgid "Reset password"
+msgstr "閲嶈瀵嗙爜"
+
+msgid "return to login"
+msgstr "杩斿洖鐧诲綍"
+
+msgid "back to login"
+msgstr "杩斿洖鐧诲綍"
+
+#todo - check translation or see if it's indeed true
+msgid "Note: your new password will be activated only after you click the activation link in the email message"
+msgstr "娉ㄦ剰: 鏂扮殑瀵嗙爜鍙湁鎮ㄥ湪婵娲婚偖浠朵腑鐨勯摼鎺ュ悗鎵嶄細琚縺娲汇"
+
+msgid "Signup"
+msgstr "娉ㄥ唽甯愬彿"
+
+msgid "We support two types of user registration: conventional username/password, and"
+msgstr "鎴戜滑鏀寔涓ょ娉ㄥ唽鏂瑰紡锛屼綘鍙互浣跨敤甯歌鐨勭敤鎴峰悕銆佸瘑鐮佹柟寮忔敞鍐岋紝鎴栬"
+
+msgid "the OpenID method"
+msgstr "浣跨敤OpenID甯愬彿娉ㄥ唽"
+
+msgid "Conventional registration"
+msgstr "璇锋敞鎰忎互涓嬮敊璇細"
+
+msgid "choose a user name"
+msgstr "閫夋嫨涓涓敤鎴峰悕"
+
+msgid "your email address"
+msgstr "鎮ㄧ殑鐢靛瓙閭欢鍦板潃"
+
+msgid "choose password"
+msgstr "瀵嗙爜"
+
+msgid "retype password"
+msgstr "纭瀵嗙爜"
+
+msgid "Register with your OpenID"
+msgstr "浣跨敤OpenID娉ㄥ唽"
+
+msgid "sorry, this name can not be used, please try another"
+msgstr "瀵逛笉璧凤紝鎮ㄤ笉鑳芥敞鍐岃鐢ㄦ埛鍚嶏紝璇锋崲涓涓瘯璇"
+
+msgid "this name is already in use - please try anoter"
+msgstr "璇ョ敤鎴峰悕宸茶娉ㄥ唽锛岃鎹竴涓瘯璇"
+
+msgid "Why use OpenID?"
+msgstr "涓轰粈涔堥渶瑕丱penID鐧诲綍锛"
+
+msgid "with openid it is easier"
+msgstr "鏋勫缓鍦∣penID缃戠粶璁よ瘉涓婄殑鏈郴缁燂紝涓嶉渶瑕佷綘娉ㄥ唽鏂扮殑甯愬彿锛屽嵆鍙娇鐢ㄦ垜浠郴缁熺殑鎵鏈夊姛鑳"
+
+msgid "openid is supported open standard"
+msgstr "OpenID鏄湁寮鏀炬爣鍑嗭紝骞朵笖鏈夌浉鍏崇殑鍩洪噾缁勭粐鎻愪緵鏀寔"
+
+msgid "Find out more"
+msgstr "鏌ョ湅鏇村"
+
+msgid "Get OpenID"
+msgstr "鑾峰彇OpenID"
+
+msgid "openid is widely adopted"
+msgstr "鍏ㄤ笘鐣屾湁1.6浜縊penID甯愬彿锛屽拰10,000涓敮鎸丱penID鐨勭珯鐐"
+
+msgid "reuse openid"
+msgstr "鐢ㄥ悓涓涓笎鍙峰彲鐧诲綍浜掕仈缃戞墍鏈夋縺娲籓penID鐨勭綉绔"
diff --git a/log/cnprog.log b/log/cnprog.log
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/log/cnprog.log
diff --git a/settings.py b/settings.py
index 985de51a..7ad8524a 100644
--- a/settings.py
+++ b/settings.py
@@ -1,24 +1,56 @@
-# encoding:utf-8
# Django settings for lanai project.
import os.path
-#DEBUG SETTINGS
DEBUG = True
TEMPLATE_DEBUG = DEBUG
+
+SITE_SRC_ROOT = '/var/www/vhosts/cnprog'
+#David Cramer debug toolbar
INTERNAL_IPS = ('127.0.0.1',)
+DEBUG_TOOLBAR_PANELS = (
+ 'debug_toolbar.panels.sql.SQLDebugPanel',
+ 'debug_toolbar.panels.headers.HeaderDebugPanel',
+ 'debug_toolbar.panels.cache.CacheDebugPanel',
+ 'debug_toolbar.panels.profiler.ProfilerDebugPanel',
+ 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
+ 'debug_toolbar.panels.templates.TemplatesDebugPanel',
+ # If you are using the profiler panel you don't need the timer
+ # 'debug_toolbar.panels.timer.TimerDebugPanel',
+)
+
+DEBUG_TOOLBAR_CONFIG = {
+ "INTERCEPT_REDIRECTS":False
+}
+
+#for logging
+import logging
+LOG_FILENAME = '/var/www/vhosts/cnprog/log/cnprog.log'
+logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG,)
#for OpenID auth
ugettext = lambda s: s
LOGIN_URL = '/%s%s' % (ugettext('account/'), ugettext('signin/'))
-#EMAIL AND ADMINS
+#system will send admins email about error stacktrace if DEBUG=False
ADMINS = (
- ('CNProg team', 'team@cnprog.com'),
+ ('you', 'you@where.com'),
)
+
MANAGERS = ADMINS
-SERVER_EMAIL = 'webmaster@cnprog.com'
-DEFAULT_FROM_EMAIL = 'webmaster@cnprog.com'
+DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+#DATABASE_NAME = 'cnprog' # Or path to database file if using sqlite3.
+#DATABASE_USER = 'root' # Not used with sqlite3.
+#DATABASE_PASSWORD = '' # Not used with sqlite3.
+DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
+DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
+
+DATABASE_NAME = 'dbname' # Or path to database file if using sqlite3.
+DATABASE_USER = 'dbuser' # Not used with sqlite3.
+DATABASE_PASSWORD = 'dbpass' # Not used with sqlite3.
+
+SERVER_EMAIL = 'server@where.com'
+DEFAULT_FROM_EMAIL = 'from@where.com'
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_SUBJECT_PREFIX = '[cnprog.com]'
@@ -26,21 +58,44 @@ EMAIL_HOST='smtp.gmail.com'
EMAIL_PORT='587'
EMAIL_USE_TLS=True
-#LOCALIZATIONS
-TIME_ZONE = 'Asia/Chongqing Asia/Chungking'
-# LANGUAGE_CODE = 'en-us'
+
+
+
+# Local time zone for this installation. Choices can be found here:
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
+# although not all choices may be available on all operating systems.
+# If running in a Windows environment this must be set to the same as your
+# system time zone.
+TIME_ZONE = 'America/Chicago'
+
+# Language code for this installation. All choices can be found here:
+# http://www.i18nguy.com/unicode/language-identifiers.html
+#LANGUAGE_CODE = 'en'
LANGUAGE_CODE = 'zh-cn'
+
SITE_ID = 1
+
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
USE_I18N = True
-#OTHER SETTINS
-APP_TITLE = u'CNProg.com 绋嬪簭鍛橀棶绛旂ぞ鍖'
-APP_URL = 'http://www.cnprog.com'
-APP_KEYWORDS = u'鎶鏈棶绛旂ぞ鍖猴紝涓浗绋嬪簭鍛橈紝缂栫▼鎶鏈ぞ鍖猴紝绋嬪簭鍛樼ぞ鍖猴紝绋嬪簭鍛樿鍧涳紝绋嬪簭鍛榳iki锛岀▼搴忓憳鍗氬'
-APP_DESCRIPTION = u'涓浗绋嬪簭鍛樼殑缂栫▼鎶鏈棶绛旂ぞ鍖恒傛垜浠仛涓撲笟鐨勩佸彲鍗忎綔缂栬緫鐨勬妧鏈棶绛旂ぞ鍖恒'
-APP_INTRO = u' <p>CNProg鏄竴涓<strong>闈㈠悜绋嬪簭鍛</strong>鐨勫彲鍗忎綔缂栬緫鐨<strong>寮鏀炬簮浠g爜闂瓟绀惧尯</strong>銆</p><p> 鎮ㄥ彲浠ュ湪杩欓噷鎻愰棶鍚勭被<strong>绋嬪簭鎶鏈棶棰</strong> - 闂涓嶅垎璇█鍜屽钩鍙般 鍚屾椂涔熷笇鏈涙偍瀵瑰姏鎵鑳藉強鐨勯棶棰橈紝缁欎簣鎮ㄧ殑瀹濊吹绛旀銆</p>'
+# Absolute path to the directory that holds media.
+# Example: "/home/media/media.lawrence.com/"
+MEDIA_ROOT = '/var/www/vhosts/cnprog/templates/upfiles/'
+
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
+# trailing slash if there is a path component (optional in other cases).
+# Examples: "http://media.lawrence.com", "http://example.com/media/"
+MEDIA_URL = 'http://where.com/upfiles/'
+
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
+# trailing slash.
+# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/admin/media/'
-SECRET_KEY = '$oo^&_m&qwbib=(_4m_n*zn-d=g#s0he5fx9xonnym#8p6yigm'
+
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = '$oo^&_m&qwbib=ffljk_4m_n*zn-d=g#s0he5fx9xonnym#8p6yigm'
+
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
@@ -55,15 +110,12 @@ MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.transaction.TransactionMiddleware',
- #'django.middleware.sqlprint.SqlPrintingMiddleware',
- 'middleware.pagesize.QuestionsPageSizeMiddleware',
- #'debug_toolbar.middleware.DebugToolbarMiddleware',
+ 'debug_toolbar.middleware.DebugToolbarMiddleware',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
'django.core.context_processors.auth',
- 'context.application_settings'
)
ROOT_URLCONF = 'urls'
@@ -72,7 +124,6 @@ TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates').replace('\\','/'),
)
-#UPLOAD SETTINGS
FILE_UPLOAD_TEMP_DIR = os.path.join(os.path.dirname(__file__), 'tmp').replace('\\','/')
FILE_UPLOAD_HANDLERS = ("django.core.files.uploadhandler.MemoryFileUploadHandler",
"django.core.files.uploadhandler.TemporaryFileUploadHandler",)
@@ -93,7 +144,3 @@ INSTALLED_APPS = (
'django_authopenid',
'debug_toolbar' ,
)
-
-# User settings
-from settings_local import *
-
diff --git a/templates/404.html b/templates/404.html
index 02725854..d24edaf0 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -1,4 +1,6 @@
+<!-- template 404.html -->
{% extends "base_content.html" %}
+{% load i18n %}
{% block title %}{% spaceless %}404 Error{% endspaceless %}{% endblock %}
{% block forestyle%}
<style type="text/css">
@@ -19,30 +21,29 @@
</div>
<div id="main-body" class="">
<div style="padding:5px 0px 10px 0;line-height:25px;">
- <h3>瀵逛笉璧凤紝娌℃湁鎵惧埌鎮ㄨ姹傜殑椤甸潰锛</h3>
+ <h3>{% trans "Sorry, could not find the page you requested." %}</h3>
<div style="margin-top:5px">
- 鏈夊彲鑳芥槸浠ヤ笅鍘熷洜瀵艰嚧锛<br>
+ {% trans "This might have happened for the following reasons:" %}<br>
<ul>
- <li>浣犳鍦ㄦ煡鐪嬬殑闂鎴栬呭洖绛斿凡缁忚鍒犻櫎锛</li>
- <li>璇锋眰鐨勫湴鍧鏈夎 - 璇锋牳瀹炲師濮婾RL鍦板潃锛</li>
- <li>璁块棶鐨勯〉闈㈣淇濇姢鎴栦綘鐨勭Н鍒嗕笉澶燂紝鍙傝<a href="/faq"> faq</a>锛</li>
- <li>濡傛灉浣犵‘淇′笉璇ュ嚭鐜404閿欒锛岃<a href="http://cnprog.uservoice.com/" target="_blank">鎶ュ憡杩欎釜闂</a></li>
+ <li>{% trans "this question or answer has been deleted;" %}</li>
+ <li>{% trans "url has error - please check it;" %}</li>
+ <li>{% trans "the page you tried to visit is protected or you don't have sufficient points, see" %} <a href="/faq"> faq</a>锛</li>
+ <li>{% trans "if you believe this error 404 should not have occured, please" %}
+ <a href="{{feedback_site_url}}" target="_blank">{% trans "report this problem" %}</a></li>
</u>
</div>
<script type="text/javascript">
var GOOG_FIXURL_LANG = 'zh-cn';
- var GOOG_FIXURL_SITE = 'http://cnprog.com/';
+ var GOOG_FIXURL_SITE = '{{site_url}}';
</script>
<script type="text/javascript" src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
<ul>
- <li><a href="#" id="linkPrevious">杩斿洖鍓嶉〉 禄 </li>
- <li><a href="/questions">鏌ョ湅鏈鏂伴棶棰 禄 </a></li>
- <li><a href="/tags/">鏌ョ湅鏍囩鍒楄〃 禄 </a></li>
+ <li><a href="#" id="linkPrevious">{% trans "back to previous page" %} 禄 </li>
+ <li><a href="/questions">{% trans "see all questions" %} 禄 </a></li>
+ <li><a href="/tags/">{% trans "see all tags" %} 禄 </a></li>
</u>
</div>
</div>
{% endblock %}
-
-
-
+<!-- end template 404.html -->
diff --git a/templates/500.html b/templates/500.html
index 2e89783a..c99774b3 100644
--- a/templates/500.html
+++ b/templates/500.html
@@ -1,4 +1,6 @@
+<!-- template 500.html -->
{% extends "base_content.html" %}
+{% load i18n %}
{% block title %}{% spaceless %}500 Error{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
@@ -9,25 +11,25 @@
</script>
{% endblock %}
{% block content %}
-<div id="main-bar" class="headNormal">
- 500 Server Error
+<div id="main-bar" class="">
+ <h3>
+ 500 Server Error
+ </h3>
+
</div>
-<div id="main-body" class="">
+<div id="main-body" class="headNormal">
<div style="padding:5px 0px 10px 0;line-height:25px">
- <h3>瀵逛笉璧凤紝绯荤粺鍙戠敓浜嗛敊璇紝涓嶈兘鍝嶅簲鎮ㄧ殑璇锋眰锛</h3>
+ <h3>{% trans "sorry, system error"</h3>
<br>
- 绯荤粺宸茬粡璁板綍閿欒鏃ュ織锛屾垜浠細灏藉揩瑙e喅姝ら棶棰樸<br>
- 濡傛灉杩欎釜闂闀挎椂闂存病鏈夎淇锛岃<span class="darkred"><a title="cnprog.uservoice.com" href="http://cnprog.uservoice.com/" >鎼滅储鏌ョ湅褰撳墠闂鐨勭姸鎬侊紝鎴栬呮姤鍛婃柊鐨刡ug</a></span>銆傛劅璋㈡偍鐨勬敮鎸侊紒
-
+ {% trans "system error log is recorded, error will be fixed as soon as possible" %}<br>
+ {% trans "please report the error to the site administrators if you wish" %}
<ul>
- <li><a href="#" id="linkPrevious">杩斿洖鍓嶉〉</li>
- <li><a href="/questions">鏌ョ湅鏈鏂伴棶棰</a></li>
- <li><a href="/tags/">鏌ョ湅鏍囩鍒楄〃</a></li>
+ <li><a href="#" id="linkPrevious">{% trans "back to previous page" %}</li>
+ <li><a href="/questions">{% trans "see latest questions" %}</a></li>
+ <li><a href="/tags/">{% trans "see tags" %}</a></li>
</u>
</div>
</div>
{% endblock %}
-
-
-
+<!-- end template 500.html -->
diff --git a/templates/about.html b/templates/about.html
index 6638060e..4655a641 100644
--- a/templates/about.html
+++ b/templates/about.html
@@ -1,71 +1,21 @@
+<!-- template about.html -->
{% extends "base_content.html" %}
+{% load i18n %}
{% load extra_tags %}
{% load humanize %}
-{% block title %}{% spaceless %}鍏充簬鏈珯{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "About" %}{% endspaceless %}{% endblock %}
{% block forejs %}
{% endblock %}
{% block content %}
<div class="headNormal">
-鍏充簬鏈珯
+{% trans "About" %}
</div>
<div class="content">
- <p>
- CNProg 鏄<strong>涓涓潰鍚戜腑鍥界▼搴忓憳鐨勫厤璐规妧鏈棶绛旂ぞ鍖</strong>銆傚畠鏄竴涓粙浜庤鍧涖佸崥瀹€佺淮鍩哄拰Digg涔嬮棿鐨勭ぞ鍖虹郴缁燂紝鍩轰簬Python鍜孌jango寮鍙戙<br>
- 鍒涘姙CNProg鐨勭伒鎰熸潵鑷簬鍥藉鐭ュ悕QA绀惧尯<a href="http://www.stackoverflow.com">StackOverflow</a>锛屼絾鏄疌NProg涓嶄粎浠呮槸涓涓眽鍖栫増鐨凷O銆<br>
- 鎴戜滑閫氳繃寮婧愮ぞ鍖烘潵缁存姢鍜屾洿鏂版簮浠g爜锛屼綘鍙互璁块棶<strong><a href="http://code.google.com/p/cnprog/">杩欓噷</a></strong>鑾峰彇鏈珯鐨勬墍鏈夋簮浠g爜锛堣娉ㄦ剰婧愪唬鐮佷娇鐢ㄧ殑鎺堟潈璁稿彲锛夈<br>
- </p>
- <br>
- <p>
- <strong>鎴戜滑涓嶈繍浣滅ぞ鍖猴紝鐢变綘鏉ヨ繍浣溿</strong>CNProg 鏄<strong><a href="http://blog.cnprog.com/2009/01/%e7%94%a8%e6%88%b7%e9%a9%b1%e5%8a%a8%e7%9a%84%e6%8a%80%e6%9c%af%e7%a4%be%e5%8c%ba/">涓涓敱鐢ㄦ埛鏉ラ┍鍔ㄧ殑绀惧尯</a></strong>銆傛瘡涓敤鎴蜂笉浠呮槸绠$悊鍛橈紝涔熸槸绀惧尯鍔熻兘闇姹傜殑鎻愬嚭鑰呫<br>
- 绀惧尯鍐呭鏄崗浣滅殑锛岀郴缁熻秺淇′换浣狅紝浣犲氨鍦ㄧぞ鍖鸿幏寰楁洿澶氱殑绠$悊鏉冮檺锛屽彲浠ュ紑濮嬬紪杈戦棶棰樻垨鍥炵瓟锛
- 甯姪鎴戜滑缁勭粐闂鍜岀瓟妗堬紝甯姪闇瑕佸府鍔╃殑骞垮ぇ绋嬪簭鍛樼敤鎴枫<br>
- 閫忔槑銆佸紑鏀俱佸叏姘戠鐞嗙殑杩愪綔妯″紡鏄湰缃戠珯鐨勭壒鐐癸紝鎴戜滑甯屾湜閫氳繃CNProg璁╃敤鎴疯兘澶熸洿鍔犲鏄撳湴瀵绘眰甯姪锛屾壘鍒伴棶棰樼瓟妗堬紝瑙e喅瀹為檯鐨勬妧鏈棶棰樸
- </p>
- <p>
- 鎴戜滑鍏虫敞鍥藉唴绋嬪簭鍛樼殑鎴愰暱!
- </p>
-
- <br>
- <h3 class="subtitle">浣犱滑鏄皝锛</h3>
- <p>
- 鎴戜滑鏄竴缇ゅ鏂楀湪浜掕仈缃戠殑缂栫▼鐖卞ソ鑰咃紝鍜屼綘涓鏍凤紝涔熸槸甯屾湜鑷繁缂栧啓楂樿川閲忚蒋浠剁殑寮鍙戜汉鍛樸
- 鎴戜滑鐨勫洟闃燂細
- </p>
- <table cellspacing="5" cellpadding="3">
- <tr>
- <td width="150px"><img src="/content/images/nophoto.png"></td>
- <td width="150px"><img src="/content/images/nophoto.png"></td>
- <td width="150px"><img src="/content/images/nophoto.png"></td>
- <td width="150px"></td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- <td> </td>
- <td><a ></a></td>
- </tr>
- <tr>
- <td colspan="4" height="5"></td>
- </tr>
- <tr>
- <td width="150px"><img src="/content/images/nophoto.png"></td>
- <td width="150px"><img src="/content/images/nophoto.png"></td>
- <td width="150px"></td>
- <td width="150px"></td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- </tr>
- </table>
- <p>
- 娆㈣繋璁块棶鎴戜滑鐨<strong><a href="http://blog.cnprog.com">鍥㈤槦Blog</a></strong>鎴栨煡鐪嬫洿澶氫粙缁嶇殑<a href="/faq" class="big">CNProg FAQ</a>銆
- </p>
+ <p>edit file templates/about.html. Below are just suggestions of what can go here</p>
+ <p>what is your site for?</p>
+ <p>how does it work? what are roles of members?</p>
+ <p>is there a place to find out more about this website?</p>
</div>
{% endblock %}
-
-
-
+<!-- end template about.html -->
diff --git a/templates/allfiles b/templates/allfiles
new file mode 100644
index 00000000..3ca0191e
--- /dev/null
+++ b/templates/allfiles
@@ -0,0 +1,30 @@
+404.html
+500.html
+about.html
+ask.html
+badges.html
+base_content.html
+base.html
+book.html
+close.html
+faq.html
+footer.html
+header.html
+index.html
+logout.html
+pagesize.html
+paginator.html
+privacy.html
+question_edit_tips.html
+question.html
+questions.html
+revisions_answer.html
+tags.html
+unanswered.html
+user_edit.html
+user_info.html
+users.html
+users_questions.html
+user_stats.html
+user_tabs.html
+user_votes.html
diff --git a/templates/answer_edit.html b/templates/answer_edit.html
index f914660a..008d9f78 100644
--- a/templates/answer_edit.html
+++ b/templates/answer_edit.html
@@ -1,11 +1,13 @@
+<!-- template answer_edit.html -->
{% extends "base.html" %}
-{% block title %}{% spaceless %}淇敼鍥炵瓟{% endspaceless %}{% endblock %}
+{% load i18n %}
+{% block title %}{% spaceless %}{% trans "Edit answer" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type='text/javascript' src='/content/js/com.cnprog.editor.js'></script>
<script type='text/javascript' src='/content/js/com.cnprog.post.js'></script>
<script type='text/javascript' src='/content/js/jquery.validate.pack.js'></script>
- <script type='text/javascript' src='/content/js/wmd/showdown-min.js'></script>
- <script type='text/javascript' src='/content/js/wmd/wmd-min.js'></script>
+ <script type='text/javascript' src='/content/js/wmd/showdown.js'></script>
+ <script type='text/javascript' src='/content/js/wmd/wmd.js'></script>
<link rel="stylesheet" type="text/css" href="/content/js/wmd/wmd.css" />
<script type="text/javascript">
@@ -19,10 +21,10 @@
//toggle preview of editor
var display = true;
- var txt = "绂佺敤棰勮";
+ var txt = "{% trans "hide preview" %}";
$('#pre-collapse').text(txt);
$('#pre-collapse').bind('click', function(){
- txt = display ? "鍚敤棰勮" : "绂佺敤棰勮";
+ txt = display ? "{% trans "show preview" %}" : "{% trans "hide preview" %}";
display = !display;
$('#previewer').toggle();
$('#pre-collapse').text(txt);
@@ -42,21 +44,22 @@
{% block content %}
<div id="main-bar" class="headNormal">
- 淇敼鍥炵瓟 [<a href="{{ answer.question.get_absolute_url }}#{{ answer.id }}">杩斿洖</a>]
+ {% trans "Edit answer" %} [<a href="{{ answer.question.get_absolute_url }}#{{ answer.id }}">{% trans "back" %}</a>]
</div>
<div id="main-body" class="ask-body">
<div id="askform">
<form id="fmedit" action="{% url edit_answer answer.id %}" method="post" >
- <label for="id_revision" ><strong>鐗堟湰:</strong></label> <br>
+ <label for="id_revision" ><strong>{% trans "revision" %}:</strong></label> <br>
{% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul }}{% endif %}
<div style="vertical-align:middle">
- {{ revision_form.revision }} <input type="submit" style="display:none" id="select_revision" name="select_revision" value="閫夋嫨鐗堟湰">
+ {{ revision_form.revision }} <input type="submit" style="display:none" id="select_revision" name="select_revision" value="{% trans "select revision" %}">
</div><br>
<div class="form-item">
<div id="wmd-button-bar" class="wmd-panel"></div>
{{ form.text }}
<span class="form-error"></span>
- <div class="preview-toggle"><span id="pre-collapse" title="鎵撳紑鎴栬呭叧闂璏arkdown缂栬緫鍣ㄧ殑瀹炴椂棰勮">棰勮寮鍏</span></div>
+ <div class="preview-toggle"><span id="pre-collapse"
+ title="{% trans "Toggle the real time Markdown editor preview" %}鎵">{% trans "toggle preview" %}</span></div>
<div id="previewer" class="wmd-preview"></div>
<br>
</div>
@@ -67,8 +70,8 @@
{{ form.summary.help_text }}
</div>
<br>
- <input type="submit" value="鐜板湪淇敼" class="submit" />
- <input type="button" value="鍙栨秷" class="submit" onclick="history.back(-1);" />
+ <input type="submit" value="{% trans "Save edit" %}" class="submit" />
+ <input type="button" value="{% trans "Cancel" %}" class="submit" onclick="history.back(-1);" />
<br>
<br>
</form>
@@ -77,63 +80,9 @@
{% endblock %}
{% block sidebar %}
-<div class="boxC">
- <p class="subtitle darkred">鍙楁杩庣殑鎻愰棶</p>
- <div>
- <ul class="list-item">
- <li>
- <b>鎮ㄧ殑闂涓庣紪绋嬬浉鍏冲悧锛</b>
- </li>
- <li>
- 寤鸿鎮ㄦ彁鐨勯棶棰樻槸鍙互琚瓟澶嶇殑锛岃屼笉浠呬粎鏄彲浠ヨ璁恒
- </li>
- <li>
- 璇疯缁嗘弿杩版偍鐨勯棶棰樸
- </li>
- <li>
- 鎴戜滑鎺ㄨ崘鎮ㄤ娇鐢ㄤ腑鏂囨弿杩伴棶棰橈紝杩欐牱鍙互寰楀埌鏇村鐨勭瓟澶嶆満浼氥
- </li>
- </ul>
- <a href="/faq/" target="_blank" title="鏌ョ湅甯歌闂" style="float:right;position:relative">faq 禄</a>
- <br>
- </div>
-</div>
-
-<div class="boxC">
- <p class="subtitle">Markdown蹇熷弬鑰</p>
- <ul class="list-item">
- <li>
- *鏂滀綋* 鎴栬 _鏂滀綋_
-
- </li>
- <li>
- **鍔犵矖** 鎴栬 __鍔犵矖__
-
- </li>
- <li>
- <b>閾炬帴</b>锛氫竴涓猍渚嬪瓙](http://url.com/ "鏍囬")
-
- </li>
-
- <li>
- <b>鍥剧墖</b>锛![alt 鏂囨湰](/path/img.jpg "鏍囬")
-
- </li>
- <li>
- 鍒楄〃锛
- 1. Foo
- 2. Bar
- </li>
- <li>
- 鍩烘湰鐨凥TML鏍囩涔熸槸鏀寔鐨
- </li>
- </ul>
- <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank" style="float:right;position:relative">鏈夊叧Markdown璇︾粏璇存槑 禄</a>
- <br>
-</div>
-
+{% include "answer_edit_tips.html" %}
{% endblock %}
{% block endjs %}
{% endblock %}
-
+<!-- end template answer_edit.html -->
diff --git a/templates/answer_edit_tips.html b/templates/answer_edit_tips.html
new file mode 100644
index 00000000..08d33bc9
--- /dev/null
+++ b/templates/answer_edit_tips.html
@@ -0,0 +1,54 @@
+<!-- template answer_edit_tips.html -->
+{% load i18n %}
+<div class="boxC">
+ <p class="subtitle darkred">{% trans "answer tips" %}</p>
+ <div>
+ <ul class="list-item">
+ <li> <b>{% trans "please make your answer relevant to this community" %}</b>
+ </li>
+ <li>
+ {% trans "try to give an answer, rather than engage into a discussion" %}
+ </li>
+ <li>
+ {% trans "please try to provide details" %}
+ </li>
+ <li>
+ {% trans "be clear and concise" %}
+ </li>
+ </ul>
+ <a href="/faq/" target="_blank" title="{% trans "see frequently asked questions" %}" style="float:right;position:relative">faq 禄</a>
+ <br>
+ </div>
+</div>
+
+<div class="boxC">
+ <p class="subtitle">{% trans "Markdown tips" %}</p>
+ <ul class="list-item">
+ <li>
+ {% trans "*italic* or __italic__" %}
+ </li>
+ <li>
+ {% trans "**bold** or __bold__" %}
+ </li>
+ <li>
+ <b>{% trans "link" %}</b>:[{% trans "text" %}](http://url.com/ "{% trans "title" %}")
+
+ </li>
+
+ <li>
+ <b>{% trans "image" %}</b>锛![alt {% trans "text" %}](/path/img.jpg "{% trans "title" %}")
+
+ </li>
+ <li>
+ {% trans "numbered list:" %}
+ 1. Foo
+ 2. Bar
+ </li>
+ <li>
+ {% trans "basic HTML tags are also supported" %}
+ </li>
+ </ul>
+ <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank" style="float:right;position:relative">{% trans "learn more about Markdown" %} 禄</a>
+ <br>
+</div>
+<!-- end template answer_edit_tips.html -->
diff --git a/templates/ask.html b/templates/ask.html
index ecd176bc..1b00a701 100644
--- a/templates/ask.html
+++ b/templates/ask.html
@@ -1,11 +1,13 @@
+<!-- template ask.html -->
{% extends "base.html" %}
-{% block title %}{% spaceless %}鎴戣鎻愰棶{% endspaceless %}{% endblock %}
+{% load i18n %}
+{% block title %}{% spaceless %}{% trans "Ask a question" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type='text/javascript' src='/content/js/com.cnprog.editor.js'></script>
- <script type='text/javascript' src='/content/js/com.cnprog.post.pack.js'></script>
+ <script type='text/javascript' src='/content/js/com.cnprog.post.js'></script>
<script type='text/javascript' src='/content/js/jquery.validate.pack.js'></script>
- <script type='text/javascript' src='/content/js/wmd/showdown-min.js'></script>
- <script type='text/javascript' src='/content/js/wmd/wmd-min.js'></script>
+ <script type='text/javascript' src='/content/js/wmd/showdown.js'></script>
+ <script type='text/javascript' src='/content/js/wmd/wmd.js'></script>
<link rel="stylesheet" type="text/css" href="/content/js/wmd/wmd.css" />
<script type="text/javascript">
$().ready(function(){
@@ -18,11 +20,12 @@
captureLength: 5, callback: lanai.highlightSyntax});
//toggle preview of editor
+ //todo remove copy-paste
var display = true;
- var txt = "[绂佺敤棰勮]";
+ var txt = "[{% trans "hide preview" %}]";
$('#pre-collapse').text(txt);
$('#pre-collapse').bind('click', function(){
- txt = display ? "[鍚敤棰勮]" : "[绂佺敤棰勮]";
+ txt = display ? "[{% trans "show preview" %}]" : "[{% trans "hide preview" %}]";
display = !display;
$('#previewer').toggle();
$('#pre-collapse').text(txt);
@@ -54,7 +57,7 @@
{% block content %}
<div id="main-bar" class="headNormal">
- 鎴戣鎻愰棶
+ {% trans "Ask a question" %}
</div>
<div id="main-body" class="ask-body">
<div id="askform">
@@ -75,7 +78,7 @@
<table width="100%">
<tr>
<td>
- <span id="pre-collapse" title="鎵撳紑鎴栬呭叧闂璏arkdown缂栬緫鍣ㄧ殑瀹炴椂棰勮">棰勮寮鍏</span>
+ <span id="pre-collapse" title="{% trans "Toggle the real time Markdown editor preview" %}">{% trans "toggle preview" %}</span>
</td>
<td style="text-align:right;">
{{ form.wiki }} <span style="font-weight:normal;cursor:help" title="{{form.wiki.help_text}}">{{ form.wiki.label_tag }} </span>
@@ -100,10 +103,10 @@
<table id="login-box">
<tr>
<td style="vertical-align:middle;">
- <strong>浣跨敤 <a href="http://openid.net/" title="浜嗚В鏇村鏈夊叧OpenID鐨勪俊鎭">OpenID</a> 鐧诲綍锛</strong><br>
+ <strong>{% trans "Use" %} <a href="http://openid.net/" title="{% trans "learn more about OpenID" %}">OpenID</a> {% trans "Login" %}:</strong><br>
{{ form.openid }}
<div class="title-desc">
- 鑾峰彇鎮ㄨ嚜宸辩殑<a href="https://www.myopenid.com/" target=="_blank">OpenID</a>銆
+ {% trans "Get your own "%} <a href="https://www.myopenid.com/" target=="_blank">OpenID</a>銆
</div>
</td>
<td style="vertical-align:middle; padding: 0px 40px 0px 40px">
@@ -111,17 +114,17 @@
<div style="width:1px; border-left:solid 1px #999; height:8em; margin:auto;"></div>
</td>
<td style="vertical-align:middle;">
- <strong>鎮ㄧ殑澶у悕:</strong><br>
+ <strong>{% trans "User name" %}:</strong><br>
{{ form.user }}
<p>
- <strong>鐢靛瓙閭欢:锛堜笉浼氬叕寮鏄剧ず锛</strong><br>
+ <strong>{% trans "Email: (won't be shown to anyone)" %}:</strong><br>
{{ form.email }}
</p>
</td>
</tr>
</table>
{% endif %}
- <input type="submit" value="鐜板湪鎻愰棶" class="submit" />
+ <input type="submit" value="{% trans "Ask your question" %}" class="submit" />
<br><br>
</form>
</div>
@@ -129,63 +132,9 @@
{% endblock %}
{% block sidebar %}
-<div class="boxC">
- <p class="subtitle darkred">鍙楁杩庣殑鎻愰棶</p>
- <div>
- <ul class="list-item">
- <li>
- <b>鎮ㄧ殑闂涓庣紪绋嬬浉鍏冲悧锛</b>
- </li>
- <li>
- 寤鸿鎮ㄦ彁鐨勯棶棰樻槸鍙互琚瓟澶嶇殑锛岃屼笉浠呬粎鏄彲浠ヨ璁恒
- </li>
- <li>
- 璇疯缁嗘弿杩版偍鐨勯棶棰樸
- </li>
- <li>
- 鎴戜滑鎺ㄨ崘鎮ㄤ娇鐢ㄤ腑鏂囨弿杩伴棶棰橈紝杩欐牱鍙互寰楀埌鏇村鐨勭瓟澶嶆満浼氥
- </li>
- </ul>
- <a href="/faq/" target="_blank" title="鏌ョ湅甯歌闂" style="float:right;position:relative">faq 禄</a>
- <br>
- </div>
-</div>
-
-<div class="boxC">
- <p class="subtitle">Markdown蹇熷弬鑰</p>
- <ul class="list-item">
- <li>
- *鏂滀綋* 鎴栬 _鏂滀綋_
-
- </li>
- <li>
- **鍔犵矖** 鎴栬 __鍔犵矖__
-
- </li>
- <li>
- <b>閾炬帴</b>锛氫竴涓猍渚嬪瓙](http://url.com/ "鏍囬")
-
- </li>
-
- <li>
- <b>鍥剧墖</b>锛![alt 鏂囨湰](/path/img.jpg "鏍囬")
-
- </li>
- <li>
- 鍒楄〃锛
- 1. Foo
- 2. Bar
- </li>
- <li>
- 鍩烘湰鐨凥TML鏍囩涔熸槸鏀寔鐨
- </li>
- </ul>
- <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank" style="float:right;position:relative">鏈夊叧Markdown璇︾粏璇存槑 禄</a>
- <br>
-</div>
-
+{% include "question_edit_tips.html" %}
{% endblock %}
{% block endjs %}
{% endblock %}
-
+<!-- end template ask.html -->
diff --git a/templates/authopenid/changeemail.html b/templates/authopenid/changeemail.html
index a6c53a64..99984b3f 100644
--- a/templates/authopenid/changeemail.html
+++ b/templates/authopenid/changeemail.html
@@ -1,9 +1,5 @@
{% extends "base_content.html" %}
{% load i18n %}
-
-
-
-
{% block content %}
<div id="main-bar" class="">
<h3>
diff --git a/templates/authopenid/complete.html b/templates/authopenid/complete.html
index fd243f28..28c38a04 100644
--- a/templates/authopenid/complete.html
+++ b/templates/authopenid/complete.html
@@ -1,19 +1,19 @@
{% extends "base.html" %}
+{% load i18n %}
{% block head %}{% endblock %}
-{% block title %}{% spaceless %}缁戝畾OpenID{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Connect your OpenID with this site" %}{% endspaceless %}{% endblock %}
{% block content %}
<div id="main-bar" class="headNormal">
- 缁戝畾OpenID甯愬彿
-
+ {% trans "Connect your OpenID with your account on this site" %}
</div>
<p id="completetxt" >
- <h3>鎮ㄧ殑OpenID甯愬彿宸茬粡楠岃瘉閫氳繃! 璇峰畬鎴愭渶鍚庝竴姝 - 缁戝畾OpenID鍒版偍鐨勫笎鍙枫</h3>
- <p style="display:none">杈撳叆鎮ㄧ殑鏂板笎鍙锋垨鑰呮寚瀹氬凡缁忓瓨鍦ㄧ殑甯愬彿銆</p>
+ <h3>{% trans "Your OpenID is accepted. Please complete this to finish registration." %}</h3>
+ <p style="display:none">{% trans "This account already exists, please use another." %}</p>
</p>
{% if form1.errors %}
<p class="errors">
- <span class="big">璇锋敞鎰忎互涓嬮敊璇細</span><br>
+ <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br>
<ul class="error-list">
{% if form1.username.errors %}
<li><span class="error">{{ form1.username.errors|join:", " }}</span></li>
@@ -26,7 +26,7 @@
{% endif %}
{% if form2.errors %}
<p class="errors">
- <span class="big">璇锋敞鎰忎互涓嬮敊璇細</span><br>
+ <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br>
<ul class="error-list">
{% if form2.username.errors %}
<li><span class="error">{{ form2.username.errors|join:", " }}</span></li>
@@ -42,10 +42,10 @@
<form name="fregister" action="{% url user_register %}" method="POST">
{{ form.next }}
<fieldset style="padding:10px">
- <legend class="big">鏂板笎鍙</legend>
- <div class="form-row"><label for="id_username">鐢ㄦ埛鍚嶏紙<i>鍦ㄧぞ鍖烘樉绀哄弸濂藉悕绉帮紝涓嶅彲鏇存敼</i>锛</label><br />{{ form1.username }}</div>
- <div class="form-row"><label for="id_email">鐢靛瓙閭欢锛<i>鐢ㄤ簬澶村儚鏄剧ず鏈嶅姟</i>锛</label><br />{{ form1.email }}</div>
- <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="鍒涘缓甯愬彿"></div>
+ <legend class="big">{% trans "New account" %}</legend>
+ <div class="form-row"><label for="id_username">{% trans "User name (<i>will be shown to others, cannot be modified</i>)" %}</label><br />{{ form1.username }}</div>
+ <div class="form-row"><label for="id_email">{% trans "Email (<i>not shared with anyone</i>)" %}</label><br />{{ form1.email }}</div>
+ <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="{% trans "create account" %}"></div>
</fieldset>
</form>
</div>
@@ -53,14 +53,15 @@
<form name="fverify" action="{% url user_register %}" method="POST">
{{ form.next }}
<fieldset style="padding:10px">
- <legend class="big">宸茬粡瀛樺湪鐨勭敤鎴</legend>
- <div class="form-row"><label for="id_username">鐢ㄦ埛鍚</label><br />{{ form2.username }}</div>
- <div class="form-row"><label for="id_passwordl">瀵嗙爜</label><br />{{ form2.password }}</div>
- <div class="submit-row"><input type="submit" class="submit" name="bverify" value="纭"> <a href="">蹇樿瀵嗙爜锛</a></div>
+ <legend class="big">{% trans "Existing account" %}</legend>
+ <div class="form-row"><label for="id_username">{% trans "user name" %}</label><br />{{ form2.username }}</div>
+ <div class="form-row"><label for="id_passwordl">{% trans "password" %}</label><br />{{ form2.password }}</div>
+ <!--todo double check translation from chinese 纭 = "Register" -->
+ <div class="submit-row">
+ <input type="submit" class="submit" name="bverify" value="{% trans "Register" %}">
+ <a href="">{% trans "Forgot your password?" %}</a>
+ </div>
</fieldset>
</form>
</div>
{% endblock %}
-
-
-
diff --git a/templates/authopenid/htmlfiles b/templates/authopenid/htmlfiles
new file mode 100644
index 00000000..1b9dccd0
--- /dev/null
+++ b/templates/authopenid/htmlfiles
@@ -0,0 +1,8 @@
+changeemail.html
+changeopenid.html
+changepw.html
+delete.html
+failure.html
+sendpw.html
+settings.html
+signup.html
diff --git a/templates/authopenid/sendpw.html b/templates/authopenid/sendpw.html
index 237a5cf6..a9488c4c 100644
--- a/templates/authopenid/sendpw.html
+++ b/templates/authopenid/sendpw.html
@@ -1,17 +1,18 @@
{% extends "base.html" %}
-{% block title %}{% spaceless %}鍙戦佹柊瀵嗙爜{% endspaceless %}{% endblock %}
+{% load i18n %}
+{% block title %}{% spaceless %}{% trans "Send new password" %}{% endspaceless %}{% endblock %}
{% block content %}
<div id="main-bar" class="">
- <h3 >鍙戦佹柊瀵嗙爜</h3>
+ <h3>{% trans "Send new password" %}</h3>
</div>
<div class="paragraph">
-涓㈠け浜嗘偍鐨勫瘑鐮侊紵 浣犲彲浠ュ湪杩欓噷閲嶈瀵嗙爜銆<br>
-璇疯緭鍏ョ敤鎴峰悕锛屾柊鐨勫瘑鐮佷細鍙戦佸埌浣犳敞鍐屾椂鍊欏~鍐欑殑鐢靛瓙閭欢銆
+{% trans "Lost your password? No problem - here you can reset it." %}<br>
+{% trans "Please enter your username below and new password will be sent to your registered e-mail" %}
</div>
{% if form.errors %}
-<p class="errors"><span class="big">璇锋敞鎰忎互涓嬮敊璇細</span><br>
+<p class="errors"><span class="big">{% "Sorry, looks like we have some errors:" %}</span><br>
{% if form.username.errors %}
<span class="error">{{ form.username.errors|join:", " }}</span>
{% endif %}
@@ -23,11 +24,11 @@
<div class="aligned">
<form action="." method="post" accept-charset="utf-8">
- <div id="form-row"><label for="id_username">鐢ㄦ埛鍚嶏細 </label>{{ form.username }}</div>
+ <div id="form-row"><label for="id_username">{% trans "User name" %}:</label>{{ form.username }}</div>
- <p style="padding-top:10px"><input type="submit" value="閲嶈瀵嗙爜"> <a href="{% url user_signin %}">杩斿洖鐧诲綍</a></p>
+ <p style="padding-top:10px"><input type="submit" value="{% trans "Reset password" %}"> <a href="{% url user_signin %}">{% trans "return to login" %}</a></p>
</form>
- <span class="darkred">娉ㄦ剰: 鏂扮殑瀵嗙爜鍙湁鎮ㄥ湪婵娲婚偖浠朵腑鐨勯摼鎺ュ悗鎵嶄細琚縺娲汇</span>
+ <span class="darkred">{% trans "Note: your new password will be activated only after you click the activation link in the email message" %}</span>
</div>
{% endblock %}
diff --git a/templates/authopenid/settings.html b/templates/authopenid/settings.html
index c765b989..ffd5dd8f 100644
--- a/templates/authopenid/settings.html
+++ b/templates/authopenid/settings.html
@@ -17,7 +17,7 @@
{% block content %}
<div id="main-bar">
- <h3><strong>{{ request.user.username }}璐︽埛璁剧疆</strong></h3>
+ <h3><strong>{{ request.user.username }} {% trans "Profile" %}</strong></h3>
</div>
<div id="settings-options">
{% if msg %}
@@ -25,16 +25,16 @@
{% endif %}
<dl class="list-item">
- <dt>禄 <a href="{% url user_changepw %}">淇敼瀵嗙爜</a></dt>
+ <dt>禄 <a href="{% url user_changepw %}">{% trans "Change password" %}</a></dt>
<dd>{% trans "Give your account a new password." %}</dd>
- <dt>禄 <a href="{% url user_changeemail %}">鏇存崲鐢靛瓙閭欢</a></dt>
+ <dt>禄 <a href="{% url user_changeemail %}">{% trans "Change email " %}</a></dt>
<dd>{% trans "Add or update the email address associated with your account." %}</dd>
{% if is_openid %}
- <dt>禄 <a href="{% url user_changeopenid %}">鏇存崲OpenID鍦板潃</a></dt>
+ <dt>禄 <a href="{% url user_changeopenid %}">{% trans "Change OpenID %}</a></dt>
<dd>{% trans "Change openid associated to your account" %}</dd>
{% endif %}
- <dt>禄 <a href="{% url user_delete %}">鍒犻櫎甯愬彿</a></dt>
+ <dt>禄 <a href="{% url user_delete %}">{% trans "Delete account" %}</a></dt>
<dd>{% trans "Erase your username and all your data from website" %}</dd>
</dl>
</div>
diff --git a/templates/authopenid/signin.html b/templates/authopenid/signin.html
index 9c5511f2..aff2f06f 100644
--- a/templates/authopenid/signin.html
+++ b/templates/authopenid/signin.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
-{% block title %}{% spaceless %}鐢ㄦ埛鐧诲綍{% endspaceless %}{% endblock %}
+{% load i18n %}
+{% block title %}{% spaceless %}{% trans "User login" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript" src="/content/js/jquery.openid.js?"></script>
<script type='text/javascript' src='/content/js/jquery.validate.pack.js'></script>
@@ -12,26 +13,26 @@
{% endblock %}
{% block content %}
<div class="headNormal">
- 鐢ㄦ埛鐧诲綍
+ {% trans "User login" %}
</div>
<div class="login">
<form name="openid_form" action="{% url user_signin %}" method="post">
{{ form2.next }}
- <p style="display:none">CNProg鏀寔<b>涓ょ</b>鐧诲綍妯″紡銆傛偍鍙互浣跨敤甯愬彿銆佸瘑鐮佺櫥褰曪紝鎴栬呬娇鐢∣penID鐧诲綍銆</p>
+ <p style="display:none">{% trans "we support two login modes" %}</p>
{% if msg %}
<p class="warning">{{ msg }}</p>
{% endif %}
<fieldset class="fieldset">
- <legend ><strong>浣跨敤OpenID鐧诲綍</strong></legend>
+ <legend ><strong>{% trans "Login with your OpenID" %}</strong></legend>
<div id="openid_choice">
- <p>璇烽夋嫨鎮ㄧ殑甯愬彿绫诲瀷骞跺畬鎴愭纭殑OpenID鍦板潃锛堝锛氭浛鎹⑩渰username}鈥濅负鎮ㄧ殑瀵瑰簲甯愬彿锛夛細</p>
+ <p>{% trans "select openid provider" %}</p>
<div id="openid_btns">
</div>
+ <br><br><br>
+ <p>{% trans "verify openid link and login" %}</p>
</div>
- <br>
- <br><br>
<p>
- {{ form2.openid_url }} <input id="bsignin" name="bsignin" type="submit" value="鐧诲綍" class="openid-login-submit" />
+ {{ form2.openid_url }} <input id="bsignin" name="bsignin" type="submit" value="{% trans "Login" %}" class="openid-login-submit" />
</p>
</fieldset>
</form>
@@ -39,7 +40,7 @@
<br>
{% if form1.errors %}
<p class="errors">
- <span class="big">璇锋敞鎰忎互涓嬮敊璇細</span><br>
+ <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br>
<ul class="error-list">
{% if form1.username.errors %}
<li><span class="error">{{ form1.username.errors|join:", " }}</span></li>
@@ -54,11 +55,12 @@
<form name="fauth" action="{% url user_signin %}" method="post">
{{ form1.next }}
<fieldset class="fieldset" >
- <legend class="big">浣跨敤甯愬彿瀵嗙爜鐧诲綍</legend>
- <div class="form-row"><label for="id_username">鐢ㄦ埛鍚嶏細</label><br />{{ form1.username }}</div>
- <div class="form-row"><label for="id_password">瀵嗙爜锛</label><br />{{ form1.password }}</div>
- <div class="submit-row"><input type="submit" class="submit" name="blogin" value="鐧诲綍"> <a href="">蹇樿瀵嗙爜锛</a> <a href="">娉ㄥ唽鏂板笎鍙</a></div>
-
+ <legend class="big">{% trans "Use login name and password" %}</legend>
+ <div class="form-row"><label for="id_username">{% trans "Login name" %}:</label><br />{{ form1.username }}</div>
+ <div class="form-row"><label for="id_password">{% trans "Password" %}:</label><br />{{ form1.password }}</div>
+ <div class="submit-row"><input type="submit" class="submit" name="blogin" value="{% trans "Login" %}">
+ <a href="">{% trans "Forgot your password?" %}</a>
+ <a href="">{% trans "Create new acccount" %}</a></div>
</fieldset>
</form>
</div>
@@ -67,28 +69,25 @@
{% block sidebar %}
<div class="boxC">
- <h3 class="subtitle">涓轰粈涔堥渶瑕丱penID鐧诲綍锛</h3>
+ <h3 class="subtitle">{% trans "Why use OpenID?" %}</h3>
<p>
<ul class="list-item">
<li>
- 鏋勫缓鍦∣penID缃戠粶璁よ瘉涓婄殑鏈郴缁燂紝涓嶉渶瑕佷綘娉ㄥ唽鏂扮殑甯愬彿锛屽嵆鍙娇鐢ㄦ垜浠郴缁熺殑鎵鏈夊姛鑳
+ {% trans "with openid it is easier" %}
</li>
<li>
- 鐢ㄥ悓涓涓笎鍙峰彲鐧诲綍浜掕仈缃戞墍鏈夋縺娲籓penID鐨勭綉绔
-
+ {% trans "reuse openid" %}
</li>
<li>
- 鍏ㄤ笘鐣屾湁1.6浜縊penID甯愬彿锛屽拰10,000涓敮鎸丱penID鐨勭珯鐐
-
+ {% trans "openid is widely adopted" %}
</li>
<li>
- OpenID鏄湁寮鏀炬爣鍑嗭紝骞朵笖鏈夌浉鍏崇殑鍩洪噾缁勭粐鎻愪緵鏀寔
-
+ {% trans "openid is supported open standard" %}
</li>
</ul>
- <a href="http://openid.net/what/" target="_blank" style="float:right;position:relative">鏌ョ湅鏇村 禄</a><br>
- <a href="http://openid.net/get/" target="_blank" style="float:right;position:relative">鑾峰彇OpenID 禄</a>
+ <a href="http://openid.net/what/" target="_blank" style="float:right;position:relative">{% trans "Find out more" %} 禄</a><br>
+ <a href="http://openid.net/get/" target="_blank" style="float:right;position:relative">{% trans "Get OpenID" %} 禄</a>
</p>
<br>
</div>
diff --git a/templates/authopenid/signup.html b/templates/authopenid/signup.html
index e51544f7..a4460aa3 100644
--- a/templates/authopenid/signup.html
+++ b/templates/authopenid/signup.html
@@ -1,18 +1,18 @@
{% extends "base.html" %}
-{% block title %}{% spaceless %}娉ㄥ唽甯愬彿{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Signup" %}{% endspaceless %}{% endblock %}
{% block content %}
<div id="main-bar" class="">
- <h3 >娉ㄥ唽甯愬彿</h3>
+ <h3 >{% trans "Signup" %}</h3>
</div>
<div class="jointxt">
- <p>鎴戜滑鏀寔涓ょ娉ㄥ唽鏂瑰紡锛屼綘鍙互浣跨敤甯歌鐨勭敤鎴峰悕銆佸瘑鐮佹柟寮忔敞鍐岋紝鎴栬<a href="{% url user_signin %}">浣跨敤OpenID甯愬彿娉ㄥ唽</a>銆</p>
+ <p>{% trans "We support two types of user registration: conventional username/password, and" %} <a href="{% url user_signin %}">{% trans "the OpenID method" %}</a>.</p>
{% if form.errors %}
<p class="errors">
- <span class="big">璇锋敞鎰忎互涓嬮敊璇細</span><br>
+ <span class="big">{% trans "Sorry, looks like we have some errors" %}</span><br>
<ul class="error-list">
{% if form.username.errors %}
<li><span class="error">{{ form.username.errors|join:", " }}</span></li>
@@ -30,22 +30,23 @@
</div>
<form action="{% url user_signup %}" method="post" accept-charset="utf-8">
<fieldset class="fieldset">
- <legend class="big">甯歌娉ㄥ唽</legend>
- <div class="form-row"><label for="id_username">閫夋嫨涓涓敤鎴峰悕锛</label><br>{{ form.username }}</div>
+ <legend class="big">{% trans "Conventional registration" %}</legend>
+ <div class="form-row"><label for="id_username">{% trans "choose a user name" %}:</label><br>{{ form.username }}</div>
- <div class="form-row"><label for="id_email">鎮ㄧ殑鐢靛瓙閭欢鍦板潃锛</label><br>{{ form.email }}</div>
- <div class="form-row"><label for="id_password1">瀵嗙爜锛</label><br />{{ form.password1 }}</div>
- <div class="form-row"><label for="id_password2">纭瀵嗙爜锛</label><br>{{ form.password2 }}</div>
- <div class="submit-row"><input type="submit" class="submit" value="娉ㄥ唽" > <a href="{% url user_signin %}">杩斿洖鐧诲綍</a></div>
+ <div class="form-row"><label for="id_email">{% trans "your email address" %}:</label><br>{{ form.email }}</div>
+ <div class="form-row"><label for="id_password1">{% trans "choose password" %}:</label><br />{{ form.password1 }}</div>
+ <div class="form-row"><label for="id_password2">{% trans "retype password" %}:</label><br>{{ form.password2 }}</div>
+ <div class="submit-row"><input type="submit" class="submit" value="{% trans "login" %}" >
+ <a href="{% url user_signin %}">{% trans "back to login" %}</a></div>
</fieldset>
<br >
</form>
<br >
<div style="display:none">
- <h2 class="signup">浣跨敤OpenID娉ㄥ唽</h2>
+ <h2 class="signup">{% trans "Register with your OpenID" %}</h2>
<form name="fopenid" action="{% url user_signin %}" method="post">
<div class="form-row">{{ form2.openid_url }}</div>
- <div class="submit-row "><input name="bsignin" class="submit" type="submit" value="浣跨敤OpenID鐧诲綍"></div>
+ <div class="submit-row "><input name="bsignin" class="submit" type="submit" value="{% trans "Login with your OpenID" %}"></div>
</form>
</div>
{% endblock %}
diff --git a/templates/badge.html b/templates/badge.html
index 4ffedfa6..d0906918 100644
--- a/templates/badge.html
+++ b/templates/badge.html
@@ -1,7 +1,9 @@
+<!-- template badge.html -->
{% extends "base_content.html" %}
+{% load i18n %}
{% load extra_tags %}
{% load humanize %}
-{% block title %}{% spaceless %}{{ badge.name }}-濂栫墝{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{{ badge.name }} - {% trans "Badge" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -12,7 +14,7 @@
{% endblock %}
{% block content %}
<div id="main-bar" class="headNormal">
- 濂栫墝
+ {% trans "Badge" %}
</div>
<div id="main-body" style="width:100%;margin-bottom:20px">
<p>
@@ -21,7 +23,7 @@
<div>
{% if badge.awarded_count %}
<p style="float:left"><span class="count">{{ awards|length|intcomma }}</span>
- <strong>鐢ㄦ埛宸茶鎺堜簣璇ュ鐗岋細</strong></p>
+ <strong>{% trans "The users have been awarded with badges:" %}</strong></p>
{% endif %}
</div>
<div id="award-list" style="clear:both;margin-left:20px;line-height:25px;">
@@ -32,7 +34,4 @@
</div>
{% endblock %}
-
-
-
-
+<!-- end template badge.html -->
diff --git a/templates/badges.html b/templates/badges.html
index e8033f13..8a3b7eab 100644
--- a/templates/badges.html
+++ b/templates/badges.html
@@ -1,8 +1,9 @@
+<!-- template badges.html -->
{% extends "base.html" %}
{% load extra_tags %}
{% load humanize %}
{% load i18n %}
-{% block title %}{% spaceless %}{% trans "Badges" %}{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Badges summary" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -13,12 +14,12 @@
{% endblock %}
{% block content %}
<div class="headlineA">
- <span class="headMedals">{% trans "Badges"%}</span>
+ <span class="headMedals">{% trans "Badges" %}</span>
</div>
<div id="main-body" style="width:100%">
<p>
- 鎻愬嚭闂锛岀粰浜堝洖绛旓紝鎶曞嚭浣犵殑绁 - CNProg 浼氶拡瀵逛綘鍦ㄧぞ鍖虹殑琛ㄧ幇锛屾巿浜堜綘鍚勭被濂栫墝銆<br>
- 杩欓噷鍒楀嚭绀惧尯鎵鏈夌殑濂栫墝锛屼互鍙婂埌鐩墠涓烘锛屾瘡涓鐗岃鎺堜簣鐨勭敤鎴蜂汉鏁般
+ {% trans "Community gives you awards for your questions, answers and votes." %}<br>
+ {% trans "Below is the list of available badges and number of times each type of badge has been awarded." %}
</p>
<br>
<div id="medalList">
@@ -45,29 +46,33 @@
{% block sidebar %}
<div class="boxB">
- <h3>绀惧尯濂栫墝</h3>
+ <h3>{% trans "Community badges" %}</h3>
<div class="body">
<p>
- <a style="cursor:default;" title="閲戠墝:鍗佸垎缃曡涔嬫渶楂樿崳鑰" class="medal"><span class="badge1">&#9679;</span>&nbsp;閲戠墝</a>
+ <a style="cursor:default;" title="gold badge: the highest honor and is very rare" class="medal"><span class="badge1">&#9679;</span>&nbsp;{% trans "gold" %}</a>
</p>
<p>
- 閲戠墝鏄崄鍒嗙綍瑙佺殑銆備綘涓嶄粎瑕佸弬涓庣ぞ鍖虹殑鎻愰棶銆佸洖绛斻佹姇绁ㄧ瓑娲诲姩锛岃屼笖闇瑕佹湁楂樻繁鐨勭煡璇嗗拰鑳藉姏鎵嶈兘鑾峰緱銆傝幏寰楅噾鐗屾剰鍛崇潃浣犲湪鏌愪釜灞傛涓婂凡缁忚揪鍒颁簡椤跺嘲銆
+ {% trans "Gold badge is very rare." %}
+ {% trans "To obtain it you have to show profound knowledge and ability in addition to actively participating in the community." %}
+ {% trans "Gold badge is the highest award in this community." %}
</p>
<p>
- <a style="cursor:default;" title="閾剁墝:鍋跺皵棰佸彂涔嬩紭璐ㄥ绔" class="medal"><span class="badge2">&#9679;</span>&nbsp;閾剁墝</a>
+ <a style="cursor:default;"
+ title="silver badge: occasionally awarded for the very high quality contributions"
+ class="medal"><span class="badge2">&#9679;</span>&nbsp;{% trans "silver" %}</a>
</p>
<p>
- 閾剁墝闇瑕佺粡杩囬暱鏃堕棿鐨勫鏂楁墠鑳借幏寰椼傚畠鏄笉鍚屽甯哥殑鑽h獕锛屽彧瑕佷綘浠樺嚭瓒冲鐨勫姫鍔涘氨浼氬緱鍒般
+ {% trans "Obtaining silver badge requires significant patience." %}
+ {% trans "If you got one, you've very significantly contributed to this community" %}
</p>
<p>
- <a style="cursor:default;" title="閾滅墝:鏃跺父鎺堜簣涔嬬壒娈婅崳瑾" class="medal"><span class="badge3">&#9679;</span>&nbsp;閾滅墝</a>
+ <a style="cursor:default;" title="{% trans "bronze badge: often given as a special honor" %}" class="medal">
+ <span class="badge3">&#9679;</span>&nbsp;{% trans "bronze" %}</a>
</p>
<p>
- 閾滅墝浼氬湪浣犳椿璺冧簬绀惧尯鏃朵骇鐢燂紝瀹冪浉瀵瑰鏄撹幏寰楋紝浣嗕篃鏄竴绉嶇壒娈婄殑鑽h獕銆
+ {% trans "If you are active in this community, you will will get this medal - still it is a special honor." %}
</p>
</div>
</div>
{% endblock %}
-
-
-
+<!-- end template badges.html -->
diff --git a/templates/base.html b/templates/base.html
index 90b40612..dca312e3 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,27 +1,34 @@
-锘縶% load extra_filters %}
-{% load i18n %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- template base.html -->
+{% load extra_filters %}
+{% load i18n %}
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>{% block title %}{% endblock %} - {{ APP_TITLE }}</title>
+ <title>{% block title %}{% endblock %} - {% trans "site title" %} - {% trans "site slogan" %}</title>
{% spaceless %}
{% block meta %}{% endblock %}
{% endspaceless %}
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta name="verify-v1" content="55uGNnQVJW8p1bbXeF/Xbh9I7nZBM/wLhRz6N/I1kkA=" />
+ <meta name="verify-v1" content="{{verify_v1_code}}" />
<link rel="shortcut icon" href="/content/images/favicon.ico" >
<link href="/content/style/style.css" rel="stylesheet" type="text/css" />
- <script type='text/javascript' src='/content/js/com.cnprog.utils.js'></script>
<script src="http://www.google.com/jsapi"></script>
<script>google.load("jquery", "1.2.6");</script>
- <script type="text/javascript">
+ <script type="text/javascript">
+ var i18nLang = 'en';
+ </script>
+ <script type='text/javascript' src='/content/js/com.cnprog.i18n.js'></script>
+ <script type='text/javascript' src='/content/js/jquery.i18n.js'></script>
+ <script type='text/javascript' src='/content/js/com.cnprog.utils.js'></script>
+ <!--<script type="text/javascript">
var uservoiceJsHost = ("https:" == document.location.protocol) ? "https://uservoice.com" : "http://cdn.uservoice.com";
document.write(unescape("%3Cscript src='" + uservoiceJsHost + "/javascripts/widgets/tab.js' type='text/javascript'%3E%3C/script%3E"))
</script>
<script type="text/javascript">
UserVoice.Tab.show({
- key: 'cnprog',
- host: 'cnprog.uservoice.com',
+ //EDIT!!!
+ key: 'key',
+ host: 'where.uservoice.com',
forum: 'general',
alignment: 'left', /* 'left', 'right' */
background_color:'#777',
@@ -29,7 +36,8 @@
hover_color: '#06C',
lang: 'en' /* 'en', 'de', 'nl', 'es', 'fr' */
})
- </script>
+ </script>-->
+ <!-- todo move this to settings -->
{% with request.user.get_messages as messages%}
{% if messages %}
<style type="text/css">
@@ -40,7 +48,6 @@
notify.show();
});
</script>
-
{% endif %}
{% endwith %}
@@ -50,9 +57,9 @@
<body>
<div class="notify" style="display:none">
<span>{% if request.user.get_messages %}
- {% trans "Congratulations! You have new badges: " %}{% for message in request.user.get_messages %}
- <font class="darkred">{{ message }}</font>, {% endfor %}{% trans "go to see" %}
- <a href="{{ request.user.get_profile_url }}">{% trans "Profile" %}</a>{% endif %}</span>
+ {% trans "congratulations, community gave you a badge" %}: {% for message in request.user.get_messages %}
+ <font class="darkred">{{ message }}</font>, {% endfor %}鏌ョ湅
+ <a href="{{ request.user.get_profile_url }}">{% trans "profile" %}</a>{% endif %}</span>
<a class="close-notify" onclick="notify.close(true)">&times;</a>
</div>
{% include "header.html" %}
@@ -81,3 +88,4 @@
{% endblock %}
</body>
</html>
+<!-- end template base.html -->
diff --git a/templates/base_content.html b/templates/base_content.html
index 6dec6cae..98a09150 100644
--- a/templates/base_content.html
+++ b/templates/base_content.html
@@ -1,8 +1,9 @@
-锘縶% load i18n %}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!-- template base_content.html -->
+{% load i18n %}
<html>
<head>
- <title>{% block title %}{% endblock %} - {{ APP_TITLE }}</title>
+ <title>{% block title %}{% endblock %} - {% trans "site title" %} - {% trans "site slogan" %}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="verify-v1" content="55uGNnQVJW8p1bbXeF/Xbh9I7nZBM/wLhRz6N/I1kkA=" />
<link rel="shortcut icon" href="/content/images/favicon.ico" >
@@ -10,17 +11,24 @@
{% spaceless %}
{% block forestyle %}{% endblock %}
{% endspaceless %}
- <script type='text/javascript' src='/content/js/com.cnprog.utils.js'></script>
<script src="http://www.google.com/jsapi"></script>
- <script>google.load("jquery", "1.2.6");</script>
- <script type="text/javascript">
+ <script>google.load("jquery", "1.2.6");</script>
+ <script type="text/javascript">
+ var i18nLang = 'en';
+ </script>
+ <script type='text/javascript' src='/content/js/com.cnprog.i18n.js'></script>
+ <script type='text/javascript' src='/content/js/jquery.i18n.js'></script>
+ <script type='text/javascript' src='/content/js/com.cnprog.utils.js'></script>
+
+ <!-- <script type="text/javascript">
var uservoiceJsHost = ("https:" == document.location.protocol) ? "https://uservoice.com" : "http://cdn.uservoice.com";
document.write(unescape("%3Cscript src='" + uservoiceJsHost + "/javascripts/widgets/tab.js' type='text/javascript'%3E%3C/script%3E"))
</script>
<script type="text/javascript">
UserVoice.Tab.show({
- key: 'cnprog',
- host: 'cnprog.uservoice.com',
+ //EDIT!!!
+ key: 'uservoicekey',
+ host: 'where.uservoice.com',
forum: 'general',
alignment: 'left', /* 'left', 'right' */
background_color:'#777',
@@ -28,7 +36,8 @@
hover_color: '#06C',
lang: 'en' /* 'en', 'de', 'nl', 'es', 'fr' */
})
- </script>
+ </script>-->
+ <!-- todo move this to settings-->
{% with request.user.get_messages as messages%}
{% if messages %}
@@ -49,10 +58,10 @@
<body>
<div class="notify" style="display:none">
<span>{% if request.user.get_messages %}
- {% trans "Congratulations! You have new badges: " %}{% for message in request.user.get_messages %}
- <font class="darkred">{{ message }}</font>, {% endfor %}{% trans "go to see" %}
- <a href="{{ request.user.get_profile_url }}">{% trans "Profile" %}</a>{% endif %}</span>
- <a class="close-notify" onclick="notify.close(true)">&times;</a>
+ {% trans "congratulations, community gave you a badge" %}:{% for message in request.user.get_messages %}
+ <font class="darkred">{{ message }}</font>, {% endfor %}{% trans "see" %}
+ <a href="{{ request.user.get_profile_url }}">{% trans "profile" %}</a>{% endif %}</span>
+ <a class="close-notify" onclick="notify.close(true)">&times;</a>
</div>
{% include "header.html" %}
<div id="wrapper">
@@ -74,3 +83,4 @@
{% endblock %}
</body>
</html>
+<!-- end template base_content.html -->
diff --git a/templates/book.html b/templates/book.html
index e5d4396b..a58a09f2 100644
--- a/templates/book.html
+++ b/templates/book.html
@@ -1,8 +1,10 @@
+<!-- template book.html -->
{% extends "base_content.html" %}
+{% load i18n %}
{% load extra_tags %}
{% load extra_filters %}
{% load humanize %}
-{% block title %}{% spaceless %}{{ book.title }}-璇讳功棰戦亾{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{{ book.title }}-{% trans "reading channel" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -21,27 +23,27 @@
<div class="bookSummary">
<table>
<tr>
- <td>銆愪綔鑰呫</td>
+ <td>{% trans "[author]" %}</td>
<td><b><a href="{% url user book.user.id %}" rel="nofollow" >{{ book.author }}</a></b></td>
</tr>
<tr>
- <td>銆愬嚭鐗堢ぞ銆</td>
+ <td>{% trans "[publisher]" %}</td>
<td>{{ book.publication }}</td>
</tr>
<tr>
- <td>銆愬嚭鐗堟棩鏈熴</td>
+ <td>{% trans "[publication date]" %}</td>
<td>{{ book.published_at|date:"Y-m" }}</td>
</tr>
<tr>
- <td>銆愪环鏍笺</td>
- <td>{{ book.price }} 鍏</td>
+ <td>{% trans "[price]" %}</td>
+ <td>{{ book.price }} {% trans "currency unit" %}</td>
</tr>
<tr>
- <td>銆愰〉鏁般</td>
- <td>{{ book.pages }} 椤</td>
+ <td>{% trans "[pages]" %}</td>
+ <td>{{ book.pages }} {% trans "pages abbreviation" %}</td>
</tr>
<tr>
- <td>銆愭爣绛俱</td>
+ <td>{% trans "[tags]" %}</td>
<td>{{ book.tagnames }}</td>
</tr>
<tr>
@@ -51,17 +53,17 @@
{% if author_info.blog_url %}
<tr>
<td></td>
- <td><a href="{{ author_info.blog_url }}" rel="nofollow" >浣滆呭崥瀹 禄</a></td>
+ <td><a href="{{ author_info.blog_url }}" rel="nofollow" >{% trans "author blog" %} 禄</a></td>
</tr>
{% endif %}
<tr>
<td> </td>
- <td><a href="#" rel="nofollow">涔︾睄鐩綍 禄</a></td>
+ <td><a href="#" rel="nofollow">{% trans "book directory" %} 禄</a></td>
</tr>
<tr>
<td> </td>
- <td><a href="#" rel="nofollow">缃戜笂璐拱 禄</a></td>
+ <td><a href="#" rel="nofollow">{% trans "buy online" %} 禄</a></td>
</tr>
</table>
</div>
@@ -74,21 +76,21 @@
<div class="tabBar">
<div class="tabsB">
- <a id="qa" class="on" title="鍥句功鐩稿叧鐨勬妧鏈瓟鐤" href="#">绛旇鑰呴棶</a>
+ <a id="qa" class="on" title="{% trans "book technical Q&A %}" href="#">{% trans "reader questions" %}</a>
</div>
</div>
- <div class="bookAsk"><a href="{% url ask_book book.short_name %}">鍚戜綔鑰呮彁闂</div>
+ <div class="bookAsk"><a href="{% url ask_book book.short_name %}">{% trans "ask the author" %}</div>
<div class="user-stats-table">
{% for question in questions.object_list %}
{% if question.favourite_count %}
{% if question.favorited_myself %}
<div class="favorites-count">
- <img title="杩欎釜闂琚 {{question.favourite_count}} 浣嶇敤鎴锋敹钘" src="/content/images/vote-favorite-on.png">
+ <img title="{% trans "this question was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}" src="/content/images/vote-favorite-on.png">
<div><b>{{question.favourite_count|intcomma}}</b></div>
</div>
{% else %}
<div class="favorites-count-off">
- <img title="杩欎釜闂琚 {{question.favourite_count}} 浣嶇敤鎴锋敹钘" src="/content/images/vote-favorite-off.png">
+ <img title="{% trans "this question was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}" src="/content/images/vote-favorite-off.png">
<div><b>{{question.favourite_count|intcomma}}</b></div>
</div>
{% endif %}
@@ -100,17 +102,17 @@
<div class="stats">
<div class="votes">
<div class="vote-count-post">{{question.score|intcomma}}</div>
- 绁
+ {% trans "votes" %}
</div>
- <div title="{% if question.answer_accepted %}鏈夌瓟妗堝凡琚帴鍙椾负姝g‘绛旀{% endif %}" class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
+ <div title="{% if question.answer_accepted %}{% trans "the answer has been accepted to be correct" %}{% endif %}" class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
<div class="answer-count-post">{{question.answer_count|intcomma}}</div>
- 鍥炵瓟
-
+ {% trans "answer" %}
+
</div>
<div class="views">
<div class="views-count-post">{{question.view_count|cnprog_intword|safe}}</div>
- 娴忚
+ {% trans "views" %}
</div>
</div>
</a>
@@ -120,7 +122,7 @@
</h3>
<div class="tags">
{% for tag in question.tagname_list %}
- <a href="{% url forum.views.tag tag|urlencode %}" title="鏌ョ湅鏈夊叧'{{ tag }}'鐨勯棶棰" rel="tag">{{ tag }}</a>
+ <a href="{% url forum.views.tag tag|urlencode %}" title="{% "see questions tagged with" %}'{{ tag }}'{% trans "using tags" %}" rel="tag">{{ tag }}</a>
{% endfor %}
</div>
<div class="started">
@@ -136,15 +138,15 @@
</div>
{% endblock %}
{% block tail %}
-
<div class="pager">
{% cnprog_paginator context %}
</div>
<div class="bookFeed">
<div id="feeds">
- <a href="/feeds/rss" title="RSS璁㈤槄璇ュ浘涔︽渶鏂伴棶棰">璁㈤槄鏈鏂伴棶棰</a>
+ <a href="/feeds/rss" title="{% trans "subscribe to book RSS feed" %}">{% trans "subscribe to the questions feed" %}</a>
</div>
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
+<!-- end template book.html -->
diff --git a/templates/close.html b/templates/close.html
index 04a22f18..32df3e82 100644
--- a/templates/close.html
+++ b/templates/close.html
@@ -1,7 +1,9 @@
+<!-- template close.html -->
{% extends "base_content.html" %}
+{% load i18n %}
{% load extra_tags %}
{% load humanize %}
-{% block title %}{% spaceless %}鍏抽棴闂{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Close question" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -11,26 +13,24 @@
{% endblock %}
{% block content %}
<div id="main-bar" class="headNormal">
- 鍏抽棴闂
+ {% trans "Close question" %}
</div>
<div id="main-body" style="width:100%;margin-bottom:10px">
- <p>鐢变簬浠ヤ笅鍘熷洜锛屼綘瑕佸叧闂繖涓棶棰橈細 <a href="{{ question.get_absolute_url }}">
+ <p>{% trans "Close the question" %}: <a href="{{ question.get_absolute_url }}">
<strong>{{ question.get_question_title }}</strong></a>
</p>
<form id="fmclose" action="{% url close question.id %}" method="post" >
<p>
- <strong>鍘熷洜锛</strong> {{ form.reason }}
+ <strong>{% trans "Reasons" %}:</strong> {{ form.reason }}
</p>
<div id="" style="padding-top:20px">
- <input type="submit" value="纭畾鍏抽棴" class="submit" />
- <input id="btBack" type="button" class="submit" value="鍙栨秷" />
+ <input type="submit" value="{% trans "OK to close" %}" class="submit" />
+ <input id="btBack" type="button" class="submit" value="{% trans "Cancel" %}" />
</div>
</form>
</div>
{% endblock %}
-
-
-
+<!-- end template close.html -->
diff --git a/templates/content/js/com.cnprog.i18n.js b/templates/content/js/com.cnprog.i18n.js
new file mode 100644
index 00000000..2d8c90a6
--- /dev/null
+++ b/templates/content/js/com.cnprog.i18n.js
@@ -0,0 +1,90 @@
+// Evgeny Fadeev evgeny.fadeev@gmail.com localized for english and chinese
+// i18nLang variable must be set in html header to extract correct language
+var i18nZh = {
+ 'insufficient privilege':'鐢ㄦ埛鏉冮檺涓嶅湪鎿嶄綔鑼冨洿',
+ 'cannot pick own answer as best':'涓嶈兘璁剧疆鑷繁鐨勫洖绛斾负鏈浣崇瓟妗',
+ 'anonymous users cannot select favorite questions':'鍖垮悕鐢ㄦ埛涓嶈兘鏀惰棌闂锛岃鍏',
+ 'please login':'娉ㄥ唽鎴栬呯櫥褰',
+ 'anonymous users cannot vote':'鍖垮悕鐢ㄦ埛涓嶈兘鎶曠エ',
+ '>15 points requried to upvote':'闇瑕+15绉垎鎵嶈兘鎶曟敮鎸佺エ銆',
+ '>100 points required to downvote':'闇瑕+100绉垎鎵嶈兘鎶曞弽瀵圭エ銆',
+ 'please see': '鏌ョ湅',
+ 'cannot vote for own posts':'涓嶈兘缁欒嚜宸辩殑甯栧瓙鎶曠エ',
+ 'daily vote cap exhausted':'瀵逛笉璧凤紝鎮ㄥ凡鐢ㄥ畬浠婃棩鎵鏈夌殑鎶曠エ銆',
+ 'cannot revoke old vote':'杩欎釜鎶曠エ宸茬粡杩囨椂锛屼笉鑳芥挙閿銆',
+ 'please confirm offensive':"纭畾瑕佸綊绫昏甯栦负骞垮憡銆佷汉韬敾鍑汇佹伓鎰忚█璁哄悧锛",
+ 'anonymous users cannot flag offensive posts':'鍖垮悕鐢ㄦ埛涓嶈兘鎿嶄綔锛岃鍏',
+ 'cannot flag message as offensive twice':'涓嶈兘閲嶅鎿嶄綔銆',
+ 'flag offensive cap exhausted':'瀵逛笉璧凤紝鎮ㄥ凡鐢ㄥ畬浠婃棩鎵鏈夌殑5娆♀樻按甯栤欐搷浣溿',
+ 'need >15 points to report spam':"闇瑕+15绉垎鎵嶈兘褰掔被鈥樺瀮鍦惧笘鈥欍",
+ 'confirm delete':"纭畾瑕佸垹闄/鎾ら攢鍒犻櫎璇ュ笘鍚楋紵",
+ 'anonymous users cannot delete/undelete':"鍖垮悕鐢ㄦ埛涓嶈兘鍒犻櫎鎴栨挙閿鍒犻櫎甯栧瓙",
+ 'post recovered':"鎿嶄綔鎴愬姛锛佽甯栧瓙宸茶鎭㈠銆",
+ 'post deleted':"鎿嶄綔鎴愬姛锛佽甯栧瓙宸插垹闄ゃ",
+ 'add comment':'娣诲姞璇勮',
+ 'community reputation points':'绀惧尯绉垎',
+ 'to comment, need':'璇勮闇瑕',
+ 'delete this comment':'鍒犻櫎姝よ瘎璁',
+ 'hide comments':"闅愯棌璇勮",
+ 'add a comment':"娣诲姞璇勮",
+ 'comments':"璇勮",
+ 'confirm delete comment':"鐪熻鍒犻櫎姝よ瘎璁哄悧锛",
+ 'characters':'瀛楃',
+ 'can write':'杩樺彲鍐',
+ 'click to close':'鐐瑰嚮娑堟伅妗嗗叧闂',
+ 'loading...':'璇诲彇涓...',
+ 'tags cannot be empty':'鏍囩涓嶈兘涓虹┖銆',
+ 'tablimits info':"鏈澶5涓爣绛撅紝姣忎釜鏍囩闀垮害灏忎簬20涓瓧绗︺",
+ 'content cannot be empty':'鍐呭涓嶈兘涓虹┖銆',
+ 'content minchars': '璇疯緭鍏ヨ嚦灏 {0} 瀛楃銆',
+ 'please enter title':'璇疯緭鍏ユ爣棰樸',
+ 'title minchars':"璇疯緭鍏ヨ嚦灏 {0} 瀛楃銆",
+ 'delete':'鍒犻櫎',
+ 'undelete': '鍙栨秷',
+ 'bold':'绮椾綋',
+ 'italic':'鏂滀綋',
+ 'link':'瓒呴摼鎺',
+ 'quote':'寮曠敤',
+ 'preformatted text':'浠g爜',
+ 'image':'鍥剧墖',
+ 'numbered list':'鏁板瓧缂栧彿鍒楄〃',
+ 'bulleted list':'椤圭洰绗﹀彿鍒楄〃',
+ 'heading':'鏍囬',
+ 'horizontal bar':'姘村钩绾',
+ 'undo':'鎾ら攢',
+ 'redo':'閲嶅仛',
+ 'enter image url':'<b>杈撳叆鍥剧墖鍦板潃</b></p><p>绀轰緥锛<br />http://www.example.com/image.jpg \"鎴戠殑鎴浘\"',
+ 'enter url':'<b>杈撳叆Web鍦板潃</b></p><p>绀轰緥锛<br />http://www.cnprog.com/ \"鎴戠殑缃戠珯\"</p>"',
+ 'upload image':'鎴栬呬笂浼犳湰鍦板浘鐗囷細',
+};
+
+var i18nEn = {
+ 'to comment, need': 'to comment, need reputation ',
+ 'please see':'please see ',
+ 'community reputation points':' ',
+ 'upload image':'Upload image:',
+ 'enter image url':'enter URL of the image, e.g. http://www.example.com/image.jpg \"image title\"',
+ 'enter url':'enter Web address, e.g. http://www.example.com \"page title\"',
+ 'daily vote cap exhausted':'sorry, you\'ve used up todays vote cap',
+ 'cannot pick own answer as best':'cannot accept own answer',
+ 'cannot revoke old vote':'older votes cannot be revoked',
+ 'please confirm offensive':'are you sure this post is offensive, contains spam, advertising, malicious remarks, etc.?',
+ 'flag offensive cap exhausted':'sorry, you\'ve used up todays cap of flagging offensive messages',
+ 'confirm delete':'are you sure you want to delete this?',
+ 'anonymous users cannot delete/undelete':'anonymous users cannot delete or undelete posts',
+ 'post recovered':'your post is now restored!',
+ 'post deleted':'your post has been deleted',
+ 'confirm delete comment':'do you really want to delete this comment?',
+ 'can write':'have ',
+ 'tablimits info':'up to 5 tags, no more than 20 characters each',
+ 'content minchars': 'please enter more than {0} characters',
+ 'title minchars':"please enter at least {0} characters",
+ 'characters':'characters left',
+};
+
+var i18n = {
+ 'en':i18nEn,
+ 'zh':i18nZh
+};
+
+var i18n_dict = i18n[i18nLang];
diff --git a/templates/content/js/com.cnprog.post.js b/templates/content/js/com.cnprog.post.js
index dbf5d128..bd4b00fd 100644
--- a/templates/content/js/com.cnprog.post.js
+++ b/templates/content/js/com.cnprog.post.js
@@ -49,24 +49,37 @@ var Vote = function(){
var removeQuestionLinkIdPrefix = 'question-delete-link-';
var removeAnswerLinkIdPrefix = 'answer-delete-link-';
- var acceptAnonymousMessage = "鐢ㄦ埛鏉冮檺涓嶅湪鎿嶄綔鑼冨洿";
- var acceptOwnAnswerMessage = "涓嶈兘璁剧疆鑷繁鐨勫洖绛斾负鏈浣崇瓟妗";
- var favoriteAnonymousMessage = "鍖垮悕鐢ㄦ埛涓嶈兘鏀惰棌闂锛岃鍏<a href='/account/signin/?next=/questions/{{QuestionID}}'>娉ㄥ唽鎴栬呯櫥褰</a>";
- var voteAnonymousMessage = "鍖垮悕鐢ㄦ埛涓嶈兘鎶曠エ锛岃鍏<a href='/account/signin/?next=/questions/{{QuestionID}}'>娉ㄥ唽鎴栬呯櫥褰</a>";
- var upVoteRequiredScoreMessage = "闇瑕+15绉垎鎵嶈兘鎶曟敮鎸佺エ銆傛煡鐪<a href='/faq'>faq</a>";
- var downVoteRequiredScoreMessage = "闇瑕+100绉垎鎵嶈兘鎶曞弽瀵圭エ銆傛煡鐪<a href='/faq'>faq</a>";
- var voteOwnDeniedMessage = "涓嶈兘缁欒嚜宸辩殑甯栧瓙鎶曠エ";
- var voteRequiredMoreVotes = "瀵逛笉璧凤紝鎮ㄥ凡鐢ㄥ畬浠婃棩鎵鏈夌殑鎶曠エ銆傛煡鐪<a href='/faq'>faq</a>";
- var voteDenyCancelMessage = "杩欎釜鎶曠エ宸茬粡杩囨椂锛屼笉鑳芥挙閿銆傛煡鐪<a href='/faq'>faq</a>";
- var offensiveConfirmation = "纭畾瑕佸綊绫昏甯栦负骞垮憡銆佷汉韬敾鍑汇佹伓鎰忚█璁哄悧锛";
- var offensiveAnonymousMessage = "鍖垮悕鐢ㄦ埛涓嶈兘鎿嶄綔锛岃鍏<a href='/account/signin/?next=/questions/{{QuestionID}}'>娉ㄥ唽鎴栬呯櫥褰</a>";
- var offensiveTwiceMessage = "涓嶈兘閲嶅鎿嶄綔銆傛煡鐪<a href='/faq'>faq</a>";
- var offensiveNoFlagsLeftMessage = "瀵逛笉璧凤紝鎮ㄥ凡鐢ㄥ畬浠婃棩鎵鏈夌殑5娆♀樻按甯栤欐搷浣溿傛煡鐪<a href='/faq'>faq</a>";
- var offensiveNoPermissionMessage = "闇瑕+15绉垎鎵嶈兘褰掔被鈥樺瀮鍦惧笘鈥欍傛煡鐪<a href='/faq'>faq</a>";
- var removeConfirmation = "纭畾瑕佸垹闄/鎾ら攢鍒犻櫎璇ュ笘鍚楋紵";
- var removeAnonymousMessage = "鍖垮悕鐢ㄦ埛涓嶈兘鍒犻櫎鎴栨挙閿鍒犻櫎甯栧瓙";
- var recoveredMessage = "鎿嶄綔鎴愬姛锛佽甯栧瓙宸茶鎭㈠銆";
- var deletedMessage = "鎿嶄綔鎴愬姛锛佽甯栧瓙宸插垹闄ゃ"
+ var acceptAnonymousMessage = $.i18n._('insufficient privilege');
+ var acceptOwnAnswerMessage = $.i18n._('cannot pick own answer as best');
+ var favoriteAnonymousMessage = $.i18n._('anonymous user cannot select favorite questions')
+ + "<a href='/account/signin/?next=/questions/{{QuestionID}}'>"
+ + $.i18n._('please login') + "</a>";
+ var voteAnonymousMessage = $.i18n._('anonymous users cannot vote')
+ + "<a href='/account/signin/?next=/questions/{{QuestionID}}'>"
+ + $.i18n._('please login') + "</a>";
+ var upVoteRequiredScoreMessage = $.i18n._('>15 points requried to upvote')
+ + $.i18n._('please see') + "<a href='/faq'>faq</a>";
+ var downVoteRequiredScoreMessage = $.i18n._('>100 points requried to downvote')
+ + $.i18n._('please see') + "<a href='/faq'>faq</a>";
+ var voteOwnDeniedMessage = $.i18n._('cannot vote for own posts');
+ var voteRequiredMoreVotes = $.i18n._('daily vote cap exhausted')
+ + $.i18n._('please see') + "<a href='/faq'>faq</a>";
+ var voteDenyCancelMessage = $.i18n._('cannot revoke old vote')
+ + $.i18n._('please see') + "<a href='/faq'>faq</a>";
+ var offensiveConfirmation = $.i18n._('please confirm offensive');
+ var offensiveAnonymousMessage = $.i18n._('anonymous users cannot flag offensive posts')
+ + "<a href='/account/signin/?next=/questions/{{QuestionID}}'>"
+ + $.i18n._('please login') + "</a>";
+ var offensiveTwiceMessage = $.i18n._('cannot flag message as offensive twice')
+ + $.i18n._('please see') + "<a href='/faq'>faq</a>";
+ var offensiveNoFlagsLeftMessage = $.i18n._('flag offensive cap exhausted')
+ + $.i18n._('please see') + "<a href='/faq'>faq</a>";
+ var offensiveNoPermissionMessage = $.i18n._('need >15 points to report spam')
+ + $.i18n._('please see') + "<a href='/faq'>faq</a>";
+ var removeConfirmation = $.i18n._('confirm delete');
+ var removeAnonymousMessage = $.i18n._('anonymous users cannot delete/undelete');
+ var recoveredMessage = $.i18n._('post recovered');
+ var deletedMessage = $.i18n._('post deleted');
var VoteType = {
acceptAnswer : 0,
@@ -201,7 +214,7 @@ var Vote = function(){
});
getremoveQuestionLink().unbind('click').click(function(event){
- Vote.remove(this, VoteType.removeQuestion)
+ Vote.remove(this, VoteType.removeQuestion);
});
getremoveAnswersLinks().unbind('click').click(function(event){
@@ -330,15 +343,22 @@ var Vote = function(){
};
var callback_remove = function(object, voteType, data){
+ alert(data.status);
if(data.allowed == "0" && data.success == "0"){
showMessage(object, removeAnonymousMessage.replace("{{QuestionID}}", questionId));
}
- else if(data.status == "1"){
- showMessage(object, recoveredMessage);
- }
- else if(data.success == "1"){
- showMessage(object, deletedMessage);
- }
+ else if (data.success == "1"){
+ if (removeActionType == 'delete'){
+ postNode.addClass('deleted');
+ postRemoveLink.innerHTML = $.i18n._('undelete');
+ showMessage(object, deletedMessage);
+ }
+ else if (removeActionType == 'undelete') {
+ postNode.removeClass('deleted');
+ postRemoveLink.innerHTML = $.i18n._('delete');
+ showMessage(object, recoveredMessage);
+ }
+ }
};
return {
@@ -395,8 +415,23 @@ var Vote = function(){
return false;
}
if(confirm(removeConfirmation)){
- postId = object.id.substr(object.id.lastIndexOf('-') + 1);
+ bits = object.id.split('-');
+ postId = bits.pop();/* this seems to be used within submit! */
+ postType = bits.shift();
+
+ if (postType == 'answer'){
+ postNode = $('#answer-container-' + postId);
+ postRemoveLink = object;
+ if (postNode.hasClass('deleted')){
+ removeActionType = 'undelete';
+ }
+ else {
+ removeActionType = 'delete';
+ }
+ }
submit($(object), voteType, callback_remove);
+
+
}
}
}
@@ -426,7 +461,8 @@ function createComments(type) {
var form = '<form id="' + formId + '" class="post-comments"><div>';
form += '<textarea name="comment" cols="60" rows="5" maxlength="300" onblur="'+ objectType +'Comments.updateTextCounter(this)" ';
form += 'onfocus="' + objectType + 'Comments.updateTextCounter(this)" onkeyup="'+ objectType +'Comments.updateTextCounter(this)"></textarea>';
- form += '<input type="submit" value="娣诲姞璇勮" /><br><span class="text-counter"></span>';
+ form += '<input type="submit" value="'
+ + $.i18n._('add comment') + '" /><br><span class="text-counter"></span>';
form += '<span class="form-error"></span></div></form>';
jDiv.append(form);
@@ -439,7 +475,10 @@ function createComments(type) {
else {
var divId = "comments-rep-needed-" + objectType + '-' + id;
if (jDiv.find("#" + divId).length == 0) {
- jDiv.append('<div id="' + divId + '" style="color:red">璇勮闇瑕 ' + repNeededForComments + ' 绀惧尯绉垎 - <a href="/faq" class="comment-user">鏌ョ湅faq</a></span>');
+ jDiv.append('<div id="' + divId + '" style="color:red">'
+ + $.i18n._('to comment, need') + ' ' +
+ + repNeededForComments + ' ' + $.i18n._('community reputation points')
+ + '<a href="/faq" class="comment-user">' + $.i18n._('please see') + 'faq</a></span>');
}
}
};
@@ -477,7 +516,7 @@ function createComments(type) {
var imgHover = "/content/images/close-small-hover.png";
html += '<img onclick="' + objectType + 'Comments.deleteComment($(this), ' + json.object_id + ', \'' + json.delete_url + '\')" src="' + img;
html += '" onmouseover="$(this).attr(\'src\', \'' + imgHover + '\')" onmouseout="$(this).attr(\'src\', \'' + img
- html += '\')" title="鍒犻櫎姝よ瘎璁" />';
+ html += '\')" title="' + $.i18n._('delete this comment') + '" />';
}
html += '</div>';
@@ -524,13 +563,15 @@ function createComments(type) {
renderForm(id, jDiv);
jDiv.show();
if (canPostComments(id, jDiv)) jDiv.find("textarea").get(0).focus();
- jDiv.siblings("a").unbind("click").click(function() { commentsFactory[objectType].hide(id); }).text("闅愯棌璇勮");
+ jDiv.siblings("a").unbind("click").click(function(){
+ commentsFactory[objectType].hide(id);
+ }).text($.i18n._('hide comments'));
},
hide: function(id) {
var jDiv = jDivInit(id);
var len = jDiv.children("div.comments").children().length;
- var anchorText = len == 0 ? "娣诲姞璇勮" : "璇勮 (<b>" + len + "</b>)";
+ var anchorText = len == 0 ? $.i18n._('add a comment') : $.i18n._('comments') + ' (<b>' + len + "</b>)";
jDiv.hide();
jDiv.siblings("a").unbind("click").click(function() { commentsFactory[objectType].show(id); }).html(anchorText);
@@ -538,7 +579,7 @@ function createComments(type) {
},
deleteComment: function(jImg, id, deleteUrl) {
- if (confirm("鐪熻鍒犻櫎姝よ瘎璁哄悧锛")) {
+ if (confirm($.i18n._('confirm delete comment'))) {
jImg.hide();
appendLoaderImg(id);
$.post(deleteUrl, { dataNeeded: "forIIS7" }, function(json) {
@@ -551,7 +592,9 @@ function createComments(type) {
var length = textarea.value ? textarea.value.length : 0;
var color = length > 270 ? "#f00" : length > 200 ? "#f60" : "#999";
var jSpan = $(textarea).siblings("span.text-counter");
- jSpan.html('杩樺彲鍐' + (300 - length) + ' 瀛楃').css("color", color);
+ jSpan.html($.i18n._('can write')
+ + (300 - length) + ' '
+ + $.i18n._('characters')).css("color", color);
}
};
}
@@ -570,4 +613,4 @@ var commentsFactory = {'question' : questionComments, 'answer' : answerComments}
Prettify
http://www.apache.org/licenses/LICENSE-2.0
*/
-var PR_SHOULD_USE_CONTINUATION = true; var PR_TAB_WIDTH = 8; var PR_normalizedHtml; var PR; var prettyPrintOne; var prettyPrint; function _pr_isIE6() { var isIE6 = navigator && navigator.userAgent && /\bMSIE 6\./.test(navigator.userAgent); _pr_isIE6 = function() { return isIE6; }; return isIE6; } (function() { function wordSet(words) { words = words.split(/ /g); var set = {}; for (var i = words.length; --i >= 0; ) { var w = words[i]; if (w) { set[w] = null; } } return set; } var FLOW_CONTROL_KEYWORDS = "break continue do else for if return while "; var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " + "double enum extern float goto int long register short signed sizeof " + "static struct switch typedef union unsigned void volatile "; var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " + "new operator private protected public this throw true try "; var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool " + "concept concept_map const_cast constexpr decltype " + "dynamic_cast explicit export friend inline late_check " + "mutable namespace nullptr reinterpret_cast static_assert static_cast " + "template typeid typename typeof using virtual wchar_t where "; var JAVA_KEYWORDS = COMMON_KEYWORDS + "boolean byte extends final finally implements import instanceof null " + "native package strictfp super synchronized throws transient "; var CSHARP_KEYWORDS = JAVA_KEYWORDS + "as base by checked decimal delegate descending event " + "fixed foreach from group implicit in interface internal into is lock " + "object out override orderby params readonly ref sbyte sealed " + "stackalloc string select uint ulong unchecked unsafe ushort var "; var JSCRIPT_KEYWORDS = COMMON_KEYWORDS + "debugger eval export function get null set undefined var with " + "Infinity NaN "; var PERL_KEYWORDS = "caller delete die do dump elsif eval exit foreach for " + "goto if import last local my next no our print package redo require " + "sub undef unless until use wantarray while BEGIN END "; var PYTHON_KEYWORDS = FLOW_CONTROL_KEYWORDS + "and as assert class def del " + "elif except exec finally from global import in is lambda " + "nonlocal not or pass print raise try with yield " + "False True None "; var RUBY_KEYWORDS = FLOW_CONTROL_KEYWORDS + "alias and begin case class def" + " defined elsif end ensure false in module next nil not or redo rescue " + "retry self super then true undef unless until when yield BEGIN END "; var SH_KEYWORDS = FLOW_CONTROL_KEYWORDS + "case done elif esac eval fi " + "function in local set then until "; var ALL_KEYWORDS = (CPP_KEYWORDS + CSHARP_KEYWORDS + JSCRIPT_KEYWORDS + PERL_KEYWORDS + PYTHON_KEYWORDS + RUBY_KEYWORDS + SH_KEYWORDS); var PR_STRING = 'str'; var PR_KEYWORD = 'kwd'; var PR_COMMENT = 'com'; var PR_TYPE = 'typ'; var PR_LITERAL = 'lit'; var PR_PUNCTUATION = 'pun'; var PR_PLAIN = 'pln'; var PR_TAG = 'tag'; var PR_DECLARATION = 'dec'; var PR_SOURCE = 'src'; var PR_ATTRIB_NAME = 'atn'; var PR_ATTRIB_VALUE = 'atv'; var PR_NOCODE = 'nocode'; function isWordChar(ch) { return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'); } function spliceArrayInto(inserted, container, containerPosition, countReplaced) { inserted.unshift(containerPosition, countReplaced || 0); try { container.splice.apply(container, inserted); } finally { inserted.splice(0, 2); } } var REGEXP_PRECEDER_PATTERN = function() { var preceders = ["!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=", "&=", "(", "*", "*=", "+=", ",", "-=", "->", "/", "/=", ":", "::", ";", "<", "<<", "<<=", "<=", "=", "==", "===", ">", ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[", "^", "^=", "^^", "^^=", "{", "|", "|=", "||", "||=", "~", "break", "case", "continue", "delete", "do", "else", "finally", "instanceof", "return", "throw", "try", "typeof"]; var pattern = '(?:' + '(?:(?:^|[^0-9.])\\.{1,3})|' + '(?:(?:^|[^\\+])\\+)|' + '(?:(?:^|[^\\-])-)'; for (var i = 0; i < preceders.length; ++i) { var preceder = preceders[i]; if (isWordChar(preceder.charAt(0))) { pattern += '|\\b' + preceder; } else { pattern += '|' + preceder.replace(/([^=<>:&])/g, '\\$1'); } } pattern += '|^)\\s*$'; return new RegExp(pattern); } (); var pr_amp = /&/g; var pr_lt = /</g; var pr_gt = />/g; var pr_quot = /\"/g; function attribToHtml(str) { return str.replace(pr_amp, '&amp;').replace(pr_lt, '&lt;').replace(pr_gt, '&gt;').replace(pr_quot, '&quot;'); } function textToHtml(str) { return str.replace(pr_amp, '&amp;').replace(pr_lt, '&lt;').replace(pr_gt, '&gt;'); } var pr_ltEnt = /&lt;/g; var pr_gtEnt = /&gt;/g; var pr_aposEnt = /&apos;/g; var pr_quotEnt = /&quot;/g; var pr_ampEnt = /&amp;/g; var pr_nbspEnt = /&nbsp;/g; function htmlToText(html) { var pos = html.indexOf('&'); if (pos < 0) { return html; } for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0; ) { var end = html.indexOf(';', pos); if (end >= 0) { var num = html.substring(pos + 3, end); var radix = 10; if (num && num.charAt(0) === 'x') { num = num.substring(1); radix = 16; } var codePoint = parseInt(num, radix); if (!isNaN(codePoint)) { html = (html.substring(0, pos) + String.fromCharCode(codePoint) + html.substring(end + 1)); } } } return html.replace(pr_ltEnt, '<').replace(pr_gtEnt, '>').replace(pr_aposEnt, "'").replace(pr_quotEnt, '"').replace(pr_ampEnt, '&').replace(pr_nbspEnt, ' '); } function isRawContent(node) { return 'XMP' === node.tagName; } function normalizedHtml(node, out) { switch (node.nodeType) { case 1: var name = node.tagName.toLowerCase(); out.push('<', name); for (var i = 0; i < node.attributes.length; ++i) { var attr = node.attributes[i]; if (!attr.specified) { continue; } out.push(' '); normalizedHtml(attr, out); } out.push('>'); for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out); } if (node.firstChild || !/^(?:br|link|img)$/.test(name)) { out.push('<\/', name, '>'); } break; case 2: out.push(node.name.toLowerCase(), '="', attribToHtml(node.value), '"'); break; case 3: case 4: out.push(textToHtml(node.nodeValue)); break; } } var PR_innerHtmlWorks = null; function getInnerHtml(node) { if (null === PR_innerHtmlWorks) { var testNode = document.createElement('PRE'); testNode.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />')); PR_innerHtmlWorks = !/</.test(testNode.innerHTML); } if (PR_innerHtmlWorks) { var content = node.innerHTML; if (isRawContent(node)) { content = textToHtml(content); } return content; } var out = []; for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out); } return out.join(''); } function makeTabExpander(tabWidth) { var SPACES = ' '; var charInLine = 0; return function(plainText) { var out = null; var pos = 0; for (var i = 0, n = plainText.length; i < n; ++i) { var ch = plainText.charAt(i); switch (ch) { case '\t': if (!out) { out = []; } out.push(plainText.substring(pos, i)); var nSpaces = tabWidth - (charInLine % tabWidth); charInLine += nSpaces; for (; nSpaces >= 0; nSpaces -= SPACES.length) { out.push(SPACES.substring(0, nSpaces)); } pos = i + 1; break; case '\n': charInLine = 0; break; default: ++charInLine; } } if (!out) { return plainText; } out.push(plainText.substring(pos)); return out.join(''); }; } var pr_chunkPattern = /(?:[^<]+|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g; var pr_commentPrefix = /^<!--/; var pr_cdataPrefix = /^<\[CDATA\[/; var pr_brPrefix = /^<br\b/i; var pr_tagNameRe = /^<(\/?)([a-zA-Z]+)/; function extractTags(s) { var matches = s.match(pr_chunkPattern); var sourceBuf = []; var sourceBufLen = 0; var extractedTags = []; if (matches) { for (var i = 0, n = matches.length; i < n; ++i) { var match = matches[i]; if (match.length > 1 && match.charAt(0) === '<') { if (pr_commentPrefix.test(match)) { continue; } if (pr_cdataPrefix.test(match)) { sourceBuf.push(match.substring(9, match.length - 3)); sourceBufLen += match.length - 12; } else if (pr_brPrefix.test(match)) { sourceBuf.push('\n'); ++sourceBufLen; } else { if (match.indexOf(PR_NOCODE) >= 0 && isNoCodeTag(match)) { var name = match.match(pr_tagNameRe)[2]; var depth = 1; end_tag_loop: for (var j = i + 1; j < n; ++j) { var name2 = matches[j].match(pr_tagNameRe); if (name2 && name2[2] === name) { if (name2[1] === '/') { if (--depth === 0) { break end_tag_loop; } } else { ++depth; } } } if (j < n) { extractedTags.push(sourceBufLen, matches.slice(i, j + 1).join('')); i = j; } else { extractedTags.push(sourceBufLen, match); } } else { extractedTags.push(sourceBufLen, match); } } } else { var literalText = htmlToText(match); sourceBuf.push(literalText); sourceBufLen += literalText.length; } } } return { source: sourceBuf.join(''), tags: extractedTags }; } function isNoCodeTag(tag) { return !!tag.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g, ' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/); } function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) { var shortcuts = {}; (function() { var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns); for (var i = allPatterns.length; --i >= 0; ) { var patternParts = allPatterns[i]; var shortcutChars = patternParts[3]; if (shortcutChars) { for (var c = shortcutChars.length; --c >= 0; ) { shortcuts[shortcutChars.charAt(c)] = patternParts; } } } })(); var nPatterns = fallthroughStylePatterns.length; var notWs = /\S/; return function(sourceCode, opt_basePos) { opt_basePos = opt_basePos || 0; var decorations = [opt_basePos, PR_PLAIN]; var lastToken = ''; var pos = 0; var tail = sourceCode; while (tail.length) { var style; var token = null; var match; var patternParts = shortcuts[tail.charAt(0)]; if (patternParts) { match = tail.match(patternParts[1]); token = match[0]; style = patternParts[0]; } else { for (var i = 0; i < nPatterns; ++i) { patternParts = fallthroughStylePatterns[i]; var contextPattern = patternParts[2]; if (contextPattern && !contextPattern.test(lastToken)) { continue; } match = tail.match(patternParts[1]); if (match) { token = match[0]; style = patternParts[0]; break; } } if (!token) { style = PR_PLAIN; token = tail.substring(0, 1); } } decorations.push(opt_basePos + pos, style); pos += token.length; tail = tail.substring(token.length); if (style !== PR_COMMENT && notWs.test(token)) { lastToken = token; } } return decorations; }; } var PR_MARKUP_LEXER = createSimpleLexer([], [[PR_PLAIN, /^[^<]+/, null], [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/, null], [PR_COMMENT, /^<!--[\s\S]*?(?:-->|$)/, null], [PR_SOURCE, /^<\?[\s\S]*?(?:\?>|$)/, null], [PR_SOURCE, /^<%[\s\S]*?(?:%>|$)/, null], [PR_SOURCE, /^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i, null], [PR_TAG, /^<\/?\w[^<>]*>/, null]]); var PR_SOURCE_CHUNK_PARTS = /^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/; function tokenizeMarkup(source) { var decorations = PR_MARKUP_LEXER(source); for (var i = 0; i < decorations.length; i += 2) { if (decorations[i + 1] === PR_SOURCE) { var start, end; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var sourceChunk = source.substring(start, end); var match = sourceChunk.match(PR_SOURCE_CHUNK_PARTS); if (match) { decorations.splice(i, 2, start, PR_TAG, start + match[1].length, PR_SOURCE, start + match[1].length + (match[2] || '').length, PR_TAG); } } } return decorations; } var PR_TAG_LEXER = createSimpleLexer([[PR_ATTRIB_VALUE, /^\'[^\']*(?:\'|$)/, null, "'"], [PR_ATTRIB_VALUE, /^\"[^\"]*(?:\"|$)/, null, '"'], [PR_PUNCTUATION, /^[<>\/=]+/, null, '<>/=']], [[PR_TAG, /^[\w:\-]+/, /^</], [PR_ATTRIB_VALUE, /^[\w\-]+/, /^=/], [PR_ATTRIB_NAME, /^[\w:\-]+/, null], [PR_PLAIN, /^\s+/, null, ' \t\r\n']]); function splitTagAttributes(source, decorations) { for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; if (style === PR_TAG) { var start, end; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var chunk = source.substring(start, end); var subDecorations = PR_TAG_LEXER(chunk, start); spliceArrayInto(subDecorations, decorations, i, 2); i += subDecorations.length - 2; } } return decorations; } function sourceDecorator(options) { var shortcutStylePatterns = [], fallthroughStylePatterns = []; if (options.tripleQuotedStrings) { shortcutStylePatterns.push([PR_STRING, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, '\'"']); } else if (options.multiLineStrings) { shortcutStylePatterns.push([PR_STRING, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, '\'"`']); } else { shortcutStylePatterns.push([PR_STRING, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, '"\'']); } fallthroughStylePatterns.push([PR_PLAIN, /^(?:[^\'\"\`\/\#]+)/, null, ' \r\n']); if (options.hashComments) { shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']); } if (options.cStyleComments) { fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]); fallthroughStylePatterns.push([PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]); } if (options.regexLiterals) { var REGEX_LITERAL = ('^/(?=[^/*])' + '(?:[^/\\x5B\\x5C]' + '|\\x5C[\\s\\S]' + '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+' + '(?:/|$)'); fallthroughStylePatterns.push([PR_STRING, new RegExp(REGEX_LITERAL), REGEXP_PRECEDER_PATTERN]); } var keywords = wordSet(options.keywords); options = null; var splitStringAndCommentTokens = createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns); var styleLiteralIdentifierPuncRecognizer = createSimpleLexer([], [[PR_PLAIN, /^\s+/, null, ' \r\n'], [PR_PLAIN, /^[a-z_$@][a-z_$@0-9]*/i, null], [PR_LITERAL, /^0x[a-f0-9]+[a-z]/i, null], [PR_LITERAL, /^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?[a-z]*/i, null, '123456789'], [PR_PUNCTUATION, /^[^\s\w\.$@]+/, null]]); function splitNonStringNonCommentTokens(source, decorations) { for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; if (style === PR_PLAIN) { var start, end, chunk, subDecs; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; chunk = source.substring(start, end); subDecs = styleLiteralIdentifierPuncRecognizer(chunk, start); for (var j = 0, m = subDecs.length; j < m; j += 2) { var subStyle = subDecs[j + 1]; if (subStyle === PR_PLAIN) { var subStart = subDecs[j]; var subEnd = j + 2 < m ? subDecs[j + 2] : chunk.length; var token = source.substring(subStart, subEnd); if (token === '.') { subDecs[j + 1] = PR_PUNCTUATION; } else if (token in keywords) { subDecs[j + 1] = PR_KEYWORD; } else if (/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(token)) { subDecs[j + 1] = token.charAt(0) === '@' ? PR_LITERAL : PR_TYPE; } } } spliceArrayInto(subDecs, decorations, i, 2); i += subDecs.length - 2; } } return decorations; } return function(sourceCode) { var decorations = splitStringAndCommentTokens(sourceCode); decorations = splitNonStringNonCommentTokens(sourceCode, decorations); return decorations; }; } var decorateSource = sourceDecorator({ keywords: ALL_KEYWORDS, hashComments: true, cStyleComments: true, multiLineStrings: true, regexLiterals: true }); function splitSourceNodes(source, decorations) { for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; if (style === PR_SOURCE) { var start, end; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var subDecorations = decorateSource(source.substring(start, end)); for (var j = 0, m = subDecorations.length; j < m; j += 2) { subDecorations[j] += start; } spliceArrayInto(subDecorations, decorations, i, 2); i += subDecorations.length - 2; } } return decorations; } function splitSourceAttributes(source, decorations) { var nextValueIsSource = false; for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; var start, end; if (style === PR_ATTRIB_NAME) { start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; nextValueIsSource = /^on|^style$/i.test(source.substring(start, end)); } else if (style === PR_ATTRIB_VALUE) { if (nextValueIsSource) { start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var attribValue = source.substring(start, end); var attribLen = attribValue.length; var quoted = (attribLen >= 2 && /^[\"\']/.test(attribValue) && attribValue.charAt(0) === attribValue.charAt(attribLen - 1)); var attribSource; var attribSourceStart; var attribSourceEnd; if (quoted) { attribSourceStart = start + 1; attribSourceEnd = end - 1; attribSource = attribValue; } else { attribSourceStart = start + 1; attribSourceEnd = end - 1; attribSource = attribValue.substring(1, attribValue.length - 1); } var attribSourceDecorations = decorateSource(attribSource); for (var j = 0, m = attribSourceDecorations.length; j < m; j += 2) { attribSourceDecorations[j] += attribSourceStart; } if (quoted) { attribSourceDecorations.push(attribSourceEnd, PR_ATTRIB_VALUE); spliceArrayInto(attribSourceDecorations, decorations, i + 2, 0); } else { spliceArrayInto(attribSourceDecorations, decorations, i, 2); } } nextValueIsSource = false; } } return decorations; } function decorateMarkup(sourceCode) { var decorations = tokenizeMarkup(sourceCode); decorations = splitTagAttributes(sourceCode, decorations); decorations = splitSourceNodes(sourceCode, decorations); decorations = splitSourceAttributes(sourceCode, decorations); return decorations; } function recombineTagsAndDecorations(sourceText, extractedTags, decorations) { var html = []; var outputIdx = 0; var openDecoration = null; var currentDecoration = null; var tagPos = 0; var decPos = 0; var tabExpander = makeTabExpander(PR_TAB_WIDTH); var adjacentSpaceRe = /([\r\n ]) /g; var startOrSpaceRe = /(^| ) /gm; var newlineRe = /\r\n?|\n/g; var trailingSpaceRe = /[ \r\n]$/; var lastWasSpace = true; function emitTextUpTo(sourceIdx) { if (sourceIdx > outputIdx) { if (openDecoration && openDecoration !== currentDecoration) { html.push('</span>'); openDecoration = null; } if (!openDecoration && currentDecoration) { openDecoration = currentDecoration; html.push('<span class="', openDecoration, '">'); } var htmlChunk = textToHtml(tabExpander(sourceText.substring(outputIdx, sourceIdx))).replace(lastWasSpace ? startOrSpaceRe : adjacentSpaceRe, '$1&nbsp;'); lastWasSpace = trailingSpaceRe.test(htmlChunk); html.push(htmlChunk.replace(newlineRe, '<br />')); outputIdx = sourceIdx; } } while (true) { var outputTag; if (tagPos < extractedTags.length) { if (decPos < decorations.length) { outputTag = extractedTags[tagPos] <= decorations[decPos]; } else { outputTag = true; } } else { outputTag = false; } if (outputTag) { emitTextUpTo(extractedTags[tagPos]); if (openDecoration) { html.push('</span>'); openDecoration = null; } html.push(extractedTags[tagPos + 1]); tagPos += 2; } else if (decPos < decorations.length) { emitTextUpTo(decorations[decPos]); currentDecoration = decorations[decPos + 1]; decPos += 2; } else { break; } } emitTextUpTo(sourceText.length); if (openDecoration) { html.push('</span>'); } return html.join(''); } var langHandlerRegistry = {}; function registerLangHandler(handler, fileExtensions) { for (var i = fileExtensions.length; --i >= 0; ) { var ext = fileExtensions[i]; if (!langHandlerRegistry.hasOwnProperty(ext)) { langHandlerRegistry[ext] = handler; } else if ('console' in window) { console.log('cannot override language handler %s', ext); } } } registerLangHandler(decorateSource, ['default-code']); registerLangHandler(decorateMarkup, ['default-markup', 'html', 'htm', 'xhtml', 'xml', 'xsl']); registerLangHandler(sourceDecorator({ keywords: CPP_KEYWORDS, hashComments: true, cStyleComments: true }), ['c', 'cc', 'cpp', 'cs', 'cxx', 'cyc']); registerLangHandler(sourceDecorator({ keywords: JAVA_KEYWORDS, cStyleComments: true }), ['java']); registerLangHandler(sourceDecorator({ keywords: SH_KEYWORDS, hashComments: true, multiLineStrings: true }), ['bsh', 'csh', 'sh']); registerLangHandler(sourceDecorator({ keywords: PYTHON_KEYWORDS, hashComments: true, multiLineStrings: true, tripleQuotedStrings: true }), ['cv', 'py']); registerLangHandler(sourceDecorator({ keywords: PERL_KEYWORDS, hashComments: true, multiLineStrings: true, regexLiterals: true }), ['perl', 'pl', 'pm']); registerLangHandler(sourceDecorator({ keywords: RUBY_KEYWORDS, hashComments: true, multiLineStrings: true, regexLiterals: true }), ['rb']); registerLangHandler(sourceDecorator({ keywords: JSCRIPT_KEYWORDS, cStyleComments: true, regexLiterals: true }), ['js']); function prettyPrintOne(sourceCodeHtml, opt_langExtension) { try { var sourceAndExtractedTags = extractTags(sourceCodeHtml); var source = sourceAndExtractedTags.source; var extractedTags = sourceAndExtractedTags.tags; if (!langHandlerRegistry.hasOwnProperty(opt_langExtension)) { opt_langExtension = /^\s*</.test(source) ? 'default-markup' : 'default-code'; } var decorations = langHandlerRegistry[opt_langExtension].call({}, source); return recombineTagsAndDecorations(source, extractedTags, decorations); } catch (e) { if ('console' in window) { console.log(e); console.trace(); } return sourceCodeHtml; } } function prettyPrint(opt_whenDone) { var isIE6 = _pr_isIE6(); var codeSegments = [document.getElementsByTagName('pre'), document.getElementsByTagName('code'), document.getElementsByTagName('xmp')]; var elements = []; for (var i = 0; i < codeSegments.length; ++i) { for (var j = 0; j < codeSegments[i].length; ++j) { elements.push(codeSegments[i][j]); } } codeSegments = null; var k = 0; function doWork() { var endTime = (PR_SHOULD_USE_CONTINUATION ? new Date().getTime() + 250 : Infinity); for (; k < elements.length && new Date().getTime() < endTime; k++) { var cs = elements[k]; if (cs.className && cs.className.indexOf('prettyprint') >= 0) { var langExtension = cs.className.match(/\blang-(\w+)\b/); if (langExtension) { langExtension = langExtension[1]; } var nested = false; for (var p = cs.parentNode; p; p = p.parentNode) { if ((p.tagName === 'pre' || p.tagName === 'code' || p.tagName === 'xmp') && p.className && p.className.indexOf('prettyprint') >= 0) { nested = true; break; } } if (!nested) { var content = getInnerHtml(cs); content = content.replace(/(?:\r\n?|\n)$/, ''); var newContent = prettyPrintOne(content, langExtension); if (!isRawContent(cs)) { cs.innerHTML = newContent; } else { var pre = document.createElement('PRE'); for (var i = 0; i < cs.attributes.length; ++i) { var a = cs.attributes[i]; if (a.specified) { var aname = a.name.toLowerCase(); if (aname === 'class') { pre.className = a.value; } else { pre.setAttribute(a.name, a.value); } } } pre.innerHTML = newContent; cs.parentNode.replaceChild(pre, cs); cs = pre; } if (isIE6 && cs.tagName === 'PRE') { var lineBreaks = cs.getElementsByTagName('br'); for (var j = lineBreaks.length; --j >= 0; ) { var lineBreak = lineBreaks[j]; lineBreak.parentNode.replaceChild(document.createTextNode('\r\n'), lineBreak); } } } } } if (k < elements.length) { setTimeout(doWork, 250); } else if (opt_whenDone) { opt_whenDone(); } } doWork(); } window['PR_normalizedHtml'] = normalizedHtml; window['prettyPrintOne'] = prettyPrintOne; window['prettyPrint'] = prettyPrint; window['PR'] = { 'createSimpleLexer': createSimpleLexer, 'registerLangHandler': registerLangHandler, 'sourceDecorator': sourceDecorator, 'PR_ATTRIB_NAME': PR_ATTRIB_NAME, 'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE, 'PR_COMMENT': PR_COMMENT, 'PR_DECLARATION': PR_DECLARATION, 'PR_KEYWORD': PR_KEYWORD, 'PR_LITERAL': PR_LITERAL, 'PR_NOCODE': PR_NOCODE, 'PR_PLAIN': PR_PLAIN, 'PR_PUNCTUATION': PR_PUNCTUATION, 'PR_SOURCE': PR_SOURCE, 'PR_STRING': PR_STRING, 'PR_TAG': PR_TAG, 'PR_TYPE': PR_TYPE }; })(); \ No newline at end of file
+var PR_SHOULD_USE_CONTINUATION = true; var PR_TAB_WIDTH = 8; var PR_normalizedHtml; var PR; var prettyPrintOne; var prettyPrint; function _pr_isIE6() { var isIE6 = navigator && navigator.userAgent && /\bMSIE 6\./.test(navigator.userAgent); _pr_isIE6 = function() { return isIE6; }; return isIE6; } (function() { function wordSet(words) { words = words.split(/ /g); var set = {}; for (var i = words.length; --i >= 0; ) { var w = words[i]; if (w) { set[w] = null; } } return set; } var FLOW_CONTROL_KEYWORDS = "break continue do else for if return while "; var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " + "double enum extern float goto int long register short signed sizeof " + "static struct switch typedef union unsigned void volatile "; var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " + "new operator private protected public this throw true try "; var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool " + "concept concept_map const_cast constexpr decltype " + "dynamic_cast explicit export friend inline late_check " + "mutable namespace nullptr reinterpret_cast static_assert static_cast " + "template typeid typename typeof using virtual wchar_t where "; var JAVA_KEYWORDS = COMMON_KEYWORDS + "boolean byte extends final finally implements import instanceof null " + "native package strictfp super synchronized throws transient "; var CSHARP_KEYWORDS = JAVA_KEYWORDS + "as base by checked decimal delegate descending event " + "fixed foreach from group implicit in interface internal into is lock " + "object out override orderby params readonly ref sbyte sealed " + "stackalloc string select uint ulong unchecked unsafe ushort var "; var JSCRIPT_KEYWORDS = COMMON_KEYWORDS + "debugger eval export function get null set undefined var with " + "Infinity NaN "; var PERL_KEYWORDS = "caller delete die do dump elsif eval exit foreach for " + "goto if import last local my next no our print package redo require " + "sub undef unless until use wantarray while BEGIN END "; var PYTHON_KEYWORDS = FLOW_CONTROL_KEYWORDS + "and as assert class def del " + "elif except exec finally from global import in is lambda " + "nonlocal not or pass print raise try with yield " + "False True None "; var RUBY_KEYWORDS = FLOW_CONTROL_KEYWORDS + "alias and begin case class def" + " defined elsif end ensure false in module next nil not or redo rescue " + "retry self super then true undef unless until when yield BEGIN END "; var SH_KEYWORDS = FLOW_CONTROL_KEYWORDS + "case done elif esac eval fi " + "function in local set then until "; var ALL_KEYWORDS = (CPP_KEYWORDS + CSHARP_KEYWORDS + JSCRIPT_KEYWORDS + PERL_KEYWORDS + PYTHON_KEYWORDS + RUBY_KEYWORDS + SH_KEYWORDS); var PR_STRING = 'str'; var PR_KEYWORD = 'kwd'; var PR_COMMENT = 'com'; var PR_TYPE = 'typ'; var PR_LITERAL = 'lit'; var PR_PUNCTUATION = 'pun'; var PR_PLAIN = 'pln'; var PR_TAG = 'tag'; var PR_DECLARATION = 'dec'; var PR_SOURCE = 'src'; var PR_ATTRIB_NAME = 'atn'; var PR_ATTRIB_VALUE = 'atv'; var PR_NOCODE = 'nocode'; function isWordChar(ch) { return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'); } function spliceArrayInto(inserted, container, containerPosition, countReplaced) { inserted.unshift(containerPosition, countReplaced || 0); try { container.splice.apply(container, inserted); } finally { inserted.splice(0, 2); } } var REGEXP_PRECEDER_PATTERN = function() { var preceders = ["!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=", "&=", "(", "*", "*=", "+=", ",", "-=", "->", "/", "/=", ":", "::", ";", "<", "<<", "<<=", "<=", "=", "==", "===", ">", ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[", "^", "^=", "^^", "^^=", "{", "|", "|=", "||", "||=", "~", "break", "case", "continue", "delete", "do", "else", "finally", "instanceof", "return", "throw", "try", "typeof"]; var pattern = '(?:' + '(?:(?:^|[^0-9.])\\.{1,3})|' + '(?:(?:^|[^\\+])\\+)|' + '(?:(?:^|[^\\-])-)'; for (var i = 0; i < preceders.length; ++i) { var preceder = preceders[i]; if (isWordChar(preceder.charAt(0))) { pattern += '|\\b' + preceder; } else { pattern += '|' + preceder.replace(/([^=<>:&])/g, '\\$1'); } } pattern += '|^)\\s*$'; return new RegExp(pattern); } (); var pr_amp = /&/g; var pr_lt = /</g; var pr_gt = />/g; var pr_quot = /\"/g; function attribToHtml(str) { return str.replace(pr_amp, '&amp;').replace(pr_lt, '&lt;').replace(pr_gt, '&gt;').replace(pr_quot, '&quot;'); } function textToHtml(str) { return str.replace(pr_amp, '&amp;').replace(pr_lt, '&lt;').replace(pr_gt, '&gt;'); } var pr_ltEnt = /&lt;/g; var pr_gtEnt = /&gt;/g; var pr_aposEnt = /&apos;/g; var pr_quotEnt = /&quot;/g; var pr_ampEnt = /&amp;/g; var pr_nbspEnt = /&nbsp;/g; function htmlToText(html) { var pos = html.indexOf('&'); if (pos < 0) { return html; } for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0; ) { var end = html.indexOf(';', pos); if (end >= 0) { var num = html.substring(pos + 3, end); var radix = 10; if (num && num.charAt(0) === 'x') { num = num.substring(1); radix = 16; } var codePoint = parseInt(num, radix); if (!isNaN(codePoint)) { html = (html.substring(0, pos) + String.fromCharCode(codePoint) + html.substring(end + 1)); } } } return html.replace(pr_ltEnt, '<').replace(pr_gtEnt, '>').replace(pr_aposEnt, "'").replace(pr_quotEnt, '"').replace(pr_ampEnt, '&').replace(pr_nbspEnt, ' '); } function isRawContent(node) { return 'XMP' === node.tagName; } function normalizedHtml(node, out) { switch (node.nodeType) { case 1: var name = node.tagName.toLowerCase(); out.push('<', name); for (var i = 0; i < node.attributes.length; ++i) { var attr = node.attributes[i]; if (!attr.specified) { continue; } out.push(' '); normalizedHtml(attr, out); } out.push('>'); for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out); } if (node.firstChild || !/^(?:br|link|img)$/.test(name)) { out.push('<\/', name, '>'); } break; case 2: out.push(node.name.toLowerCase(), '="', attribToHtml(node.value), '"'); break; case 3: case 4: out.push(textToHtml(node.nodeValue)); break; } } var PR_innerHtmlWorks = null; function getInnerHtml(node) { if (null === PR_innerHtmlWorks) { var testNode = document.createElement('PRE'); testNode.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />')); PR_innerHtmlWorks = !/</.test(testNode.innerHTML); } if (PR_innerHtmlWorks) { var content = node.innerHTML; if (isRawContent(node)) { content = textToHtml(content); } return content; } var out = []; for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out); } return out.join(''); } function makeTabExpander(tabWidth) { var SPACES = ' '; var charInLine = 0; return function(plainText) { var out = null; var pos = 0; for (var i = 0, n = plainText.length; i < n; ++i) { var ch = plainText.charAt(i); switch (ch) { case '\t': if (!out) { out = []; } out.push(plainText.substring(pos, i)); var nSpaces = tabWidth - (charInLine % tabWidth); charInLine += nSpaces; for (; nSpaces >= 0; nSpaces -= SPACES.length) { out.push(SPACES.substring(0, nSpaces)); } pos = i + 1; break; case '\n': charInLine = 0; break; default: ++charInLine; } } if (!out) { return plainText; } out.push(plainText.substring(pos)); return out.join(''); }; } var pr_chunkPattern = /(?:[^<]+|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g; var pr_commentPrefix = /^<!--/; var pr_cdataPrefix = /^<\[CDATA\[/; var pr_brPrefix = /^<br\b/i; var pr_tagNameRe = /^<(\/?)([a-zA-Z]+)/; function extractTags(s) { var matches = s.match(pr_chunkPattern); var sourceBuf = []; var sourceBufLen = 0; var extractedTags = []; if (matches) { for (var i = 0, n = matches.length; i < n; ++i) { var match = matches[i]; if (match.length > 1 && match.charAt(0) === '<') { if (pr_commentPrefix.test(match)) { continue; } if (pr_cdataPrefix.test(match)) { sourceBuf.push(match.substring(9, match.length - 3)); sourceBufLen += match.length - 12; } else if (pr_brPrefix.test(match)) { sourceBuf.push('\n'); ++sourceBufLen; } else { if (match.indexOf(PR_NOCODE) >= 0 && isNoCodeTag(match)) { var name = match.match(pr_tagNameRe)[2]; var depth = 1; end_tag_loop: for (var j = i + 1; j < n; ++j) { var name2 = matches[j].match(pr_tagNameRe); if (name2 && name2[2] === name) { if (name2[1] === '/') { if (--depth === 0) { break end_tag_loop; } } else { ++depth; } } } if (j < n) { extractedTags.push(sourceBufLen, matches.slice(i, j + 1).join('')); i = j; } else { extractedTags.push(sourceBufLen, match); } } else { extractedTags.push(sourceBufLen, match); } } } else { var literalText = htmlToText(match); sourceBuf.push(literalText); sourceBufLen += literalText.length; } } } return { source: sourceBuf.join(''), tags: extractedTags }; } function isNoCodeTag(tag) { return !!tag.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g, ' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/); } function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) { var shortcuts = {}; (function() { var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns); for (var i = allPatterns.length; --i >= 0; ) { var patternParts = allPatterns[i]; var shortcutChars = patternParts[3]; if (shortcutChars) { for (var c = shortcutChars.length; --c >= 0; ) { shortcuts[shortcutChars.charAt(c)] = patternParts; } } } })(); var nPatterns = fallthroughStylePatterns.length; var notWs = /\S/; return function(sourceCode, opt_basePos) { opt_basePos = opt_basePos || 0; var decorations = [opt_basePos, PR_PLAIN]; var lastToken = ''; var pos = 0; var tail = sourceCode; while (tail.length) { var style; var token = null; var match; var patternParts = shortcuts[tail.charAt(0)]; if (patternParts) { match = tail.match(patternParts[1]); token = match[0]; style = patternParts[0]; } else { for (var i = 0; i < nPatterns; ++i) { patternParts = fallthroughStylePatterns[i]; var contextPattern = patternParts[2]; if (contextPattern && !contextPattern.test(lastToken)) { continue; } match = tail.match(patternParts[1]); if (match) { token = match[0]; style = patternParts[0]; break; } } if (!token) { style = PR_PLAIN; token = tail.substring(0, 1); } } decorations.push(opt_basePos + pos, style); pos += token.length; tail = tail.substring(token.length); if (style !== PR_COMMENT && notWs.test(token)) { lastToken = token; } } return decorations; }; } var PR_MARKUP_LEXER = createSimpleLexer([], [[PR_PLAIN, /^[^<]+/, null], [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/, null], [PR_COMMENT, /^<!--[\s\S]*?(?:-->|$)/, null], [PR_SOURCE, /^<\?[\s\S]*?(?:\?>|$)/, null], [PR_SOURCE, /^<%[\s\S]*?(?:%>|$)/, null], [PR_SOURCE, /^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i, null], [PR_TAG, /^<\/?\w[^<>]*>/, null]]); var PR_SOURCE_CHUNK_PARTS = /^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/; function tokenizeMarkup(source) { var decorations = PR_MARKUP_LEXER(source); for (var i = 0; i < decorations.length; i += 2) { if (decorations[i + 1] === PR_SOURCE) { var start, end; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var sourceChunk = source.substring(start, end); var match = sourceChunk.match(PR_SOURCE_CHUNK_PARTS); if (match) { decorations.splice(i, 2, start, PR_TAG, start + match[1].length, PR_SOURCE, start + match[1].length + (match[2] || '').length, PR_TAG); } } } return decorations; } var PR_TAG_LEXER = createSimpleLexer([[PR_ATTRIB_VALUE, /^\'[^\']*(?:\'|$)/, null, "'"], [PR_ATTRIB_VALUE, /^\"[^\"]*(?:\"|$)/, null, '"'], [PR_PUNCTUATION, /^[<>\/=]+/, null, '<>/=']], [[PR_TAG, /^[\w:\-]+/, /^</], [PR_ATTRIB_VALUE, /^[\w\-]+/, /^=/], [PR_ATTRIB_NAME, /^[\w:\-]+/, null], [PR_PLAIN, /^\s+/, null, ' \t\r\n']]); function splitTagAttributes(source, decorations) { for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; if (style === PR_TAG) { var start, end; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var chunk = source.substring(start, end); var subDecorations = PR_TAG_LEXER(chunk, start); spliceArrayInto(subDecorations, decorations, i, 2); i += subDecorations.length - 2; } } return decorations; } function sourceDecorator(options) { var shortcutStylePatterns = [], fallthroughStylePatterns = []; if (options.tripleQuotedStrings) { shortcutStylePatterns.push([PR_STRING, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, '\'"']); } else if (options.multiLineStrings) { shortcutStylePatterns.push([PR_STRING, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, '\'"`']); } else { shortcutStylePatterns.push([PR_STRING, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, '"\'']); } fallthroughStylePatterns.push([PR_PLAIN, /^(?:[^\'\"\`\/\#]+)/, null, ' \r\n']); if (options.hashComments) { shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']); } if (options.cStyleComments) { fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]); fallthroughStylePatterns.push([PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]); } if (options.regexLiterals) { var REGEX_LITERAL = ('^/(?=[^/*])' + '(?:[^/\\x5B\\x5C]' + '|\\x5C[\\s\\S]' + '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+' + '(?:/|$)'); fallthroughStylePatterns.push([PR_STRING, new RegExp(REGEX_LITERAL), REGEXP_PRECEDER_PATTERN]); } var keywords = wordSet(options.keywords); options = null; var splitStringAndCommentTokens = createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns); var styleLiteralIdentifierPuncRecognizer = createSimpleLexer([], [[PR_PLAIN, /^\s+/, null, ' \r\n'], [PR_PLAIN, /^[a-z_$@][a-z_$@0-9]*/i, null], [PR_LITERAL, /^0x[a-f0-9]+[a-z]/i, null], [PR_LITERAL, /^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?[a-z]*/i, null, '123456789'], [PR_PUNCTUATION, /^[^\s\w\.$@]+/, null]]); function splitNonStringNonCommentTokens(source, decorations) { for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; if (style === PR_PLAIN) { var start, end, chunk, subDecs; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; chunk = source.substring(start, end); subDecs = styleLiteralIdentifierPuncRecognizer(chunk, start); for (var j = 0, m = subDecs.length; j < m; j += 2) { var subStyle = subDecs[j + 1]; if (subStyle === PR_PLAIN) { var subStart = subDecs[j]; var subEnd = j + 2 < m ? subDecs[j + 2] : chunk.length; var token = source.substring(subStart, subEnd); if (token === '.') { subDecs[j + 1] = PR_PUNCTUATION; } else if (token in keywords) { subDecs[j + 1] = PR_KEYWORD; } else if (/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(token)) { subDecs[j + 1] = token.charAt(0) === '@' ? PR_LITERAL : PR_TYPE; } } } spliceArrayInto(subDecs, decorations, i, 2); i += subDecs.length - 2; } } return decorations; } return function(sourceCode) { var decorations = splitStringAndCommentTokens(sourceCode); decorations = splitNonStringNonCommentTokens(sourceCode, decorations); return decorations; }; } var decorateSource = sourceDecorator({ keywords: ALL_KEYWORDS, hashComments: true, cStyleComments: true, multiLineStrings: true, regexLiterals: true }); function splitSourceNodes(source, decorations) { for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; if (style === PR_SOURCE) { var start, end; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var subDecorations = decorateSource(source.substring(start, end)); for (var j = 0, m = subDecorations.length; j < m; j += 2) { subDecorations[j] += start; } spliceArrayInto(subDecorations, decorations, i, 2); i += subDecorations.length - 2; } } return decorations; } function splitSourceAttributes(source, decorations) { var nextValueIsSource = false; for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; var start, end; if (style === PR_ATTRIB_NAME) { start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; nextValueIsSource = /^on|^style$/i.test(source.substring(start, end)); } else if (style === PR_ATTRIB_VALUE) { if (nextValueIsSource) { start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var attribValue = source.substring(start, end); var attribLen = attribValue.length; var quoted = (attribLen >= 2 && /^[\"\']/.test(attribValue) && attribValue.charAt(0) === attribValue.charAt(attribLen - 1)); var attribSource; var attribSourceStart; var attribSourceEnd; if (quoted) { attribSourceStart = start + 1; attribSourceEnd = end - 1; attribSource = attribValue; } else { attribSourceStart = start + 1; attribSourceEnd = end - 1; attribSource = attribValue.substring(1, attribValue.length - 1); } var attribSourceDecorations = decorateSource(attribSource); for (var j = 0, m = attribSourceDecorations.length; j < m; j += 2) { attribSourceDecorations[j] += attribSourceStart; } if (quoted) { attribSourceDecorations.push(attribSourceEnd, PR_ATTRIB_VALUE); spliceArrayInto(attribSourceDecorations, decorations, i + 2, 0); } else { spliceArrayInto(attribSourceDecorations, decorations, i, 2); } } nextValueIsSource = false; } } return decorations; } function decorateMarkup(sourceCode) { var decorations = tokenizeMarkup(sourceCode); decorations = splitTagAttributes(sourceCode, decorations); decorations = splitSourceNodes(sourceCode, decorations); decorations = splitSourceAttributes(sourceCode, decorations); return decorations; } function recombineTagsAndDecorations(sourceText, extractedTags, decorations) { var html = []; var outputIdx = 0; var openDecoration = null; var currentDecoration = null; var tagPos = 0; var decPos = 0; var tabExpander = makeTabExpander(PR_TAB_WIDTH); var adjacentSpaceRe = /([\r\n ]) /g; var startOrSpaceRe = /(^| ) /gm; var newlineRe = /\r\n?|\n/g; var trailingSpaceRe = /[ \r\n]$/; var lastWasSpace = true; function emitTextUpTo(sourceIdx) { if (sourceIdx > outputIdx) { if (openDecoration && openDecoration !== currentDecoration) { html.push('</span>'); openDecoration = null; } if (!openDecoration && currentDecoration) { openDecoration = currentDecoration; html.push('<span class="', openDecoration, '">'); } var htmlChunk = textToHtml(tabExpander(sourceText.substring(outputIdx, sourceIdx))).replace(lastWasSpace ? startOrSpaceRe : adjacentSpaceRe, '$1&nbsp;'); lastWasSpace = trailingSpaceRe.test(htmlChunk); html.push(htmlChunk.replace(newlineRe, '<br />')); outputIdx = sourceIdx; } } while (true) { var outputTag; if (tagPos < extractedTags.length) { if (decPos < decorations.length) { outputTag = extractedTags[tagPos] <= decorations[decPos]; } else { outputTag = true; } } else { outputTag = false; } if (outputTag) { emitTextUpTo(extractedTags[tagPos]); if (openDecoration) { html.push('</span>'); openDecoration = null; } html.push(extractedTags[tagPos + 1]); tagPos += 2; } else if (decPos < decorations.length) { emitTextUpTo(decorations[decPos]); currentDecoration = decorations[decPos + 1]; decPos += 2; } else { break; } } emitTextUpTo(sourceText.length); if (openDecoration) { html.push('</span>'); } return html.join(''); } var langHandlerRegistry = {}; function registerLangHandler(handler, fileExtensions) { for (var i = fileExtensions.length; --i >= 0; ) { var ext = fileExtensions[i]; if (!langHandlerRegistry.hasOwnProperty(ext)) { langHandlerRegistry[ext] = handler; } else if ('console' in window) { console.log('cannot override language handler %s', ext); } } } registerLangHandler(decorateSource, ['default-code']); registerLangHandler(decorateMarkup, ['default-markup', 'html', 'htm', 'xhtml', 'xml', 'xsl']); registerLangHandler(sourceDecorator({ keywords: CPP_KEYWORDS, hashComments: true, cStyleComments: true }), ['c', 'cc', 'cpp', 'cs', 'cxx', 'cyc']); registerLangHandler(sourceDecorator({ keywords: JAVA_KEYWORDS, cStyleComments: true }), ['java']); registerLangHandler(sourceDecorator({ keywords: SH_KEYWORDS, hashComments: true, multiLineStrings: true }), ['bsh', 'csh', 'sh']); registerLangHandler(sourceDecorator({ keywords: PYTHON_KEYWORDS, hashComments: true, multiLineStrings: true, tripleQuotedStrings: true }), ['cv', 'py']); registerLangHandler(sourceDecorator({ keywords: PERL_KEYWORDS, hashComments: true, multiLineStrings: true, regexLiterals: true }), ['perl', 'pl', 'pm']); registerLangHandler(sourceDecorator({ keywords: RUBY_KEYWORDS, hashComments: true, multiLineStrings: true, regexLiterals: true }), ['rb']); registerLangHandler(sourceDecorator({ keywords: JSCRIPT_KEYWORDS, cStyleComments: true, regexLiterals: true }), ['js']); function prettyPrintOne(sourceCodeHtml, opt_langExtension) { try { var sourceAndExtractedTags = extractTags(sourceCodeHtml); var source = sourceAndExtractedTags.source; var extractedTags = sourceAndExtractedTags.tags; if (!langHandlerRegistry.hasOwnProperty(opt_langExtension)) { opt_langExtension = /^\s*</.test(source) ? 'default-markup' : 'default-code'; } var decorations = langHandlerRegistry[opt_langExtension].call({}, source); return recombineTagsAndDecorations(source, extractedTags, decorations); } catch (e) { if ('console' in window) { console.log(e); console.trace(); } return sourceCodeHtml; } } function prettyPrint(opt_whenDone) { var isIE6 = _pr_isIE6(); var codeSegments = [document.getElementsByTagName('pre'), document.getElementsByTagName('code'), document.getElementsByTagName('xmp')]; var elements = []; for (var i = 0; i < codeSegments.length; ++i) { for (var j = 0; j < codeSegments[i].length; ++j) { elements.push(codeSegments[i][j]); } } codeSegments = null; var k = 0; function doWork() { var endTime = (PR_SHOULD_USE_CONTINUATION ? new Date().getTime() + 250 : Infinity); for (; k < elements.length && new Date().getTime() < endTime; k++) { var cs = elements[k]; if (cs.className && cs.className.indexOf('prettyprint') >= 0) { var langExtension = cs.className.match(/\blang-(\w+)\b/); if (langExtension) { langExtension = langExtension[1]; } var nested = false; for (var p = cs.parentNode; p; p = p.parentNode) { if ((p.tagName === 'pre' || p.tagName === 'code' || p.tagName === 'xmp') && p.className && p.className.indexOf('prettyprint') >= 0) { nested = true; break; } } if (!nested) { var content = getInnerHtml(cs); content = content.replace(/(?:\r\n?|\n)$/, ''); var newContent = prettyPrintOne(content, langExtension); if (!isRawContent(cs)) { cs.innerHTML = newContent; } else { var pre = document.createElement('PRE'); for (var i = 0; i < cs.attributes.length; ++i) { var a = cs.attributes[i]; if (a.specified) { var aname = a.name.toLowerCase(); if (aname === 'class') { pre.className = a.value; } else { pre.setAttribute(a.name, a.value); } } } pre.innerHTML = newContent; cs.parentNode.replaceChild(pre, cs); cs = pre; } if (isIE6 && cs.tagName === 'PRE') { var lineBreaks = cs.getElementsByTagName('br'); for (var j = lineBreaks.length; --j >= 0; ) { var lineBreak = lineBreaks[j]; lineBreak.parentNode.replaceChild(document.createTextNode('\r\n'), lineBreak); } } } } } if (k < elements.length) { setTimeout(doWork, 250); } else if (opt_whenDone) { opt_whenDone(); } } doWork(); } window['PR_normalizedHtml'] = normalizedHtml; window['prettyPrintOne'] = prettyPrintOne; window['prettyPrint'] = prettyPrint; window['PR'] = { 'createSimpleLexer': createSimpleLexer, 'registerLangHandler': registerLangHandler, 'sourceDecorator': sourceDecorator, 'PR_ATTRIB_NAME': PR_ATTRIB_NAME, 'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE, 'PR_COMMENT': PR_COMMENT, 'PR_DECLARATION': PR_DECLARATION, 'PR_KEYWORD': PR_KEYWORD, 'PR_LITERAL': PR_LITERAL, 'PR_NOCODE': PR_NOCODE, 'PR_PLAIN': PR_PLAIN, 'PR_PUNCTUATION': PR_PUNCTUATION, 'PR_SOURCE': PR_SOURCE, 'PR_STRING': PR_STRING, 'PR_TAG': PR_TAG, 'PR_TYPE': PR_TYPE }; })();
diff --git a/templates/content/js/com.cnprog.utils.js b/templates/content/js/com.cnprog.utils.js
index a5f0e982..e271ed78 100644
--- a/templates/content/js/com.cnprog.utils.js
+++ b/templates/content/js/com.cnprog.utils.js
@@ -1,5 +1,6 @@
var showMessage = function(object, msg) {
- var div = $('<div class="vote-notification"><h3>' + msg + '</h3>(鐐瑰嚮娑堟伅妗嗗叧闂)</div>');
+ var div = $('<div class="vote-notification"><h3>' + msg + '</h3>('
+ + $.i18n._('click to close') + ')</div>');
div.click(function(event) {
$(".vote-notification").fadeOut("fast", function() { $(this).remove(); });
@@ -33,7 +34,12 @@ var notify = function() {
} ();
function appendLoader(containerSelector) {
- $(containerSelector).append('<img class="ajax-loader" src="/content/images/indicator.gif" title="璇诲彇涓..." alt="璇诲彇涓..." />');
+ $(containerSelector).append('<img class="ajax-loader" '
+ +'src="/content/images/indicator.gif" title="'
+ +$.i18n._('loading...')
+ +'" alt="'
+ +$.i18n._('loading...')
+ +'" />');
}
function removeLoader() {
@@ -96,16 +102,16 @@ var CPValidator = function(){
getQuestionFormMessages: function(){
return {
tags: {
- required: " 鏍囩涓嶈兘涓虹┖銆",
- maxlength: " 鏈澶5涓爣绛撅紝姣忎釜鏍囩闀垮害灏忎簬20涓瓧绗︺"
+ required: " " + $.i18n._('tags cannot be empty'),
+ maxlength: " " + $.i18n._('tablimits info'),
},
text: {
- required: " 鍐呭涓嶈兘涓虹┖銆",
- minlength: jQuery.format(" 璇疯緭鍏ヨ嚦灏 {0} 瀛楃銆")
+ required: " " + $.i18n._('content cannot be empty'),
+ minlength: jQuery.format(' ' + $.i18n._('content minchars'))
},
title: {
- required: " 璇疯緭鍏ユ爣棰樸",
- minlength: jQuery.format(" 璇疯緭鍏ヨ嚦灏 {0} 瀛楃銆")
+ required: " " + $.i18n._('please enter title'),
+ minlength: jQuery.format(' ' + $.i18n._('title minchars'))
}
};
}
@@ -113,4 +119,4 @@ var CPValidator = function(){
}();
//Search Engine Keyword Highlight with Javascript
//http://scott.yang.id.au/code/se-hilite/
-Hilite={elementid:"content",exact:true,max_nodes:1000,onload:true,style_name:"hilite",style_name_suffix:true,debug_referrer:""};Hilite.search_engines=[["local","q"],["cnprog\\.","q"],["google\\.","q"],["search\\.yahoo\\.","p"],["search\\.msn\\.","q"],["search\\.live\\.","query"],["search\\.aol\\.","userQuery"],["ask\\.com","q"],["altavista\\.","q"],["feedster\\.","q"],["search\\.lycos\\.","q"],["alltheweb\\.","q"],["technorati\\.com/search/([^\\?/]+)",1],["dogpile\\.com/info\\.dogpl/search/web/([^\\?/]+)",1,true]];Hilite.decodeReferrer=function(d){var g=null;var e=new RegExp("");for(var c=0;c<Hilite.search_engines.length;c++){var f=Hilite.search_engines[c];e.compile("^http://(www\\.)?"+f[0],"i");var b=d.match(e);if(b){var a;if(isNaN(f[1])){a=Hilite.decodeReferrerQS(d,f[1])}else{a=b[f[1]+1]}if(a){a=decodeURIComponent(a);if(f.length>2&&f[2]){a=decodeURIComponent(a)}a=a.replace(/\'|"/g,"");a=a.split(/[\s,\+\.]+/);return a}break}}return null};Hilite.decodeReferrerQS=function(f,d){var b=f.indexOf("?");var c;if(b>=0){var a=new String(f.substring(b+1));b=0;c=0;while((b>=0)&&((c=a.indexOf("=",b))>=0)){var e,g;e=a.substring(b,c);b=a.indexOf("&",c)+1;if(e==d){if(b<=0){return a.substring(c+1)}else{return a.substring(c+1,b-1)}}else{if(b<=0){return null}}}}return null};Hilite.hiliteElement=function(f,e){if(!e||f.childNodes.length==0){return}var c=new Array();for(var b=0;b<e.length;b++){e[b]=e[b].toLowerCase();if(Hilite.exact){c.push("\\b"+e[b]+"\\b")}else{c.push(e[b])}}c=new RegExp(c.join("|"),"i");var a={};for(var b=0;b<e.length;b++){if(Hilite.style_name_suffix){a[e[b]]=Hilite.style_name+(b+1)}else{a[e[b]]=Hilite.style_name}}var d=function(m){var j=c.exec(m.data);if(j){var n=j[0];var i="";var h=m.splitText(j.index);var g=h.splitText(n.length);var l=m.ownerDocument.createElement("SPAN");m.parentNode.replaceChild(l,h);l.className=a[n.toLowerCase()];l.appendChild(h);return l}else{return m}};Hilite.walkElements(f.childNodes[0],1,d)};Hilite.hilite=function(){var a=Hilite.debug_referrer?Hilite.debug_referrer:document.referrer;var b=null;a=Hilite.decodeReferrer(a);if(a&&((Hilite.elementid&&(b=document.getElementById(Hilite.elementid)))||(b=document.body))){Hilite.hiliteElement(b,a)}};Hilite.walkElements=function(d,f,e){var a=/^(script|style|textarea)/i;var c=0;while(d&&f>0){c++;if(c>=Hilite.max_nodes){var b=function(){Hilite.walkElements(d,f,e)};setTimeout(b,50);return}if(d.nodeType==1){if(!a.test(d.tagName)&&d.childNodes.length>0){d=d.childNodes[0];f++;continue}}else{if(d.nodeType==3){d=e(d)}}if(d.nextSibling){d=d.nextSibling}else{while(f>0){d=d.parentNode;f--;if(d.nextSibling){d=d.nextSibling;break}}}}};if(Hilite.onload){if(window.attachEvent){window.attachEvent("onload",Hilite.hilite)}else{if(window.addEventListener){window.addEventListener("load",Hilite.hilite,false)}else{var __onload=window.onload;window.onload=function(){Hilite.hilite();__onload()}}}}; \ No newline at end of file
+Hilite={elementid:"content",exact:true,max_nodes:1000,onload:true,style_name:"hilite",style_name_suffix:true,debug_referrer:""};Hilite.search_engines=[["local","q"],["cnprog\\.","q"],["google\\.","q"],["search\\.yahoo\\.","p"],["search\\.msn\\.","q"],["search\\.live\\.","query"],["search\\.aol\\.","userQuery"],["ask\\.com","q"],["altavista\\.","q"],["feedster\\.","q"],["search\\.lycos\\.","q"],["alltheweb\\.","q"],["technorati\\.com/search/([^\\?/]+)",1],["dogpile\\.com/info\\.dogpl/search/web/([^\\?/]+)",1,true]];Hilite.decodeReferrer=function(d){var g=null;var e=new RegExp("");for(var c=0;c<Hilite.search_engines.length;c++){var f=Hilite.search_engines[c];e.compile("^http://(www\\.)?"+f[0],"i");var b=d.match(e);if(b){var a;if(isNaN(f[1])){a=Hilite.decodeReferrerQS(d,f[1])}else{a=b[f[1]+1]}if(a){a=decodeURIComponent(a);if(f.length>2&&f[2]){a=decodeURIComponent(a)}a=a.replace(/\'|"/g,"");a=a.split(/[\s,\+\.]+/);return a}break}}return null};Hilite.decodeReferrerQS=function(f,d){var b=f.indexOf("?");var c;if(b>=0){var a=new String(f.substring(b+1));b=0;c=0;while((b>=0)&&((c=a.indexOf("=",b))>=0)){var e,g;e=a.substring(b,c);b=a.indexOf("&",c)+1;if(e==d){if(b<=0){return a.substring(c+1)}else{return a.substring(c+1,b-1)}}else{if(b<=0){return null}}}}return null};Hilite.hiliteElement=function(f,e){if(!e||f.childNodes.length==0){return}var c=new Array();for(var b=0;b<e.length;b++){e[b]=e[b].toLowerCase();if(Hilite.exact){c.push("\\b"+e[b]+"\\b")}else{c.push(e[b])}}c=new RegExp(c.join("|"),"i");var a={};for(var b=0;b<e.length;b++){if(Hilite.style_name_suffix){a[e[b]]=Hilite.style_name+(b+1)}else{a[e[b]]=Hilite.style_name}}var d=function(m){var j=c.exec(m.data);if(j){var n=j[0];var i="";var h=m.splitText(j.index);var g=h.splitText(n.length);var l=m.ownerDocument.createElement("SPAN");m.parentNode.replaceChild(l,h);l.className=a[n.toLowerCase()];l.appendChild(h);return l}else{return m}};Hilite.walkElements(f.childNodes[0],1,d)};Hilite.hilite=function(){var a=Hilite.debug_referrer?Hilite.debug_referrer:document.referrer;var b=null;a=Hilite.decodeReferrer(a);if(a&&((Hilite.elementid&&(b=document.getElementById(Hilite.elementid)))||(b=document.body))){Hilite.hiliteElement(b,a)}};Hilite.walkElements=function(d,f,e){var a=/^(script|style|textarea)/i;var c=0;while(d&&f>0){c++;if(c>=Hilite.max_nodes){var b=function(){Hilite.walkElements(d,f,e)};setTimeout(b,50);return}if(d.nodeType==1){if(!a.test(d.tagName)&&d.childNodes.length>0){d=d.childNodes[0];f++;continue}}else{if(d.nodeType==3){d=e(d)}}if(d.nextSibling){d=d.nextSibling}else{while(f>0){d=d.parentNode;f--;if(d.nextSibling){d=d.nextSibling;break}}}}};if(Hilite.onload){if(window.attachEvent){window.attachEvent("onload",Hilite.hilite)}else{if(window.addEventListener){window.addEventListener("load",Hilite.hilite,false)}else{var __onload=window.onload;window.onload=function(){Hilite.hilite();__onload()}}}};
diff --git a/templates/content/js/jquery.i18n.js b/templates/content/js/jquery.i18n.js
new file mode 100644
index 00000000..0a155a31
--- /dev/null
+++ b/templates/content/js/jquery.i18n.js
@@ -0,0 +1,133 @@
+/*
+ * jQuery i18n plugin
+ * @requires jQuery v1.1 or later
+ *
+ * Examples at: http://recurser.com/articles/2008/02/21/jquery-i18n-translation-plugin/
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Based on 'javascript i18n that almost doesn't suck' by markos
+ * http://markos.gaivo.net/blog/?p=100
+ *
+ * Revision: $Id$
+ * Version: 1.0.0 Feb-10-2008
+ */
+ (function($) {
+/**
+ * i18n provides a mechanism for translating strings using a jscript dictionary.
+ *
+ */
+
+
+/*
+ * i18n property list
+ */
+$.i18n = {
+
+/**
+ * setDictionary()
+ * Initialise the dictionary and translate nodes
+ *
+ * @param property_list i18n_dict : The dictionary to use for translation
+ */
+ setDictionary: function(i18n_dict) {
+ i18n_dict = i18n_dict;
+ },
+
+/**
+ * _()
+ * The actual translation function. Looks the given string up in the
+ * dictionary and returns the translation if one exists. If a translation
+ * is not found, returns the original word
+ *
+ * @param string str : The string to translate
+ * @param property_list params : params for using printf() on the string
+ * @return string : Translated word
+ *
+ */
+ _: function (str, params) {
+ var transl = str;
+ if (i18n_dict&& i18n_dict[str]) {
+ transl = i18n_dict[str];
+ }
+ return this.printf(transl, params);
+ },
+
+/**
+ * toEntity()
+ * Change non-ASCII characters to entity representation
+ *
+ * @param string str : The string to transform
+ * @return string result : Original string with non-ASCII content converted to entities
+ *
+ */
+ toEntity: function (str) {
+ var result = '';
+ for (var i=0;i<str.length; i++) {
+ if (str.charCodeAt(i) > 128)
+ result += "&#"+str.charCodeAt(i)+";";
+ else
+ result += str.charAt(i);
+ }
+ return result;
+ },
+
+/**
+ * stripStr()
+ *
+ * @param string str : The string to strip
+ * @return string result : Stripped string
+ *
+ */
+ stripStr: function(str) {
+ return str.replace(/^\s*/, "").replace(/\s*$/, "");
+ },
+
+/**
+ * stripStrML()
+ *
+ * @param string str : The multi-line string to strip
+ * @return string result : Stripped string
+ *
+ */
+ stripStrML: function(str) {
+ // Split because m flag doesn't exist before JS1.5 and we need to
+ // strip newlines anyway
+ var parts = str.split('\n');
+ for (var i=0; i<parts.length; i++)
+ parts[i] = stripStr(parts[i]);
+
+ // Don't join with empty strings, because it "concats" words
+ // And strip again
+ return stripStr(parts.join(" "));
+ },
+
+/*
+ * printf()
+ * C-printf like function, which substitutes %s with parameters
+ * given in list. %%s is used to escape %s.
+ *
+ * Doesn't work in IE5.0 (splice)
+ *
+ * @param string S : string to perform printf on.
+ * @param string L : Array of arguments for printf()
+ */
+ printf: function(S, L) {
+ if (!L) return S;
+
+ var nS = "";
+ var tS = S.split("%s");
+
+ for(var i=0; i<L.length; i++) {
+ if (tS[i].lastIndexOf('%') == tS[i].length-1 && i != L.length-1)
+ tS[i] += "s"+tS.splice(i+1,1)[0];
+ nS += tS[i] + L[i];
+ }
+ return nS + tS[tS.length-1];
+ }
+
+};
+
+
+})(jQuery);
diff --git a/templates/content/js/wmd/wmd.js b/templates/content/js/wmd/wmd.js
index d83780d6..7b611dba 100644
--- a/templates/content/js/wmd/wmd.js
+++ b/templates/content/js/wmd/wmd.js
@@ -27,18 +27,18 @@ Attacklab.wmdBase = function(){
global.isOpera = /opera/.test(nav.userAgent.toLowerCase());
global.isKonqueror = /konqueror/.test(nav.userAgent.toLowerCase());
- var toolbar_strong_label = "绮椾綋 <strong> Ctrl-B";
- var toolbar_emphasis_label = "鏂滀綋 <em> Ctrl-I";
- var toolbar_hyperlink_label = "瓒呴摼鎺 <a> Ctrl-L";
- var toolbar_blockquote_label = "寮曠敤 <blockquote> Ctrl-.";
- var toolbar_code_label = "浠g爜 <pre><code> Ctrl-K";
- var toolbar_image_label = "鍥剧墖 <img> Ctrl-G";
- var toolbar_numbered_label = "鏁板瓧缂栧彿鍒楄〃 <ol> Ctrl-O";
- var toolbar_bulleted_label = "椤圭洰绗﹀彿鍒楄〃 <ul> Ctrl-U";
- var toolbar_heading_label = "鏍囬 <h1>/<h2> Ctrl-H";
- var toolbar_horizontal_label = "姘村钩绾 <hr> Ctrl-R";
- var toolbar_undo_label = "鎾ら攢 Ctrl-Z";
- var toolbar_redo_label = "閲嶅仛 Ctrl-Y";
+ var toolbar_strong_label = $.i18n._('bold') + " <strong> Ctrl-B";
+ var toolbar_emphasis_label = $.i18n._('italic') + " <em> Ctrl-I";
+ var toolbar_hyperlink_label = $.i18n._('link') + " <a> Ctrl-L";
+ var toolbar_blockquote_label = $.i18n._('quote') + " <blockquote> Ctrl-.";
+ var toolbar_code_label = $.i18n._('preformatted text') + " <pre><code> Ctrl-K";
+ var toolbar_image_label = $.i18n._('image') + " <img> Ctrl-G";
+ var toolbar_numbered_label = $.i18n._('numbered list') + " <ol> Ctrl-O";
+ var toolbar_bulleted_label = $.i18n._('bulleted list') + " <ul> Ctrl-U";
+ var toolbar_heading_label = $.i18n._('heading') + " <h1>/<h2> Ctrl-H";
+ var toolbar_horizontal_label = $.i18n._('horizontal bar') + " <hr> Ctrl-R";
+ var toolbar_undo_label = $.i18n._('undo') + " Ctrl-Z";
+ var toolbar_redo_label = $.i18n._('redo') + " Ctrl-Y";
// -------------------------------------------------------------------
// YOUR CHANGES GO HERE
@@ -49,11 +49,9 @@ Attacklab.wmdBase = function(){
// The text that appears on the upper part of the dialog box when
// entering links.
- var imageDialogText = "<p style='margin-top: 0px'><b>杈撳叆鍥剧墖鍦板潃</b></p><p>绀轰緥锛<br />"+
- "http://www.cnprog.com/images/temp.jpg \"鎴戠殑鎴浘\"</p>";
- var linkDialogText = "<p style='margin-top: 0px'><b>杈撳叆Web鍦板潃</b></p><p>绀轰緥锛<br />"+
- "http://www.cnprog.com/ \"鎴戠殑缃戠珯\"</p>";
- var uploadImageHTML ="<div>鎴栬呬笂浼犳湰鍦板浘鐗囷細</div>" +
+ var imageDialogText = "<p style='margin-top: 0px'>" + $.i18n._('enter image url') + '</p>';
+ var linkDialogText = "<p style='margin-top: 0px'>" + $.i18n._('enter url') + '</p>';
+ var uploadImageHTML ="<div>" + $.i18n._('upload image') + "</div>" +
"<input type=\"file\" name=\"file-upload\" id=\"file-upload\" size=\"26\" "+
"onchange=\"return ajaxFileUpload($('#image-url'));\"/><br>" +
"<img id=\"loading\" src=\"/content/images/indicator.gif\" style=\"display:none;\"/>";
@@ -1079,7 +1077,7 @@ Attacklab.wmdBase = function(){
}
else {
// mac and other non-Windows platforms
- redoButton.title = "閲嶅仛 - Ctrl+Shift+Z";
+ redoButton.title = $.i18n._('redo') + " - Ctrl+Shift+Z";
}
redoButton.XShift = "-220px";
redoButton.execute = function(manager){
diff --git a/templates/content/style/default.css b/templates/content/style/default.css
index 9b561803..0221cc03 100644
--- a/templates/content/style/default.css
+++ b/templates/content/style/default.css
@@ -164,7 +164,7 @@ h4 {display:block;font-size:90%; font-family:Verdana;color:#ccc;}
color:darkred;
font-weight:400;
font-size:100%;
- letter-spacing:1px;
+ /*letter-spacing:1px;*/
}
@@ -198,7 +198,7 @@ h4 {display:block;font-size:90%; font-family:Verdana;color:#ccc;}
float: left;
font-size: 140%;
font-weight:700;
- letter-spacing:3px;
+ /*letter-spacing:3px;*/
margin-top:8px;
padding:5px 0 0 3px ;
height:20px;
@@ -329,7 +329,7 @@ h4 {display:block;font-size:90%; font-family:Verdana;color:#ccc;}
font-size:120%;
font-weight:bold;
width:120px;
- letter-spacing:1px;
+ /*letter-spacing:1px;*/
background-color:#D4D0C8;
}
.notify
@@ -461,7 +461,7 @@ h4 {display:block;font-size:90%; font-family:Verdana;color:#ccc;}
}
.highlight-box{
- letter-spacing:1px;
+ /*letter-spacing:1px;*/
color:#735005;
}
@@ -890,7 +890,7 @@ h4 {display:block;font-size:90%; font-family:Verdana;color:#ccc;}
margin-bottom:-10px;
width:600px;
color:#aaa;
- letter-spacing:1px;
+ /*letter-spacing:1px;*/
}
@@ -1750,4 +1750,4 @@ a.comment-user:hover {
.error{color:red;}
.error-list li{padding:5px;}
.login{margin-bottom:10px;}
-.fieldset{border:solid 1px #777;margin-top:10px;padding:10px;} \ No newline at end of file
+.fieldset{border:solid 1px #777;margin-top:10px;padding:10px;}
diff --git a/templates/content/style/openid.css b/templates/content/style/openid.css
index 7a892840..0d201df2 100644
--- a/templates/content/style/openid.css
+++ b/templates/content/style/openid.css
@@ -42,4 +42,4 @@
}
.openid_selected {
border: 4px solid #DDD;
- } \ No newline at end of file
+ }
diff --git a/templates/content/style/style.css b/templates/content/style/style.css
index d0fac81c..165903ba 100644
--- a/templates/content/style/style.css
+++ b/templates/content/style/style.css
@@ -8,7 +8,7 @@ div{margin:0 auto; padding:0;}
h1,h2,h3,h4,h5,h6,ul,li,dl,dt,dd,form,img,p{margin:0; padding:0; border:none; }
input, select {font-family:Trebuchet MS,"segoe ui",Helvetica,"Microsoft YaHei",瀹嬩綋,Tahoma,Verdana,MingLiu,PMingLiu,Arial,sans-serif;}
p{margin-bottom:4px; font-size:13px; line-height:160%;}
-a {color:#663333; text-decoration:none;}
+a {color:#333333; text-decoration:none;}
a:hover {text-decoration:underline;}
.block{width:960px; height:auto;}
.fleft{float:left;}
@@ -81,27 +81,46 @@ blockquote
#CALeft{width:700px; float:left; position:relative;padding-left:5px}
#CARight{width:240px; float:right; padding-right:5px}
#CAFull{float:left;padding:0 5px 0 5px;width:950px;}
-#ground {clear:both;border-top:6px solid #000; padding-top:6px; padding-bottom:50px; text-align:center;background:#777;}
+#ground {width:100%;border-top:1px solid #000; padding-top:6px; padding-bottom:10px; text-align:center;background:#777;}
+/*#licenseLogo {top:10px;right:10px;}*/
/*椤堕儴鍙婂鑸爮*/
-#top {height:20px; text-align:right; padding:3px;background-color:#eee;}
+#top {height:20px; text-align:right; padding:3px;background-color:#ffffff;}
#header {width:960px;}
-#top a {height:35px; text-align:right;letter-spacing:1px; margin-left:20px;text-decoration:underline; font-size:12px; color:#666;}
+#top a {height:35px; text-align:right;
+ /*letter-spacing:1px; */
+ margin-left:20px;text-decoration:underline; font-size:12px; color:#333333;}
#logo {padding:5px;}
#navBar {float:clear;position:relative;display:block;width:960px;}
-#navBar .nav {margin:20px 0px 0px 16px;letter-spacing:1px; }
-#navBar .nav a {color:#333; background-color:#F9F7ED; padding:0px 12px 3px 12px; height:25px; line-height:30px;margin-left:10px; font-size:15px; font-weight:400; text-decoration:none;display: block;float: left;}
+#navBar .nav {margin:20px 0px 0px 16px;
+ /*letter-spacing:1px; */
+ }
+#navBar .nav a {color:#333; background-color:#F9F7ED;
+ border-bottom: none;
+ border-left: 1px solid #aaaaaa;
+ border-right: 1px solid #aaaaaa;
+ border-top: 1px solid #aaaaaa;
+ padding:0px 12px 3px 12px; height:25px; line-height:30px;margin-left:10px; font-size:15px; font-weight:400; text-decoration:none;display: block;float: left;}
#navBar .nav a:hover {text-decoration:underline}
-#navBar .nav a.on {height:24px;line-height:28px;border:1px solid #B02B2C; background:#B02B2C; color:#FFF; font-weight:600; text-decoration:none}
+#navBar .nav a.on {height:24px;line-height:28px;
+ border-top:1px solid #e66222;
+ border-bottom: 1px solid #d64000;
+ border-right:1px solid #e66222;
+ border-left:1px solid #e66222;
+ /*background:#A31E39; */
+ background:#d64000;
+ color:#FFF; font-weight:600; text-decoration:none}
#navBar .nav a.special {font-size:15px; color:#B02B2C; font-weight:bold; text-decoration:none; }
#navBar .nav a.special:hover {text-decoration:underline;}
#navBar .nav div.focus {float:right; padding-right:0px;}
/*鎼滅储鏍*/
-#searchBar {background-color:#B02B2C;padding:5px;}
+#searchBar {background-color:#9db2b1;padding:5px;} /* #B02B2C */
#searchBar .content { }
#searchBar .searchInput {font-size:13px; height:18px; width:400px;}
#searchBar .searchBtn {font-size:14px; height:26px; width:80px;}
-#searchBar .options {padding-top:5px; font-size:100%;color:#EEE;letter-spacing:1px;}
+#searchBar .options {padding-top:5px; font-size:100%;color:#EEE;
+ /*letter-spacing:1px;*/
+ }
#searchBar .options INPUT {margin-left:15px;}
#searchBar .options INPUT:hover {cursor:pointer}
@@ -111,7 +130,9 @@ blockquote
#listA .qstA thumb {float:left; }
#listA .qstA H2 {font-size:15px; font-weight:800; margin:8px auto;padding:0px;}
#listA .qstA H2 a {color:#663333; }
-#listA .qstA .stat {font-size:13px;letter-spacing:1px;float:right;}
+#listA .qstA .stat {font-size:13px;
+ /*letter-spacing:1px;*/
+ float:right;}
#listA .qstA .stat span {margin-right:5px;}
#listA .qstA .stat td {min-width:40px;text-align:center;}
#listA .qstA .stat .num {font-family:arial;color:#905213; font-size:20px; font-weight:800;}
@@ -270,7 +291,9 @@ a:hover.medal {color:#333; text-decoration:none; background:url(/content/images
.headMedals {float:left; height:23px; line-height:23px; margin:5px 0 0 5px;padding:0px 6px 0px 15px; font-size:15px; font-weight:700; border-bottom:0px solid #777; border-left:0px solid #darkred; background-color:#FFF;background:url(/content/images/dot-list.gif) no-repeat left center;}
.headLogin {float:left; padding:3px; font-size:15px; font-weight:800; background:url(/content/images/ico_login.gif) no-repeat; padding-left:24px;}
.headNormal {text-align:left;padding:3px; font-size:15px; margin-bottom:12px; font-weight:800;border-bottom:1px solid #777;}
-.headUser {text-align:left;padding:5px; font-size:20px; letter-spacing:1px;margin-bottom:12px; font-weight:800;border-bottom:1px solid #777;}
+.headUser {text-align:left;padding:5px; font-size:20px;
+ /*letter-spacing:1px;*/
+ margin-bottom:12px; font-weight:800;border-bottom:1px solid #777;}
/*RSS璁㈤槄*/
#feeds {margin:10px 0; }
#feeds a {background:url(/content/images/feed-icon-small.png) no-repeat 0; padding-left:18px; font-weight:700; font-size:13px; }
@@ -330,6 +353,7 @@ a:hover.medal {color:#333; text-decoration:none; background:url(/content/images
padding: 15px;
color: White;
background-color: darkred;
+ text-align: center;
}
.vote-notification a
{
@@ -446,9 +470,6 @@ a.comment-user, a.comment-user:hover {
a.comment-user:hover {
text-decoration:underline;
}
-.deleted{
- background:#F4E7E7 none repeat scroll 0 0;
-}
/*鍥炵瓟*/
#answers {}
.answer{
@@ -521,6 +542,10 @@ a.comment-user:hover {
.answer-img-accept:hover{background:url(/content/images/vote-accepted-on.png)}
+.deleted{
+ background:#F4E7E7 none repeat scroll 0 0;
+}
+
/*鏍囩鍒楄〃*/
.tagsbox {}
.tagsbox a {color:#000;line-height:30px;margin-right:10px;font-size:100%;background-color:#F9F7ED;padding:3px;}
@@ -616,7 +641,7 @@ span.form-error {
font-weight:600;
width:100%;
color:#aaa;
- letter-spacing:1px;
+ /*letter-spacing:1px;*/
text-align:left;
}
@@ -699,7 +724,9 @@ background-color: #97ff97;
/*鐢ㄦ埛璧勬枡椤甸潰*/
.count {font-family:Arial;font-size:200%;font-weight:700;color:#777}
-.scoreNumber{font-family:Arial;font-size:35px;font-weight:800;color:#777;line-height:40px;letter-spacing:0px}
+.scoreNumber{font-family:Arial;font-size:35px;font-weight:800;color:#777;line-height:40px;
+ /*letter-spacing:0px*/
+ }
.user-details{font-size:13px;}
.user-about{background-color:#EEEEEE;height:200px;line-height:20px; overflow:auto;padding:10px;width:90%;}
.user-edit-link {background:url(/content/images/edit.png) no-repeat; padding-left:20px; font-weight:600;}
@@ -747,13 +774,18 @@ width:950;margin-bottom:10px;
font-family:Arial;
}
+.stats div {
+ font-size:11px;
+ text-align:center;
+}
+
.narrow .votes {
background:#EEEEEE none repeat scroll 0 0;
float:left;
- height:38px;
+ height:42px;
margin:0 3px 0 0;
padding:5px;
- width:40px;
+ width:46px;
text-align:center;
-moz-border-radius: 5px;
-khtml-border-radius: 5px;
@@ -771,10 +803,11 @@ width:950;margin-bottom:10px;
.narrow .views {
float:left;
- height:38px;
+ height:42px;
margin:0 7px 0 0;
- padding:5px 0 5px 4px;
- width:40px;
+ /*padding:5px 0 5px 4px;*/
+ padding: 5px;
+ width:46px;
text-align:center;
-moz-border-radius: 5px;
-khtml-border-radius: 5px;
@@ -784,10 +817,10 @@ width:950;margin-bottom:10px;
.narrow .status {
float:left;
- height:38px;
+ height:42px;
margin:0 3px 0 0;
padding:5px;
- width:40px;
+ width:46px;
text-align:center;
-moz-border-radius: 5px;
-khtml-border-radius: 5px;
@@ -928,7 +961,9 @@ div.started .reputation-score {
.blogRss {float:right;margin:0 10px 0 0;width:460px;height:240px;background-color:#EEE; padding:5px;}
.bookQuestions {margin-bottom:10px;}
.bookFeed {float:right;}
-.bookAsk{letter-spacing:1px; float:right;margin:-30px 10px 0 0; padding:3px 5px 3px 5px;}
+.bookAsk{
+ /*letter-spacing:1px; */
+ float:right;margin:-30px 10px 0 0; padding:3px 5px 3px 5px;}
.bookAsk a {font-size:15px; color:#FFF; font-weight:bold; text-decoration:none;background-color:#EC7000;padding:3px 6px 3px 6px; }
.bookAsk a:hover {text-decoration:underline;}
@@ -944,7 +979,9 @@ div.started .reputation-score {
.silver, .badge2 {color:#CCCCCC;}
.bronze, .badge3 {color:#CC9933;}
.score {font-weight:800; color:#333;}
-.footerLinks {color:#EEE; font-size:13px; letter-spacing:1px;}
+.footerLinks {color:#EEE; font-size:13px;
+ /* letter-spacing:1px;*/
+ }
.footerLinks a {color:#FFF; font-size:13px;}
.subSearch {margin-bottom:12px; padding:4px;}
a.comment {background:#EEE; color:#993300; padding:4px;}
@@ -959,7 +996,15 @@ ul.bulleta li {background:url(/content/images/bullet_green.gif) no-repeat 0px 2p
.message{padding:5px;font-weight:bold;background-color:#eee;margin:10px 0 10px 0;}
.warning{color:red;}
.darkred{color:darkred;}
-.submit{cursor:pointer;letter-spacing:1px;background-color:#D4D0C8;height:40px;border:1px solid #777;width:100px;font-weight:bold;font-size:120%;}
+.submit{
+ cursor:pointer;
+ /*letter-spacing:1px;*/
+ background-color:#D4D0C8;
+ height:40px;
+ border:1px solid #777;
+/* width:100px; */
+ font-weight:bold;
+ font-size:120%;}
.submit:hover{text-decoration:underline;}
.ask-body{padding-right:10px;}
.thousand{color:orange;}
@@ -996,4 +1041,4 @@ ul.bulleta li {background:url(/content/images/bullet_green.gif) no-repeat 0px 2p
padding-left: 3px;
padding-right: 3px;
cursor:pointer;
-} \ No newline at end of file
+}
diff --git a/templates/faq.html b/templates/faq.html
index e9650c3e..31ee444a 100644
--- a/templates/faq.html
+++ b/templates/faq.html
@@ -1,47 +1,47 @@
+<!-- template faq.html -->
{% extends "base_content.html" %}
{% load extra_tags %}
{% load humanize %}
+{% load i18n %}
{% block title %}{% spaceless %}FAQ{% endspaceless %}{% endblock %}
{% block forejs %}
{% endblock %}
{% block content %}
<div class="headNormal">
- 甯歌闂(FAQ)
+ {% trans "Frequently Asked Questions " %}(FAQ)
</div>
<div id="main-body" style="width:100%">
- <h3 class="subtitle">鎴戝彲浠ュ湪杩欓噷鎻愰棶浠涔堟牱鐨勯棶棰橈紵</h3>
- <p>姣棤鐤戦棶锛岄鍏堝繀椤绘槸<span class="yellowbg">鎶鏈紪绋嬮棶棰橈紒</span>
- 鎻愰棶涔嬪墠锛屽厖鍒嗗埄鐢ㄧ郴缁熺殑鑷姩鏌ユ壘銆佹爣绛惧拰鎼滅储锛岀湅鐪嬫槸鍚﹀凡缁忔湁涓鏍风殑闂骞舵湁浜嗙瓟妗堛<br>
- 閬垮厤闂浉鍚岀殑闂锛屽噺灏戝悗鏈夐棶棰樼殑鏈嬪弸鐨勭枒鎯戯紝浠ュ悗鑳藉娓呮櫚鍦版壘鍒板敮涓闂鍜岀瓟妗堛
+ <h3 class="subtitle">{% trans "What kinds of questions can I ask here?" %}</h3>
+ <p>{% trans "Most importanly - questions should be <strong>relevant</strong> to this community." %}<br>
+ {% trans "Before asking the question - please make sure to use search to see whether your question has alredy been answered."%}<br>
</p><br>
- <h3 class="subtitle">浠涔堟牱鐨勯棶棰樻垜涓嶈鍦ㄨ繖閲屾彁闂紵</h3>
- <p> <span class="yellowbg">涓庣▼搴忓憳鎴栨妧鏈棤鍏崇殑锛屽紩璧蜂簤鍚垫垨澶繃浜庝富瑙傛х瓑杩濊儗绀惧尯瀹楁棬鐨勫唴瀹广</span>鏈珯寤虹珛鏄负浜嗗府鍔╁ぇ浼楃▼搴忓憳瑙e喅瀹為檯鎶鏈棶棰橈紝鎴戜滑闇瑕佸疄闄呯殑闂锛
- </p><p>
- 鍚屾牱锛屽湪绀惧尯寤虹珛涔嬪垵锛屽緢澶氱敤鎴峰彲鑳藉绀惧尯鏈夊悇绉嶅悇鏍风殑鐤戦棶銆傛垜浠笇鏈涜兘澶熼氳繃鏇村鐨刦aq鎴栬呮枃妗e幓瑙i噴杩欎簺鐤戦棶锛屽鏋滅敤鎴锋病鏈夋壘鍒扮瓟妗堬紝甯屾湜浣犲湪绀惧尯鎻愬嚭姝ょ被闂锛屽苟寮曠敤鈥渇aq鈥濇垨鑰呪渃nprog鈥濈瓑鐩稿叧鐨勬爣绛俱傛瘯绔燂紝璁块棶绀惧尯鐨勭敤鎴凤紝鏄叧蹇冧粬浠瀵绘壘鐨勭瓟妗堬紝涓嶆槸鏉ュ涔犲浣曚娇鐢ㄥ鏉傜殑绀惧尯鍔熻兘鐨勩
- </p><p>
- 濡傛灉杩樻病鏈夋嫓璇昏繃Eric S. Raymond鐨<a href="http://www.catb.org/~esr/faqs/smart-questions.html">銆奌ow To Ask Questions The Smart Way銆</a>鐨勬湅鍙嬶紝鎺ㄨ崘鍏堣涓涓嬪ぇ甯堢殑绠磋█銆傚彟澶栵紝杩欓噷鏈変竴<a href="http://www.dianbo.org/9238/stone/tiwendezhihui.htm">涓枃鐗堟湰</a>锛屽彲浠ュ弬鑰冩祻瑙堛
- </p><p><span class="yellowbg">绠$悊杩愯绀惧尯鐨勬槸浣犱滑锛岃屼笉鏄垜浠</span></p>
+ <h3 class="subtitle">{% trans "What questions should I avoid asking?" %}</h3>
+ <p>{% trans "Please avoid asking questions that are not relevant to this community, too subjective and argumentative." %}</p>
</p><br>
- <h3 class="subtitle">浠涔堟牱鐨勫洖绛旀槸涓嶅彈娆㈣繋鐨勶紵</h3>
- <p> CNProg 甯屾湜鐢ㄦ埛鎻愪緵閽堝鎻愰棶鐨勬妧鏈洖绛旓紝鍙互鏄繘涓姝ヤ簡瑙i棶棰樺疄璐紝缁欎簣鍙傝冩柟妗堬紝鎴栧畬鍏ㄨВ鍐抽棶棰樼殑鍥炵瓟銆傛垜浠笇鏈涢氳繃闂瓟鐨勫舰寮忚В鍐崇敤鎴风殑瀹為檯闂銆傚洜姝わ紝<span class="yellowbg">鎴戜滑涓嶆杩庡湪鍥炵瓟涓嚭鐜颁笉鏄洖绛旈棶棰樼殑鍐呭锛屽寘鎷拡瀵逛粬浜哄洖绛旂殑璁ㄨ锛屽拰鍏朵粬鏃犳剰涔夌殑娴垂缃戠粶璧勬簮琛屼负</span>銆侰NProg寤鸿鎮ㄤ娇鐢<span class="yellowbg">璇勮</span>鍔熻兘鏉ヨ璁轰綘鐨勬剰瑙佸拰鎯虫硶銆
-
+ <h3 class="subtitle">{% trans "What should I avoid in my answers?" %}</h3>
+ <p>{% trans "site title" %} {% trans "is a Q&A site, not a discussion group. Therefore - please avoid having discussions in your answers, comment facility allows some space for brief discussions." %}
</p><br>
- <h3 class="subtitle">璋佹槸绀惧尯鐨勭鐞嗗憳锛</h3>
- <p> 绛旀鏄細<span class="yellowbg">姣忎釜鐢ㄦ埛銆</span><br>
-
- 绀惧尯娌℃湁涓ユ牸鎰忎箟涓婄殑绠$悊鍛樿韩浠姐
- 閫氳繃绉垎杩愪綔锛<span class="yellowbg">姣忎釜鐢ㄦ埛閮芥湁鏉冮檺鍒涘缓鏍囩锛岃繘琛屽鎵鏈夐棶棰樸佸洖绛旂殑鎶曠エ銆佺紪杈戙佸叧闂瓑鎿嶄綔銆</span>
+ <h3 class="subtitle">{% trans "Who moderates this community?" %}</h3>
+ <p>{% trans "The short answer is: <strong>you</strong>." %}<br>
+ {% trans "This website is moderated by the users." %}
+ {% trans "The reputation system allows users earn the authorization to perform a variety of moderation tasks." %}
</p><br>
- <h3 class="subtitle">浠涔堟槸绀惧尯绉垎锛</h3>
- <p> 瀵逛簬姝e父浣跨敤绀惧尯杩涜鎻愰棶銆佸洖绛旇岃█锛岀Н鍒嗕笉鏄繀椤荤殑銆<br>
- 鎴戜滑涓鍐嶅0鏄庯紝CNProg鐢变綘鏉ヨ繍琛屽拰缁存姢銆傚鏋滀綘鎯冲府鍔╂垜浠潵杩愪綔CNProg锛屼綘闇瑕佷竴瀹氱殑绉垎绛夌骇銆<span class="yellowbg">绉垎鏄竴绉嶇敤鏉ョ矖鐣ヨ 閲忕ぞ鍖哄浣犳湁澶氫俊浠荤殑鏁版嵁銆</span>绉垎涓嶆槸鏈夎皝鏉ユ敮浠樻垨鐩存帴缁欎簣浣犵殑锛岃屾槸浣犻氳繃鑾峰緱鍏朵粬鐢ㄦ埛鐨勬敮鎸佸拰淇′换鈥滆禋寰椻濈殑銆
- <br><br>
- 涓句緥鏉ヨ锛屽鏋滀綘鎻愪簡涓涓潪甯告湁甯姪鐨勯棶棰樻垨鑰呭仛浜嗗緢鏈夌敤鐨勫洖绛旓紝浣犲皢浼氳鍏朵粬鐢ㄦ埛鎶曡禐鎴愮エ銆傜浉鍙嶏紝浣犳彁浜嗕笉鍙楁杩庣殑闂锛屾垨鑰呰瀵肩敤鎴风殑鍥炵瓟锛屼綘灏嗗彲鑳借鍏朵粬鐢ㄦ埛鎶曞弽瀵圭エ銆傛瘡涓禐鎴愮エ浼氬府浣犱骇鐢<strong>10</strong>涓ぞ鍖虹Н鍒嗭紝姣忎釜鍙嶅绁ㄤ細鐩稿簲鎵i櫎浣<strong>2</strong>涓Н鍒嗐傛瘡澶╅氳繃鍒汉鎶曡禐鎴愮エ锛屼綘鏈澶氬彧鑳戒骇鐢<strong>200</strong>涓Н鍒嗭紝杩欐槸涓婇檺銆傚綋浣犵疮璁″埌涓瀹氱Н鍒嗭紝浣犲彲浠ュ湪绀惧尯鍋氭洿澶氱殑浜嬫儏锛<br>
+ <h3 class="subtitle">{% trans "How does reputation system work?" %}</h3>
+ <p>{% trans "Anyone can ask questions and give answers, points are not necessary for that." %}<br>
+ {% trans "As we've said before, users help running this site. Point system helps select users who can administer this community."%}
+ {% trans "Reputation points roughly measure how community trusts you. These points are given to you directly by other members of the community." %}
+ </p>
+ <p>
+ {% trans "For example, if you ask an interesting question or give a helpful answer, your input will be upvoted and you will gain more trust in the community." %}
+ {% trans "If on the other hand someone gives a misleading answer, the answer will be voted down and he/she loses some points." %}
+ {% trans "Each vote in favor will generate <strong>10</strong> points, each vote against will subtract <strong>2</strong> points." %}
+ {% trans "Through the votes of other people you can accumulate a maximum of <strong>200</strong> points." %}
+ {% trans "After accumulating certain number of points, you can do more:" %}
<table style="font-family:arial;" cellspacing="3" cellpadding="3">
<tr>
<th width="40px" style="text-align:right"></th>
@@ -49,66 +49,65 @@
</tr>
<tr>
<td style="text-align:right;padding-right:5px"><strong>15</strong></td>
- <td>鎶曡禐鎴愮エ</td>
+ <td>{% trans "upvote" %}</td>
</tr>
<tr>
<td style="text-align:right;padding-right:5px"><strong>15</strong></td>
- <td>鏍囪鍨冨溇甯</td>
+ <td>{% trans "use tags" %}</td>
</tr>
<tr>
<td style="text-align:right;padding-right:5px"><strong>50</strong></td>
- <td>娣诲姞璇勮</td>
+ <td>{% trans "add comments" %}</td>
</tr>
<tr>
<td style="text-align:right;padding-right:5px"><strong>100</strong></td>
- <td>鎶曞弽瀵圭エ</td>
+ <td>{% trans "downvote" %}</td>
</tr><tr>
<td style="text-align:right;padding-right:5px"><strong>250</strong></td>
<td>鎵撳紑鍏抽棴鑷繁鐨勯棶棰</td>
</tr>
<tr>
<td style="text-align:right;padding-right:5px"><strong>500</strong></td>
- <td>缁欎换浣曢棶棰樻暣鐞嗘爣绛</td>
+ <td>{% trans "retag questions" %}</td>
</tr>
<tr>
<td style="text-align:right;padding-right:5px"><strong>750</strong></td>
- <td>缂栬緫wiki绫婚棶棰</td>
+ <td>{% trans "edit community wiki questions" %}</td>
</tr>
<tr>
<td style="text-align:right;padding-right:5px"><strong>2000</strong></td>
- <td>缂栬緫浠讳綍闂鎴栫瓟妗</td>
+ <td>{% trans "edit any answer" %}</td>
</tr>
<tr>
<td style="text-align:right;padding-right:5px"><strong>3000</strong></td>
- <td>鎵撳紑鍏抽棴浠讳綍浜虹殑闂</td>
+ <td>{% trans "open any closed question" %}</td>
</tr>
<tr>
<td style="text-align:right;padding-right:5px"><strong>5000</strong></td>
- <td>鍒犻櫎浠讳綍涓涓瘎璁</td>
+ <td>{% trans "delete any comment" %}</td>
</tr>
<tr>
<td style="text-align:right;padding-right:5px"><strong>10000</strong></td>
- <td>鍒犻櫎浠讳綍涓涓棶棰樻垨绛旀锛屽強鍏朵粬绠$悊鍔熻兘</td>
+ <td>{% trans "delete any questions and answers and perform other moderation tasks" %}</td>
</tr>
</table>
</p><br>
- <h3 class="subtitle">鎴戦渶瑕佹敞鍐屼竴涓柊鐢ㄦ埛鍚楋紵</h3>
- <p> 涓嶉渶瑕併傜ぞ鍖烘彁渚涗簡OpenID鐨勭櫥褰曟敮鎸侊紝浣犺鐢℅oogle銆乊ahoo绛変换浣曟敮鎸丱penID鐧诲綍鐨勫笎鍙峰氨鍙互浣跨敤绯荤粺銆<strong><a href="/account/signin">椹笂鐧诲綍</a> 禄</strong>
+ <h3 class="subtitle">{% trans "To register, do I need to create new password?" %}</h3>
+ <p>{% trans "No, you don't have to. You can login through any service that supports OpenID, e.g. Google, Yahoo, AOL, etc." %}
+ <strong><a href="/account/signin">{% trans "Login now!" %}</a> 禄</strong>
</p><br>
- <h3 class="subtitle">涓轰粈涔堝叾浠栦汉鍙互淇敼鎴戠殑闂/鍥炵瓟锛</h3>
- <p> CNProg 鏄负浜嗗府鍔╃▼搴忓憳瑙e喅鏇村闂锛屾洿鍔犳柟渚跨殑瑙e喅闂銆傛墍浠ラ棶棰樺拰绛旀閮芥槸濡俉iki涓鏍峰彲缂栬緫鐨勶紝鎴戜滑甯屾湜绀惧尯鑳藉府鍔╃敤鎴锋矇娣銆佺Н绱洿澶氭湁鐢ㄧ殑鐭ヨ瘑鍜岀粡楠屻傚鏋滄偍涓嶅枩娆㈣繖绉嶆柟寮忥紝鎴戜滑灏婇噸浣犵殑閫夋嫨銆
+ <h3 class="subtitle">{% trans "Why other people can edit my questions/answers?" %}</h3>
+ <p> {% trans "Goal of this site is..." %} {% trans "So questions and answers can be edited like wiki pages by experienced users of this site and this improves the overall quality of the knowledge base content." %}
+ {% trans "If this approach is not for you, we respect your choice." %}
</p><br>
-
- <h3 class="subtitle">杩樻湁鍏朵粬闂锛</h3>
- <p> 濡傛灉鎮ㄥ绀惧尯杩樻湁鍏朵粬鐤戦棶锛岃涓璧锋潵瀹屽杽鎴戜滑鐨<a href="/tags/faq" class="big">CNProg FAQ</a>銆
+ <h3 class="subtitle">{% trans "Still have questions?" %}</h3>
+ <p>{% trans "Please ask your question, help make our community better!" %} <a href="/tags/faq" class="big">{% trans "site title" %} {% trans "questions" %}</a>{% trans "." %}
</p>
<br><br>
</div>
{% endblock %}
-
-
-
+<!-- end template faq.html -->
diff --git a/templates/footer.html b/templates/footer.html
index 46649b9f..61e6e6bb 100644
--- a/templates/footer.html
+++ b/templates/footer.html
@@ -1,28 +1,33 @@
-锘縶% load extra_tags %}
+<!-- template footer.html -->
+{% load extra_tags %}
{% load i18n %}
+<!-- 椤甸潰搴曢儴寮濮嬶細 -->
<div id="ground">
<div class="footerLinks" >
- <a href="/about">{% trans "About us" %}</a><span class="link-separator"> |</span>
+ <a href="/about">{% trans "about" %}</a><span class="link-separator"> |</span>
<a href="/faq">{% trans "faq" %}</a><span class="link-separator"> |</span>
- <a href="http://blog.cnprog.com">Blog</a><span class="link-separator"> |</span>
- <a href="mailto:team@cnprog.com">{% trans "Contact" %}</a><span class="link-separator"> |</span>
- <a href="/privacy">{% trans "Privacy" %}</a><span class="link-separator"> |</span>
- <a href="http://cnprog.uservoice.com" target="_blank">{% trans "Feedback" %}</a>
+ <a href="{{ blog_url }}">{% trans "blog" %}</a><span class="link-separator"> |</span>
+ <a href="{{ webmaster_email }}">{% trans "contact us" %}</a><span class="link-separator"> |</span>
+ <a href="/privacy">{% trans "privacy policy" %}</a><span class="link-separator"> |</span>
+ <a href="{{ feedback_url }}" target="_blank">{% trans "give feedback" %}</a>
</div>
<p style="margin-top:10px;">
<a href="http://code.google.com/p/cnprog/" target="_blank">
<img src="/content/images/djangomade124x25_grey.gif" border="0" alt="Made with Django." title="Made with Django." >
</a>
+ <!--<div style="font-size:90%;color:#333">{% trans "current revision" %}: R-0120-20090406</div>-->
</p>
- <p style="margin-top:-30px; margin-right:15px;" class="fright"><img src="/content/images/cc-wiki.png" title="Creative Commons: Attribution - Share Alike" alt="cc-wiki" width="50" height="68" /></p>
+ <p id="licenseLogo"><img src="/content/images/cc-wiki.png" title="Creative Commons: Attribution - Share Alike" alt="cc-wiki" width="50" height="68" /></p>
</div>
+ <!-- 椤甸潰搴曢儴缁撴潫锛 -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
- var pageTracker = _gat._getTracker("UA-248512-5");
+ var pageTracker = _gat._getTracker({{ google_analytics_key }});
pageTracker._trackPageview();
} catch(err) {}
</script>
+<!-- end template footer.html -->
diff --git a/templates/header.html b/templates/header.html
index 1da107b6..0aa02886 100644
--- a/templates/header.html
+++ b/templates/header.html
@@ -1,13 +1,15 @@
+<!-- template header.html -->
{% load extra_tags %}
{% load i18n %}
<div id="top">
<div id="header">
{% if request.user.is_authenticated %}
- <a href="/users/{{ request.user.id }}/{{ request.user.username }}/">{{ request.user.username }}</a> {% get_score_badge request.user %} <a href="/logout/">{% trans "Logout" %}</a>
+ <a href="/users/{{ request.user.id }}/{{ request.user.username }}/">{{ request.user.username }}</a> {% get_score_badge request.user %}
+ <a href="/logout/">{% trans "logout" %}</a>
{% else %}
- <a href="/account/signin">{% trans "Login" %}</a>
+ <a href="/account/signin">{% trans "login" %}</a>
{% endif %}
- <a href="/about">{% trans "About us" %}</a>
+ <a href="/about">{% trans "about" %}</a>
<a href="/faq">{% trans "faq" %}</a>
</div>
</div>
@@ -18,24 +20,26 @@
<td width="23%">
<div id="logo">
<a href="/">
- <img src="/content/images/logo.png" title="{% trans 'link to homepage'%}" />
+ <img src="/content/images/logo.png" title="{% trans "back to home page" %}" />
</a>
</div>
</td>
<td width="77%" valign="bottom">
<div class="nav">
- <a id="nav_questions" href="/questions/" >{% trans "Questions" %}</a>
- <a id="nav_tags" href="/tags/">{% trans "Tags" %}</a>
- <a id="nav_users" href="/users/">{% trans "Users" %}</a>
- <a id="nav_books" href="/books/">{% trans "Books" %}</a>
- <a id="nav_badges" href="/badges/">{% trans "Badges" %}</a>
- <a id="nav_unanswered" href="/questions/unanswered/">{% trans "Unanswered" %}</a>
+ <a id="nav_questions" href="/questions/" >{% trans "questions" %}</a>
+ <a id="nav_tags" href="/tags/">{% trans "tags" %}</a>
+ <a id="nav_users" href="/users/">{% trans "users" %}</a>
+ <!--<a id="nav_books" href="/books/">{% trans "books" %}</a>-->
+ <a id="nav_badges" href="/badges/">{% trans "badges" %}</a>
+ <a id="nav_unanswered" href="/questions/unanswered/">{% trans "unanswered questions" %}</a>
+ {% comment %}<!-- i think this needs to be removed -e.f. -->
{% if request.user.is_authenticated %}
- <a id="nav_profile" href="/users/{{ request.user.id }}/{{ request.user.username }}/">{% trans "Profile" %}</a>
+ <a id="nav_profile" href="/users/{{ request.user.id }}/{{ request.user.username }}/">{% trans "my profile" %}</a>
{% endif %}
+ {% endcomment %}
<div class="focus">
- <a id="nav_ask" href="/questions/ask/" class="special">{% trans "Ask a question" %}</a>
+ <a id="nav_ask" href="/questions/ask/" class="special">{% trans "ask a question" %}</a>
</div>
</div>
@@ -50,12 +54,12 @@
<form action="/search/" method="GET">
<div>
<input type="text" class="searchInput" value="{{ keywords }}" name="q" id="keywords" >
- <input type="submit" name="Submit" value="{% trans 'Search' %}" class="searchBtn" >
+ <input type="submit" name="Submit" value="{% trans "search" %}" class="searchBtn" >
</div>
<div class="options">
- <input id="type-question" type="radio" class="" value="question" name="t" checked >{% trans "Questions" %}
- <input id="type-tag" type="radio" class="" value="tag" name="t" >{% trans "Tags" %}
- <input id="type-user" type="radio" class="" value="user" name="t" >{% trans "Users" %}
+ <input id="type-question" type="radio" class="" value="question" name="t" checked >{% trans "questions" %}
+ <input id="type-tag" type="radio" class="" value="tag" name="t" >{% trans "tags" %}
+ <input id="type-user" type="radio" class="" value="user" name="t" >{% trans "users" %}
</div>
</form>
</td>
@@ -63,3 +67,4 @@
</table>
</div>
</div>
+<!-- end template header.html -->
diff --git a/templates/index.html b/templates/index.html
index ba3e2229..2ef66d4e 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,11 +1,11 @@
{% extends "base.html" %}
+{% load i18n %}
{% load extra_tags %}
{% load humanize %}
{% load extra_filters %}
-{% load i18n %}
{% block title %}{% spaceless %}{% trans "Home" %}{% endspaceless %}{% endblock %}
-{% block meta %}<meta name="keywords" content="{{ APP_KEYWORDS }}" />
- <meta name="description" content="{{ APP_DESCRIPTION }}" />{% endblock %}
+{% block meta %}<meta name="keywords" content="{% trans "meta site keywords, comma separated" %}" />
+ <meta name="description" content="{% trans "meta site content" %}" />{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -20,12 +20,13 @@
<div class="tabBar">
<div class="headQuestions">{% trans "Questions" %}</div>
<div class="tabsA">
- <a id="latest" href="?sort=latest" title="{% trans 'Newest updated questions' %}" >{% trans "Newest" %}</a>
- <a id="hottest" href="?sort=hottest" title="{% trans 'Questions with most answers' %}" >{% trans "Hottest" %}</a>
- <a id="mostvoted" href="?sort=mostvoted" title="{% trans 'Questions with most votes' %}" >{% trans "Best" %}</a>
- <a id="all" href="/questions/" title="{% trans 'All questions' %}" >{% trans "All" %}</a>
+ <a id="latest" href="?sort=latest" title="{% trans "last updated questions" %}" >{% trans "newest" %}</a>
+ <a id="hottest" href="?sort=hottest" title="{% trans "hottest questions" %}" >{% trans "hottest" %}</a>
+ <a id="mostvoted" href="?sort=mostvoted" title="{% trans "most voted questions" %}" >{% trans "most voted" %}</a>
+ <a id="all" href="/questions/" title="{% trans "all questions" %}" >{% trans "all questions" %}</a>
</div>
</div>
+<!-- 闂鍒楄〃 -->
<div id="listA">
{% for question in questions %}
<div class="qstA">
@@ -42,9 +43,9 @@
<td><span class="num">{{ question.view_count|cnprog_intword|safe }}</span> </td>
</tr>
<tr>
- <td><span class="unit">{% trans "Answers" %}</span></td>
- <td><span class="unit">{% trans "Votes" %}</span></td>
- <td><span class="unit">{% trans "Visits" %}</span></td>
+ <td><span class="unit">{% trans "answers" %}</span></td>
+ <td><span class="unit">{% trans "votes" %}</span></td>
+ <td><span class="unit">{% trans "views" %}</span></td>
</tr>
</table>
</div>
@@ -52,7 +53,7 @@
{{ question.summary }}...
</div>
{% if question.wiki %}
- <span class="from wiki">{% trans "Community wiki" %}</span>
+ <span class="from wiki">{% trans "community wiki" %}</span>
<span class="date" title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</span>
{% else %}
<div class="from">
@@ -64,7 +65,7 @@
{% endif %}
<div class="tags">
{% for tag in question.tagname_list %}
- <a href="{% url forum.views.tag tag|urlencode %}" title="{% trans 'Browse questions with tag of ' %}'{{ tag }}'" rel="tag">{{ tag }}</a>
+ <a href="{% url forum.views.tag tag|urlencode %}" title="{% trans "see questions tagged" %}'{{ tag }}'{% trans "using tags" %}" rel="tag">{{ tag }}</a>
{% endfor %}
</div>
</div>
@@ -75,11 +76,12 @@
{% block sidebar %}
{% if not request.user.is_authenticated %}
<div class="boxA">
- <h3>{% trans "Welcome" %}</h3>
+ <h3>{% trans "welcome to website" %}</h3>
<div class="body">
- {{ APP_INTRO|safe }}
- <div class="more"><a href="/about">{% trans "About us" %} 禄</a></div>
- <div class="more"><a href="/faq">FAQ 禄</a></div>
+ <p>{% trans "what is this website" %}</p>
+ <p>{% trans "what can one do on this website" %}</p>
+ <div class="more"><a href="/about">{% trans "about" %} 禄</a></div>
+ <div class="more"><a href="/faq">{% trans "faq" %} 禄</a></div>
</div>
</div>
{% endif %}
@@ -88,33 +90,34 @@
<div class="body">
<p class="tagsbox">
{% for tag in tags %}
- <a rel="tag" title="{% trans 'Browse questions with tag of ' %}'{{ tag.name }}'" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a>
+ <a rel="tag"
+ title="{% blocktrans with tag.name as tagname %}see questions tagged '{{tagname}}'{% endblocktrans %}" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a>
{% endfor %}
</p>
- <div class="more"><a href="/tags">{% trans "Popular tags" %} 禄</a> </div>
+ <div class="more"><a href="/tags">{% trans "popular tags" %} 禄</a> </div>
</div>
</div>
<div class="boxB">
- <h3>{% trans "Recent badges" %}</h3>
+ <h3>{% trans "Recent awards" %}</h3>
<div class="body">
<ul class="badge-list">
{% for award in awards %}
<li>
<a href="/badges/{{award.badge_id}}/{{award.badge_name}}" title="{{ award.badge_description }}" class="medal">
- <span class="badge{{ award.badge_type }}">&#9679;</span>&nbsp;{{ award.badge_name }}</a>
+ <span class="badge{{ award.badge_type }}">&#9679;</span>&nbsp;{{ award.badge_name }}</a> {% trans "given to" %}
<a href="/users/{{award.user_id}}/{{award.user_name}}">{{ award.user_name }}</a>
</li>
{% endfor %}
</ul>
- <div class="more"><a href="/badges/">{% trans "All badges" %} 禄</a> </div>
+ <div class="more"><a href="/badges/">{% trans "all awards" %} 禄</a> </div>
</div>
</div>
<div id="feeds">
-<a href="/feeds/rss" title="{% trans 'RSS feed of recent 30 questions' %}">{% trans "Subscribe" %}</a>
+<a href="/feeds/rss" title="{% trans "subscribe to last 30 questions by RSS" %}">{% trans "subscribe to the questions feed" %}</a>
</div>
{% endblock %}
{% block tail %}
<div style="padding:5px 0 5px 5px;">
-<span class="evenMore">{% trans "Are you looking for more questions? Try to browse" %} <a href="/questions/">{% trans "All questions" %}</a>{% trans " or "%} <a href="/tags/">{% trans "Popular tags" %}</a>{% trans ". Please help us answer "%}<a href="/questions/unanswered">{% trans "Unanswered questions" %}</a></span>
+<span class="evenMore">{% trans "Still looking for more? See" %} <a href="/questions/">{% trans "complete list of quesionts" %}</a>, {% trans "or" %} <a href="/tags/">{% trans "popular tags" %}</a>{% trans "." %} {% trans "Please help us answer" %} <a href="/questions/unanswered">{% trans "unanswered questions" %}</a>{% trans "." %}</span>
</div>
{% endblock %}
diff --git a/templates/logout.html b/templates/logout.html
index 48a2deaf..b13e5e25 100644
--- a/templates/logout.html
+++ b/templates/logout.html
@@ -1,3 +1,4 @@
+<!-- template logout.html -->
{% extends "base_content.html" %}
{% load extra_tags %}
{% load humanize %}
@@ -13,13 +14,12 @@
{% endblock %}
{% block content %}
<div class="headNormal">
- {% trans "Logout" %}
+ {% trans "Logout" %}
</div>
<div id="main-body" style="width:100%">
- <input id="btLogout" type="button" class="submit" value="OK" style="width:150px">
+ <p>{% trans "As a registered user you can login with your OpenID, log out of the site or permanently remove your account." %}</p>
+ <input id="btLogout" type="button" class="submit" value="{% trans "Logout now" %}"><!-- style="width:150px">-->
<br><br>
</div>
{% endblock %}
-
-
-
+<!-- ent template logout.html -->
diff --git a/templates/okfiles b/templates/okfiles
new file mode 100644
index 00000000..3ca0191e
--- /dev/null
+++ b/templates/okfiles
@@ -0,0 +1,30 @@
+404.html
+500.html
+about.html
+ask.html
+badges.html
+base_content.html
+base.html
+book.html
+close.html
+faq.html
+footer.html
+header.html
+index.html
+logout.html
+pagesize.html
+paginator.html
+privacy.html
+question_edit_tips.html
+question.html
+questions.html
+revisions_answer.html
+tags.html
+unanswered.html
+user_edit.html
+user_info.html
+users.html
+users_questions.html
+user_stats.html
+user_tabs.html
+user_votes.html
diff --git a/templates/pagesize.html b/templates/pagesize.html
index 5eb0159c..5037f1f6 100644
--- a/templates/pagesize.html
+++ b/templates/pagesize.html
@@ -1,7 +1,9 @@
+<!-- template pagesize.html -->
{% spaceless %}
+{% load i18n %}
{% if is_paginated %}
<div class="paginator">
- <span class="text">姣忛〉鏄剧ず</span>
+ <span class="text">{% trans "posts per page" %}</span>
{% ifequal pagesize 10 %}
<span class="curr">10</span>
{% else %}
@@ -21,4 +23,5 @@
{% endifequal %}
</div>
{% endif %}
-{% endspaceless %} \ No newline at end of file
+{% endspaceless %}
+<!-- end template pagesize.html -->
diff --git a/templates/paginator.html b/templates/paginator.html
index 3e8bd856..c5e51a81 100644
--- a/templates/paginator.html
+++ b/templates/paginator.html
@@ -1,7 +1,10 @@
+<!-- paginator.html -->
{% spaceless %}
+{% load i18n %}
{% if is_paginated %}
<div class="paginator">
-{% if has_previous %}<span class="prev"><a href="{{base_url}}page={{ previous }}{{ extend_url }}" title="涓婁竴椤">&laquo; 涓婁竴椤</a></span>{% endif %}
+{% if has_previous %}<span class="prev"><a href="{{base_url}}page={{ previous }}{{ extend_url }}" title="{% trans "previous" %}">
+&laquo; {% trans "previous" %}</a></span>{% endif %}
{% if not in_leading_range %}
{% for num in pages_outside_trailing_range %}
@@ -14,22 +17,23 @@
{% ifequal num page %}
{% ifequal pages 1 %}
{% else %}
- <span class="curr" title="褰撳墠椤">{{ num }}</span>
+ <span class="curr" title="{% trans "current page" %}">{{ num }}</span>
{% endifequal %}
{% else %}
- <span class="page"><a href="{{base_url}}page={{ num }}{{ extend_url }}" title="绗瑊{ num }}椤">{{ num }}</a></span>
+ <span class="page"><a href="{{base_url}}page={{ num }}{{ extend_url }}" title="{% trans "page number " %}{{ num }}{% trans "number - make blank in english" %}">{{ num }}</a></span>
{% endifequal %}
{% endfor %}
{% if not in_trailing_range %}
...
{% for num in pages_outside_leading_range reversed %}
- <span class="page"><a href="{{base_url}}page={{ num }}{{ extend_url }}" title="绗瑊{ num }}椤">{{ num }}</a></span>
+ <span class="page"><a href="{{base_url}}page={{ num }}{{ extend_url }}" title="{% trans "page number " %}{{ num }}{% trans "number - make blank in english" %}">{{ num }}</a></span>
{% endfor %}
{% endif %}
-{% if has_next %}<span class="next"><a href="{{base_url}}page={{ next }}{{ extend_url }}" title="涓嬩竴椤">涓嬩竴椤 &raquo;</a></span>{% endif %}
+{% if has_next %}<span class="next"><a href="{{base_url}}page={{ next }}{{ extend_url }}" title="{% trans "next page" %}">{% trans "next page" %} &raquo;</a></span>{% endif %}
</div>
{% endif %}
-{% endspaceless %} \ No newline at end of file
+{% endspaceless %}
+<!-- end paginator.html -->
diff --git a/templates/privacy.html b/templates/privacy.html
index b0f02cd7..335aba92 100644
--- a/templates/privacy.html
+++ b/templates/privacy.html
@@ -1,40 +1,43 @@
+<!-- privacy.html -->
{% extends "base_content.html" %}
{% load extra_tags %}
+{% load i18n %}
{% load humanize %}
-{% block title %}{% spaceless %}闅愮鏀跨瓥{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Privacy policy" %}{% endspaceless %}{% endblock %}
{% block forejs %}
{% endblock %}
{% block content %}
<div class="headNormal">
- 闅愮鏀跨瓥
+ {% trans "Privacy policy" %}
</div>
<div id="main-body" style="width:100%">
<p>
- CNProg鎵胯鐢ㄦ埛闅愮鐨勯噸瑕佹с傛湰鏂囦欢姒傝堪鍦ㄦ偍娴忚CNProg杩囩▼涓墍鎺ユ敹鍜屾敹闆嗙殑涓汉淇℃伅鐨勭绫伙紝浠ュ強CNProg鎵閲囧彇鐨勪繚鎶や俊鎭殑涓浜涙帾鏂姐侰NProg甯屾湜杩欏皢鏈夊姪浜庢偍鍦ㄧ煡鎯呯殑鎯呭喌涓嬶紝灏卞拰鎴戜滑鍏变韩涓汉淇℃伅鐨勯棶棰樹綔鍑哄喅瀹氥
+ {% trans "general message about privacy" %}
</p>
- <h3 class="subtitle">缃戠珯璁块棶鑰</h3>
- <p> 褰撴偍璁块棶鏈綉绔欐垨浣跨敤鎴戜滑鐨勬煇浜涘湪绾挎湇鍔℃椂锛屾湇鍔″櫒浼氳嚜鍔ㄨ褰曚俊鎭紝鍖呮嫭浣嗕笉闄愪簬URL銆両P鍦板潃銆佹祻瑙堝櫒鐨勭被鍨嬨佸睆骞曞垎杈ㄧ巼銆佺郴缁熺被鍨嬪拰浣跨敤鐨勮瑷浠ュ強璁块棶鏃ユ湡鍜屾椂闂淬傛垜浠殑鐩殑鏄负浜嗗悜鎮ㄦ彁渚涙洿濂界殑鐢ㄦ埛鏈嶅姟锛屽寘鎷彲鑳戒负鎮ㄦ彁渚涘畾鍒剁殑鍦ㄧ嚎鏈嶅姟銆
+ <h3 class="subtitle">{% trans "Site Visitors" %}</h3>
+ <p>
+ {% trans "what technical information is collected about visitors" %}
</p>
- <h3 class="subtitle">涓汉韬唤淇℃伅</h3>
- <p> 鍦ㄧ櫥褰曚娇鐢–NProg鐨勬彁闂拰鍥炵瓟鍔熻兘鏃讹紝鎴戜滑瑕佹眰浣跨敤鑰呮彁渚涚敤鎴峰悕銆佸瘑鐮併佺數瀛愰偖浠剁瓑淇℃伅銆侰NProg鏀堕泦杩欑被鍏充簬涓汉韬唤鐨勪俊鎭彧鏄负浜嗙櫥褰曠郴缁熻幏寰椾娇鐢ㄥ姛鑳界殑鐩殑銆傛垜浠笉浼氬悜浠讳綍鍏朵粬绀惧尯鐢ㄦ埛銆佷釜浜烘垨绗笁鏂归忛湶鎮ㄧ殑瀵嗙爜鎴栬呯數瀛愰偖浠朵俊鎭傜敤鎴峰彲浠ラ夋嫨鎬у湴濉啓鐢ㄦ埛璧勬枡銆佷釜浜虹綉绔欍佸勾榫勩佸煄甯傜瓑淇℃伅锛屾垜浠敹闆嗚繖浜涘唴瀹逛负浜嗕娇鐢ㄦ埛鑳藉鏇村鏄撳拰鏇存弧鎰忓湴浣跨敤CNProg鎻愪緵鐨勭綉椤靛拰鏈嶅姟銆
+ <h3 class="subtitle">{% trans "Personal Information" %}</h3>
+ <p>
+ {% trans "details on personal information policies" %}
</p>
- <h3 class="subtitle">鍏朵粬鏈嶅姟</h3>
- <p> CNProg鍙兘浼氭敹闆嗗拰缁熻鐢ㄦ埛璁块棶鏈珯鐨勬鍐垫暟鎹備緥濡傦紝CNProg鍙兘浼氭娴嬬綉绔欐渶娴佽鐨勯儴鍒嗗姛鑳姐侰NProg鍙兘浼氬叕寮鏄剧ず鎴栬呮彁渚涚粰绗笁鏂逛娇鐢ㄨ鏁版嵁銆備絾鏄紝CNProg涓嶄細鍏紑鎮ㄧ殑韬唤淇℃伅銆
+ <h3 class="subtitle">{% trans "Other Services" %}</h3>
+ <p>
+ {% trans "details on sharing data with third parties" %}
</p>
- <h3 class="subtitle">Cookie</h3>
- <p> 璁块棶CNProg鏃讹紝鎴戜滑浼氬悜鎮ㄧ殑璁$畻鏈哄彂閫佷竴涓垨澶氫釜涓撻棬鐢ㄤ簬璇嗗埆鎮ㄧ殑娴忚鍣ㄧ殑Cookie锛堝寘鍚竴涓瓧绗︿覆鐨勫皬鏂囦欢锛夈 浣跨敤 Cookie 鐨勭洰鐨勬槸閫氳繃鍌ㄥ瓨鐢ㄦ埛鍋忓ソ銆佽窡韪敤鎴峰惧悜锛堜緥濡傛悳绱㈡柟娉曪級鏉ユ彁楂樻垜浠殑鏈嶅姟璐ㄩ噺銆傚ぇ澶氭暟娴忚鍣ㄧ殑鍒濆璁剧疆鍧囦负鎺ュ彈 Cookie锛屼絾涔熷彲浠ュ皢鍏堕噸缃负鎷掔粷鎵鏈 Cookie 鎴栧湪鏀跺埌 Cookie 鏃舵彁绀恒備笉杩囷紝濡傛灉绂佺敤 Cookie锛屾煇浜涘姛鑳藉拰鏈嶅姟鍙兘鏃犳硶姝e父杩愯銆
+ <h3 class="subtitle">Cookies</h3>
+ <p>
+ {% trans "cookie policy details" %}
</p>
-
- <h3 class="subtitle">鏀跨瓥鏇存敼</h3>
- <p> 鎴戜滑鍙兘鍦ㄤ簨鍏堥氱煡鎴栦笉閫氱煡鐨勬儏鍐典笅闅忔椂鏇存敼姝"闅愮鏀跨瓥"锛屾垜浠缓璁敤鎴锋椂甯告煡鐪婥NProg闅愮鏀跨瓥鐨勬敼鍔紝鍦ㄤ换浣曟敼鍔ㄧ敓鏁堝悗鎮ㄧ殑缁х画璁块棶鍜屼娇鐢ㄦ湰绔欙紝鎴戜滑鍋囪鎮ㄥ凡鍚屾剰浜咰NProg浠ヤ笂鐨勬墍鏈夋潯娆俱
+ <h3 class="subtitle">{% trans "Policy Changes" %}</h3>
+ <p>{% trans "how privacy policies can be changed" %}
</p>
<br><br>
</div>
{% endblock %}
-
-
-
+<!-- end privacy.html -->
diff --git a/templates/question.html b/templates/question.html
index 9cbe1664..5ba08b63 100644
--- a/templates/question.html
+++ b/templates/question.html
@@ -1,13 +1,15 @@
+<!-- question.html -->
{% extends "base.html" %}{% load extra_tags %}{% load extra_filters %}{% load humanize %}
+{% load i18n %}
{% block title %}{% spaceless %}{{ question.get_question_title }}{% endspaceless %}{% endblock %}
{% block forejs %}
{% if not question.closed and request.user.is_authenticated %}
<script type='text/javascript' src='/content/js/com.cnprog.editor.js'></script>
- <script type='text/javascript' src='/content/js/wmd/showdown-min.js'></script>
- <script type='text/javascript' src='/content/js/wmd/wmd-min.js'></script>
+ <script type='text/javascript' src='/content/js/wmd/showdown.js'></script>
+ <script type='text/javascript' src='/content/js/wmd/wmd.js'></script>
<link rel="stylesheet" type="text/css" href="/content/js/wmd/wmd.css" />
{% endif %}
- <script type='text/javascript' src='/content/js/com.cnprog.post.pack.js'></script>
+ <script type='text/javascript' src='/content/js/com.cnprog.post.js'></script>
<script type='text/javascript' src='/content/js/jquery.validate.pack.js'></script>
<script type="text/javascript">
// define reputation needs for comments
@@ -32,10 +34,10 @@
captureLength: 5, callback: lanai.highlightSyntax});
var display = true;
- var txt = "[绂佺敤棰勮]";
+ var txt = "[{% trans "hide preview" %}]";
$('#pre-collapse').text(txt);
$('#pre-collapse').bind('click', function(){
- txt = display ? "[鍚敤棰勮]" : "[绂佺敤棰勮]";
+ txt = display ? "[{% trans "show preview" %}]" : "[{% trans "hide preview" %}]";
display = !display;
$('#previewer').toggle();
$('#pre-collapse').text(txt);
@@ -59,29 +61,39 @@
<td style="width:30px;vertical-align:top">
<div class="vote-buttons">
{% if question_vote %}
- <img id="question-img-upvote-{{ question.id }}" class="question-img-upvote" src="/content/images/vote-arrow-up{% if question_vote.is_upvote %}-on{% endif %}.png" title="杩欑瘒甯栧瓙鏈変环鍊硷紙鍐嶆鐐瑰嚮鍙栨秷鎿嶄綔锛" >
- <div id="question-vote-number-{{ question.id }}" class="vote-number" title="褰撳墠鎬荤エ鏁">
+ <img id="question-img-upvote-{{ question.id }}" class="question-img-upvote"
+ src="/content/images/vote-arrow-up{% if question_vote.is_upvote %}-on{% endif %}.png"
+ title="{% trans "i like this post (click again to cancel)" %}" >
+ <div id="question-vote-number-{{ question.id }}" class="vote-number"
+ title="{% trans "current number of votes" %}">
{{ question.score }}
</div>
- <img id="question-img-downvote-{{ question.id }}" class="question-img-downvote" src="/content/images/vote-arrow-down{% if question_vote.is_downvote %}-on{% endif %}.png" title="杩欑瘒甯栧瓙娌℃湁浠峰硷紙鍐嶆鐐瑰嚮鍙栨秷鎿嶄綔锛" >
+ <img id="question-img-downvote-{{ question.id }}" class="question-img-downvote"
+ src="/content/images/vote-arrow-down{% if question_vote.is_downvote %}-on{% endif %}.png"
+ title="{% trans "i dont like this post (click again to cancel)" %}" >
{% else %}
- <img id="question-img-upvote-{{ question.id }}" class="question-img-upvote" src="/content/images/vote-arrow-up.png" title="杩欑瘒甯栧瓙鏈変环鍊硷紙鍐嶆鐐瑰嚮鍙栨秷鎿嶄綔锛" >
- <div id="question-vote-number-{{ question.id }}" class="vote-number" title="褰撳墠鎬荤エ鏁">
+ <img id="question-img-upvote-{{ question.id }}" class="question-img-upvote"
+ src="/content/images/vote-arrow-up.png"
+ title="{% trans "i like this post (click again to cancel)" %}" >
+ <div id="question-vote-number-{{ question.id }}" class="vote-number"
+ title="{% trans "current number of votes" %}">
{{ question.score }}
</div>
- <img id="question-img-downvote-{{ question.id }}" class="question-img-downvote" src="/content/images/vote-arrow-down.png" title="杩欑瘒甯栧瓙娌℃湁浠峰硷紙鍐嶆鐐瑰嚮鍙栨秷鎿嶄綔锛" >
+ <img id="question-img-downvote-{{ question.id }}" class="question-img-downvote"
+ src="/content/images/vote-arrow-down.png" title="{% trans "i dont like this post (click again to cancel)" %}" >
{% endif %}
<br><br>
{% if favorited %}
- <img class="question-img-favorite" src="/content/images/vote-favorite-on.png" title="鎴戣鏀惰棌杩欎釜闂锛堝啀娆$偣鍑诲彇娑堟搷浣滐級" >
+ <img class="question-img-favorite" src="/content/images/vote-favorite-on.png"
+ title="{% trans "mark this question as favorite (click again to cancel)" %}" >
<div id="favorite-number" class="favorite-number my-favorite-number">
{{ question.favourite_count }}
</div>
{% else %}
- <img class="question-img-favorite" src="/content/images/vote-favorite-off.png" title="鎴戣鏀惰棌杩欎釜闂锛堝啀娆$偣鍑诲彇娑堟搷浣滐級" >
-
+ <img class="question-img-favorite" src="/content/images/vote-favorite-off.png"
+ title="{% trans "remove favorite mark from this question (click again to restore mark)" %}" >
<div id="favorite-number" class="favorite-number">{% ifnotequal question.favourite_count 0 %}{{ question.favourite_count }}{% endifnotequal %}
</div>
@@ -96,7 +108,8 @@
</div>
<div id="question-tags" class="tags" >
{% for tag in question.tagname_list %}
- <a href="{% url forum.views.tag tag|urlencode %}" class="post-tag" title="鏌ョ湅鏈夊叧'{{ tag }}'鐨勯棶棰" rel="tag">{{ tag }}</a>
+ <a href="{% url forum.views.tag tag|urlencode %}" class="post-tag"
+ title="{% trans "see questions tagged" %}'{{ tag }}'{% trans "using tags" %}" rel="tag">{{ tag }}</a>
{% endfor %}
</div>
<div id="question-controls" style="clear:both;">
@@ -105,27 +118,30 @@
<td width="210px" style="vertical-align:top">
{% if request.user|can_edit_post:question %}
- <span class="action-link"><a href="{% url edit_question question.id %}">缂栬緫</a></span>
+ <span class="action-link"><a href="{% url edit_question question.id %}">{% trans 'edit' %}</a></span>
<span class="action-link-separator">|</span>
{% endif %}
{% if request.user|can_delete_post:question %}
- <span class="action-link"><a id="question-delete-link-{{question.id}}">鍒犻櫎</a></span>
+ <span class="action-link"><a id="question-delete-link-{{question.id}}">{% trans "delete" %}</a></span>
<span class="action-link-separator">|</span>
{% endif %}
{% if question.closed %}
{% if request.user|can_reopen_question:question %}
- <span class="action-link"><a href="{% url reopen question.id %}">鎵撳紑</a></span>
+ <span class="action-link"><a href="{% url reopen question.id %}">{% trans "reopen" %}</a></span>
<span class="action-link-separator">|</span>
{% endif %}
{% else %}
{% if request.user|can_close_question:question %}
- <span class="action-link"><a href="{% url close question.id %}">鍏抽棴</a></span>
+ <span class="action-link"><a href="{% url close question.id %}">{% trans "close" %}</a></span>
<span class="action-link-separator">|</span>
{% endif %}
{% endif %}
- <span id="question-offensive-flag-{{ question.id }}" class="offensive-flag" title="妫涓捐甯栦负鍨冣滄按甯栤濓紙鍚箍鍛娿佷汉韬敾鍑汇佹伓鎰忚█璁虹瓑锛"><a>鍨冨溇甯栵紵</a><span class="darkred">{% if request.user|can_view_offensive_flags %}{% if question.offensive_flag_count %}({{ question.offensive_flag_count }}){% endif %}{% endif %}</span>
-
+ <span id="question-offensive-flag-{{ question.id }}" class="offensive-flag"
+ title="{% trans "report as offensive (i.e containing spam, advertising, malicious text, etc.)" %}">
+ <a>{% trans "flag offensive" %}</a>
+ <span class="darkred">{% if request.user|can_view_offensive_flags %}
+ {% if question.offensive_flag_count %}({{ question.offensive_flag_count }}){% endif %}{% endif %}</span>
</span>
</td>
@@ -135,7 +151,7 @@
<table width="200px" >
<tr>
<td colspan="2">
- 鏇存柊浜<a href="{% url question_revisions question.id %}"><strong title="{{question.last_edited_at }}">{% diff_date question.last_edited_at %}</strong></a>
+ {% trans "updated" %} <a href="{% url question_revisions question.id %}"><strong title="{{question.last_edited_at }}">{% diff_date question.last_edited_at %}</strong></a>
</td>
</tr>
@@ -177,14 +193,14 @@
</td>
<td style="vertical-align:top">
{% if question.wiki %}
- <span class="wiki-category">绀惧尯Wiki</span>
+ <span class="wiki-category">{% trans "community wiki" %}</span>
<div style="margin-bottom:10px"></div>
{% else %}
<div class="question-mark">
<table width="200px">
<tr>
<td colspan="2">
- 鎻愰棶浜<strong title="{{ question.added_at }}">{% diff_date question.added_at %}</strong>
+ {% trans "asked" %} <strong title="{{ question.added_at }}">{% diff_date question.added_at %}</strong>
</td>
</tr>
@@ -213,7 +229,10 @@
<div class="post-comments" style="margin-bottom:20px">
<input id="can-post-comments-question-{{question.id}}" type="hidden" value="{{ request.user|can_add_comments }}"/>
- <a id="comments-link-question-{{question.id}}" class="comments-link">{% if question.comment_count %}璇勮 <strong>({{question.comment_count}})</strong>{% else %}娣诲姞璇勮{% endif %}</a>
+ <a id="comments-link-question-{{question.id}}" class="comments-link">
+ {% if question.comment_count %}{% trans "comments" %} <strong>({{question.comment_count}})</strong>
+ {% else %}{% trans "add comment" %}
+ {% endif %}</a>
<div id="comments-question-{{question.id}}" class="comments-container">
<div class="comments"/></div>
</div>
@@ -225,41 +244,49 @@
</table>
{% if question.closed %}
<div class="question-status" style="margin-bottom:15px">
- <h3>闂浠モ渰{ question.get_close_reason_display }}鈥濈殑鍘熷洜宸茶 <a href="{{ question.closed_by.get_profile_url }}">{{ question.closed_by.username }}</a> 浜巤% diff_date question.closed_at %}<font class="darkred">鍏抽棴</font></h3>
+ <h3>{% blocktrans %}The question has been closed for the following reason "{{ question.get_close_reason_display }}" by{% endblocktrans %}
+ <a href="{{ question.closed_by.get_profile_url }}">{{ question.closed_by.username }}</a>
+ {% blocktrans %}close date {{question.closed_at}}{% endblocktrans %}</h3>
</div>
{% endif %}
{% ifnotequal question.answer_count 0 %}
<div class="tabBar">
<a name="sort-top"></a>
- <div class="headQuestions">{{ question.answer_count }}涓洖绛旓細</div>
+ <div class="headQuestions">{{ question.answer_count }}{% trans "Answers" %}:</div>
<div class="tabsA">
- <a id="oldest" href="?sort=oldest#sort-top" title="鏈鍏堝洖绛旀樉绀哄湪鏈鍓嶉潰">鏈鍏堝洖绛</a>
- <a id="latest" href="?sort=latest#sort-top" title="鏈鏅氬洖绛旀樉绀哄湪鏈鍓嶉潰">鏈杩戝洖绛</a>
- <a id="votes" href="?sort=votes#sort-top" title="鎶曠エ娆℃暟鏈澶氱殑鏄剧ず鍦ㄦ渶鍓嶉潰">鎶曠エ鏈澶</a>
+ <a id="oldest" href="?sort=oldest#sort-top" title="{% trans "oldest answers will be shown first" %}">{% trans "oldest answers" %}</a>
+ <a id="latest" href="?sort=latest#sort-top" title="{% trans "newest answers will be shown first" %}">{% trans "newest answers" %}</a>
+ <a id="votes" href="?sort=votes#sort-top" title="{% trans "most voted answers will be shown first" %}">{% trans "popular answers" %}</a>
</div>
</div>
{% cnprog_paginator context %}
{% for answer in answers %}
<a name="{{ answer.id }}"></a>
- <div id="answer-container-{{ answer.id }}" class="answer {% if answer.accepted %}accepted-answer{% endif %}{% if answer.deleted %}deleted{% endif %} {% ifequal answer.author_id question.author_id %} answered-by-owner{% endifequal %}">
+ <div id="answer-container-{{ answer.id }}" class="answer {% if answer.accepted %}accepted-answer{% endif %} {% ifequal answer.author_id question.author_id %} answered-by-owner{% endifequal %} {% if answer.deleted %}deleted{% endif %}">
<table style="width:100%;">
<tr>
<td style="width:30px;vertical-align:top">
<div class="vote-buttons">
- <img id="answer-img-upvote-{{ answer.id }}" class="answer-img-upvote" src="/content/images/vote-arrow-up{% get_user_vote_image user_answer_votes answer.id 1 %}.png" title="杩欑瘒甯栧瓙鏈変环鍊硷紙鍐嶆鐐瑰嚮鍙栨秷鎿嶄綔锛" >
- <div id="answer-vote-number-{{ answer.id }}" class="vote-number" title="褰撳墠鎬荤エ鏁">
+ <img id="answer-img-upvote-{{ answer.id }}" class="answer-img-upvote" src="/content/images/vote-arrow-up{% get_user_vote_image user_answer_votes answer.id 1 %}.png" title="{% trans "i like this answer (click again to cancel)" %}">
+ <div id="answer-vote-number-{{ answer.id }}" class="vote-number" title="{% trans "current number of votes" %}">
{{ answer.score }}
</div>
- <img id="answer-img-downvote-{{ answer.id }}" class="answer-img-downvote" src="/content/images/vote-arrow-down{% get_user_vote_image user_answer_votes answer.id -1 %}.png" title="杩欑瘒甯栧瓙娌℃湁浠峰硷紙鍐嶆鐐瑰嚮鍙栨秷鎿嶄綔锛" >
+ <img id="answer-img-downvote-{{ answer.id }}" class="answer-img-downvote"
+ src="/content/images/vote-arrow-down{% get_user_vote_image user_answer_votes answer.id -1 %}.png"
+ title="{% trans "i dont like this answer (click again to cancel)" %}" >
<br><br>
{% ifequal request.user question.author %}
- <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept" src="/content/images/vote-accepted{% if answer.accepted %}-on{% endif %}.png" title="鏈浣崇瓟妗堬紙鍐嶆鐐瑰嚮鍙栨秷鎿嶄綔锛" >
+ <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept"
+ src="/content/images/vote-accepted{% if answer.accepted %}-on{% endif %}.png"
+ title="{% trans "mark this answer as favorite (click again to undo)" %}" >
{% else %}
{% if answer.accepted %}
- <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept" src="/content/images/vote-accepted{% if answer.accepted %}-on{% endif %}.png" title="杩欎釜绛旀宸茬粡琚彁闂綔鑰呮爣璁颁负鏈浣崇瓟妗" >
+ <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept"
+ src="/content/images/vote-accepted{% if answer.accepted %}-on{% endif %}.png"
+ title="{% trans "the author of the question has selected this answer as correct" %}" >
{% endif %}
{% endifequal %}
</div>
@@ -272,32 +299,43 @@
<div class="answer-controls" style="clear:both;">
<table width="100%">
<tr>
- <td width="210px" style="vertical-align:top">
+ <td width="400px" style="vertical-align:top">
{% if request.user|can_edit_post:answer %}
- <span class="action-link"><a href="{% url edit_answer answer.id %}">缂栬緫</a></span>
+ <span class="action-link"><a href="{% url edit_answer answer.id %}">{% trans "edit" %}</a></span>
<span class="action-link-separator">|</span>
{% endif %}
{% if request.user|can_delete_post:answer %}
- <span class="action-link"><a id="answer-delete-link-{{answer.id}}">鍒犻櫎</a></span>
+ <span class="action-link">
+ <a id="answer-delete-link-{{answer.id}}">
+ {% if answer.deleted %}
+ {% trans "undelete" %}
+ {% endif %}
+ {% if not answer.deleted %}
+ {% trans "delete" %}
+ {% endif %}
+ </a>
+ </span>
<span class="action-link-separator">|</span>
{% endif %}
<span class="linksopt">
- <a href="#{{ answer.id }}" title="璇ュ洖绛旂殑閾炬帴鍦板潃">
- 姘镐箙閾炬帴
+ <a href="#{{ answer.id }}" title="{% trans "answer permanent link" %}">
+ {% trans "permanent link" %}
</a>
</span>
<span class="action-link-separator">|</span>
- <span id="answer-offensive-flag-{{ answer.id }}" class="offensive-flag" title="妫涓捐甯栦负鍨冣滄按甯栤濓紙鍚箍鍛娿佷汉韬敾鍑汇佹伓鎰忚█璁虹瓑锛"><a>鍨冨溇甯栵紵</a><span class="darkred">{% if request.user|can_view_offensive_flags %}{% if answer.offensive_flag_count %}({{ answer.offensive_flag_count }}){% endif %}{% endif %}</span></span>
+ <span id="answer-offensive-flag-{{ answer.id }}" class="offensive-flag"
+ title="{% trans "report as offensive (i.e containing spam, advertising, malicious text, etc.)" %}">
+ <a>{% trans "flag offensive" %}</a>
+ <span class="darkred">{% if request.user|can_view_offensive_flags %}{% if answer.offensive_flag_count %}({{ answer.offensive_flag_count }}){% endif %}{% endif %}</span></span>
</td>
- <td width="210px" style="vertical-align:top">
+ <td width="110px" style="vertical-align:top">
{% if answer.last_edited_by %}
<div class="question-edit" >
<table width="200px" >
<tr>
<td colspan="2">
- 鏇存柊浜<a href="{% url answer_revisions answer.id %}"><strong title="{{answer.last_edited_at }}">{% diff_date answer.last_edited_at %}</strong></a>
+ {% trans "updated" %}<a href="{% url answer_revisions answer.id %}"><strong title="{{answer.last_edited_at }}">{% diff_date answer.last_edited_at %}</strong></a>
</td>
-
</tr>
{% if answer.wiki %}
<tr>
@@ -336,16 +374,15 @@
</td>
<td style="vertical-align:top">
{% if answer.wiki %}
- <span class="wiki-category">绀惧尯Wiki</span>
+ <span class="wiki-category">{% trans "community wiki" %}</span>
<div style="margin-bottom:10px"></div>
{% else %}
<div class="answer-mark">
<table width="200px">
<tr>
- <td colspan="2">
- 鍥炵瓟浜<strong title="{{answer.added_at}}">{% diff_date answer.added_at %}</strong>
+ <td colspan="2">
+ {% trans "asked" %} <strong title="{{answer.added_at}}">{% diff_date answer.added_at %}</strong>
</td>
-
</tr>
<tr>
<td width="40px" style="vertical-align:bottom">
@@ -370,7 +407,9 @@
</div>
<div id="comment-{{ answer.id }}" class="post-comments" >
<input id="can-post-comments-answer-{{answer.id}}" type="hidden" value="{{ request.user|can_add_comments }}"/>
- <a id="comments-link-answer-{{answer.id}}" class="comments-link">{% if answer.comment_count %}璇勮 <strong>({{answer.comment_count}})</strong>{% else %}娣诲姞璇勮{% endif %}</a>
+ <a id="comments-link-answer-{{answer.id}}" class="comments-link">
+ {% if answer.comment_count %}{% trans "comments" %}
+ <strong>({{answer.comment_count}})</strong>{% else %}{% trans "add comment" %}{% endif %}</a>
<div id="comments-answer-{{answer.id}}" class="comments-container">
<div class="comments"/></div>
</div>
@@ -394,7 +433,7 @@
{% if not question.closed %}
{% if request.user.is_authenticated %}
<div style="padding:10px 0 0 0;">
- <div class="headNormal">鎮ㄧ殑鍥炵瓟锛</div>
+ <div class="headNormal">{% trans "Your answer" %}:</div>
</div>
<div id="description" class="" >
@@ -404,7 +443,8 @@
<table width="100%">
<tr>
<td>
- <span id="pre-collapse" title="鎵撳紑鎴栬呭叧闂璏arkdown缂栬緫鍣ㄧ殑瀹炴椂棰勮">棰勮寮鍏</span>
+ <span id="pre-collapse"
+ title="{% trans "Toggle the real time Markdown editor preview" %}">{% trans "toggle preview" %}</span>
</td>
<td style="text-align:right;">
{{ answer.wiki }} <span style="font-weight:normal;cursor:help" title="{{answer.wiki.help_text}}">{{ answer.wiki.label_tag }} </span>
@@ -415,12 +455,11 @@
</div>
<div id="previewer" class="wmd-preview"></div>
{{ answer.text.errors }}
-
</div>
<br>
- <input type="submit" value="鍥炵瓟璇ラ棶棰" class="submit"><span class="form-error"></span>
+ <input type="submit" value="{% trans "Answer the question" %}" class="submit"><span class="form-error"></span>
{% else %}
- <input id="btLogin" type="button" class="submit" style="width:200px" value="鐧诲綍骞跺洖绛旇闂">
+ <input id="btLogin" type="button" class="submit" style="width:200px" value="{% trans "Login to answer" %}">
{% endif %}
{% endif %}
<br><br>
@@ -432,26 +471,28 @@
{% block sidebar %}
<div class="boxC">
<p>
- 鎮ㄦ鍦ㄦ祻瑙堢殑闂鍚湁浠ヤ笅鏍囩锛
+ {% trans "Question tags" %}:
</p>
<p class="tags" >
{% for tag in tags %}
- <a href="{% url forum.views.tag tag.name|urlencode %}" title="鏌ョ湅鏈夊叧'{{ tag.name }}'鐨勯棶棰" rel="tag">{{ tag.name }}</a> <span class="tag-number">脳 {{ tag.used_count|intcomma }}</span><br>
+ <a href="{% url forum.views.tag tag.name|urlencode %}"
+ title="{% trans "see questions tagged"%}'{{tag.name}}'{% trans "using tags" %}"
+ rel="tag">{{ tag.name }}</a> <span class="tag-number">脳 {{ tag.used_count|intcomma }}</span><br>
{% endfor %}
</p>
<p>
- 鎻愰棶鏃堕棿锛 <br><strong title="{{ question.added_at }}">{{ question.added_at|timesince }}鍓</strong>
+ {% trans "question asked" %}: <strong title="{{ question.added_at }}">{{ question.added_at|timesince }} {% trans "ago" %}</strong>
</p>
<p>
- 鐩墠娴忚鏁伴噺锛<br><strong>{{ question.view_count|intcomma }} 娆</strong>
+ {% trans "question was seen" %}: <strong>{{ question.view_count|intcomma }} {% trans "times" %}</strong>
</p>
<p>
- 鏈鍚庢洿鏂版椂闂达細<br><strong title="{{ question.last_activity_at }}">{{ question.last_activity_at|timesince }}鍓</strong>
+ {% trans "last updated" %}: <strong title="{{ question.last_activity_at }}">{{ question.last_activity_at|timesince }} {% trans "ago" %}</strong>
</p>
</div>
<div class="boxC">
- <h3 class="subtitle">鐩镐技鐨勯棶棰</h3>
+ <h3 class="subtitle">{% trans "Related questions" %}</h3>
<div class="questions-related">
{% for question in similar_questions %}
<p>
@@ -466,4 +507,4 @@
{% block endjs %}
{% endblock %}
-
+<!-- end question.html -->
diff --git a/templates/question_edit.html b/templates/question_edit.html
index 2cec358f..6fe8bb41 100644
--- a/templates/question_edit.html
+++ b/templates/question_edit.html
@@ -1,14 +1,16 @@
+<!-- question_edit.html -->
{% extends "base.html" %}
-{% block title %}{% spaceless %}淇敼闂{% endspaceless %}{% endblock %}
+{% load i18n %}
+{% block title %}{% spaceless %}{% trans "Edit question" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type='text/javascript' src='/content/js/com.cnprog.editor.js'></script>
<script type='text/javascript' src='/content/js/com.cnprog.post.js'></script>
<script type='text/javascript' src='/content/js/jquery.validate.pack.js'></script>
- <script type='text/javascript' src='/content/js/wmd/showdown-min.js'></script>
- <script type='text/javascript' src='/content/js/wmd/wmd-min.js'></script>
+ <script type='text/javascript' src='/content/js/wmd/showdown.js'></script>
+ <script type='text/javascript' src='/content/js/wmd/wmd.js'></script>
<link rel="stylesheet" type="text/css" href="/content/js/wmd/wmd.css" />
<script type="text/javascript">
-
+ //todo move javascript out
$().ready(function(){
$("#nav_questions").attr('className',"on");
$('#editor').TextAreaResizer();
@@ -19,10 +21,10 @@
//toggle preview of editor
var display = true;
- var txt = "绂佺敤棰勮";
+ var txt = "[{% trans "hide preview"}%]";
$('#pre-collapse').text(txt);
$('#pre-collapse').bind('click', function(){
- txt = display ? "鍚敤棰勮" : "绂佺敤棰勮";
+ txt = display ? "[{% trans "show preview" %}]" : "[{% trans "hide preview" %}]";
display = !display;
$('#previewer').toggle();
$('#pre-collapse').text(txt);
@@ -60,15 +62,16 @@
{% block content %}
<div id="main-bar" class="headNormal">
- 淇敼闂 [<a href="{{ question.get_absolute_url }}">杩斿洖</a>]
+ {% trans "Edit question" %} [<a href="{{ question.get_absolute_url }}">{% trans "back" %}</a>]
</div>
<div id="main-body" class="ask-body">
<div id="askform">
<form id="fmedit" action="{% url edit_question question.id %}" method="post" >
- <label for="id_revision" ><strong>鐗堟湰:</strong></label> <br>
+ <label for="id_revision" ><strong>{% trans "revision" %}:</strong></label> <br>
{% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul }}{% endif %}
<div style="vertical-align:middle">
- {{ revision_form.revision }} <input type="submit" style="display:none" id="select_revision" name="select_revision" value="閫夋嫨鐗堟湰">
+ {{ revision_form.revision }} <input type="submit" style="display:none" id="select_revision" name="select_revision"
+ value="{% trans "select revision"%}">
</div><br>
<div class="form-item">
<label for="id_title" ><strong>{{ form.title.label_tag }}:</strong></label> <span class="form-error"></span><br>
@@ -85,7 +88,7 @@
<table width="100%">
<tr>
<td>
- <span id="pre-collapse" title="鎵撳紑鎴栬呭叧闂璏arkdown缂栬緫鍣ㄧ殑瀹炴椂棰勮">棰勮寮鍏</span>
+ <span id="pre-collapse" title="{% trans "Toggle the real time Markdown editor preview" %}">{% trans "toggle preview" %}</span>
</td>
<td style="text-align:right;">
{{ form.wiki }} <span style="color:#000;cursor:help" title="{{form.wiki.help_text}}">{{ form.wiki.label_tag }} </span>
@@ -113,8 +116,8 @@
<br>
<div class="error" ></div>
- <input type="submit" value="鐜板湪淇敼" class="submit" />
- <input type="button" value="鍙栨秷" class="submit" onclick="history.back(-1);" />
+ <input type="submit" value="{% trans "Save edit" %}" class="submit" />
+ <input type="button" value="{% trans "Cancel" %}" class="submit" onclick="history.back(-1);" />
<br>
<br>
</form>
@@ -123,63 +126,9 @@
{% endblock %}
{% block sidebar %}
-<div class="boxC">
- <p class="subtitle darkred">鍙楁杩庣殑鎻愰棶</p>
- <div>
- <ul class="list-item">
- <li>
- <b>鎮ㄧ殑闂涓庣紪绋嬬浉鍏冲悧锛</b>
- </li>
- <li>
- 寤鸿鎮ㄦ彁鐨勯棶棰樻槸鍙互琚瓟澶嶇殑锛岃屼笉浠呬粎鏄彲浠ヨ璁恒
- </li>
- <li>
- 璇疯缁嗘弿杩版偍鐨勯棶棰樸
- </li>
- <li>
- 鎴戜滑鎺ㄨ崘鎮ㄤ娇鐢ㄤ腑鏂囨弿杩伴棶棰橈紝杩欐牱鍙互寰楀埌鏇村鐨勭瓟澶嶆満浼氥
- </li>
- </ul>
- <a href="/faq/" target="_blank" title="鏌ョ湅甯歌闂" style="float:right;position:relative">faq 禄</a>
- <br>
- </div>
-</div>
-
-<div class="boxC">
- <p class="subtitle">Markdown蹇熷弬鑰</p>
- <ul class="list-item">
- <li>
- *鏂滀綋* 鎴栬 _鏂滀綋_
-
- </li>
- <li>
- **鍔犵矖** 鎴栬 __鍔犵矖__
-
- </li>
- <li>
- <b>閾炬帴</b>锛氫竴涓猍渚嬪瓙](http://url.com/ "鏍囬")
-
- </li>
-
- <li>
- <b>鍥剧墖</b>锛![alt 鏂囨湰](/path/img.jpg "鏍囬")
-
- </li>
- <li>
- 鍒楄〃锛
- 1. Foo
- 2. Bar
- </li>
- <li>
- 鍩烘湰鐨凥TML鏍囩涔熸槸鏀寔鐨
- </li>
- </ul>
- <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank" style="float:right;position:relative">鏈夊叧Markdown璇︾粏璇存槑 禄</a>
- <br>
-</div>
-
+{% include "question_edit_tips.html" %}
{% endblock %}
{% block endjs %}
{% endblock %}
-
+<!-- end question_edit.html -->
diff --git a/templates/question_edit_tips.html b/templates/question_edit_tips.html
new file mode 100644
index 00000000..4ac666a6
--- /dev/null
+++ b/templates/question_edit_tips.html
@@ -0,0 +1,51 @@
+<!-- question_edit_tips.html -->
+{% load i18n %}
+<div class="boxC">
+ <p class="subtitle darkred">{% trans "question tips" %}</p>
+ <div>
+ <ul class="list-item">
+ <li> <b>{% trans "please ask a relevant question" %}</b>
+ </li>
+ <li>
+ {% trans "please try provide enough details" %}
+ </li>
+ <li>
+ {% trans "be clear and concise" %}
+ </li>
+ </ul>
+ <a href="/faq/" target="_blank" title="{% trans "see frequently asked questions" %}" style="float:right;position:relative">faq 禄</a>
+ <br>
+ </div>
+</div>
+
+<div class="boxC">
+ <p class="subtitle">{% trans "Markdown tips" %}</p>
+ <ul class="list-item">
+ <li>
+ {% trans "*italic* or __italic__" %}
+ </li>
+ <li>
+ {% trans "**bold** or __bold__" %}
+ </li>
+ <li>
+ <b>{% trans "link" %}</b>:[{% trans "text" %}](http://url.com/ "{% trans "title" %}")
+
+ </li>
+
+ <li>
+ <b>{% trans "image" %}</b>锛![alt {% trans "text" %}](/path/img.jpg "{% trans "title" %}")
+
+ </li>
+ <li>
+ {% trans "numbered list:" %}
+ 1. Foo
+ 2. Bar
+ </li>
+ <li>
+ {% trans "basic HTML tags are also supported" %}
+ </li>
+ </ul>
+ <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank" style="float:right;position:relative">{% trans "learn more about Markdown" %} 禄</a>
+ <br>
+</div>
+<!-- end question_edit_tips.html -->
diff --git a/templates/questions.html b/templates/questions.html
index 6663dbf2..21ac18ce 100644
--- a/templates/questions.html
+++ b/templates/questions.html
@@ -1,8 +1,10 @@
+<!-- questions.html -->
{% extends "base.html" %}
{% load extra_tags %}
+{% load i18n %}
{% load humanize %}
{% load extra_filters %}
-{% block title %}{% spaceless %}闂鍒楄〃{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Questions" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -18,12 +20,12 @@
{% endblock %}
{% block content %}
<div class="tabBar">
- <div class="headQuestions">{% if searchtag %}鏍囩闂{% else %}{% if searchtitle %}鏌ヨ缁撴灉{% else %}鎵鏈夐棶棰榹% endif %}{% endif %}</div>
+ <div class="headQuestions">{% if searchtag %}{% trans "Found by tags" %}{% else %}{% if searchtitle %}{% trans "Found by title" %}{% else %}{% trans "All questions" %}{% endif %}{% endif %}</div>
<div class="tabsA">
- <a id="latest" href="?sort=latest" class="off" title="鏈鏂板姞鍏ョ郴缁熺殑闂">鏈鏂伴棶棰</a>
- <a id="active" href="?sort=active" class="off" title="鏈杩戣鏇存柊鐨勯棶棰">娲昏穬闂</a>
- <a id="hottest" href="?sort=hottest" class="off" title="琚洖澶嶆渶澶氱殑闂">鐑棬闂</a>
- <a id="mostvoted" href="?sort=mostvoted" class="off" title="鎶曠エ娆℃暟鏈澶氱殑闂">鏈鏈変环鍊奸棶棰</a>
+ <a id="latest" href="?sort=latest" class="off" title="{% trans "most recently asked questions" %}">{% trans "newest" %}</a>
+ <a id="active" href="?sort=active" class="off" title="{% trans "most recently updated questions" %}">{% trans "active" %}</a>
+ <a id="hottest" href="?sort=hottest" class="off" title="{% trans "hottest questions" %}">{% trans "hottest" %}</a>
+ <a id="mostvoted" href="?sort=mostvoted" class="off" title="{% trans "most voted questions" %}">{% trans "most voted" %}</a>
</div>
</div>
<div id="listA">
@@ -40,9 +42,9 @@
<td><span class="num">{{ question.view_count|cnprog_intword|safe }}</span> </td>
</tr>
<tr>
- <td><span class="unit">鍥炵瓟</span></td>
- <td><span class="unit">绁ㄦ暟</span></td>
- <td><span class="unit">娴忚</span></td>
+ <td><span class="unit">{% trans "answers" %}</span></td>
+ <td><span class="unit">{% trans "votes" %}</span></td>
+ <td><span class="unit">{% trans "views" %}</span></td>
</tr>
</table>
</div>
@@ -53,7 +55,7 @@
{% ifequal tab_id 'active'%}
{% if question.wiki %}
- <span class="from wiki">绀惧尯Wiki</span>
+ <span class="from wiki">{% trans "community wiki" %}</span>
<span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
{% else %}
<div class="from">
@@ -65,7 +67,7 @@
{% endif %}
{% else %}
{% if question.wiki %}
- <span class="from wiki">绀惧尯Wiki</span>
+ <span class="from wiki">{% trans "community wiki" %}</span>
<span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
{% else %}
<div class="from">
@@ -79,7 +81,7 @@
<div class="tags">
{% for tag in question.tagname_list %}
- <a href="{% url forum.views.tag tag|urlencode %}" title="鏌ョ湅鏈夊叧'{{ tag }}'鐨勯棶棰" rel="tag">{{ tag }}</a>
+ <a href="{% url forum.views.tag tag|urlencode %}" title="{% trans "see questions tagged" %}'{{ tag }}'{% trans "using tags" %}" rel="tag">{{ tag }}</a>
{% endfor %}
</div>
</div>
@@ -103,45 +105,48 @@
{% block sidebar %}
<div class="boxC">
<p>
- 鎮ㄦ鍦ㄦ祻瑙堟墍鏈<br><div class="questions-count">{{ questions_count|intcomma }}</div>
- <p>涓
- {% if searchtag %}
- 鏍囪涓
- <span class="tag">
- {{ searchtag }}
- </span>
- {% endif %}
- {% if searchtitle %}
- 鏍囬鍚湁
- <strong class="darkred">
- {{ searchtitle }}
- </strong>
- {% endif %}
- 鐨勯棶棰樸</p>
+ {% if searchtag %}
+ {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num and searchtag as tagname %}
+ have total {{q_num}} questions tagged {{tagname}}
+ {% plural %}
+ have total {{q_num}} questions tagged {{tagname}}
+ {% endblocktrans %}
+ {% endif %}
+ {% if searchtitle %}
+ {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num %}
+ have total {{q_num}} questions containing {{searchtitle}}
+ {% plural %}
+ have total {{q_num}} questions containing {{searchtitle}}
+ {% endblocktrans %}
+ {% endif %}
+
{% ifequal tab_id "latest" %}
- <p>闂鎸<strong>鎻愰棶鏃堕棿</strong>鏄剧ず鎺掑簭銆傛柊鍔犲叆鐨勯棶棰樺皢鏄剧ず鍦ㄦ渶鍓嶉潰銆</p>
+ <p>{% trans "latest questions info" %}</p>
{% endifequal %}
{% ifequal tab_id "active" %}
- <p>闂鎸<strong>鏈鍚庢洿鏂版椂闂</strong>鏄剧ず鎺掑簭銆傛渶鍚庤鍥炵瓟鎴栬呮洿鏂扮殑闂灏嗘樉绀哄湪鏈鍓嶉潰銆</p>
+ <p>{% trans "Questions are sorted by the <strong>time of last update</strong>." %}
+ {% trans "Most recently answered ones are shown first." %}</p>
{% endifequal %}
{% ifequal tab_id "hottest" %}
- <p>闂鎸<strong>鍥炲鏁伴噺</strong>鏄剧ず鎺掑簭銆傚洖澶嶆渶澶氱殑闂灏嗘樉绀哄湪鏈鍓嶉潰銆</p>
+ <p>{% trans "Questions sorted by <strong>number of responses</strong>." %}
+ {% trans "Most answered questions are shown first." %}</p>
{% endifequal %}
{% ifequal tab_id "mostvoted" %}
- <p>闂鎸<strong>鎶曠エ鏁伴噺</strong>鏄剧ず鎺掑簭銆傛姇绁ㄦ渶澶氱殑闂灏嗘樉绀哄湪鏈鍓嶉潰銆</p>
+ <p>{% trans "Questions are sorted by the <strong>number of votes</strong>." %}
+ {% trans "Most voted questions are shown first." %}</p>
{% endifequal %}
</p>
</div>
<div class="boxC">
- <h3 class="subtitle">鐩稿叧鏍囩</h3>
+ <h3 class="subtitle">{% trans "Related tags" %}</h3>
<div class="tags">
{% for tag in tags %}
- <a rel="tag" title="鏌ョ湅鏈夊叧'{{ tag.name }}'鐨勯棶棰" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a>
+ <a rel="tag" title="{% trans "see questions tagged" %}'{{ tag.name }}'{% trans "using tags" %}" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a>
<span class="tag-number">脳 {{ tag.used_count|intcomma }}</span>
<br>
{% endfor %}
@@ -150,4 +155,4 @@
</div>
{% endblock %}
-
+<!-- end questions.html -->
diff --git a/templates/reopen.html b/templates/reopen.html
index 9d87c3a6..7ab59421 100644
--- a/templates/reopen.html
+++ b/templates/reopen.html
@@ -1,7 +1,9 @@
+<!-- reopen.html -->
{% extends "base_content.html" %}
{% load extra_tags %}
+{% load i18n %}
{% load humanize %}
-{% block title %}{% spaceless %}閲嶈闂{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Reopen question" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -11,21 +13,21 @@
{% endblock %}
{% block content %}
<div id="main-bar" class="headNormal">
- 閲嶈闂
+ {% trans "Reopen question" %}
</div>
<div id="main-body" style="width:100%">
- <p>浣犲皢鎵撳紑杩欎釜宸茬粡琚叧闂殑闂锛 <a href="{{ question.get_absolute_url }}"><span class="big">{{ question.get_question_title }}</span></a>
+ <p>{% trans "Open the previously closed question" %}: <a href="{{ question.get_absolute_url }}"><span class="big">{{ question.get_question_title }}</span></a>
</p>
- <p><strong>闂鏇句互鈥渰{ question.get_close_reason_display }}鈥濈殑鍘熷洜琚 <a href="{{ question.closed_by.get_profile_url }}">{{ question.closed_by.username }}</a> 浜巤% diff_date question.closed_at %}<font class="darkred">鍏抽棴</font>
+ <p><strong>{% trans "The question was closed for the following reason " %}"{{ question.get_close_reason_display }}"{% trans "reason - leave blank in english" %} <a href="{{ question.closed_by.get_profile_url }}">{{ question.closed_by.username }}</a> {% trans "on "%} {% diff_date question.closed_at %}<font class="darkred">{% trans "date closed" %}</font>
</strong>
</p>
<form id="fmclose" action="{% url reopen question.id %}" method="post" >
<div id="" style="padding:20px 0 20px 0">
- <input type="submit" value="纭畾鎵撳紑杩欎釜闂" class="submit" />
- <input id="btBack" type="button" value="鍙栨秷" class="submit" />
+ <input type="submit" value="{% trans "Reopen this question" %}" class="submit" />
+ <input id="btBack" type="button" value="{% trans "Cancel" %}" class="submit" />
</div>
@@ -35,3 +37,4 @@
+<!-- end reopen.html -->
diff --git a/templates/revisions_answer.html b/templates/revisions_answer.html
index ece59d6e..5ab12fbf 100644
--- a/templates/revisions_answer.html
+++ b/templates/revisions_answer.html
@@ -1,13 +1,15 @@
+<!-- revisions_answer.html -->
{% extends "base_content.html" %}
+{% load i18n %}
{% load extra_tags %}
{% load extra_filters %}
{% load humanize %}
-{% block title %}{% spaceless %}鐗堟湰鍘嗗彶{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Revision history" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type='text/javascript' src='/content/js/com.cnprog.editor.js'></script>
<script type='text/javascript' src='/content/js/com.cnprog.post.js'></script>
<script type="text/javascript">
-
+ //todo - take this out into .js file
$().ready(function(){
$("#nav_questions").attr('className',"on");
$('div.revision div[id^=rev-header-]').bind('click', function(){
@@ -31,7 +33,7 @@
{% block content %}
<div id="main-bar" class="headNormal">
- 鐗堟湰鍘嗗彶 [<a href="{{ post.get_absolute_url }}">杩斿洖</a>]
+ {% trans "Revision history" %} [<a href="{{ post.get_absolute_url }}">{% trans "back" %}</a>]
</div>
<div id="main-body" class="">
<div id="revisions">
@@ -42,13 +44,13 @@
<table width="100%">
<tr>
<td width="20" style="vertical-align:middle"><img id="rev-arrow-{{ revision.revision }}" src="/content/images/expander-arrow-show.gif"></td>
- <td width="30px" style="vertical-align:middle"><span class="revision-number" title="鐗堟湰 {{ revision.revision }}">{{ revision.revision }}</span></td>
+ <td width="30px" style="vertical-align:middle"><span class="revision-number" title="{% trans "revision" %} {{ revision.revision }}">{{ revision.revision }}</span></td>
<td width="200px" style="vertical-align:middle">
{% if revision.summary %}
<div class="summary"><span>{{ revision.summary }}<span></div>
{% endif %}
{% if request.user|can_edit_post:post %}
- <a href="{% url edit_answer post.id %}?revision={{ revision.revision }}">缂栬緫</a>
+ <a href="{% url edit_answer post.id %}?revision={{ revision.revision }}">{% trans "edit" %}</a>
{% endif %}
</td>
@@ -58,9 +60,9 @@
<tr >
<td colspan="2" style="padding:3px 0 3px 0">
{% ifequal revision.revision 1 %}
- 鎻愰棶浜<strong title="{{ post.added_at }}">{% diff_date post.added_at %}</strong>
+ {% trans "asked" %} <strong title="{{ post.added_at }}">{% diff_date post.added_at %}</strong>
{% else %}
- 鏇存柊浜<strong title="{{ post.last_edited_at }}">{% diff_date revision.revised_at %}</strong>
+ {% trans "updated" %} <strong title="{{ post.last_edited_at }}">{% diff_date revision.revised_at %}</strong>
{% endifequal %}
</td>
@@ -97,4 +99,4 @@
{% block endjs %}
{% endblock %}
-
+<!-- end revisions_answer.html -->
diff --git a/templates/revisions_question.html b/templates/revisions_question.html
index 94fb2644..77a421bb 100644
--- a/templates/revisions_question.html
+++ b/templates/revisions_question.html
@@ -1,13 +1,16 @@
+<!-- revisions_question.html -->
{% extends "base_content.html" %}
+<!--somehow very similar to revisions_answer.html-->
{% load extra_tags %}
+{% load i18n %}
{% load extra_filters %}
{% load humanize %}
-{% block title %}{% spaceless %}鐗堟湰鍘嗗彶{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Revision history" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type='text/javascript' src='/content/js/com.cnprog.editor.js'></script>
<script type='text/javascript' src='/content/js/com.cnprog.post.js'></script>
<script type="text/javascript">
-
+ //todo - take this out into .js file
$().ready(function(){
$("#nav_questions").attr('className',"on");
$('div.revision div[id^=rev-header-]').bind('click', function(){
@@ -15,8 +18,6 @@
toggleRev(revId);
});
-
-
lanai.highlightSyntax();
});
@@ -27,13 +28,12 @@
arrow.attr("src", "/content/images/expander-arrow-" + (visible ? "show" : "hide") + ".gif");
$("#rev-body-" + id).slideToggle("fast");
}
-
</script>
{% endblock %}
{% block content %}
<div id="main-bar" class="headNormal">
- 鐗堟湰鍘嗗彶 [<a href="{{ post.get_absolute_url }}">杩斿洖</a>]
+ {% trans "Revision history" %}[<a href="{{ post.get_absolute_url }}">{% trans "back" %}</a>]
</div>
<div id="main-body" class="">
<div id="revisions">
@@ -44,13 +44,13 @@
<table width="100%">
<tr>
<td width="20" style="vertical-align:middle"><img id="rev-arrow-{{ revision.revision }}" src="/content/images/expander-arrow-show.gif"></td>
- <td width="30px" style="vertical-align:middle"><span class="revision-number" title="鐗堟湰 {{ revision.revision }}">{{ revision.revision }}</span></td>
+ <td width="30px" style="vertical-align:middle"><span class="revision-number" title="{% trans "revision" %} {{ revision.revision }}">{{ revision.revision }}</span></td>
<td width="200px" style="vertical-align:middle">
{% if revision.summary %}
<div class="summary"><span>{{ revision.summary }}<span></div>
{% endif %}
{% if request.user|can_edit_post:post %}
- <a href="{% url edit_question post.id %}?revision={{ revision.revision }}">缂栬緫</a>
+ <a href="{% url edit_question post.id %}?revision={{ revision.revision }}">{% trans "edit" %}</a>
{% endif %}
</td>
@@ -60,9 +60,9 @@
<tr >
<td colspan="2" style="padding:3px 0 3px 0">
{% ifequal revision.revision 1 %}
- 鎻愰棶浜<strong title="{{ post.added_at }}">{% diff_date post.added_at %}</strong>
+ {% trans "asked" %}<strong title="{{ post.added_at }}">{% diff_date post.added_at %}</strong>
{% else %}
- 鏇存柊浜<strong title="{{ post.last_edited_at }}">{% diff_date revision.revised_at %}</strong>
+ {% trans "updated" %}<strong title="{{ post.last_edited_at }}">{% diff_date revision.revised_at %}</strong>
{% endifequal %}
</td>
@@ -100,3 +100,4 @@
{% block endjs %}
{% endblock %}
+<!-- end revisions_question.html -->
diff --git a/templates/tags.html b/templates/tags.html
index 0d2a972e..cb499eed 100644
--- a/templates/tags.html
+++ b/templates/tags.html
@@ -1,7 +1,9 @@
+<!-- tags.html -->
{% extends "base_content.html" %}
+{% load i18n %}
{% load extra_tags %}
{% load humanize %}
-{% block title %}{% spaceless %}鏍囩鍒楄〃{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Tag list" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -24,25 +26,25 @@
{% block content %}
<!-- Tabs -->
<div class="tabBar">
- <div class="headQuestions">鏍囩鍒楄〃</div>
+ <div class="headQuestions">{% trans "Tag list" %}</div>
<div class="tabsA">
- <a id="sort_name" href="/tags/?sort=name" class="off" title="鎸夊悕绉扮殑瀛楁瘝鍏堝悗椤哄簭鎺掑簭">鎸夊悕绉版帓搴</a>
- <a id="sort_used" href="/tags/?sort=used" class="off" title="鎸夋爣绛捐浣跨敤鐨勬鏁版帓搴">鎸夋祦琛岀▼搴︽帓搴</a>
+ <a id="sort_name" href="/tags/?sort=name" class="off" title="{% trans "sorted alphabetically" %}">{% trans "by name" %}</a>
+ <a id="sort_used" href="/tags/?sort=used" class="off" title="{% trans "sorted by frequency of tag use" %}">{% trans "by popularity" %}</a>
</div>
</div>
<div id="searchtags">
<p>
{% if stag %}
- 鍖归厤鏌ヨ '<span class="darkred"><strong>{{ stag }}</strong></span>' 鐨勬墍鏈夋爣绛撅細
+ {% trans "All tags matching query" %} '<span class="darkred"><strong>{{ stag }}</strong></span>' {% trans "all tags - make this empty in english" %}:
{% endif %}
{% if not tags.object_list %}
- <span >娌℃湁鎵惧埌鐩稿叧鏁版嵁銆</span>
+ <span>{% trans "Nothing found" %}</span>
{% endif %}
</p>
<ul class="tagsList tags">
{% for tag in tags.object_list %}
<li>
- <a href="{% url forum.views.tag tag|urlencode %}" title="鏌ョ湅鏈夊叧'{{ tag }}'鐨勯棶棰" rel="tag">
+ <a href="{% url forum.views.tag tag|urlencode %}" title="{% trans "see questions tagged" %}'{{ tag }}'{% trans "using tags" %}" rel="tag">
{{ tag }}
</a>&nbsp;
<span class="tag-number">脳 {{ tag.used_count|intcomma }}</span>
@@ -58,4 +60,5 @@
<div class="pager">
{% cnprog_paginator context %}
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
+<!-- end tags.html -->
diff --git a/templates/template.list b/templates/template.list
new file mode 100644
index 00000000..d4d4ec2d
--- /dev/null
+++ b/templates/template.list
@@ -0,0 +1,18 @@
+close.html
+book.html
+base_content.html
+badges.html
+badge.html
+ask.html
+answer_edit_tips.html
+answer_edit.html
+about.html
+500.html
+404.html
+pagesize.html
+logout.html
+header.html
+footer.html
+faq.html
+base.html
+question.html
diff --git a/templates/tough/faq.html b/templates/tough/faq.html
new file mode 100644
index 00000000..9b43a9ca
--- /dev/null
+++ b/templates/tough/faq.html
@@ -0,0 +1,110 @@
+{% extends "base_content.html" %}
+{% load extra_tags %}
+{% load humanize %}
+{% block title %}{% spaceless %}FAQ{% endspaceless %}{% endblock %}
+{% block forejs %}
+{% endblock %}
+{% block content %}
+<div class="headNormal">
+ {% trans "Frequently Asked Questions " %}(FAQ)
+</div>
+<div id="main-body" style="width:100%">
+
+ <h3 class="subtitle">{% trans "What kinds of questions can I ask here?" %}</h3>
+ <p>{% trans "Most importanly - questions should be <strong>relevant</strong> to this community." %}<br>
+ {% trans "Before asking the question - please make sure to use search to see whether your question has alredy been answered."%}<br>
+ </p><br>
+
+ <h3 class="subtitle">{% trans "What questions should I avoid asking?" %}</h3>
+ <p>{% trans "Please avoid asking questions that are not relevant to this community, too subjective and argumentative." %}</p>
+ </p><br>
+
+ <h3 class="subtitle">{% trans "What should I avoid in my answers?" %}</h3>
+ <p>{% trans "site title" %} {% trans "is a Q&A site, not a discussion group. Therefore - please avoid having discussions in your answers, comment facility allows some space for brief discussions." %}
+ </p><br>
+
+ <h3 class="subtitle">{% trans "Who moderates this community?" %}</h3>
+ <p>{% trans "The short answer is: <strong>you</strong>." %}<br>
+ {% trans "This website is moderated by the users." %}
+ {% trans "The reputation system allows users earn the authorization to perform a variety of moderation tasks." %}
+ </p><br>
+
+ <h3 class="subtitle">{% trans "How does reputation system work?" %}</h3>
+ <p>{% trans "Anyone can ask questions and give answers, points are not necessary for that." %}<br>
+ {% trans "As we've said before, users help running this site. Point system helps select users who can administer this community."%}
+ {% trans "Reputation points roughly measure how community trusts you. These points are given to you directly by other members of the community." %}
+ </p>
+ <p>
+ {% trans "For example, if you ask an interesting question or give a helpful answer, your input will be upvoted and you will gain more trust in the community." %}
+ {% trans "If on the other hand someone gives a misleading answer, the answer will be voted down and he/she loses some points." %}
+ {% trans "Each vote in favor will generate <strong>10</strong> points, each vote against will subtract <strong>2</strong> points." trans %}
+ {% trans "Through the votes of other people you can accumulate a maximum of <strong>200</strong> points." %}
+ {% "After accumulating certain number of points, you can do more:" %}
+ <table style="font-family:arial;" cellspacing="3" cellpadding="3">
+ <tr>
+ <th width="40px" style="text-align:right"></th>
+ <th width="300px"></th>
+ </tr>
+ <tr>
+ <td style="text-align:right;padding-right:5px"><strong>15</strong></td>
+ <td>{% trans "upvote" %}</td>
+ </tr>
+ <tr>
+ <td style="text-align:right;padding-right:5px"><strong>15</strong></td>
+ <td>{% trans "use tags" %}</td>
+ </tr>
+ <tr>
+ <td style="text-align:right;padding-right:5px"><strong>50</strong></td>
+ <td>{% trans "add comments" %}</td>
+ </tr>
+ <tr>
+ <td style="text-align:right;padding-right:5px"><strong>100</strong></td>
+ <td>{% trans "downvote" %}</td>
+ </tr><tr>
+ <td style="text-align:right;padding-right:5px"><strong>250</strong></td>
+ <td>鎵撳紑鍏抽棴鑷繁鐨勯棶棰</td>
+ </tr>
+ <tr>
+ <td style="text-align:right;padding-right:5px"><strong>500</strong></td>
+ <td>{% trans "retag questions" %}</td>
+ </tr>
+ <tr>
+ <td style="text-align:right;padding-right:5px"><strong>750</strong></td>
+ <td>{% trans "edit community wiki questions" %}</td>
+ </tr>
+ <tr>
+ <td style="text-align:right;padding-right:5px"><strong>2000</strong></td>
+ <td>{% trans "edit any answer" %}</td>
+ </tr>
+ <tr>
+ <td style="text-align:right;padding-right:5px"><strong>3000</strong></td>
+ <td>{% trans "open any closed question" %}</td>
+ </tr>
+ <tr>
+ <td style="text-align:right;padding-right:5px"><strong>5000</strong></td>
+ <td>{% trans "delete any comment" %}</td>
+ </tr>
+ <tr>
+ <td style="text-align:right;padding-right:5px"><strong>10000</strong></td>
+ <td>{% trans "delete any questions and answers and perform other moderation tasks" %}</td>
+ </tr>
+
+ </table>
+
+ </p><br>
+
+ <h3 class="subtitle">{% trans "To register, do I need to create new password?"</h3>
+ <p>{% trans "No, you don't have to. You can login through any service that supports OpenID, e.g. Google, Yahoo, AOL, etc." %}
+ <strong><a href="/account/signin">{% trans "Login now!" %}</a> 禄</strong>
+ </p><br>
+
+ <h3 class="subtitle">{% trans "Why other people can edit my questions/answers?" %}</h3>
+ <p> {% trans "Goal of this site is..." %} {% trans "So questions and answers can be edited like wiki pages by experienced users of this site and this improves the overall quality of the knowledge base content." %}
+ {% trans "If this approach is not for you, we respect your choice." %}
+ </p><br>
+ <h3 class="subtitle">{% trans "Still have questions?" %}</h3>
+ <p>{% "Please ask your question, help make our community better!" %} <a href="/tags/faq" class="big">{% trans "site title" %} {% trans "questions" %}</a>{% trans "." %}
+ </p>
+ <br><br>
+</div>
+{% endblock %}
diff --git a/templates/tough/question_retag.html b/templates/tough/question_retag.html
new file mode 100644
index 00000000..105428f4
--- /dev/null
+++ b/templates/tough/question_retag.html
@@ -0,0 +1,107 @@
+{% extends "base.html" %}
+{% block title %}{% spaceless %}{% trans "Revise tags" %}{% endspaceless %}{% endblock %}
+{% block forejs %}
+ <script type='text/javascript' src='/content/js/com.cnprog.editor.js'></script>
+ <script type='text/javascript' src='/content/js/com.cnprog.post.js'></script>
+ <script type='text/javascript' src='/content/js/jquery.validate.pack.js'></script>
+ <script type="text/javascript">
+
+ $().ready(function(){
+ $("#nav_questions").attr('className',"on");
+ //Tags autocomplete action
+ var tags = {{ tags|safe }};
+ $("#id_tags").autocomplete(tags, {
+ minChars: 1,
+ matchContains: true,
+ max: 20,
+ multiple: true,
+ multipleSeparator: " ",
+ formatItem: function(row, i, max) {
+ return row.n + " ("+ row.c +")";
+ },
+ formatResult: function(row, i, max){
+ return row.n;
+ }
+
+ });
+
+ $("#fmretag").validate({
+ rules: {
+ tags: {
+ required: true,
+ maxength: 105
+ }
+ },
+ messages: {
+ tags: {
+ required: ' ' + {% trans "tags are requried" %},
+ maxlength: ' ' + {% trans "up to 5 tags, less than 20 characters each" %},
+ }
+ }
+
+ });
+ lanai.highlightSyntax();
+
+ });
+ </script>
+{% endblock %}
+
+{% block content %}
+<div id="main-bar" class="headNormal">
+ {% trans "Change tags" %} [<a href="{{ question.get_absolute_url }}">{% trans "back" %}</a>]
+</div>
+<div id="main-body" class="ask-body">
+ <div id="askform">
+ <form id="fmretag" action="{% url edit_question question.id %}" method="post" >
+ <h3>
+ {{ question.get_question_title }}
+ </h3>
+ <div id="description" class="edit-content-html">
+ {{ question.html|safe }}
+ </div>
+
+
+ <div class="form-item">
+ <strong>{{ form.tags.label_tag }}:</strong> <span class="form-error"></span><br>
+ {{ form.tags }} {{ form.tags.errors }}
+ <div class="title-desc">
+ {{ form.tags.help_text }}
+ </div>
+ </div>
+ <br>
+
+ <div class="error" ></div>
+ <input type="submit" value="{% trans "Change now" %}" class="submit" />
+ <input type="button" value="{% trans "Cancel" %}" class="submit" onclick="history.back(-1);" />
+ <br>
+ <br>
+ </form>
+ </div>
+</div>
+{% endblock %}
+
+{% block sidebar %}
+<div class="boxC">
+ <p class="subtitle">{% trans "Why use and modify tags?" %}</p>
+ <ul class="list-item">
+
+ <li>
+ {% trans "site title" %} {% trans "uses tags for the classification of questions %}
+ </li>
+ <li>
+ 淇敼瀹屾暣闂闇瑕佺敤鎴风殑绉垎杈惧埌涓瀹氭潯浠讹紙姣斿锛氱Н鍒 >= 3000鍒嗭紝鑷繁鍙戝竷鐨勯棶棰橀櫎澶栵級锛岃岀敤鎴风Н鍒嗚揪鍒版瘮杈冧綆鐨勬椂鍊欙紝灏卞彲浠ヤ慨鏀归棶棰樼殑鏍囩锛堟瘮濡傦細绉垎 >= 500, 杩欓噷鎸囨墍鏈夐棶棰樼殑鏍囩锛夈
+
+ </li>
+ <li>
+ {% trans "tag editors receive special awards from the community" %}
+ </li>
+ </ul>
+ <a href="{% url faq %}" style="float:right;position:relative">faq 禄</a>
+ <br>
+</div>
+
+{% endblock %}
+
+{% block endjs %}
+{% endblock %}
+
diff --git a/templates/tough/unanswered.html b/templates/tough/unanswered.html
new file mode 100644
index 00000000..94e778db
--- /dev/null
+++ b/templates/tough/unanswered.html
@@ -0,0 +1,115 @@
+{% extends "base.html" %}
+{% load extra_tags %}
+{% load humanize %}
+{% load extra_filters %}
+{% block title %}{% spaceless %}{% trans "Unanswered questions" %}{% endspaceless %}{% endblock %}
+{% block forejs %}
+ <script type="text/javascript">
+ $().ready(function(){
+ $("#nav_unanswered").attr('className',"on");
+ });
+
+ </script>
+{% endblock %}
+{% block content %}
+<div class="tabBar">
+ <span class="headQuestions">{% trans "Unanswered questions" %}</span>
+ <div class="tabsA">
+ <a id="latest" href="?sort=latest" class="on" title="{% trans "most recently asked questions" %}>{% trans "newest" %}</a>
+ </div>
+</div>
+
+<div id="listA">
+ {% for question in questions.object_list %}
+ <div class="qstA">
+ <h2><a href="{{ question.get_absolute_url }}">{{ question.get_question_title }}</a></h2>
+ <div class="stat">
+ <table>
+ <tr>
+ <td><span class="num">{{ question.answer_count|intcomma }}</span> </td>
+ <td><span class="num">{{ question.score|intcomma }}</span> </td>
+ <td><span class="num">{{ question.view_count|cnprog_intword|safe }}</span> </td>
+ </tr>
+ <tr>
+ <td><span class="unit">{% trans "answers" %}</span></td>
+ <td><span class="unit">{% trans "votes" %}</span></td>
+ <td><span class="unit">{% trans "views" %}</span></td>
+ </tr>
+ </table>
+ </div>
+ <div class="summary">
+ {{ question.summary }}...
+ </div>
+
+ {% ifequal tab_id 'active'%}
+ {% if question.wiki %}
+ <span class="from wiki">{% trans "community wiki" %}</span>
+ <span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
+ {% else %}
+ <div class="from">
+ {% comment %}{% gravatar question.last_activity_by 24 %}{% endcomment %}
+ <span class="author"><a href="{{ question.last_activity_by.get_profile_url }}">{{ question.last_activity_by }}</a></span>
+ <span class="score">{% get_score_badge question.last_activity_by %} </span>
+ <span class="date" title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</span>
+ </div>
+ {% endif %}
+ {% else %}
+ {% if question.wiki %}
+ <span class="from wiki">{% trans "community wiki" %}</span>
+ <span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
+ {% else %}
+ <div class="from">
+ {% comment %}{% gravatar question.author 24 %}{% endcomment %}
+ <span class="author"><a href="{{ question.author.get_profile_url }}">{{ question.author }}</a></span>
+ <span class="score">{% get_score_badge question.author %} </span>
+ <span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
+ </div>
+ {% endif %}
+ {% endifequal %}
+
+ <div class="tags">
+ {% for tag in question.tagname_list %}
+ <a href="{% url forum.views.tag tag|urlencode %}" title="{% trans "see questions tagged" %}'{{ tag }}'{% trans "using tags" %}" rel="tag">{{ tag }}</a>
+ {% endfor %}
+ </div>
+ </div>
+ {% endfor %}
+</div>
+{% endblock %}
+
+{% block tail %}
+ <div class="pager">
+ {% cnprog_paginator context %}
+
+ </div>
+ <div class="pagesize">
+ {% cnprog_pagesize context %}
+ </div>
+{% endblock %}
+
+{% block sidebar %}
+<div class="boxC">
+ <p>
+ <!--todo: move this to blocktrans -->
+ {% tans "Have a total of" %}<br><div class="questions-count">{{ questions_count|intcomma }}</div>
+ <p>{% trans "number of <strong>unanswered</strong> questions" %}</p>
+ <p>闂鎸 <strong>闂鍒涘缓鏃堕棿</strong> 鎺掑簭銆傛渶鏂板姞鍏ョ殑闂灏嗘樉绀哄湪鏈鍓嶉潰銆</p>
+
+ </p>
+</div>
+<div class="boxC">
+ <h3 class="subtitle">{% trans "Related tags" %}</h3>
+ <div class="body">
+ <div class="tags">
+ {% for tag in tags %}
+ <a rel="tag" title="{% trans "see questions tagged"%}'{{ tag.name }}'{% trans "using tags" %}" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a>
+ <span class="tag-number">脳 {{ tag.used_count|intcomma }}</span>
+ <br>
+ {% endfor %}
+ <br>
+ </div>
+ </div>
+</div>
+
+{% endblock %}
+
diff --git a/templates/unanswered.html b/templates/unanswered.html
index 4012921a..926f2ffd 100644
--- a/templates/unanswered.html
+++ b/templates/unanswered.html
@@ -1,8 +1,10 @@
+<!-- unanswered.html -->
{% extends "base.html" %}
{% load extra_tags %}
+{% load i18n %}
{% load humanize %}
{% load extra_filters %}
-{% block title %}{% spaceless %}娌℃湁鍥炵瓟鐨勯棶棰榹% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Unanswered questions" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -13,9 +15,9 @@
{% endblock %}
{% block content %}
<div class="tabBar">
- <span class="headQuestions">娌℃湁鍥炵瓟鐨勯棶棰</span>
+ <span class="headQuestions">{% trans "Unanswered questions" %}</span>
<div class="tabsA">
- <a id="latest" href="?sort=latest" class="on" title="鏈鏂板姞鍏ョ郴缁熺殑闂">鏈鏂伴棶棰</a>
+ <a id="latest" href="?sort=latest" class="on" title="{% trans "most recently asked questions" %}">{% trans "newest" %}</a>
</div>
</div>
@@ -31,9 +33,9 @@
<td><span class="num">{{ question.view_count|cnprog_intword|safe }}</span> </td>
</tr>
<tr>
- <td><span class="unit">鍥炵瓟</span></td>
- <td><span class="unit">绁ㄦ暟</span></td>
- <td><span class="unit">娴忚</span></td>
+ <td><span class="unit">{% trans "answers" %}</span></td>
+ <td><span class="unit">{% trans "votes" %}</span></td>
+ <td><span class="unit">{% trans "views" %}</span></td>
</tr>
</table>
</div>
@@ -43,7 +45,7 @@
{% ifequal tab_id 'active'%}
{% if question.wiki %}
- <span class="from wiki">绀惧尯Wiki</span>
+ <span class="from wiki">{% trans "community wiki" %}</span>
<span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
{% else %}
<div class="from">
@@ -55,7 +57,7 @@
{% endif %}
{% else %}
{% if question.wiki %}
- <span class="from wiki">绀惧尯Wiki</span>
+ <span class="from wiki">{% trans "community wiki" %}</span>
<span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
{% else %}
<div class="from">
@@ -68,9 +70,12 @@
{% endifequal %}
<div class="tags">
- {% for tag in question.tagname_list %}
- <a href="{% url forum.views.tag tag|urlencode %}" title="鏌ョ湅鏈夊叧'{{ tag }}'鐨勯棶棰" rel="tag">{{ tag }}</a>
- {% endfor %}
+ {% for tag in question.tagname_list %}
+ <a href="{% url forum.views.tag tag|urlencode %}"
+ title="{% trans "see questions tagged" %}'{{ tag }}'{% trans "using tags" %}"
+ rel="tag">{{ tag }}
+ </a>
+ {% endfor %}
</div>
</div>
{% endfor %}
@@ -78,31 +83,30 @@
{% endblock %}
{% block tail %}
- <div class="pager">
- {% cnprog_paginator context %}
-
- </div>
- <div class="pagesize">
- {% cnprog_pagesize context %}
- </div>
+ <div class="pager">
+ {% cnprog_paginator context %}
+ </div>
+ <div class="pagesize">
+ {% cnprog_pagesize context %}
+ </div>
{% endblock %}
{% block sidebar %}
<div class="boxC">
<p>
- 鎮ㄦ鍦ㄦ祻瑙堟墍鏈<br><div class="questions-count">{{ questions_count|intcomma }}</div>
- <p>涓<span class="darkred"><strong> 娌℃湁鍥炵瓟鐨 </strong></span>闂銆</p>
-
- <p>闂鎸 <strong>闂鍒涘缓鏃堕棿</strong> 鎺掑簭銆傛渶鏂板姞鍏ョ殑闂灏嗘樉绀哄湪鏈鍓嶉潰銆</p>
-
+ {% blocktrans with questions_count|intcomma as num_q %}have {{num_q}} unanswered questions{% endblocktrans %}
+ {% comment %}
+ {% trans "Have a total of" %}<br><div class="questions-count">{{ questions_count|intcomma }}</div>
+ {% endcomment %}
+ <!---<p>闂鎸 <strong>闂鍒涘缓鏃堕棿</strong> 鎺掑簭銆傛渶鏂板姞鍏ョ殑闂灏嗘樉绀哄湪鏈鍓嶉潰銆</p>-->
</p>
</div>
<div class="boxC">
- <h3 class="subtitle">鐩稿叧鏍囩</h3>
+ <h3 class="subtitle">{% trans "Related tags" %}</h3>
<div class="body">
<div class="tags">
{% for tag in tags %}
- <a rel="tag" title="鏌ョ湅鏈夊叧'{{ tag.name }}'鐨勯棶棰" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a>
+ <a rel="tag" title="{% trans "see questions tagged"%}'{{ tag.name }}'{% trans "using tags" %}" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a>
<span class="tag-number">脳 {{ tag.used_count|intcomma }}</span>
<br>
{% endfor %}
@@ -113,3 +117,4 @@
{% endblock %}
+<!-- end unanswered.html -->
diff --git a/templates/upfiles/1245715031297631.png b/templates/upfiles/1245715031297631.png
new file mode 100755
index 00000000..89a6aed4
--- /dev/null
+++ b/templates/upfiles/1245715031297631.png
Binary files differ
diff --git a/templates/upfiles/12457157052552259.png b/templates/upfiles/12457157052552259.png
new file mode 100755
index 00000000..89a6aed4
--- /dev/null
+++ b/templates/upfiles/12457157052552259.png
Binary files differ
diff --git a/templates/user.html b/templates/user.html
index dd8e3b13..53a30dc0 100644
--- a/templates/user.html
+++ b/templates/user.html
@@ -1,3 +1,4 @@
+<!-- user.html -->
{% extends "base_content.html" %}
{% load extra_tags %}
{% load humanize %}
@@ -31,4 +32,4 @@
{% endblock %}
{% include "user_footer.html" %}
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}<!-- end user.html -->
diff --git a/templates/user_edit.html b/templates/user_edit.html
index 18794472..0f927374 100644
--- a/templates/user_edit.html
+++ b/templates/user_edit.html
@@ -1,7 +1,9 @@
+<!-- user_edit.html -->
{% extends "base_content.html" %}
{% load extra_tags %}
{% load humanize %}
-{% block title %}{% spaceless %}淇敼涓汉璧勬枡{% endspaceless %}{% endblock %}
+{% load i18n %}
+{% block title %}{% spaceless %}{% trans "Edit user profile" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -14,7 +16,7 @@
{% endblock %}
{% block content %}
<div id="main-bar" class="headNormal">
- {{ request.user.username }} - 淇敼璧勬枡
+ {{ request.user.username }} - {% trans "edit profile" %}
</div>
<div id="main-body" style="width:100%;padding-top:10px">
<form name="" action="{% url edit_user request.user.id %}" method="post">
@@ -25,12 +27,13 @@
<img src="/content/images/nophoto.png">
{% endif %}
<div style="padding:20px 0 0 20px;font-weight:bold;font-size:150%">
- <a href="http://www.gravatar.com/" target="_blank" title="gravatar鍜屾偍鐨勯偖浠跺湴鍧鏄粦瀹氱殑">淇敼澶村儚</a>
+ <a href="http://www.gravatar.com/" target="_blank"
+ title="gravatar {% trans "image associated with your email address" %}">{% trans "avatar" %}</a>
</div>
</div>
<div id="askform" style="float:right;width:750px;text-align:left;">
- <h2>娉ㄥ唽鐢ㄦ埛</h2>
+ <h2>{% trans "Registered user" %}</h2>
<table class="user-details">
<tr>
<th width="100px"></th>
@@ -76,8 +79,8 @@
</table>
<div style="margin:30px 0 60px 0">
- <input type="submit" value="鏇存柊" class="submit" >
- <input id="cancel" type="button" value="鍙栨秷" class="submit" >
+ <input type="submit" value="{% trans "Update" %}" class="submit" >
+ <input id="cancel" type="button" value="{% trans "Cancel" %}" class="submit" >
</div>
</div>
@@ -85,6 +88,4 @@
</div>
{% endblock %}
-
-
-
+<!-- end user_edit.html -->
diff --git a/templates/user_favorites.html b/templates/user_favorites.html
index 8cebc798..d47670bd 100644
--- a/templates/user_favorites.html
+++ b/templates/user_favorites.html
@@ -1,7 +1,9 @@
+<!-- user_favorites.html -->
{% extends "user.html" %}
{% load extra_tags %}
{% load humanize %}
{% block usercontent %}
{% include "users_questions.html" %}
-{% endblock %} \ No newline at end of file
+{% endblock %}
+<!-- end user_favorites.html -->
diff --git a/templates/user_footer.html b/templates/user_footer.html
index 3deba20a..ee347742 100644
--- a/templates/user_footer.html
+++ b/templates/user_footer.html
@@ -1,3 +1,4 @@
+<!-- user_footer.html -->
<div id="mainbar-footer">
-</div> \ No newline at end of file
+</div><!-- end user_footer.html -->
diff --git a/templates/user_info.html b/templates/user_info.html
index 1700fda8..8e6dca84 100644
--- a/templates/user_info.html
+++ b/templates/user_info.html
@@ -1,6 +1,8 @@
+<!-- user_info.html -->
{% load extra_tags %}
{% load extra_filters %}
{% load humanize %}
+{% load i18n %}
<div id="subheader" class="headUser">
{{view_user.username}}
@@ -18,7 +20,7 @@
<tr>
<td align="center">
<div class="scoreNumber">{{view_user.reputation|intcomma}}</div>
- <p><b style="color:#777;">绉垎</b></p>
+ <p><b style="color:#777;">{% trans "reputation" %}</b></p>
</td>
</tr>
</table>
@@ -26,51 +28,52 @@
<td width="360" style="vertical-align: top;">
<table class="user-details">
<tr height="30px">
- <th width="130" align="left"><strong>娉ㄥ唽鐢ㄦ埛</strong></th>
+ <th width="130" align="left"><strong>{% trans "Registered user" %}</strong></th>
<th width="230" align="right">
{% if request.user|can_view_user_edit:view_user %}
- <span class="user-edit-link"><a href="/users/{{ view_user.id }}/edit/">鏇存柊鎴戠殑璧勬枡</a></span>
+ <span class="user-edit-link"><a href="/users/{{ view_user.id }}/edit/">{% trans "update profile" %}</a></span>
{% endif %}
</th>
</tr>
{% if view_user.real_name %}
<tr>
- <td >濮撳悕</td>
- <td ><b>{{view_user.real_name}}</b></td>
+ <td>{% trans "real name" %}</td>
+ <td><b>{{view_user.real_name}}</b></td>
</tr>
{% endif %}
<tr>
- <td>宸插姞鍏</td>
+ <td>{% trans "member for" %}</td>
<td>{{ view_user.date_joined|timesince }}</td>
</tr>
{% if view_user.last_seen %}
<tr>
- <td>涓婃娲诲姩鏃堕棿</td>
- <td><strong title="{{ view_user.last_seen }}">{{ view_user.last_seen|timesince }}鍓</strong></td>
+ <td>{% trans "last seen" %}</td>
+ <td><strong title="{{ view_user.last_seen }}">{{ view_user.last_seen|timesince }} {% trans "ago" %}</strong></td>
</tr>
{% endif %}
{% if view_user.website %}
<tr>
- <td>涓汉缃戠珯</td>
+ <td>{% trans "user website" %}</td>
<td><a rel="nofollow" target="_blank" href="{{view_user.website}}">{{view_user.website}}</a></td>
</tr>
{% endif %}
{% if view_user.location %}
<tr>
- <td>鍩庡競</td>
+ <td>{% trans "location" %}</td>
<td>{{view_user.location}}</td>
</tr>
{% endif %}
{% if view_user.date_of_birth%}
<tr>
- <td>骞撮緞</td>
- <td>{% get_age view_user.date_of_birth %} 宀</td>
+ <!--todo - redo this with blocktrans -->
+ <td>{% trans "age" %}</td>
+ <td>{% get_age view_user.date_of_birth %} {% trans "age unit" %}</td>
</tr>
{% endif %}
{% if votes_today_left %}
<tr>
- <td>浠婃棩鍓╀綑鎶曠エ鏁</td>
- <td><strong class="darkred">{{ votes_today_left }}</strong> 绁</td>
+ <td>{% trans "todays unused votes" %}</td>
+ <td><strong class="darkred">{{ votes_today_left }}</strong> {% trans "votes left" %}</td>
</tr>
{% endif %}
</table>
@@ -83,4 +86,5 @@
</div>
</td>
</tr>
-</table> \ No newline at end of file
+</table>
+<!-- end user_info.html -->
diff --git a/templates/user_preferences.html b/templates/user_preferences.html
index 3a760a25..246a834e 100644
--- a/templates/user_preferences.html
+++ b/templates/user_preferences.html
@@ -1,20 +1,11 @@
+<!-- user_preferences.html -->
{% extends "user.html" %}
{% load extra_tags %}
{% load humanize %}
{% block usercontent %}
<div style="padding:5px;">
- <fieldset>
- <legend><b>鍚屾Twitter娑堟伅</b></legend>
- <form>
- <label for="name">璐﹀彿:</label>
- <input id="name" /><br>
- <label for="password">瀵嗙爜:</label>
- <input id="password" type="password"/><br>
- <input id="cbMessage" type="checkbox" />鍙戝竷鎴戠殑鎻愰棶鍒版垜鐨凾witter<br>
- <input id="cbReply" type="checkbox" />鍙戝竷鎴戠殑鍥炵瓟鍒版垜鐨凾witter<br>
- <input type="submit" value="淇濆瓨" />
- </form>
- </fieldset>
+ <h1>Surprise will be here soon ;-)</h1>
</div>
{% endblock %}
+<!-- end user_preferences.html -->
diff --git a/templates/user_recent.html b/templates/user_recent.html
index bb2bc99d..70c074ad 100644
--- a/templates/user_recent.html
+++ b/templates/user_recent.html
@@ -1,3 +1,4 @@
+<!-- user_recent.html -->
{% extends "user.html" %}
{% load extra_tags %}
{% load humanize %}
@@ -22,4 +23,5 @@
</div>
{% endfor %}
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
+<!-- end user_recent.html -->
diff --git a/templates/user_reputation.html b/templates/user_reputation.html
index aad8db44..7a1c7366 100644
--- a/templates/user_reputation.html
+++ b/templates/user_reputation.html
@@ -1,3 +1,4 @@
+<!-- user_reputation.html -->
{% extends "user.html" %}
{% load extra_tags %}
{% load humanize %}
@@ -37,4 +38,4 @@
{% endfor %}
</div>
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}<!-- end user_reputation.html -->
diff --git a/templates/user_responses.html b/templates/user_responses.html
index 0ada494c..45aab21b 100644
--- a/templates/user_responses.html
+++ b/templates/user_responses.html
@@ -1,3 +1,4 @@
+<!-- user_responses.html -->
{% extends "user.html" %}
{% load extra_tags %}
{% load humanize %}
@@ -9,7 +10,7 @@
<div style="width:150px;float:left">{% diff_date response.time 3 %}</div>
<div style="width:100px;float:left"><a href="{{ response.userlink }}">{{ response.username }}</a></div>
<div style="float:left;overflow:hidden;width:680px">
- <strong {% ifequal response.type "鍥炵瓟闂"%}class="user-action-2"{% endifequal %}{% ifequal response.type "鏈浣崇瓟妗"%}class="user-action-8"{% endifequal %}>{{ response.type }}</strong>锛
+ <strong {% ifequal response.type "question_answered" %}class="user-action-2"{% endifequal %}{% ifequal response.type "answer_accepted" %}class="user-action-8"{% endifequal %}>{{ response.type }}</strong>锛
<a href="{{ response.titlelink }}">{{ response.title }}</a><br>
{{ response.content|safe }}
<div style="height:10px"></div>
@@ -18,4 +19,5 @@
</div>
{% endfor %}
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
+<!-- end user_responses.html -->
diff --git a/templates/user_stats.html b/templates/user_stats.html
index f6f55246..a5be1a77 100644
--- a/templates/user_stats.html
+++ b/templates/user_stats.html
@@ -1,4 +1,6 @@
+<!-- user_stats.html -->
{% extends "user.html" %}
+{% load i18n %}
{% load extra_tags %}
{% load humanize %}
{% block usercontent %}
@@ -10,7 +12,7 @@
<div style="text-align: right;" class="count">{{questions|length}}</div>
</td>
<td>
- <h2>涓棶棰</h2>
+ <h2>{% trans "User questions" %}</h2>
</td>
</tr>
</table>
@@ -23,7 +25,7 @@
<div style="text-align: right;" class="count">{{answered_questions|length}}</div>
</td>
<td >
- <h2>涓洖绛</h2>
+ <h2>{% trans "Answers" %}</h2>
</td>
</tr>
</table>
@@ -31,12 +33,14 @@
{% for answered_question in answered_questions %}
<div class="answer-summary">
<a title="{{answered_question.summary}}" href="/questions/{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}">
- <div class="answer-votes {% if answered_question.accepted %}answered-accepted{% endif %}" title="璇ュ洖绛旀诲叡鏈墈{ answered_question.vote_count }}涓姇绁&#13;{% if answered_question.accepted %}璇ュ洖绛斿凡琚涓烘渶浣崇瓟妗坽%endif%}">
+ <div class="answer-votes {% if answered_question.accepted %}answered-accepted{% endif %}"
+ title="{% blocktrans with answered_question.vote_count as vote_count %}the answer has been voted for {{ vote_count }} times{% endblocktrans %}&#13;{% if answered_question.accepted %}{% trans "this answer has been selected as correct" %}{%endif%}">
{{ answered_question.vote_count }}
</div>
</a>
<div class="answer-link">
- <a href="/questions/{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}">{{answered_question.title}}</a> {% if answered_question.comment_count %}<span title="璇ュ洖绛旀湁{{ answered_question.comment_count }}鏉¤瘎璁">({{answered_question.comment_count}})</span>{% endif %}
+ <a href="/questions/{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}">{{answered_question.title}}</a> {% if answered_question.comment_count %}<span
+ title="{% blocktrans %}the answer has been commented {{ answered_question.comment_count }} times{% endblocktrans %}">({{answered_question.comment_count}})</span>{% endif %}
</div>
</div>
{% endfor %}
@@ -49,7 +53,7 @@
<div style="text-align: right;" class="count">{{total_votes}}</div>
</td>
<td >
- <h2>涓姇绁</h2>
+ <h2>{% trans "votes total" %}</h2>
</td>
</tr>
</table>
@@ -58,12 +62,12 @@
<tr>
<td width="60">
<img style="cursor: default;" align="absmiddle" src="/content/images/vote-arrow-up-on.png"/>
- <span title="璇ョ敤鎴锋姇鐨勮禐鎴愮エ鎬绘暟" class="vote-count">{{up_votes}}</span>
+ <span title="{% trans "user has voted up this many times" %}" class="vote-count">{{up_votes}}</span>
</td>
<td width="60">
<img style="cursor: default;" align="absmiddle" src="/content/images/vote-arrow-down-on.png"/>
- <span title="鐢ㄦ埛鎶曠殑鍙嶅绁ㄦ绘暟" class="vote-count">{{down_votes}}</span>
+ <span title="{% trans "user voted down this many times" %}" class="vote-count">{{down_votes}}</span>
</td>
</tr>
@@ -77,7 +81,7 @@
<div style="text-align: right;" class="count">{{tags|length}}</div>
</td>
<td >
- <h2>涓爣绛</h2>
+ <h2>{% trans "Tags" %}</h2>
</td>
</tr>
</table>
@@ -86,7 +90,9 @@
<tr>
<td width="180" valign="top">
{% for tag in tags%}
- <a rel="tag" title="鏌ョ湅鏈夊叧'{{ tag }}'鐨勯棶棰" href="{% url forum.views.tag tag|urlencode %}">{{tag.name}}</a><span class="tag-number"> 脳 {{ tag.used_count|intcomma }}</span><br>
+ <a rel="tag"
+ title="{% blocktrans %}see other questions tagged '{{ tag }}' {% endblocktrans %}"
+ href="{% url forum.views.tag tag|urlencode %}">{{tag.name}}</a><span class="tag-number"> 脳 {{ tag.used_count|intcomma }}</span><br>
{% if forloop.counter|divisibleby:"10" %}
</td>
<td width="180" valign="top">
@@ -104,7 +110,7 @@
<div style="text-align: right;" class="count">{{total_awards}}</div>
</td>
<td >
- <h2>鏋氬鐗</h2>
+ <h2>{% trans "Badges" %}</h2>
</td>
</tr>
</table>
@@ -125,3 +131,4 @@
</div>
{% endblock %}
+<!-- end user_stats.html -->
diff --git a/templates/user_tabs.html b/templates/user_tabs.html
index 165b1b9f..03a9d111 100644
--- a/templates/user_tabs.html
+++ b/templates/user_tabs.html
@@ -1,20 +1,34 @@
+<!-- user_tabs.html -->
{% load extra_filters %}
+{% load i18n %}
<div class="tabBar">
<div class="tabsA">
- <a id="stats" {% ifequal tab_name "stats" %}class="on"{% endifequal %} title="鐢ㄦ埛姒傝" href="/users/{{view_user.id}}/{{view_user.username}}?sort=stats">姒傝</a>
- <a id="recent" {% ifequal tab_name "recent" %}class="on"{% endifequal %} title="鏈杩戞椿鍔" href="/users/{{view_user.id}}/{{view_user.username}}?sort=recent">鏈杩戞椿鍔</a>
+ <a id="stats" {% ifequal tab_name "stats" %}class="on"{% endifequal %}
+ title="{% trans "User profile" %}" href="/users/{{view_user.id}}/{{view_user.username}}?sort=stats">{% trans "overview" %}</a>
+ <a id="recent" {% ifequal tab_name "recent" %}class="on"{% endifequal %}
+ title="{% trans "recent activity" %}" href="/users/{{view_user.id}}/{{view_user.username}}?sort=recent">{% trans "recent activity" %}</a>
{% if request.user|is_user_self:view_user %}
- <a id="responses" {% ifequal tab_name "responses" %}class="on"{% endifequal %} title="鍏朵粬鐢ㄦ埛鐨勫洖澶嶅拰璇勮" href="/users/{{view_user.id}}/{{view_user.username}}?sort=responses">鍥炲簲</a>
+ <a id="responses" {% ifequal tab_name "responses" %}class="on"{% endifequal %}
+ title="{% trans "comments and answers to others questions" %}"
+ href="/users/{{view_user.id}}/{{view_user.username}}?sort=responses">{% trans "responses" %}</a>
{% endif %}
- <a id="reputation" {% ifequal tab_name "reputation" %}class="on"{% endifequal %} title="鐢ㄦ埛鐨勭ぞ鍖虹Н鍒嗗巻鍙" href="/users/{{view_user.id}}/{{view_user.username}}?sort=reputation">绉垎</a>
+ <a id="reputation" {% ifequal tab_name "reputation" %}class="on"{% endifequal %}
+ title="{% trans "graph of user reputation" %}"
+ href="/users/{{view_user.id}}/{{view_user.username}}?sort=reputation">{% trans "reputation history" %}</a>
{% if request.user|can_view_user_votes:view_user %}
- <a id="votes" {% ifequal tab_name "votes" %}class="on"{% endifequal %} title="鐢ㄦ埛鎵鏈夋姇绁" href="/users/{{view_user.id}}/{{view_user.username}}?sort=votes">鎶曠エ</a>
+ <a id="votes" {% ifequal tab_name "votes" %}class="on"{% endifequal %}
+ title="{% trans "user vote record" %}" href="/users/{{view_user.id}}/{{view_user.username}}?sort=votes">{% trans "casted votes" %}</a>
{% endif %}
- <a id="favorites" {% ifequal tab_name "favorites" %}class="on"{% endifequal %} title="鐢ㄦ埛鏀惰棌鐨勯棶棰" href="/users/{{view_user.id}}/{{view_user.username}}?sort=favorites">鏀惰棌</a>
+ <a id="favorites" {% ifequal tab_name "favorites" %}class="on"{% endifequal %}
+ title="{% trans "questions that user selected as his/her favorite"
+ href="/users/{{view_user.id}}/{{view_user.username}}?sort=favorites">{% trans "favorites" %}</a>
<!--
{% if request.user|can_view_user_preferences:view_user %}
- <a id="preferences" {% ifequal tab_name "preferences" %}class="on"{% endifequal %} title="鐢ㄦ埛鍙傛暟鐨勮缃" href="/users/{{view_user.id}}/{{view_user.username}}?sort=preferences">璁剧疆</a>
+ <a id="preferences" {% ifequal tab_name "preferences" %}class="on"{% endifequal %}
+ title="{% trans "user preference settings" %}"
+ href="/users/{{view_user.id}}/{{view_user.username}}?sort=preferences">{% trans "settings" %}</a>
{% endif %}
-->
</div>
-</div> \ No newline at end of file
+</div>
+<!-- end user_tabs.html -->
diff --git a/templates/user_votes.html b/templates/user_votes.html
index d50a3308..ec967704 100644
--- a/templates/user_votes.html
+++ b/templates/user_votes.html
@@ -1,6 +1,8 @@
+<!-- user_votes.html -->
{% extends "user.html" %}
{% load extra_tags %}
{% load humanize %}
+{% load i18n %}
{% block usercontent %}
<div style="padding-top:5px;font-size:13px;">
@@ -9,9 +11,9 @@
<div style="width:150px;float:left">{% diff_date vote.voted_at 3 %}</div>
<div style="width:30px;float:left">
{% ifequal vote.vote 1 %}
- <img src="/content/images/vote-arrow-up-on.png" title="璧炴垚绁">
+ <img src="/content/images/vote-arrow-up-on.png" title="{% trans "upvote" %}">
{% else %}
- <img src="/content/images/vote-arrow-down-on.png" title="鍙嶅绁">
+ <img src="/content/images/vote-arrow-down-on.png" title="{% trans "downvote" %}">
{% endifequal %}
</div>
<div style="float:left;overflow:hidden;width:750px">
@@ -25,4 +27,5 @@
</div>
{% endfor %}
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
+<!-- end user_votes.html -->
diff --git a/templates/users.html b/templates/users.html
index 16a83b21..701dbaa2 100644
--- a/templates/users.html
+++ b/templates/users.html
@@ -1,9 +1,12 @@
+<!-- users.html -->
{% extends "base_content.html" %}
{% load extra_tags %}
{% load humanize %}
-{% block title %}{% spaceless %}鐢ㄦ埛鍒楄〃{% endspaceless %}{% endblock %}
+{% load i18n %}
+{% block title %}{% spaceless %}{% trans "Users" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
+ //todo move javascript out
$().ready(function(){
$("#nav_users").attr('className',"on");
$("#type-user").attr('checked',true);
@@ -14,27 +17,26 @@
Hilite.elementid = "main-body";
Hilite.debug_referrer = location.href;
});
-
</script>
{% endblock %}
{% block content %}
<div class="tabBar">
- <div class="headUsers">鐢ㄦ埛鍒楄〃</div>
+ <div class="headUsers">{% trans "Users" %}</div>
<div class="tabsA">
- <a id="sort_reputation" href="?sort=reputation" class="off" title="绉垎">绉垎</a>
- <a id="sort_newest" href="?sort=newest" class="off" title="鏈鏂板姞鍏">鏈鏂板姞鍏</a>
- <a id="sort_last" href="?sort=last" class="off" title="鏈鍏堝姞鍏">鏈鍏堝姞鍏</a>
- <a id="sort_user" href="?sort=user" class="off" title="鐢ㄦ埛鍚">鐢ㄦ埛鍚</a>
+ <a id="sort_reputation" href="?sort=reputation" class="off" title="{% trans "reputation" %}">{% trans "reputation" %}</a>
+ <a id="sort_newest" href="?sort=newest" class="off" title="{% trans "recent" %}">{% trans "recent" %}</a>
+ <a id="sort_last" href="?sort=last" class="off" title="{% trans "oldest" %}">{% trans "oldest" %}</a>
+ <a id="sort_user" href="?sort=user" class="off" title="{% trans "by username" %}">{% trans "by username" %}</a>
</div>
</div>
<div id="main-body" style="width:100%">
<p>
{% if suser %}
- 鍖归厤鏌ヨ '<span class="darkred"><strong>{{ suser }}</strong></span>' 鐨勬墍鏈夌敤鎴峰悕锛
+ {% blocktrans %}users matching query {{suser}}:{% endblocktrans %}
{% endif %}
{% if not users.object_list %}
- <span >娌℃湁鎵惧埌鐩稿叧鏁版嵁銆</span>
+ <span>{% trans "Nothing found." %}</span>
{% endif %}
</p>
<div class="userList">
@@ -67,4 +69,5 @@
<div class="pager">
{% cnprog_paginator context %}
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
+<!-- end users.html -->
diff --git a/templates/users_questions.html b/templates/users_questions.html
index f797a6b8..dfb87c8f 100644
--- a/templates/users_questions.html
+++ b/templates/users_questions.html
@@ -1,17 +1,21 @@
+<!-- users_questions.html -->
{% load extra_tags %}
{% load extra_filters %}
{% load humanize %}
+{% load i18n %}
<div class="user-stats-table">
{% for question in questions%}
{% if question.favourite_count %}
{% if question.favorited_myself %}
<div class="favorites-count">
- <img title="杩欎釜闂琚 {{question.favourite_count}} 浣嶇敤鎴锋敹钘" src="/content/images/vote-favorite-on.png">
+ <img title="{% trans "this questions was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}"
+ src="/content/images/vote-favorite-on.png">
<div><b>{{question.favourite_count|intcomma}}</b></div>
</div>
{% else %}
<div class="favorites-count-off">
- <img title="杩欎釜闂琚 {{question.favourite_count}} 浣嶇敤鎴锋敹钘" src="/content/images/vote-favorite-off.png">
+ <img title="{% trans "this question was selected as favorite" %}{{question.favourite_count}} {% trans "number of times" %}"
+ src="/content/images/vote-favorite-off.png">
<div><b>{{question.favourite_count|intcomma}}</b></div>
</div>
{% endif %}
@@ -23,17 +27,17 @@
<div class="stats">
<div class="votes">
<div class="vote-count-post">{{question.vote_count|intcomma}}</div>
- 绁
+ {% trans "votes" %}
</div>
- <div title="{% if question.answer_accepted %}鏈夌瓟妗堝凡琚帴鍙椾负姝g‘绛旀{% endif %}" class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
+ <div title="{% if question.answer_accepted %}{% trans "this answer has been accepted to be correct" %}{% endif %}" class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
<div class="answer-count-post">{{question.answer_count|intcomma}}</div>
- 鍥炵瓟
+ {% trans "answers" %}
</div>
<div class="views">
<div class="views-count-post">{{question.view_count|cnprog_intword|safe}}</div>
- 娴忚
+ {% trans "views" %}
</div>
</div>
</a>
@@ -44,7 +48,8 @@
<div class="tags">
{% convert2tagname_list question %}
{% for tag in question.tagnames %}
- <a href="{% url forum.views.tag tag|urlencode %}" title="鏌ョ湅鏈夊叧'{{ tag }}'鐨勯棶棰" rel="tag">{{ tag }}</a>
+ <!--todo - move trans below to blocktrans -->
+ <a href="{% url forum.views.tag tag|urlencode %}" title="{% trans "see questions tagged" %} '{{ tag }}' {% trans "using tags" %}" rel="tag">{{ tag }}</a>
{% endfor %}
</div>
<div class="started">
@@ -57,4 +62,5 @@
</div>
<br clear="both"/>
{% endfor %}
-</div> \ No newline at end of file
+</div>
+<!-- end users_questions.html -->
diff --git a/urls.py b/urls.py
index a219fd44..89b5127c 100644
--- a/urls.py
+++ b/urls.py
@@ -60,5 +60,4 @@ urlpatterns = patterns('',
url(r'^books/ask/(?P<short_name>[^/]+)/$', app.ask_book, name='ask_book'),
url(r'^books/(?P<short_name>[^/]+)/$', app.book, name='book'),
url(r'^search/$', app.search, name='search'),
- (r'^i18n/', include('django.conf.urls.i18n')),
)