增加多语言支持

liangliangyy 2 years ago
parent 442a03ffdc
commit 0221ee317a

@ -1,6 +1,5 @@
from django import forms
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.forms import UserChangeForm
from django.contrib.auth.forms import UsernameField
from django.utils.translation import gettext_lazy as _
@ -36,16 +35,6 @@ class BlogUserCreationForm(forms.ModelForm):
class BlogUserChangeForm(UserChangeForm):
password = ReadOnlyPasswordHashField(
label=_("Password"),
help_text=_(
"Raw passwords are not stored, so there is no way to see this "
"user's password, but you can change the password using "
"<a href=\"{}\">this form</a>."
),
)
email = forms.EmailField(label="Email", widget=forms.EmailInput)
class Meta:
model = BlogUser
fields = '__all__'

@ -2,8 +2,8 @@ import typing
from datetime import timedelta
from django.core.cache import cache
from django.utils.translation import gettext_lazy as _
from django.utils.translation import gettext
from django.utils.translation import gettext_lazy as _
from djangoblog.utils import send_email
@ -18,7 +18,8 @@ def send_verify_email(to_mail: str, code: str, subject: str = _("Verify Email"))
code: 验证码
"""
html_content = _(
f"You are resetting the password, the verification code is{code}, valid within 5 minutes, please keep it properly")
"You are resetting the password, the verification code is%(code)s, valid within 5 minutes, please keep it "
"properly") % {'code': code}
send_email([to_mail], subject, html_content)

@ -349,7 +349,7 @@ class BlogSettings(models.Model):
'评论是否需要审核', default=False, null=False)
class Meta:
verbose_name = '网站配置'
verbose_name = _('Website configuration')
verbose_name_plural = verbose_name
def __str__(self):
@ -357,7 +357,7 @@ class BlogSettings(models.Model):
def clean(self):
if BlogSettings.objects.exclude(id=self.id).count():
raise ValidationError(_('只能有一个配置'))
raise ValidationError(_('There can only be one configuration'))
def save(self, *args, **kwargs):
super().save(*args, **kwargs)

@ -55,4 +55,8 @@ urlpatterns = [
r'upload',
views.fileupload,
name='upload'),
path(
r'clean',
views.clean_cache_view,
name='clean'),
]

@ -94,11 +94,6 @@ class IndexView(ArticleListView):
# 友情链接类型
link_type = LinkShowType.I
def dispatch(self, request, *args, **kwargs):
from django.utils.translation import get_language
print(get_language())
return super(IndexView, self).dispatch(request, *args, **kwargs)
def get_queryset_data(self):
article_list = Article.objects.filter(type='a', status='p')
return article_list
@ -373,3 +368,8 @@ def permission_denied_view(
request, template_name, {
'message': _('Sorry, you do not have permission to access this page?'),
'statuscode': '403'}, status=403)
def clean_cache_view(request):
cache.clear()
return HttpResponse('ok')

@ -12,26 +12,26 @@ def send_comment_email(comment):
site = get_current_site().domain
subject = _('Thanks for your comment')
article_url = f"https://{site}{comment.article.get_absolute_url()}"
html_content = _(f"""
<p>Thank you very much for your comments on this site</p>
You can visit
<a href="{article_url}" rel="bookmark">{comment.article.title}</a>
html_content = _("""<p>Thank you very much for your comments on this site</p>
You can visit <a href="%(article_url)s" rel="bookmark">%(article_title)s</a>
to review your comments,
Thank you again!
<br />
If the link above cannot be opened, please copy this link to your browser.
{article_url}
""")
%(article_url)s""") % {'article_url': article_url, 'article_title': comment.article.title}
tomail = comment.author.email
send_email([tomail], subject, html_content)
try:
if comment.parent_comment:
html_content = _(f"""
Your comment on <a href="{article_url}" rel="bookmark">{comment.article.title}</a><br/> {comment.parent_comment.body} <br/> has received a reply. go check it out
html_content = _("""Your comment on <a href="%(article_url)s" rel="bookmark">%(article_title)s</a><br/> has
received a reply. <br/> %(comment_body)s
<br/>
go check it out!
<br/>
If the link above cannot be opened, please copy this link to your browser.
{article_url}
""")
%(article_url)s
""") % {'article_url': article_url, 'article_title': comment.article.title,
'comment_body': comment.parent_comment.body}
tomail = comment.parent_comment.author.email
send_email([tomail], subject, html_content)
except Exception as e:

@ -1,45 +1,14 @@
from django.contrib import admin
from django.contrib.admin.models import LogEntry, ADDITION, CHANGE, DELETION
from django.contrib.admin.models import DELETION
from django.contrib.contenttypes.models import ContentType
from django.urls import reverse, NoReverseMatch
from django.utils.encoding import force_str
from django.utils.html import escape
from django.utils.safestring import mark_safe
from django.utils.translation import pgettext_lazy, gettext_lazy as _
action_names = {
ADDITION: pgettext_lazy('logentry_admin:action_type', 'Addition'),
DELETION: pgettext_lazy('logentry_admin:action_type', 'Deletion'),
CHANGE: pgettext_lazy('logentry_admin:action_type', 'Change'),
}
from django.utils.translation import gettext_lazy as _
class LogEntryAdmin(admin.ModelAdmin):
date_hierarchy = 'action_time'
readonly_fields = ([f.name for f in LogEntry._meta.fields] +
['object_link', 'action_description', 'user_link',
'get_change_message'])
fieldsets = (
(_('Metadata'), {
'fields': (
'action_time',
'user_link',
'action_description',
'object_link',
)
}),
(_('Details'), {
'fields': (
'get_change_message',
'content_type',
'object_id',
'object_repr',
)
}),
)
list_filter = [
'content_type'
]
@ -58,7 +27,6 @@ class LogEntryAdmin(admin.ModelAdmin):
'user_link',
'content_type',
'object_link',
'action_description',
'get_change_message',
]
@ -67,9 +35,9 @@ class LogEntryAdmin(admin.ModelAdmin):
def has_change_permission(self, request, obj=None):
return (
request.user.is_superuser or
request.user.has_perm('admin.change_logentry')
) and request.method != 'POST'
request.user.is_superuser or
request.user.has_perm('admin.change_logentry')
) and request.method != 'POST'
def has_delete_permission(self, request, obj=None):
return False
@ -121,13 +89,3 @@ class LogEntryAdmin(admin.ModelAdmin):
if 'delete_selected' in actions:
del actions['delete_selected']
return actions
def action_description(self, obj):
return action_names[obj.action_flag]
action_description.short_description = _('action')
def get_change_message(self, obj):
return obj.get_change_message()
get_change_message.short_description = _('change message')

@ -192,13 +192,13 @@ PAGINATE_BY = 10
# http cache timeout
CACHE_CONTROL_MAX_AGE = 2592000
# cache setting
# CACHES = {
# 'default': {
# 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
# 'TIMEOUT': 10800,
# 'LOCATION': 'unique-snowflake',
# }
# }
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'TIMEOUT': 10800,
'LOCATION': 'unique-snowflake',
}
}
# 使用redis作为缓存
if os.environ.get("DJANGO_REDIS_URL"):
CACHES = {

@ -58,7 +58,7 @@ urlpatterns += i18n_patterns(
name='search'),
re_path(r'', include('servermanager.urls', namespace='servermanager')),
re_path(r'', include('owntracks.urls', namespace='owntracks'))
, prefix_default_language=True) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
, prefix_default_language=False) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL,
document_root=settings.MEDIA_ROOT)

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-07 23:54+0800\n"
"POT-Creation-Date: 2023-09-13 16:02+0800\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"
@ -18,45 +18,29 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: .\accounts\admin.py:13
#: .\accounts\admin.py:12
msgid "password"
msgstr "password"
#: .\accounts\admin.py:14
#: .\accounts\admin.py:13
msgid "Enter password again"
msgstr "Enter password again"
#: .\accounts\admin.py:25 .\accounts\forms.py:89
#: .\accounts\admin.py:24 .\accounts\forms.py:89
msgid "passwords do not match"
msgstr "passwords do not match"
#: .\accounts\admin.py:40
msgid "Password"
msgstr "Password"
#: .\accounts\admin.py:42
msgid ""
"Raw passwords are not stored, so there is no way to see this user's "
"password, but you can change the password using <a href=\"{}\">this form</a>."
msgstr ""
"Raw passwords are not stored, so there is no way to see this user's "
"password, but you can change the password using <a href=\"{}\">this form</a>."
#: .\accounts\forms.py:36
msgid "email already exists"
msgstr "email already exists"
#: .\accounts\forms.py:46 .\accounts\forms.py:50
#, fuzzy
#| msgid "forget the password"
msgid "New password"
msgstr "New password"
#: .\accounts\forms.py:60
#, fuzzy
#| msgid "forget the password"
msgid "Confirm password"
msgstr "Confirm the password"
msgstr "Confirm password"
#: .\accounts\forms.py:70 .\accounts\forms.py:116
msgid "Email"
@ -70,7 +54,7 @@ msgstr "Code"
msgid "email does not exist"
msgstr "email does not exist"
#: .\accounts\models.py:12
#: .\accounts\models.py:12 .\oauth\models.py:17
msgid "nick name"
msgstr "nick name"
@ -89,31 +73,29 @@ msgstr "last modify time"
msgid "create source"
msgstr "create source"
#: .\accounts\models.py:33 .\djangoblog\logentryadmin.py:113
#: .\accounts\models.py:33 .\djangoblog\logentryadmin.py:81
msgid "user"
msgstr "user"
#: .\accounts\tests.py:216 .\accounts\utils.py:38
#, fuzzy
#| msgid "get verification code"
#: .\accounts\tests.py:216 .\accounts\utils.py:39
msgid "Verification code error"
msgstr "get verification code"
msgstr "Verification code error"
#: .\accounts\utils.py:13
msgid "Verify Email"
msgstr "Verify Email"
#: .\accounts\utils.py:21
#, python-brace-format
#, python-format
msgid ""
"You are resetting the password, the verification code is{code}, valid "
"You are resetting the password, the verification code is%(code)s, valid "
"within 5 minutes, please keep it properly"
msgstr ""
"You are resetting the password, the verification code is{code}, valid "
"You are resetting the password, the verification code is%(code)s, valid "
"within 5 minutes, please keep it properly"
#: .\blog\admin.py:13 .\blog\models.py:92 .\comments\models.py:17
#: .\oauth\models.py:12 .\templates\blog\tags\article_meta_info.html:33
#: .\oauth\models.py:12
msgid "author"
msgstr "author"
@ -134,12 +116,11 @@ msgid "Open article comments"
msgstr "Open article comments"
#: .\blog\admin.py:89 .\blog\models.py:101 .\blog\models.py:183
#: .\templates\blog\tags\article_meta_info.html:17
#: .\templates\blog\tags\sidebar.html:40
msgid "category"
msgstr "category"
#: .\blog\models.py:20 .\blog\models.py:179
#: .\blog\models.py:20 .\blog\models.py:179 .\templates\share_layout\nav.html:8
msgid "index"
msgstr "index"
@ -224,7 +205,6 @@ msgid "show toc"
msgstr "show toc"
#: .\blog\models.py:105 .\blog\models.py:249
#: .\templates\blog\tags\article_meta_info.html:22
msgid "tag"
msgstr "tag"
@ -278,253 +258,270 @@ msgstr "site name"
#: .\blog\models.py:305
msgid "site description"
msgstr ""
msgstr "site description"
#: .\blog\models.py:311
msgid "site seo description"
msgstr ""
msgstr "site seo description"
#: .\blog\models.py:313
msgid "site keywords"
msgstr ""
msgstr "site keywords"
#: .\blog\models.py:318
msgid "article sub length"
msgstr ""
msgstr "article sub length"
#: .\blog\models.py:319
msgid "sidebar article count"
msgstr ""
msgstr "sidebar article count"
#: .\blog\models.py:320
msgid "sidebar comment count"
msgstr ""
msgstr "sidebar comment count"
#: .\blog\models.py:321
msgid "article comment count"
msgstr ""
msgstr "article comment count"
#: .\blog\models.py:322
msgid "show adsense"
msgstr ""
msgstr "show adsense"
#: .\blog\models.py:324
msgid "adsense code"
msgstr ""
msgstr "adsense code"
#: .\blog\models.py:325
msgid "open site comment"
msgstr ""
msgstr "open site comment"
#: .\blog\models.py:352
msgid "Website configuration"
msgstr "Website configuration"
#: .\blog\models.py:360
msgid "只能有一个配置"
msgstr ""
msgid "There can only be one configuration"
msgstr "There can only be one configuration"
#: .\blog\views.py:349
#: .\blog\views.py:348
msgid ""
"Sorry, the page you requested is not found, please click the home page to "
"see other?"
msgstr ""
"Sorry, the page you requested is not found, please click the home page to "
"see other?"
#: .\blog\views.py:357
#: .\blog\views.py:356
msgid "Sorry, the server is busy, please click the home page to see other?"
msgstr ""
msgstr "Sorry, the server is busy, please click the home page to see other?"
#: .\blog\views.py:370
#: .\blog\views.py:369
msgid "Sorry, you do not have permission to access this page?"
msgstr ""
msgstr "Sorry, you do not have permission to access this page?"
#: .\comments\admin.py:15
msgid "Disable comments"
msgstr ""
msgstr "Disable comments"
#: .\comments\admin.py:16
msgid "Enable comments"
msgstr ""
msgstr "Enable comments"
#: .\comments\admin.py:46
msgid "User"
msgstr ""
msgstr "User"
#: .\comments\models.py:25
msgid "parent comment"
msgstr ""
msgstr "parent comment"
#: .\comments\models.py:29
msgid "enable"
msgstr ""
msgstr "enable"
#: .\comments\models.py:34 .\templates\blog\tags\article_info.html:30
msgid "comment"
msgstr ""
msgstr "comment"
#: .\comments\utils.py:13
msgid "Thanks for your comment"
msgstr ""
msgstr "Thanks for your comment"
#: .\comments\utils.py:15
#, python-brace-format
#, python-format
msgid ""
"\n"
" <p>Thank you very much for your comments on this site</"
"p>\n"
" You can visit\n"
" <a href=\"{article_url}\" rel=\"bookmark\">{comment."
"article.title}</a>\n"
"<p>Thank you very much for your comments on this site</p>\n"
" You can visit <a href=\"%(article_url)s\" rel=\"bookmark"
"\">%(article_title)s</a>\n"
" to review your comments,\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this "
"link to your browser.\n"
" {article_url}\n"
" "
" %(article_url)s"
msgstr ""
"<p>Thank you very much for your comments on this site</p>\n"
" You can visit <a href=\"%(article_url)s\" rel=\"bookmark"
"\">%(article_title)s</a>\n"
" to review your comments,\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this "
"link to your browser.\n"
" %(article_url)s"
#: .\comments\utils.py:29
#, python-brace-format
#: .\comments\utils.py:26
#, python-format
msgid ""
"\n"
" Your comment on <a href=\"{article_url}\" rel=\"bookmark"
"\">{comment.article.title}</a><br/> {comment.parent_comment.body} <br/> has "
"received a reply. go check it out\n"
"Your comment on <a href=\"%(article_url)s\" rel=\"bookmark\">"
"%(article_title)s</a><br/> has \n"
" received a reply. <br/> %(comment_body)s\n"
" <br/> \n"
" go check it out!\n"
" <br/>\n"
" If the link above cannot be opened, please copy this "
"link to your browser.\n"
" {article_url}\n"
" %(article_url)s\n"
" "
msgstr ""
"Your comment on <a href=\"%(article_url)s\" rel=\"bookmark\">"
"%(article_title)s</a><br/> has \n"
" received a reply. <br/> %(comment_body)s\n"
" <br/> \n"
" go check it out!\n"
" <br/>\n"
" If the link above cannot be opened, please copy this "
"link to your browser.\n"
" %(article_url)s\n"
" "
#: .\djangoblog\logentryadmin.py:11
msgctxt "logentry_admin:action_type"
msgid "Addition"
msgstr ""
#: .\djangoblog\logentryadmin.py:12
msgctxt "logentry_admin:action_type"
msgid "Deletion"
msgstr ""
#: .\djangoblog\logentryadmin.py:13
msgctxt "logentry_admin:action_type"
msgid "Change"
msgstr ""
#: .\djangoblog\logentryadmin.py:25
msgid "Metadata"
msgstr ""
#: .\djangoblog\logentryadmin.py:33
msgid "Details"
msgstr ""
#: .\djangoblog\logentryadmin.py:95
#: .\djangoblog\logentryadmin.py:63
msgid "object"
msgstr ""
#: .\djangoblog\logentryadmin.py:128
msgid "action"
msgstr ""
#: .\djangoblog\logentryadmin.py:133
msgid "change message"
msgstr ""
msgstr "object"
#: .\djangoblog\settings.py:140
msgid "English"
msgstr ""
msgstr "English"
#: .\djangoblog\settings.py:141
msgid "Simplified Chinese"
msgstr ""
msgstr "Simplified Chinese"
#: .\djangoblog\settings.py:142
msgid "Traditional Chinese"
msgstr ""
#: .\oauth\models.py:17
msgid "nickname"
msgstr ""
msgstr "Traditional Chinese"
#: .\oauth\models.py:30
msgid "oauth user"
msgstr ""
msgstr "oauth user"
#: .\oauth\models.py:37
msgid "weibo"
msgstr ""
msgstr "weibo"
#: .\oauth\models.py:38
msgid "google"
msgstr ""
msgstr "google"
#: .\oauth\models.py:48
msgid "callback url"
msgstr ""
msgstr "callback url"
#: .\oauth\models.py:59
msgid "already exists"
msgstr ""
msgstr "already exists"
#: .\oauth\views.py:154
#, python-format
msgid ""
"\n"
" <p>Congratulations, you have successfully bound your email address. You "
"can use {oauthuser.type} to directly log in to this website without a "
"password. You are welcome to continue to follow this site, the address is</"
"p>\n"
"\n"
" <a href=\"{'http://' + site}\" rel=\"bookmark\">{'http://' "
"+ site}</a>\n"
"\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this link "
"to your browser.\n"
" {site}\n"
"can use\n"
" %(oauthuser_type)s to directly log in to this website without a "
"password.</p>\n"
" You are welcome to continue to follow this site, the address is\n"
" <a href=\"%(site)s\" rel=\"bookmark\">%(site)s</a>\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this link to your "
"browser.\n"
" %(site)s\n"
" "
msgstr ""
"\n"
" <p>Congratulations, you have successfully bound your email address. You "
"can use\n"
" %(oauthuser_type)s to directly log in to this website without a "
"password.</p>\n"
" You are welcome to continue to follow this site, the address is\n"
" <a href=\"%(site)s\" rel=\"bookmark\">%(site)s</a>\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this link to your "
"browser.\n"
" %(site)s\n"
" "
#: .\oauth\views.py:165
msgid "Congratulations on your successful binding!"
msgstr ""
msgstr "Congratulations on your successful binding!"
#: .\oauth\views.py:217
#, python-brace-format
#, python-format
msgid ""
"\n"
" <p>Please click the link below to bind your email</p>\n"
"\n"
" <a href=\"{url}\" rel=\"bookmark\">{url}</a>\n"
" <a href=\"%(url)s\" rel=\"bookmark\">%(url)s</a>\n"
"\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this link "
"to your browser.\n"
" {url}\n"
" <br />\n"
" %(url)s\n"
" "
msgstr ""
"\n"
" <p>Please click the link below to bind your email</p>\n"
"\n"
" <a href=\"%(url)s\" rel=\"bookmark\">%(url)s</a>\n"
"\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this link "
"to your browser.\n"
" <br />\n"
" %(url)s\n"
" "
#: .\oauth\views.py:227 .\oauth\views.py:239
#: .\oauth\views.py:228 .\oauth\views.py:240
msgid "Bind your email"
msgstr ""
msgstr "Bind your email"
#: .\oauth\views.py:241
#: .\oauth\views.py:242
msgid ""
"Congratulations, the binding is just one step away. Please log in to your "
"email to check the email to complete the binding. Thank you."
msgstr ""
"Congratulations, the binding is just one step away. Please log in to your "
"email to check the email to complete the binding. Thank you."
#: .\oauth\views.py:243
#: .\oauth\views.py:245
msgid "Binding successful"
msgstr ""
msgstr "Binding successful"
#: .\oauth\views.py:245
#, python-brace-format
#: .\oauth\views.py:247
#, python-format
msgid ""
"Congratulations, you have successfully bound your email address. You can use "
"{oauthuser.type} to directly log in to this website without a password. You "
"are welcome to continue to follow this site."
"%(oauthuser_type)s to directly log in to this website without a password. "
"You are welcome to continue to follow this site."
msgstr ""
"Congratulations, you have successfully bound your email address. You can use "
"%(oauthuser_type)s to directly log in to this website without a password. "
"You are welcome to continue to follow this site."
#: .\templates\account\forget_password.html:7
msgid "forget the password"
@ -538,46 +535,62 @@ msgstr "get verification code"
msgid "submit"
msgstr "submit"
#: .\templates\account\login.html:36
msgid "Create Account"
msgstr "Create Account"
#: .\templates\account\login.html:42
#, fuzzy
#| msgid "forget the password"
msgid "Forget Password"
msgstr "forget the password"
#: .\templates\account\result.html:18 .\templates\blog\tags\sidebar.html:126
msgid "login"
msgstr ""
msgstr "login"
#: .\templates\account\result.html:22
msgid "back to the homepage"
msgstr ""
msgstr "back to the homepage"
#: .\templates\blog\article_archives.html:7
#: .\templates\blog\article_archives.html:24
msgid "article archive"
msgstr ""
msgstr "article archive"
#: .\templates\blog\article_archives.html:32
msgid "year"
msgstr ""
msgstr "year"
#: .\templates\blog\article_archives.html:36
msgid "month"
msgstr ""
msgstr "month"
#: .\templates\blog\tags\article_info.html:12
msgid "pin to top"
msgstr ""
msgstr "pin to top"
#: .\templates\blog\tags\article_info.html:28
msgid "comments"
msgstr ""
msgstr "comments"
#: .\templates\blog\tags\article_info.html:58
msgid "toc"
msgstr ""
msgstr "toc"
#: .\templates\blog\tags\article_meta_info.html:7
#, fuzzy
#| msgid "Published"
msgid "Published on"
msgstr "Published"
#: .\templates\blog\tags\article_meta_info.html:6
msgid "posted in"
msgstr "posted in"
#: .\templates\blog\tags\article_meta_info.html:14
msgid "and tagged"
msgstr "and tagged"
#: .\templates\blog\tags\article_meta_info.html:36
#: .\templates\blog\tags\article_meta_info.html:25
msgid "by "
msgstr "by"
#: .\templates\blog\tags\article_meta_info.html:29
#, python-format
msgid ""
"\n"
@ -589,21 +602,26 @@ msgstr ""
" title=\"View all articles published by "
"%(article.author.username)s\"\n"
" "
#: .\templates\blog\tags\article_meta_info.html:50
#: .\templates\blog\tags\article_meta_info.html:44
msgid "on"
msgstr "on"
#: .\templates\blog\tags\article_meta_info.html:54
msgid "edit"
msgstr "edit"
#: .\templates\blog\tags\article_pagination.html:4
msgid "article navigation"
msgstr ""
msgstr "article navigation"
#: .\templates\blog\tags\article_pagination.html:9
msgid "earlier articles"
msgstr ""
msgstr "earlier articles"
#: .\templates\blog\tags\article_pagination.html:12
msgid "newer articles"
msgstr ""
msgstr "newer articles"
#: .\templates\blog\tags\article_tag_list.html:5
msgid "tags"
@ -611,57 +629,57 @@ msgstr "tags"
#: .\templates\blog\tags\sidebar.html:7
msgid "search"
msgstr ""
msgstr "search"
#: .\templates\blog\tags\sidebar.html:50
msgid "recent comments"
msgstr ""
msgstr "recent comments"
#: .\templates\blog\tags\sidebar.html:57
msgid "published in"
msgstr ""
msgid "published on"
msgstr "published on"
#: .\templates\blog\tags\sidebar.html:65
msgid "recent articles"
msgstr ""
msgstr "recent articles"
#: .\templates\blog\tags\sidebar.html:77
msgid "bookmark"
msgstr ""
msgstr "bookmark"
#: .\templates\blog\tags\sidebar.html:96
msgid "Tag Cloud"
msgstr ""
msgstr "Tag Cloud"
#: .\templates\blog\tags\sidebar.html:107
msgid "Welcome to star or fork the source code of this site"
msgstr ""
msgstr "Welcome to star or fork the source code of this site"
#: .\templates\blog\tags\sidebar.html:118
msgid "Function"
msgstr ""
msgstr "Function"
#: .\templates\blog\tags\sidebar.html:120
msgid "management site"
msgstr ""
msgstr "management site"
#: .\templates\blog\tags\sidebar.html:122
msgid "logout"
msgstr ""
msgstr "logout"
#: .\templates\blog\tags\sidebar.html:129
msgid "Track record"
msgstr ""
msgstr "Track record"
#: .\templates\blog\tags\sidebar.html:135
msgid "Click me to return to the top"
msgstr ""
#~ msgid "This entry was published on"
#~ msgstr "This entry was published on"
msgstr "Click me to return to the top"
#~ msgid "belongs"
#~ msgstr "belongs"
#: .\templates\oauth\oauth_applications.html:5
#| msgid "login"
msgid "quick login"
msgstr "quick login"
#~ msgid "been"
#~ msgstr "been"
#: .\templates\share_layout\nav.html:26
msgid "Article archive"
msgstr "Article archive"

@ -3,12 +3,11 @@
# 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: 2023-09-07 23:54+0800\n"
"POT-Creation-Date: 2023-09-13 16:02+0800\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"
@ -18,43 +17,27 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: .\accounts\admin.py:13
#: .\accounts\admin.py:12
msgid "password"
msgstr "密码"
#: .\accounts\admin.py:14
#: .\accounts\admin.py:13
msgid "Enter password again"
msgstr "再次输入密码"
#: .\accounts\admin.py:25 .\accounts\forms.py:89
#: .\accounts\admin.py:24 .\accounts\forms.py:89
msgid "passwords do not match"
msgstr "密码不匹配"
#: .\accounts\admin.py:40
msgid "Password"
msgstr "密码"
#: .\accounts\admin.py:42
msgid ""
"Raw passwords are not stored, so there is no way to see this user's "
"password, but you can change the password using <a href=\"{}\">this form</a>."
msgstr ""
"未存储原始密码,因此无法看到此用户的密码,但您可以使用”更改密码<a href="
"\"{}\">此表单</a>。"
#: .\accounts\forms.py:36
msgid "email already exists"
msgstr "邮箱已存在"
#: .\accounts\forms.py:46 .\accounts\forms.py:50
#, fuzzy
#| msgid "forget the password"
msgid "New password"
msgstr "新密码"
#: .\accounts\forms.py:60
#, fuzzy
#| msgid "forget the password"
msgid "Confirm password"
msgstr "确认密码"
@ -70,7 +53,7 @@ msgstr "验证码"
msgid "email does not exist"
msgstr "邮箱不存在"
#: .\accounts\models.py:12
#: .\accounts\models.py:12 .\oauth\models.py:17
msgid "nick name"
msgstr "昵称"
@ -89,13 +72,11 @@ msgstr "最后修改时间"
msgid "create source"
msgstr "来源"
#: .\accounts\models.py:33 .\djangoblog\logentryadmin.py:113
#: .\accounts\models.py:33 .\djangoblog\logentryadmin.py:81
msgid "user"
msgstr "用户"
#: .\accounts\tests.py:216 .\accounts\utils.py:38
#, fuzzy
#| msgid "get verification code"
#: .\accounts\tests.py:216 .\accounts\utils.py:39
msgid "Verification code error"
msgstr "验证码错误"
@ -104,14 +85,14 @@ msgid "Verify Email"
msgstr "验证邮箱"
#: .\accounts\utils.py:21
#, python-brace-format
#, python-format
msgid ""
"You are resetting the password, the verification code is{code}, valid "
"You are resetting the password, the verification code is%(code)s, valid "
"within 5 minutes, please keep it properly"
msgstr "您正在重置密码,验证码为:{code}5分钟内有效 请妥善保管"
msgstr "您正在重置密码,验证码为:%(code)s5分钟内有效 请妥善保管."
#: .\blog\admin.py:13 .\blog\models.py:92 .\comments\models.py:17
#: .\oauth\models.py:12 .\templates\blog\tags\article_meta_info.html:33
#: .\oauth\models.py:12
msgid "author"
msgstr "作者"
@ -132,12 +113,11 @@ msgid "Open article comments"
msgstr "打开文章评论"
#: .\blog\admin.py:89 .\blog\models.py:101 .\blog\models.py:183
#: .\templates\blog\tags\article_meta_info.html:17
#: .\templates\blog\tags\sidebar.html:40
msgid "category"
msgstr "分类目录"
#: .\blog\models.py:20 .\blog\models.py:179
#: .\blog\models.py:20 .\blog\models.py:179 .\templates\share_layout\nav.html:8
msgid "index"
msgstr "首页"
@ -222,7 +202,6 @@ msgid "show toc"
msgstr "显示目录"
#: .\blog\models.py:105 .\blog\models.py:249
#: .\templates\blog\tags\article_meta_info.html:22
msgid "tag"
msgstr "标签"
@ -314,215 +293,219 @@ msgstr "广告内容"
msgid "open site comment"
msgstr "公共头部"
#: .\blog\models.py:352
msgid "Website configuration"
msgstr "网站配置"
#: .\blog\models.py:360
msgid "只能有一个配置"
msgstr ""
msgid "There can only be one configuration"
msgstr "只能有一个配置"
#: .\blog\views.py:349
#: .\blog\views.py:348
msgid ""
"Sorry, the page you requested is not found, please click the home page to "
"see other?"
msgstr ""
msgstr "抱歉,你所访问的页面找不到,请点击首页看看别的?"
#: .\blog\views.py:357
#: .\blog\views.py:356
msgid "Sorry, the server is busy, please click the home page to see other?"
msgstr ""
msgstr "抱歉,服务出错了,请点击首页看看别的?"
#: .\blog\views.py:370
#: .\blog\views.py:369
msgid "Sorry, you do not have permission to access this page?"
msgstr ""
msgstr "抱歉,你没用权限访问此页面。"
#: .\comments\admin.py:15
msgid "Disable comments"
msgstr ""
msgstr "禁用评论"
#: .\comments\admin.py:16
msgid "Enable comments"
msgstr ""
msgstr "启用评论"
#: .\comments\admin.py:46
msgid "User"
msgstr ""
msgstr "用户"
#: .\comments\models.py:25
msgid "parent comment"
msgstr ""
msgstr "上级评论"
#: .\comments\models.py:29
msgid "enable"
msgstr ""
msgstr "启用"
#: .\comments\models.py:34 .\templates\blog\tags\article_info.html:30
msgid "comment"
msgstr ""
msgstr "评论"
#: .\comments\utils.py:13
msgid "Thanks for your comment"
msgstr ""
msgstr "感谢你的评论"
#: .\comments\utils.py:15
#, python-brace-format
#, python-format
msgid ""
"\n"
" <p>Thank you very much for your comments on this site</"
"p>\n"
" You can visit\n"
" <a href=\"{article_url}\" rel=\"bookmark\">{comment."
"article.title}</a>\n"
"<p>Thank you very much for your comments on this site</p>\n"
" You can visit <a href=\"%(article_url)s\" rel=\"bookmark"
"\">%(article_title)s</a>\n"
" to review your comments,\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this "
"link to your browser.\n"
" {article_url}\n"
" "
" %(article_url)s"
msgstr ""
"<p>非常感谢您对此网站的评论</p>\n"
" 您可以访问<a href=\"%(article_url)s\" rel=\"书签\">%(article_title)s</a>\n"
"查看您的评论,\n"
"再次感谢您!\n"
" <br />\n"
" 如果上面的链接打不开,请复制此链接链接到您的浏览器。\n"
"%(article_url)s"
#: .\comments\utils.py:29
#, python-brace-format
#: .\comments\utils.py:26
#, python-format
msgid ""
"\n"
" Your comment on <a href=\"{article_url}\" rel=\"bookmark"
"\">{comment.article.title}</a><br/> {comment.parent_comment.body} <br/> has "
"received a reply. go check it out\n"
"Your comment on <a href=\"%(article_url)s\" rel=\"bookmark\">"
"%(article_title)s</a><br/> has \n"
" received a reply. <br/> %(comment_body)s\n"
" <br/> \n"
" go check it out!\n"
" <br/>\n"
" If the link above cannot be opened, please copy this "
"link to your browser.\n"
" {article_url}\n"
" %(article_url)s\n"
" "
msgstr ""
#: .\djangoblog\logentryadmin.py:11
msgctxt "logentry_admin:action_type"
msgid "Addition"
msgstr ""
#: .\djangoblog\logentryadmin.py:12
msgctxt "logentry_admin:action_type"
msgid "Deletion"
msgstr ""
#: .\djangoblog\logentryadmin.py:13
msgctxt "logentry_admin:action_type"
msgid "Change"
msgstr ""
#: .\djangoblog\logentryadmin.py:25
msgid "Metadata"
msgstr ""
#: .\djangoblog\logentryadmin.py:33
msgid "Details"
msgstr ""
#: .\djangoblog\logentryadmin.py:95
"您对 <a href=\"%(article_url)s\" rel=\"bookmark\">%(article_title)s</a><br/> "
"的评论有\n"
" 收到回复。<br/> %(comment_body)s\n"
"<br/>\n"
"快去看看吧!\n"
"<br/>\n"
" 如果上面的链接打不开,请复制此链接链接到您的浏览器。\n"
" %(article_url)s\n"
" "
#: .\djangoblog\logentryadmin.py:63
msgid "object"
msgstr ""
#: .\djangoblog\logentryadmin.py:128
msgid "action"
msgstr ""
#: .\djangoblog\logentryadmin.py:133
msgid "change message"
msgstr ""
msgstr "对象"
#: .\djangoblog\settings.py:140
msgid "English"
msgstr ""
msgstr "英文"
#: .\djangoblog\settings.py:141
msgid "Simplified Chinese"
msgstr ""
msgstr "简体中文"
#: .\djangoblog\settings.py:142
msgid "Traditional Chinese"
msgstr ""
#: .\oauth\models.py:17
msgid "nickname"
msgstr ""
msgstr "繁体中文"
#: .\oauth\models.py:30
msgid "oauth user"
msgstr ""
msgstr "第三方用户"
#: .\oauth\models.py:37
msgid "weibo"
msgstr ""
msgstr "微博"
#: .\oauth\models.py:38
msgid "google"
msgstr ""
msgstr "谷歌"
#: .\oauth\models.py:48
msgid "callback url"
msgstr ""
msgstr "回调地址"
#: .\oauth\models.py:59
msgid "already exists"
msgstr ""
msgstr "已经存在"
#: .\oauth\views.py:154
#, python-format
msgid ""
"\n"
" <p>Congratulations, you have successfully bound your email address. You "
"can use {oauthuser.type} to directly log in to this website without a "
"password. You are welcome to continue to follow this site, the address is</"
"p>\n"
"\n"
" <a href=\"{'http://' + site}\" rel=\"bookmark\">{'http://' "
"+ site}</a>\n"
"\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this link "
"to your browser.\n"
" {site}\n"
"can use\n"
" %(oauthuser_type)s to directly log in to this website without a "
"password.</p>\n"
" You are welcome to continue to follow this site, the address is\n"
" <a href=\"%(site)s\" rel=\"bookmark\">%(site)s</a>\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this link to your "
"browser.\n"
" %(site)s\n"
" "
msgstr ""
"\n"
" <p>恭喜你已经绑定成功 你可以使用\n"
" %(oauthuser_type)s 来免密登录本站 </p>\n"
" 欢迎继续关注本站, 地址是\n"
" <a href=\"%(site)s\" rel=\"bookmark\">%(site)s</a>\n"
" 再次感谢你\n"
" <br />\n"
" 如果上面链接无法打开,请复制此链接到你的浏览器 \n"
" %(site)s\n"
" "
#: .\oauth\views.py:165
msgid "Congratulations on your successful binding!"
msgstr ""
msgstr "恭喜你绑定成功"
#: .\oauth\views.py:217
#, python-brace-format
#, python-format
msgid ""
"\n"
" <p>Please click the link below to bind your email</p>\n"
"\n"
" <a href=\"{url}\" rel=\"bookmark\">{url}</a>\n"
" <a href=\"%(url)s\" rel=\"bookmark\">%(url)s</a>\n"
"\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this link "
"to your browser.\n"
" {url}\n"
" <br />\n"
" %(url)s\n"
" "
msgstr ""
"\n"
" <p>请点击下面的链接绑定您的邮箱</p>\n"
"\n"
" <a href=\"%(url)s\" rel=\"bookmark\">%(url)s</a>\n"
"\n"
"再次感谢您!\n"
" <br />\n"
"如果上面的链接打不开,请复制此链接到您的浏览器。\n"
"%(url)s\n"
" "
#: .\oauth\views.py:227 .\oauth\views.py:239
#: .\oauth\views.py:228 .\oauth\views.py:240
msgid "Bind your email"
msgstr ""
msgstr "绑定邮箱"
#: .\oauth\views.py:241
#: .\oauth\views.py:242
msgid ""
"Congratulations, the binding is just one step away. Please log in to your "
"email to check the email to complete the binding. Thank you."
msgstr ""
msgstr "恭喜您,还差一步就绑定成功了,请登录您的邮箱查看邮件完成绑定,谢谢。"
#: .\oauth\views.py:243
#: .\oauth\views.py:245
msgid "Binding successful"
msgstr ""
msgstr "绑定成功"
#: .\oauth\views.py:245
#, python-brace-format
#: .\oauth\views.py:247
#, python-format
msgid ""
"Congratulations, you have successfully bound your email address. You can use "
"{oauthuser.type} to directly log in to this website without a password. You "
"are welcome to continue to follow this site."
"%(oauthuser_type)s to directly log in to this website without a password. "
"You are welcome to continue to follow this site."
msgstr ""
"恭喜您绑定成功,您以后可以使用%(oauthuser_type)s来直接免密码登录本站啦感谢"
"您对本站对关注。"
#: .\templates\account\forget_password.html:7
msgid "forget the password"
@ -536,46 +519,61 @@ msgstr "获取验证码"
msgid "submit"
msgstr "提交"
#: .\templates\account\login.html:36
msgid "Create Account"
msgstr "创建账号"
#: .\templates\account\login.html:42
#| msgid "forget the password"
msgid "Forget Password"
msgstr "忘记密码"
#: .\templates\account\result.html:18 .\templates\blog\tags\sidebar.html:126
msgid "login"
msgstr ""
msgstr "登录"
#: .\templates\account\result.html:22
msgid "back to the homepage"
msgstr ""
msgstr "返回首页吧"
#: .\templates\blog\article_archives.html:7
#: .\templates\blog\article_archives.html:24
msgid "article archive"
msgstr ""
msgstr "文章归档"
#: .\templates\blog\article_archives.html:32
msgid "year"
msgstr ""
msgstr ""
#: .\templates\blog\article_archives.html:36
msgid "month"
msgstr ""
msgstr ""
#: .\templates\blog\tags\article_info.html:12
msgid "pin to top"
msgstr ""
msgstr "置顶"
#: .\templates\blog\tags\article_info.html:28
msgid "comments"
msgstr ""
msgstr "评论"
#: .\templates\blog\tags\article_info.html:58
msgid "toc"
msgstr ""
msgstr "目录"
#: .\templates\blog\tags\article_meta_info.html:7
#, fuzzy
#| msgid "Published"
msgid "Published on"
msgstr "发表于"
#: .\templates\blog\tags\article_meta_info.html:6
msgid "posted in"
msgstr "发布于"
#: .\templates\blog\tags\article_meta_info.html:14
msgid "and tagged"
msgstr "标签"
#: .\templates\blog\tags\article_meta_info.html:36
#: .\templates\blog\tags\article_meta_info.html:25
msgid "by "
msgstr "由"
#: .\templates\blog\tags\article_meta_info.html:29
#, python-format
msgid ""
"\n"
@ -584,24 +582,28 @@ msgid ""
" "
msgstr ""
"\n"
" title=\"查看所有由 "
"%(article.author.username)s\"发布的文章\n"
" title=\"查看所有由 %(article.author.username)s\"发布的文章\n"
" "
#: .\templates\blog\tags\article_meta_info.html:50
#: .\templates\blog\tags\article_meta_info.html:44
msgid "on"
msgstr "在"
#: .\templates\blog\tags\article_meta_info.html:54
msgid "edit"
msgstr "编辑"
#: .\templates\blog\tags\article_pagination.html:4
msgid "article navigation"
msgstr ""
msgstr "文章导航"
#: .\templates\blog\tags\article_pagination.html:9
msgid "earlier articles"
msgstr ""
msgstr "早期文章"
#: .\templates\blog\tags\article_pagination.html:12
msgid "newer articles"
msgstr ""
msgstr "较新文章"
#: .\templates\blog\tags\article_tag_list.html:5
msgid "tags"
@ -609,57 +611,57 @@ msgstr "标签"
#: .\templates\blog\tags\sidebar.html:7
msgid "search"
msgstr ""
msgstr "搜索"
#: .\templates\blog\tags\sidebar.html:50
msgid "recent comments"
msgstr ""
msgstr "近期评论"
#: .\templates\blog\tags\sidebar.html:57
msgid "published in"
msgstr ""
msgid "published on"
msgstr "发表于"
#: .\templates\blog\tags\sidebar.html:65
msgid "recent articles"
msgstr ""
msgstr "近期文章"
#: .\templates\blog\tags\sidebar.html:77
msgid "bookmark"
msgstr ""
msgstr "书签"
#: .\templates\blog\tags\sidebar.html:96
msgid "Tag Cloud"
msgstr ""
msgstr "标签云"
#: .\templates\blog\tags\sidebar.html:107
msgid "Welcome to star or fork the source code of this site"
msgstr ""
msgstr "欢迎您STAR或者FORK本站源代码"
#: .\templates\blog\tags\sidebar.html:118
msgid "Function"
msgstr ""
msgstr "功能"
#: .\templates\blog\tags\sidebar.html:120
msgid "management site"
msgstr ""
msgstr "管理站点"
#: .\templates\blog\tags\sidebar.html:122
msgid "logout"
msgstr ""
msgstr "登出"
#: .\templates\blog\tags\sidebar.html:129
msgid "Track record"
msgstr ""
msgstr "运动轨迹记录"
#: .\templates\blog\tags\sidebar.html:135
msgid "Click me to return to the top"
msgstr ""
#~ msgid "This entry was published on"
#~ msgstr "这篇文章发布在 "
msgstr "点我返回顶部"
#~ msgid "belongs"
#~ msgstr "属于"
#: .\templates\oauth\oauth_applications.html:5
#| msgid "login"
msgid "quick login"
msgstr "快捷登录"
#~ msgid "been"
#~ msgstr "贴了"
#: .\templates\share_layout\nav.html:26
msgid "Article archive"
msgstr "文章归档"

@ -3,12 +3,11 @@
# 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: 2023-09-07 23:54+0800\n"
"POT-Creation-Date: 2023-09-13 16:02+0800\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"
@ -18,554 +17,564 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: .\accounts\admin.py:13
#: .\accounts\admin.py:12
msgid "password"
msgstr ""
msgstr "密碼"
#: .\accounts\admin.py:14
#: .\accounts\admin.py:13
msgid "Enter password again"
msgstr ""
msgstr "再次輸入密碼"
#: .\accounts\admin.py:25 .\accounts\forms.py:89
#: .\accounts\admin.py:24 .\accounts\forms.py:89
msgid "passwords do not match"
msgstr ""
#: .\accounts\admin.py:40
msgid "Password"
msgstr ""
#: .\accounts\admin.py:42
msgid ""
"Raw passwords are not stored, so there is no way to see this user's "
"password, but you can change the password using <a href=\"{}\">this form</a>."
msgstr ""
msgstr "密碼不匹配"
#: .\accounts\forms.py:36
msgid "email already exists"
msgstr ""
msgstr "郵箱已存在"
#: .\accounts\forms.py:46 .\accounts\forms.py:50
msgid "New password"
msgstr ""
msgstr "新密碼"
#: .\accounts\forms.py:60
msgid "Confirm password"
msgstr ""
msgstr "確認密碼"
#: .\accounts\forms.py:70 .\accounts\forms.py:116
msgid "Email"
msgstr ""
msgstr "郵箱"
#: .\accounts\forms.py:76 .\accounts\forms.py:80
msgid "Code"
msgstr ""
msgstr "驗證碼"
#: .\accounts\forms.py:100 .\accounts\tests.py:194
msgid "email does not exist"
msgstr ""
msgstr "郵箱不存在"
#: .\accounts\models.py:12
#: .\accounts\models.py:12 .\oauth\models.py:17
msgid "nick name"
msgstr ""
msgstr "昵稱"
#: .\accounts\models.py:13 .\blog\models.py:29 .\blog\models.py:266
#: .\blog\models.py:284 .\comments\models.py:13 .\oauth\models.py:23
#: .\oauth\models.py:53
msgid "creation time"
msgstr ""
msgstr "創建時間"
#: .\accounts\models.py:14 .\comments\models.py:14 .\oauth\models.py:24
#: .\oauth\models.py:54
msgid "last modify time"
msgstr ""
msgstr "最後修改時間"
#: .\accounts\models.py:15
msgid "create source"
msgstr ""
msgstr "來源"
#: .\accounts\models.py:33 .\djangoblog\logentryadmin.py:113
#: .\accounts\models.py:33 .\djangoblog\logentryadmin.py:81
msgid "user"
msgstr ""
msgstr "用戶"
#: .\accounts\tests.py:216 .\accounts\utils.py:38
#: .\accounts\tests.py:216 .\accounts\utils.py:39
msgid "Verification code error"
msgstr ""
msgstr "驗證碼錯誤"
#: .\accounts\utils.py:13
msgid "Verify Email"
msgstr ""
msgstr "驗證郵箱"
#: .\accounts\utils.py:21
#, python-brace-format
#, python-format
msgid ""
"You are resetting the password, the verification code is{code}, valid "
"You are resetting the password, the verification code is%(code)s, valid "
"within 5 minutes, please keep it properly"
msgstr ""
msgstr "您正在重置密碼,驗證碼為:%(code)s5分鐘內有效 請妥善保管."
#: .\blog\admin.py:13 .\blog\models.py:92 .\comments\models.py:17
#: .\oauth\models.py:12 .\templates\blog\tags\article_meta_info.html:33
#: .\oauth\models.py:12
msgid "author"
msgstr ""
msgstr "作者"
#: .\blog\admin.py:53
msgid "Publish selected articles"
msgstr ""
msgstr "發布選中的文章"
#: .\blog\admin.py:54
msgid "Draft selected articles"
msgstr ""
msgstr "選中文章設為草稿"
#: .\blog\admin.py:55
msgid "Close article comments"
msgstr ""
msgstr "關閉文章評論"
#: .\blog\admin.py:56
msgid "Open article comments"
msgstr ""
msgstr "打開文章評論"
#: .\blog\admin.py:89 .\blog\models.py:101 .\blog\models.py:183
#: .\templates\blog\tags\article_meta_info.html:17
#: .\templates\blog\tags\sidebar.html:40
msgid "category"
msgstr ""
msgstr "分類目錄"
#: .\blog\models.py:20 .\blog\models.py:179
#: .\blog\models.py:20 .\blog\models.py:179 .\templates\share_layout\nav.html:8
msgid "index"
msgstr ""
msgstr "首頁"
#: .\blog\models.py:21
msgid "list"
msgstr ""
msgstr "列表"
#: .\blog\models.py:22
msgid "post"
msgstr ""
msgstr "文章"
#: .\blog\models.py:23
msgid "all"
msgstr ""
msgstr "所有"
#: .\blog\models.py:24
msgid "slide"
msgstr ""
msgstr "側邊欄"
#: .\blog\models.py:30 .\blog\models.py:267 .\blog\models.py:285
msgid "modify time"
msgstr ""
msgstr "修改時間"
#: .\blog\models.py:63
msgid "Draft"
msgstr ""
msgstr "草稿"
#: .\blog\models.py:64
msgid "Published"
msgstr ""
msgstr "發布"
#: .\blog\models.py:67
msgid "Open"
msgstr ""
msgstr "打開"
#: .\blog\models.py:68
msgid "Close"
msgstr ""
msgstr "關閉"
#: .\blog\models.py:71 .\comments\admin.py:47
msgid "Article"
msgstr ""
msgstr "文章"
#: .\blog\models.py:72
msgid "Page"
msgstr ""
msgstr "頁面"
#: .\blog\models.py:74 .\blog\models.py:280
msgid "title"
msgstr ""
msgstr "標題"
#: .\blog\models.py:75
msgid "body"
msgstr ""
msgstr "內容"
#: .\blog\models.py:77
msgid "publish time"
msgstr ""
msgstr "發布時間"
#: .\blog\models.py:79
msgid "status"
msgstr ""
msgstr "狀態"
#: .\blog\models.py:84
msgid "comment status"
msgstr ""
msgstr "評論狀態"
#: .\blog\models.py:88 .\oauth\models.py:43
msgid "type"
msgstr ""
msgstr "類型"
#: .\blog\models.py:89
msgid "views"
msgstr ""
msgstr "閱讀量"
#: .\blog\models.py:97 .\blog\models.py:258 .\blog\models.py:282
msgid "order"
msgstr ""
msgstr "排序"
#: .\blog\models.py:98
msgid "show toc"
msgstr ""
msgstr "顯示目錄"
#: .\blog\models.py:105 .\blog\models.py:249
#: .\templates\blog\tags\article_meta_info.html:22
msgid "tag"
msgstr ""
msgstr "標簽"
#: .\blog\models.py:115 .\comments\models.py:21
msgid "article"
msgstr ""
msgstr "文章"
#: .\blog\models.py:171
msgid "category name"
msgstr ""
msgstr "分類名"
#: .\blog\models.py:174
msgid "parent category"
msgstr ""
msgstr "上級分類"
#: .\blog\models.py:234
msgid "tag name"
msgstr ""
msgstr "標簽名"
#: .\blog\models.py:256
msgid "link name"
msgstr ""
msgstr "鏈接名"
#: .\blog\models.py:257 .\blog\models.py:271
msgid "link"
msgstr ""
msgstr "鏈接"
#: .\blog\models.py:260
msgid "is show"
msgstr ""
msgstr "是否顯示"
#: .\blog\models.py:262
msgid "show type"
msgstr ""
msgstr "顯示類型"
#: .\blog\models.py:281
msgid "content"
msgstr ""
msgstr "內容"
#: .\blog\models.py:283 .\oauth\models.py:52
msgid "is enable"
msgstr ""
msgstr "是否啟用"
#: .\blog\models.py:289
msgid "sidebar"
msgstr ""
msgstr "側邊欄"
#: .\blog\models.py:299
msgid "site name"
msgstr ""
msgstr "站點名稱"
#: .\blog\models.py:305
msgid "site description"
msgstr ""
msgstr "站點描述"
#: .\blog\models.py:311
msgid "site seo description"
msgstr ""
msgstr "站點SEO描述"
#: .\blog\models.py:313
msgid "site keywords"
msgstr ""
msgstr "關鍵字"
#: .\blog\models.py:318
msgid "article sub length"
msgstr ""
msgstr "文章摘要長度"
#: .\blog\models.py:319
msgid "sidebar article count"
msgstr ""
msgstr "側邊欄文章數目"
#: .\blog\models.py:320
msgid "sidebar comment count"
msgstr ""
msgstr "側邊欄評論數目"
#: .\blog\models.py:321
msgid "article comment count"
msgstr ""
msgstr "文章頁面默認顯示評論數目"
#: .\blog\models.py:322
msgid "show adsense"
msgstr ""
msgstr "是否顯示廣告"
#: .\blog\models.py:324
msgid "adsense code"
msgstr ""
msgstr "廣告內容"
#: .\blog\models.py:325
msgid "open site comment"
msgstr ""
msgstr "公共頭部"
#: .\blog\models.py:352
msgid "Website configuration"
msgstr "網站配置"
#: .\blog\models.py:360
msgid "只能有一个配置"
msgstr ""
msgid "There can only be one configuration"
msgstr "只能有一個配置"
#: .\blog\views.py:349
#: .\blog\views.py:348
msgid ""
"Sorry, the page you requested is not found, please click the home page to "
"see other?"
msgstr ""
msgstr "抱歉,你所訪問的頁面找不到,請點擊首頁看看別的?"
#: .\blog\views.py:357
#: .\blog\views.py:356
msgid "Sorry, the server is busy, please click the home page to see other?"
msgstr ""
msgstr "抱歉,服務出錯了,請點擊首頁看看別的?"
#: .\blog\views.py:370
#: .\blog\views.py:369
msgid "Sorry, you do not have permission to access this page?"
msgstr ""
msgstr "抱歉,你沒用權限訪問此頁面。"
#: .\comments\admin.py:15
msgid "Disable comments"
msgstr ""
msgstr "禁用評論"
#: .\comments\admin.py:16
msgid "Enable comments"
msgstr ""
msgstr "啟用評論"
#: .\comments\admin.py:46
msgid "User"
msgstr ""
msgstr "用戶"
#: .\comments\models.py:25
msgid "parent comment"
msgstr ""
msgstr "上級評論"
#: .\comments\models.py:29
msgid "enable"
msgstr ""
msgstr "啟用"
#: .\comments\models.py:34 .\templates\blog\tags\article_info.html:30
msgid "comment"
msgstr ""
msgstr "評論"
#: .\comments\utils.py:13
msgid "Thanks for your comment"
msgstr ""
msgstr "感謝你的評論"
#: .\comments\utils.py:15
#, python-brace-format
#, python-format
msgid ""
"\n"
" <p>Thank you very much for your comments on this site</"
"p>\n"
" You can visit\n"
" <a href=\"{article_url}\" rel=\"bookmark\">{comment."
"article.title}</a>\n"
"<p>Thank you very much for your comments on this site</p>\n"
" You can visit <a href=\"%(article_url)s\" rel=\"bookmark"
"\">%(article_title)s</a>\n"
" to review your comments,\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this "
"link to your browser.\n"
" {article_url}\n"
" "
" %(article_url)s"
msgstr ""
"<p>非常感謝您對此網站的評論</p>\n"
" 您可以訪問<a href=\"%(article_url)s\" rel=\"書簽\">%(article_title)s</a>\n"
"查看您的評論,\n"
"再次感謝您!\n"
" <br />\n"
" 如果上面的鏈接打不開,請復製此鏈接鏈接到您的瀏覽器。\n"
"%(article_url)s"
#: .\comments\utils.py:29
#, python-brace-format
#: .\comments\utils.py:26
#, python-format
msgid ""
"\n"
" Your comment on <a href=\"{article_url}\" rel=\"bookmark"
"\">{comment.article.title}</a><br/> {comment.parent_comment.body} <br/> has "
"received a reply. go check it out\n"
"Your comment on <a href=\"%(article_url)s\" rel=\"bookmark\">"
"%(article_title)s</a><br/> has \n"
" received a reply. <br/> %(comment_body)s\n"
" <br/> \n"
" go check it out!\n"
" <br/>\n"
" If the link above cannot be opened, please copy this "
"link to your browser.\n"
" {article_url}\n"
" %(article_url)s\n"
" "
msgstr ""
#: .\djangoblog\logentryadmin.py:11
msgctxt "logentry_admin:action_type"
msgid "Addition"
msgstr ""
#: .\djangoblog\logentryadmin.py:12
msgctxt "logentry_admin:action_type"
msgid "Deletion"
msgstr ""
#: .\djangoblog\logentryadmin.py:13
msgctxt "logentry_admin:action_type"
msgid "Change"
msgstr ""
#: .\djangoblog\logentryadmin.py:25
msgid "Metadata"
msgstr ""
#: .\djangoblog\logentryadmin.py:33
msgid "Details"
msgstr ""
#: .\djangoblog\logentryadmin.py:95
"您對 <a href=\"%(article_url)s\" rel=\"bookmark\">%(article_title)s</a><br/> "
"的評論有\n"
" 收到回復。<br/> %(comment_body)s\n"
"<br/>\n"
"快去看看吧!\n"
"<br/>\n"
" 如果上面的鏈接打不開,請復製此鏈接鏈接到您的瀏覽器。\n"
" %(article_url)s\n"
" "
#: .\djangoblog\logentryadmin.py:63
msgid "object"
msgstr ""
#: .\djangoblog\logentryadmin.py:128
msgid "action"
msgstr ""
#: .\djangoblog\logentryadmin.py:133
msgid "change message"
msgstr ""
msgstr "對象"
#: .\djangoblog\settings.py:140
msgid "English"
msgstr ""
msgstr "英文"
#: .\djangoblog\settings.py:141
msgid "Simplified Chinese"
msgstr ""
msgstr "簡體中文"
#: .\djangoblog\settings.py:142
msgid "Traditional Chinese"
msgstr ""
#: .\oauth\models.py:17
msgid "nickname"
msgstr ""
msgstr "繁體中文"
#: .\oauth\models.py:30
msgid "oauth user"
msgstr ""
msgstr "第三方用戶"
#: .\oauth\models.py:37
msgid "weibo"
msgstr ""
msgstr "微博"
#: .\oauth\models.py:38
msgid "google"
msgstr ""
msgstr "谷歌"
#: .\oauth\models.py:48
msgid "callback url"
msgstr ""
msgstr "回調地址"
#: .\oauth\models.py:59
msgid "already exists"
msgstr ""
msgstr "已經存在"
#: .\oauth\views.py:154
#, python-format
msgid ""
"\n"
" <p>Congratulations, you have successfully bound your email address. You "
"can use {oauthuser.type} to directly log in to this website without a "
"password. You are welcome to continue to follow this site, the address is</"
"p>\n"
"\n"
" <a href=\"{'http://' + site}\" rel=\"bookmark\">{'http://' "
"+ site}</a>\n"
"\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this link "
"to your browser.\n"
" {site}\n"
"can use\n"
" %(oauthuser_type)s to directly log in to this website without a "
"password.</p>\n"
" You are welcome to continue to follow this site, the address is\n"
" <a href=\"%(site)s\" rel=\"bookmark\">%(site)s</a>\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this link to your "
"browser.\n"
" %(site)s\n"
" "
msgstr ""
"\n"
" <p>恭喜你已經綁定成功 你可以使用\n"
" %(oauthuser_type)s 來免密登錄本站 </p>\n"
" 歡迎繼續關註本站, 地址是\n"
" <a href=\"%(site)s\" rel=\"bookmark\">%(site)s</a>\n"
" 再次感謝你\n"
" <br />\n"
" 如果上面鏈接無法打開,請復製此鏈接到你的瀏覽器 \n"
" %(site)s\n"
" "
#: .\oauth\views.py:165
msgid "Congratulations on your successful binding!"
msgstr ""
msgstr "恭喜你綁定成功"
#: .\oauth\views.py:217
#, python-brace-format
#, python-format
msgid ""
"\n"
" <p>Please click the link below to bind your email</p>\n"
"\n"
" <a href=\"{url}\" rel=\"bookmark\">{url}</a>\n"
" <a href=\"%(url)s\" rel=\"bookmark\">%(url)s</a>\n"
"\n"
" Thank you again!\n"
" <br />\n"
" If the link above cannot be opened, please copy this link "
"to your browser.\n"
" {url}\n"
" <br />\n"
" %(url)s\n"
" "
msgstr ""
"\n"
" <p>請點擊下面的鏈接綁定您的郵箱</p>\n"
"\n"
" <a href=\"%(url)s\" rel=\"bookmark\">%(url)s</a>\n"
"\n"
"再次感謝您!\n"
" <br />\n"
"如果上面的鏈接打不開,請復製此鏈接到您的瀏覽器。\n"
"%(url)s\n"
" "
#: .\oauth\views.py:227 .\oauth\views.py:239
#: .\oauth\views.py:228 .\oauth\views.py:240
msgid "Bind your email"
msgstr ""
msgstr "綁定郵箱"
#: .\oauth\views.py:241
#: .\oauth\views.py:242
msgid ""
"Congratulations, the binding is just one step away. Please log in to your "
"email to check the email to complete the binding. Thank you."
msgstr ""
msgstr "恭喜您,還差一步就綁定成功了,請登錄您的郵箱查看郵件完成綁定,謝謝。"
#: .\oauth\views.py:243
#: .\oauth\views.py:245
msgid "Binding successful"
msgstr ""
msgstr "綁定成功"
#: .\oauth\views.py:245
#, python-brace-format
#: .\oauth\views.py:247
#, python-format
msgid ""
"Congratulations, you have successfully bound your email address. You can use "
"{oauthuser.type} to directly log in to this website without a password. You "
"are welcome to continue to follow this site."
"%(oauthuser_type)s to directly log in to this website without a password. "
"You are welcome to continue to follow this site."
msgstr ""
"恭喜您綁定成功,您以後可以使用%(oauthuser_type)s來直接免密碼登錄本站啦感謝"
"您對本站對關註。"
#: .\templates\account\forget_password.html:7
msgid "forget the password"
msgstr ""
msgstr "忘記密碼"
#: .\templates\account\forget_password.html:18
msgid "get verification code"
msgstr ""
msgstr "獲取驗證碼"
#: .\templates\account\forget_password.html:19
msgid "submit"
msgstr ""
msgstr "提交"
#: .\templates\account\login.html:36
msgid "Create Account"
msgstr "創建賬號"
#: .\templates\account\login.html:42
#, fuzzy
#| msgid "forget the password"
msgid "Forget Password"
msgstr "忘記密碼"
#: .\templates\account\result.html:18 .\templates\blog\tags\sidebar.html:126
msgid "login"
msgstr ""
msgstr "登錄"
#: .\templates\account\result.html:22
msgid "back to the homepage"
msgstr ""
msgstr "返回首頁吧"
#: .\templates\blog\article_archives.html:7
#: .\templates\blog\article_archives.html:24
msgid "article archive"
msgstr ""
msgstr "文章歸檔"
#: .\templates\blog\article_archives.html:32
msgid "year"
msgstr ""
msgstr ""
#: .\templates\blog\article_archives.html:36
msgid "month"
msgstr ""
msgstr ""
#: .\templates\blog\tags\article_info.html:12
msgid "pin to top"
msgstr ""
msgstr "置頂"
#: .\templates\blog\tags\article_info.html:28
msgid "comments"
msgstr ""
msgstr "評論"
#: .\templates\blog\tags\article_info.html:58
msgid "toc"
msgstr ""
msgstr "目錄"
#: .\templates\blog\tags\article_meta_info.html:6
msgid "posted in"
msgstr "發布於"
#: .\templates\blog\tags\article_meta_info.html:14
msgid "and tagged"
msgstr "標簽"
#: .\templates\blog\tags\article_meta_info.html:7
msgid "Published on"
msgstr "发表于"
#: .\templates\blog\tags\article_meta_info.html:25
msgid "by "
msgstr ""
#: .\templates\blog\tags\article_meta_info.html:36
#: .\templates\blog\tags\article_meta_info.html:29
#, python-format
msgid ""
"\n"
@ -573,71 +582,87 @@ msgid ""
"%(article.author.username)s\"\n"
" "
msgstr ""
"\n"
" title=\"查看所有由 %(article.author.username)s\"發布的文章\n"
" "
#: .\templates\blog\tags\article_meta_info.html:44
msgid "on"
msgstr "在"
#: .\templates\blog\tags\article_meta_info.html:50
#: .\templates\blog\tags\article_meta_info.html:54
msgid "edit"
msgstr ""
msgstr "編輯"
#: .\templates\blog\tags\article_pagination.html:4
msgid "article navigation"
msgstr ""
msgstr "文章導航"
#: .\templates\blog\tags\article_pagination.html:9
msgid "earlier articles"
msgstr ""
msgstr "早期文章"
#: .\templates\blog\tags\article_pagination.html:12
msgid "newer articles"
msgstr ""
msgstr "較新文章"
#: .\templates\blog\tags\article_tag_list.html:5
msgid "tags"
msgstr ""
msgstr "標簽"
#: .\templates\blog\tags\sidebar.html:7
msgid "search"
msgstr ""
msgstr "搜索"
#: .\templates\blog\tags\sidebar.html:50
msgid "recent comments"
msgstr ""
msgstr "近期評論"
#: .\templates\blog\tags\sidebar.html:57
msgid "published in"
msgstr ""
msgid "published on"
msgstr "發表於"
#: .\templates\blog\tags\sidebar.html:65
msgid "recent articles"
msgstr ""
msgstr "近期文章"
#: .\templates\blog\tags\sidebar.html:77
msgid "bookmark"
msgstr ""
msgstr "書簽"
#: .\templates\blog\tags\sidebar.html:96
msgid "Tag Cloud"
msgstr ""
msgstr "標簽雲"
#: .\templates\blog\tags\sidebar.html:107
msgid "Welcome to star or fork the source code of this site"
msgstr ""
msgstr "歡迎您STAR或者FORK本站源代碼"
#: .\templates\blog\tags\sidebar.html:118
msgid "Function"
msgstr ""
msgstr "功能"
#: .\templates\blog\tags\sidebar.html:120
msgid "management site"
msgstr ""
msgstr "管理站點"
#: .\templates\blog\tags\sidebar.html:122
msgid "logout"
msgstr ""
msgstr "登出"
#: .\templates\blog\tags\sidebar.html:129
msgid "Track record"
msgstr ""
msgstr "運動軌跡記錄"
#: .\templates\blog\tags\sidebar.html:135
msgid "Click me to return to the top"
msgstr ""
msgstr "點我返回頂部"
#: .\templates\oauth\oauth_applications.html:5
#| msgid "login"
msgid "quick login"
msgstr "快捷登錄"
#: .\templates\share_layout\nav.html:26
msgid "Article archive"
msgstr "文章歸檔"

@ -14,7 +14,7 @@ class OAuthUser(models.Model):
null=True,
on_delete=models.CASCADE)
openid = models.CharField(max_length=50)
nickname = models.CharField(max_length=50, verbose_name=_('nickname'))
nickname = models.CharField(max_length=50, verbose_name=_('nick name'))
token = models.CharField(max_length=150, null=True, blank=True)
picture = models.CharField(max_length=350, blank=True, null=True)
type = models.CharField(blank=False, null=False, max_length=50)

@ -151,16 +151,16 @@ def emailconfirm(request, id, sign):
login(request, author)
site = 'http://' + get_current_site().domain
content = _(f'''
<p>Congratulations, you have successfully bound your email address. You can use {oauthuser.type} to directly log in to this website without a password. You are welcome to continue to follow this site, the address is</p>
<a href="{'http://' + site}" rel="bookmark">{'http://' + site}</a>
Thank you again!
<br />
If the link above cannot be opened, please copy this link to your browser.
{site}
''')
content = _('''
<p>Congratulations, you have successfully bound your email address. You can use
%(oauthuser_type)s to directly log in to this website without a password.</p>
You are welcome to continue to follow this site, the address is
<a href="%(site)s" rel="bookmark">%(site)s</a>
Thank you again!
<br />
If the link above cannot be opened, please copy this link to your browser.
%(site)s
''') % {'oauthuser_type': oauthuser.type, 'site': site}
send_email(emailto=[oauthuser.email, ], title=_('Congratulations on your successful binding!'), content=content)
url = reverse('oauth:bindsuccess', kwargs={
@ -214,16 +214,17 @@ class RequireEmailView(FormView):
})
url = "http://{site}{path}".format(site=site, path=path)
content = _(f"""
content = _("""
<p>Please click the link below to bind your email</p>
<a href="{url}" rel="bookmark">{url}</a>
<a href="%(url)s" rel="bookmark">%(url)s</a>
Thank you again!
<br />
If the link above cannot be opened, please copy this link to your browser.
{url}
""")
<br />
%(url)s
""") % {'url': url}
send_email(emailto=[email, ], title=_('Bind your email'), content=content)
url = reverse('oauth:bindsuccess', kwargs={
'oauthid': oauthid
@ -238,11 +239,14 @@ def bindsuccess(request, oauthid):
if type == 'email':
title = _('Bind your email')
content = _(
'Congratulations, the binding is just one step away. Please log in to your email to check the email to complete the binding. Thank you.')
'Congratulations, the binding is just one step away. '
'Please log in to your email to check the email to complete the binding. Thank you.')
else:
title = _('Binding successful')
content = _(
f"Congratulations, you have successfully bound your email address. You can use {oauthuser.type} to directly log in to this website without a password. You are welcome to continue to follow this site.")
"Congratulations, you have successfully bound your email address. You can use %(oauthuser_type)s"
" to directly log in to this website without a password. You are welcome to continue to follow this site." % {
'oauthuser_type': oauthuser.type})
return render(request, 'oauth/bindsuccess.html', {
'title': title,
'content': content

@ -5,12 +5,14 @@ import json
import logging
from itertools import groupby
import django.utils.timezone
import requests
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.http import JsonResponse
from django.shortcuts import render
from django.utils import timezone
from django.utils.timezone import utc
from django.views.decorators.csrf import csrf_exempt
from .models import OwnTrackLog
@ -95,9 +97,6 @@ def convert_to_amap(locations):
@login_required
def get_datas(request):
import django.utils.timezone
from django.utils.timezone import utc
now = django.utils.timezone.now().replace(tzinfo=utc)
querydate = django.utils.timezone.datetime(
now.year, now.month, now.day, 0, 0, 0)
@ -118,7 +117,7 @@ def get_datas(request):
d["name"] = tid
paths = list()
locations = convert_to_amap(
sorted(item, key=lambda x: x.created_time))
sorted(item, key=lambda x: x.creation_time))
for i in locations.split(';'):
paths.append(i.split(','))
d["path"] = paths

@ -1,5 +1,6 @@
{% extends 'share_layout/base_account.html' %}
{% load static %}
{% load i18n %}
{% block content %}
<div class="container">
@ -9,10 +10,6 @@
<img class="img-circle profile-img" src="{% static 'blog/img/avatar.png' %}" alt="">
<form class="form-signin" action="{% url 'account:login' %}" method="post">
{% csrf_token %}
{% comment %}<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Email" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>{% endcomment %}
{{ form.non_field_errors }}
{% for field in form %}
{{ field }}
@ -34,11 +31,15 @@
</div>
<p class="text-center">
<a href="{% url "account:register" %}">Create Account</a>
<a href="{% url "account:register" %}">
{% trans 'Create Account' %}
</a>
|
<a href="/">Home Page</a>
|
<a href="{% url "account:forget_password" %}">忘记密码</a>
<a href="{% url "account:forget_password" %}">
{% trans 'Forget Password' %}
</a>
</p>
</div> <!-- /container -->

@ -1,36 +1,29 @@
{% load blog_tags %}
{% load cache %}
{% load i18n %}
{% with article.id|add:user.is_authenticated as cachekey %}
{% cache 36000 metainfo cachekey %}
<footer class="entry-meta">
{% trans 'Published on' %}<a href="{{ article.get_absolute_url }}"
title="{% datetimeformat article.pub_time %}"
itemprop="datePublished" content="{% datetimeformat article.pub_time %}"
rel="bookmark">
<time class="entry-date updated"
datetime="{{ article.pub_time }}">
{% datetimeformat article.pub_time %}</time>
</a>
{% if article.type == 'a' %}
{% trans 'category' %}:
<a href="{{ article.category.get_absolute_url }}" rel="category tag">{{ article.category.name }}</a>
{% if article.tags.all %}
{% trans 'tag' %}
{% for t in article.tags.all %}
<a href="{{ t.get_absolute_url }}" rel="tag">{{ t.name }}</a>
{% if t != article.tags.all.last %}
{% endif %}
{% endfor %}
{% load blog_tags %}
<footer class="entry-meta">
{% trans 'posted in' %}
<a href="{{ article.category.get_absolute_url }}" rel="category tag">{{ article.category.name }}</a>
</a>
{% if article.type == 'a' %}
{% if article.tags.all %}
{% trans 'and tagged' %}
{% for t in article.tags.all %}
<a href="{{ t.get_absolute_url }}" rel="tag">{{ t.name }}</a>
{% if t != article.tags.all.last %}
,
{% endif %}
{% endif %}
<span class="by-author">{% trans 'author' %}
{% endfor %}
{% endif %}
{% endif %}
.{% trans 'by ' %}
<span class="by-author">
<span class="author vcard">
<a class="url fn n" href="{{ article.author.get_absolute_url }}"
{% blocktranslate %}
@ -45,12 +38,22 @@
</span>
</span>
</a>
</span>
{% if user.is_superuser %}
<a href="{{ article.get_admin_url }}">{% trans 'edit' %}</a>
{% endif %}
</span>
{% trans 'on' %}
<a href="{{ article.get_absolute_url }}"
title="{% datetimeformat article.pub_time %}"
itemprop="datePublished" content="{% datetimeformat article.pub_time %}"
rel="bookmark">
<time class="entry-date updated"
datetime="{{ article.pub_time }}">
{% datetimeformat article.pub_time %}</time>
{% if user.is_superuser %}
<a href="{{ article.get_admin_url }}">{% trans 'edit' %}</a>
{% endif %}
</span>
</footer><!-- .entry-meta -->
</footer><!-- .entry-meta -->
{% endcache %}
{% endwith %}

@ -1,7 +1,8 @@
{% load i18n %}
<div class="widget-login">
{% if apps %}
<small>
快捷登录:
{% trans 'quick login' %}:
</small>
{% for icon,url in apps %}
<a href="{{ url }}" rel="nofollow">

@ -77,9 +77,8 @@
</form>
{% cache 36000 nav %}
{% include 'share_layout/nav.html' %}
{% endcache %}
{% include 'share_layout/nav.html' %}
</header><!-- #masthead -->
<div id="main" class="wrapper">

@ -1,11 +1,11 @@
{% load i18n %}
<nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle">菜单</button>
<a class="assistive-text" href="#content" title="跳至正文">跳至正文</a>
<div class="menu-%e8%8f%9c%e5%8d%95-container">
<ul id="menu-%e8%8f%9c%e5%8d%95" class="nav-menu">
<li id="menu-item-3498"
class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-3498">
<a href="/">首页</a></li>
<a href="/">{% trans 'index' %}</a></li>
{% load blog_tags %}
{% query nav_category_list parent_category=None as root_categorys %}
@ -23,7 +23,7 @@
{% endif %}
<li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children">
<a href="{% url "blog:archives" %}">文章归档</a>
<a href="{% url "blog:archives" %}">{% trans 'Article archive' %}</a>
</li>
</ul>
</div>

Loading…
Cancel
Save