Add validation to user admin

This commit is contained in:
cuom1999 2024-09-17 21:11:40 -05:00
parent 05ab90e1d4
commit c54bcd4a16
3 changed files with 137 additions and 110 deletions

View file

@ -1,14 +1,19 @@
from django.contrib import admin from django.contrib import admin
from django.forms import ModelForm from django.forms import ModelForm, CharField, TextInput
from django.utils.html import format_html from django.utils.html import format_html
from django.utils.translation import gettext, gettext_lazy as _, ungettext from django.utils.translation import gettext, gettext_lazy as _, ungettext
from reversion.admin import VersionAdmin
from django.contrib.auth.admin import UserAdmin as OldUserAdmin from django.contrib.auth.admin import UserAdmin as OldUserAdmin
from django.core.exceptions import ValidationError
from django_ace import AceWidget from django_ace import AceWidget
from judge.models import Profile, ProfileInfo from judge.models import Profile, ProfileInfo
from judge.widgets import AdminPagedownWidget, AdminSelect2Widget from judge.widgets import AdminPagedownWidget, AdminSelect2Widget
from reversion.admin import VersionAdmin
import re
class ProfileForm(ModelForm): class ProfileForm(ModelForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@ -166,8 +171,25 @@ class ProfileAdmin(VersionAdmin):
recalculate_points.short_description = _("Recalculate scores") recalculate_points.short_description = _("Recalculate scores")
class UserForm(ModelForm):
username = CharField(
max_length=150,
help_text=_("Username can only contain letters, digits, and underscores."),
widget=TextInput(attrs={"class": "vTextField"}),
)
def clean_username(self):
username = self.cleaned_data.get("username")
if not re.match(r"^\w+$", username):
raise ValidationError(
_("Username can only contain letters, digits, and underscores.")
)
return username
class UserAdmin(OldUserAdmin): class UserAdmin(OldUserAdmin):
# Customize the fieldsets for adding and editing users # Customize the fieldsets for adding and editing users
form = UserForm
fieldsets = ( fieldsets = (
(None, {"fields": ("username", "password")}), (None, {"fields": ("username", "password")}),
("Personal Info", {"fields": ("first_name", "last_name", "email")}), ("Personal Info", {"fields": ("first_name", "last_name", "email")}),

View file

@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: lqdoj2\n" "Project-Id-Version: lqdoj2\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-03 21:28+0700\n" "POT-Creation-Date: 2024-09-18 09:10+0700\n"
"PO-Revision-Date: 2021-07-20 03:44\n" "PO-Revision-Date: 2021-07-20 03:44\n"
"Last-Translator: Icyene\n" "Last-Translator: Icyene\n"
"Language-Team: Vietnamese\n" "Language-Team: Vietnamese\n"
@ -23,8 +23,8 @@ msgid "last seen"
msgstr "xem lần cuối" msgstr "xem lần cuối"
#: chat_box/models.py:55 chat_box/models.py:80 chat_box/models.py:96 #: chat_box/models.py:55 chat_box/models.py:80 chat_box/models.py:96
#: judge/admin/interface.py:151 judge/models/contest.py:703 #: judge/admin/interface.py:151 judge/models/contest.py:710
#: judge/models/contest.py:909 judge/models/course.py:129 #: judge/models/contest.py:916 judge/models/course.py:129
#: judge/models/profile.py:465 judge/models/profile.py:539 #: judge/models/profile.py:465 judge/models/profile.py:539
msgid "user" msgid "user"
msgstr "người dùng" msgstr "người dùng"
@ -232,7 +232,7 @@ msgid "diff"
msgstr "" msgstr ""
#: judge/admin/organization.py:60 judge/admin/problem.py:290 #: judge/admin/organization.py:60 judge/admin/problem.py:290
#: judge/admin/profile.py:122 #: judge/admin/profile.py:127
msgid "View on site" msgid "View on site"
msgstr "Xem trên trang" msgstr "Xem trên trang"
@ -331,11 +331,11 @@ msgstr "Tổng điểm"
msgid "Vote" msgid "Vote"
msgstr "" msgstr ""
#: judge/admin/profile.py:41 #: judge/admin/profile.py:46
msgid "timezone" msgid "timezone"
msgstr "múi giờ" msgstr "múi giờ"
#: judge/admin/profile.py:131 judge/admin/submission.py:327 #: judge/admin/profile.py:136 judge/admin/submission.py:327
#: templates/notification/list.html:9 #: templates/notification/list.html:9
#: templates/organization/requests/log.html:9 #: templates/organization/requests/log.html:9
#: templates/organization/requests/pending.html:19 #: templates/organization/requests/pending.html:19
@ -343,31 +343,35 @@ msgstr "múi giờ"
msgid "User" msgid "User"
msgstr "Thành viên" msgstr "Thành viên"
#: judge/admin/profile.py:137 templates/registration/registration_form.html:40 #: judge/admin/profile.py:142 templates/registration/registration_form.html:40
#: templates/user/edit-profile.html:123 templates/user/import/table_csv.html:8 #: templates/user/edit-profile.html:123 templates/user/import/table_csv.html:8
msgid "Email" msgid "Email"
msgstr "Email" msgstr "Email"
#: judge/admin/profile.py:143 judge/views/register.py:36 #: judge/admin/profile.py:148 judge/views/register.py:36
#: templates/registration/registration_form.html:68 #: templates/registration/registration_form.html:68
#: templates/user/edit-profile.html:147 #: templates/user/edit-profile.html:147
msgid "Timezone" msgid "Timezone"
msgstr "Múi giờ" msgstr "Múi giờ"
#: judge/admin/profile.py:149 #: judge/admin/profile.py:154
msgid "date joined" msgid "date joined"
msgstr "ngày tham gia" msgstr "ngày tham gia"
#: judge/admin/profile.py:159 #: judge/admin/profile.py:164
#, python-format #, python-format
msgid "%d user have scores recalculated." msgid "%d user have scores recalculated."
msgid_plural "%d users have scores recalculated." msgid_plural "%d users have scores recalculated."
msgstr[0] "%d người dùng đã được tính điểm lại." msgstr[0] "%d người dùng đã được tính điểm lại."
#: judge/admin/profile.py:166 #: judge/admin/profile.py:171
msgid "Recalculate scores" msgid "Recalculate scores"
msgstr "Tính điểm lại" msgstr "Tính điểm lại"
#: judge/admin/profile.py:177 judge/admin/profile.py:184
msgid "Username can only contain letters, digits, and underscores."
msgstr "Tên đăng nhập phải chứa ký tự, chữ số, hoặc dấu gạch dưới"
#: judge/admin/runtime.py:19 #: judge/admin/runtime.py:19
msgid "Disallowed problems" msgid "Disallowed problems"
msgstr "Các bài tập không được cho phép" msgstr "Các bài tập không được cho phép"
@ -784,7 +788,7 @@ msgstr "mô tả"
msgid "problems" msgid "problems"
msgstr "bài tập" msgstr "bài tập"
#: judge/models/contest.py:137 judge/models/contest.py:708 #: judge/models/contest.py:137 judge/models/contest.py:715
msgid "start time" msgid "start time"
msgstr "thời gian bắt đầu" msgstr "thời gian bắt đầu"
@ -1024,297 +1028,296 @@ msgstr "Số bài nộp tối đa mỗi phút. Để trống nếu không muốn
msgid "End time must be after start time" msgid "End time must be after start time"
msgstr "Thời gian kết thúc phải sau thời gian bắt đầu" msgstr "Thời gian kết thúc phải sau thời gian bắt đầu"
#: judge/models/contest.py:662 #: judge/models/contest.py:669
msgid "See private contests" msgid "See private contests"
msgstr "" msgstr ""
#: judge/models/contest.py:663 #: judge/models/contest.py:670
msgid "Edit own contests" msgid "Edit own contests"
msgstr "" msgstr ""
#: judge/models/contest.py:664 #: judge/models/contest.py:671
msgid "Edit all contests" msgid "Edit all contests"
msgstr "" msgstr ""
#: judge/models/contest.py:665 #: judge/models/contest.py:672
msgid "Clone contest" msgid "Clone contest"
msgstr "" msgstr ""
#: judge/models/contest.py:666 templates/contest/moss.html:72 #: judge/models/contest.py:673 templates/contest/moss.html:72
msgid "MOSS contest" msgid "MOSS contest"
msgstr "" msgstr ""
#: judge/models/contest.py:667 #: judge/models/contest.py:674
msgid "Rate contests" msgid "Rate contests"
msgstr "" msgstr ""
#: judge/models/contest.py:668 #: judge/models/contest.py:675
msgid "Contest access codes" msgid "Contest access codes"
msgstr "" msgstr ""
#: judge/models/contest.py:669 #: judge/models/contest.py:676
msgid "Create private contests" msgid "Create private contests"
msgstr "" msgstr ""
#: judge/models/contest.py:670 #: judge/models/contest.py:677
msgid "Change contest visibility" msgid "Change contest visibility"
msgstr "" msgstr ""
#: judge/models/contest.py:671 #: judge/models/contest.py:678
msgid "Edit contest problem label script" msgid "Edit contest problem label script"
msgstr "Cách hiển thị thứ tự bài tập" msgstr "Cách hiển thị thứ tự bài tập"
#: judge/models/contest.py:673 judge/models/contest.py:834 #: judge/models/contest.py:680 judge/models/contest.py:841
#: judge/models/contest.py:912 judge/models/contest.py:942 #: judge/models/contest.py:919 judge/models/contest.py:949
#: judge/models/contest.py:1021 judge/models/submission.py:116 #: judge/models/contest.py:1028 judge/models/submission.py:116
msgid "contest" msgid "contest"
msgstr "kỳ thi" msgstr "kỳ thi"
#: judge/models/contest.py:674 #: judge/models/contest.py:681
msgid "contests" msgid "contests"
msgstr "kỳ thi" msgstr "kỳ thi"
#: judge/models/contest.py:697 #: judge/models/contest.py:704
msgid "associated contest" msgid "associated contest"
msgstr "" msgstr ""
#: judge/models/contest.py:710 judge/models/course.py:176 #: judge/models/contest.py:717 judge/models/course.py:184
msgid "score" msgid "score"
msgstr "điểm" msgstr "điểm"
#: judge/models/contest.py:711 #: judge/models/contest.py:718
msgid "cumulative time" msgid "cumulative time"
msgstr "tổng thời gian" msgstr "tổng thời gian"
#: judge/models/contest.py:713 #: judge/models/contest.py:720
msgid "is disqualified" msgid "is disqualified"
msgstr "đã bị loại" msgstr "đã bị loại"
#: judge/models/contest.py:715 #: judge/models/contest.py:722
msgid "Whether this participation is disqualified." msgid "Whether this participation is disqualified."
msgstr "Quyết định thí sinh có bị loại không." msgstr "Quyết định thí sinh có bị loại không."
#: judge/models/contest.py:717 #: judge/models/contest.py:724
msgid "tie-breaking field" msgid "tie-breaking field"
msgstr "" msgstr ""
#: judge/models/contest.py:719 #: judge/models/contest.py:726
msgid "virtual participation id" msgid "virtual participation id"
msgstr "id lần tham gia ảo" msgstr "id lần tham gia ảo"
#: judge/models/contest.py:721 #: judge/models/contest.py:728
msgid "0 means non-virtual, otherwise the n-th virtual participation." msgid "0 means non-virtual, otherwise the n-th virtual participation."
msgstr "0 nghĩa là tham gia chính thức, ngược lại là lần tham gia ảo thứ n." msgstr "0 nghĩa là tham gia chính thức, ngược lại là lần tham gia ảo thứ n."
#: judge/models/contest.py:724 #: judge/models/contest.py:731
msgid "contest format specific data" msgid "contest format specific data"
msgstr "" msgstr ""
#: judge/models/contest.py:727 #: judge/models/contest.py:734
msgid "same as format_data, but including frozen results" msgid "same as format_data, but including frozen results"
msgstr "" msgstr ""
#: judge/models/contest.py:731 #: judge/models/contest.py:738
msgid "final score" msgid "final score"
msgstr "điểm" msgstr "điểm"
#: judge/models/contest.py:733 #: judge/models/contest.py:740
msgid "final cumulative time" msgid "final cumulative time"
msgstr "tổng thời gian" msgstr "tổng thời gian"
#: judge/models/contest.py:809 #: judge/models/contest.py:816
#, python-format #, python-format
msgid "%s spectating in %s" msgid "%s spectating in %s"
msgstr "%s đang theo dõi trong %s" msgstr "%s đang theo dõi trong %s"
#: judge/models/contest.py:814 #: judge/models/contest.py:821
#, python-format #, python-format
msgid "%s in %s, v%d" msgid "%s in %s, v%d"
msgstr "%s trong %s, v%d" msgstr "%s trong %s, v%d"
#: judge/models/contest.py:819 #: judge/models/contest.py:826
#, python-format #, python-format
msgid "%s in %s" msgid "%s in %s"
msgstr "%s trong %s" msgstr "%s trong %s"
#: judge/models/contest.py:822 #: judge/models/contest.py:829
msgid "contest participation" msgid "contest participation"
msgstr "lần tham gia kỳ thi" msgstr "lần tham gia kỳ thi"
#: judge/models/contest.py:823 #: judge/models/contest.py:830
msgid "contest participations" msgid "contest participations"
msgstr "lần tham gia kỳ thi" msgstr "lần tham gia kỳ thi"
#: judge/models/contest.py:830 judge/models/contest.py:883 #: judge/models/contest.py:837 judge/models/contest.py:890
#: judge/models/contest.py:945 judge/models/course.py:165 #: judge/models/contest.py:952 judge/models/problem.py:609
#: judge/models/problem.py:609 judge/models/problem.py:616 #: judge/models/problem.py:616 judge/models/problem.py:637
#: judge/models/problem.py:637 judge/models/problem.py:668 #: judge/models/problem.py:668 judge/models/problem_data.py:50
#: judge/models/problem_data.py:50
msgid "problem" msgid "problem"
msgstr "bài tập" msgstr "bài tập"
#: judge/models/contest.py:838 judge/models/contest.py:895 #: judge/models/contest.py:845 judge/models/contest.py:902
#: judge/models/course.py:167 judge/models/problem.py:209 #: judge/models/course.py:166 judge/models/problem.py:209
msgid "points" msgid "points"
msgstr "điểm" msgstr "điểm"
#: judge/models/contest.py:839 #: judge/models/contest.py:846
msgid "partial" msgid "partial"
msgstr "thành phần" msgstr "thành phần"
#: judge/models/contest.py:840 judge/models/contest.py:897 #: judge/models/contest.py:847 judge/models/contest.py:904
msgid "is pretested" msgid "is pretested"
msgstr "dùng pretest" msgstr "dùng pretest"
#: judge/models/contest.py:841 judge/models/course.py:166 #: judge/models/contest.py:848 judge/models/course.py:165
#: judge/models/course.py:175 judge/models/interface.py:48 #: judge/models/course.py:183 judge/models/interface.py:48
msgid "order" msgid "order"
msgstr "thứ tự" msgstr "thứ tự"
#: judge/models/contest.py:843 #: judge/models/contest.py:850
msgid "visible testcases" msgid "visible testcases"
msgstr "hiển thị test" msgstr "hiển thị test"
#: judge/models/contest.py:848 #: judge/models/contest.py:855
msgid "Maximum number of submissions for this problem, or 0 for no limit." msgid "Maximum number of submissions for this problem, or 0 for no limit."
msgstr "Số lần nộp tối đa, đặt là 0 nếu không có giới hạn." msgstr "Số lần nộp tối đa, đặt là 0 nếu không có giới hạn."
#: judge/models/contest.py:850 #: judge/models/contest.py:857
msgid "max submissions" msgid "max submissions"
msgstr "số lần nộp tối đa" msgstr "số lần nộp tối đa"
#: judge/models/contest.py:853 #: judge/models/contest.py:860
msgid "Why include a problem you can't submit to?" msgid "Why include a problem you can't submit to?"
msgstr "" msgstr ""
#: judge/models/contest.py:857 #: judge/models/contest.py:864
#, fuzzy #, fuzzy
#| msgid "Only for format new IOI. Separated by commas, e.g: 2, 3" #| msgid "Only for format new IOI. Separated by commas, e.g: 2, 3"
msgid "Separated by commas, e.g: 2, 3" msgid "Separated by commas, e.g: 2, 3"
msgstr "" msgstr ""
"Chỉ dùng với format IOI mới. Các sub cách nhau bởi dấu phẩy. Ví dụ: 2, 3" "Chỉ dùng với format IOI mới. Các sub cách nhau bởi dấu phẩy. Ví dụ: 2, 3"
#: judge/models/contest.py:858 #: judge/models/contest.py:865
msgid "hidden subtasks" msgid "hidden subtasks"
msgstr "Đóng băng subtasks" msgstr "Đóng băng subtasks"
#: judge/models/contest.py:870 #: judge/models/contest.py:877
msgid "contest problem" msgid "contest problem"
msgstr "bài trong kỳ thi" msgstr "bài trong kỳ thi"
#: judge/models/contest.py:871 #: judge/models/contest.py:878
msgid "contest problems" msgid "contest problems"
msgstr "bài trong kỳ thi" msgstr "bài trong kỳ thi"
#: judge/models/contest.py:877 judge/models/submission.py:274 #: judge/models/contest.py:884 judge/models/submission.py:274
msgid "submission" msgid "submission"
msgstr "bài nộp" msgstr "bài nộp"
#: judge/models/contest.py:890 judge/models/contest.py:916 #: judge/models/contest.py:897 judge/models/contest.py:923
msgid "participation" msgid "participation"
msgstr "lần tham gia" msgstr "lần tham gia"
#: judge/models/contest.py:898 #: judge/models/contest.py:905
msgid "Whether this submission was ran only on pretests." msgid "Whether this submission was ran only on pretests."
msgstr "Quyết định bài nộp chỉ được chạy trên pretest không." msgstr "Quyết định bài nộp chỉ được chạy trên pretest không."
#: judge/models/contest.py:903 #: judge/models/contest.py:910
msgid "contest submission" msgid "contest submission"
msgstr "bài nộp kỳ thi" msgstr "bài nộp kỳ thi"
#: judge/models/contest.py:904 #: judge/models/contest.py:911
msgid "contest submissions" msgid "contest submissions"
msgstr "bài nộp kỳ thi" msgstr "bài nộp kỳ thi"
#: judge/models/contest.py:920 #: judge/models/contest.py:927
msgid "rank" msgid "rank"
msgstr "rank" msgstr "rank"
#: judge/models/contest.py:921 #: judge/models/contest.py:928
msgid "rating" msgid "rating"
msgstr "rating" msgstr "rating"
#: judge/models/contest.py:922 #: judge/models/contest.py:929
msgid "raw rating" msgid "raw rating"
msgstr "rating thật" msgstr "rating thật"
#: judge/models/contest.py:923 #: judge/models/contest.py:930
msgid "contest performance" msgid "contest performance"
msgstr "" msgstr ""
#: judge/models/contest.py:924 #: judge/models/contest.py:931
msgid "last rated" msgid "last rated"
msgstr "lần cuối được xếp hạng" msgstr "lần cuối được xếp hạng"
#: judge/models/contest.py:928 #: judge/models/contest.py:935
msgid "contest rating" msgid "contest rating"
msgstr "rating kỳ thi" msgstr "rating kỳ thi"
#: judge/models/contest.py:929 #: judge/models/contest.py:936
msgid "contest ratings" msgid "contest ratings"
msgstr "rating kỳ thi" msgstr "rating kỳ thi"
#: judge/models/contest.py:953 #: judge/models/contest.py:960
msgid "contest moss result" msgid "contest moss result"
msgstr "kết quả MOSS kỳ thi" msgstr "kết quả MOSS kỳ thi"
#: judge/models/contest.py:954 #: judge/models/contest.py:961
msgid "contest moss results" msgid "contest moss results"
msgstr "kết quả MOSS kỳ thi" msgstr "kết quả MOSS kỳ thi"
#: judge/models/contest.py:959 #: judge/models/contest.py:966
msgid "clarified problem" msgid "clarified problem"
msgstr "" msgstr ""
#: judge/models/contest.py:961 #: judge/models/contest.py:968
msgid "clarification body" msgid "clarification body"
msgstr "" msgstr ""
#: judge/models/contest.py:963 #: judge/models/contest.py:970
msgid "clarification timestamp" msgid "clarification timestamp"
msgstr "" msgstr ""
#: judge/models/contest.py:982 #: judge/models/contest.py:989
msgid "contests summary" msgid "contests summary"
msgstr "tổng kết kỳ thi" msgstr "tổng kết kỳ thi"
#: judge/models/contest.py:983 #: judge/models/contest.py:990
msgid "contests summaries" msgid "contests summaries"
msgstr "tổng kết kỳ thi" msgstr "tổng kết kỳ thi"
#: judge/models/contest.py:994 judge/models/contest.py:1001 #: judge/models/contest.py:1001 judge/models/contest.py:1008
msgid "official contest category" msgid "official contest category"
msgstr "loại kỳ thi chính thức" msgstr "loại kỳ thi chính thức"
#: judge/models/contest.py:1002 #: judge/models/contest.py:1009
msgid "official contest categories" msgid "official contest categories"
msgstr "các loại kỳ thi chính thức" msgstr "các loại kỳ thi chính thức"
#: judge/models/contest.py:1007 judge/models/contest.py:1014 #: judge/models/contest.py:1014 judge/models/contest.py:1021
msgid "official contest location" msgid "official contest location"
msgstr "địa điểm kỳ thi chính thức" msgstr "địa điểm kỳ thi chính thức"
#: judge/models/contest.py:1015 #: judge/models/contest.py:1022
msgid "official contest locations" msgid "official contest locations"
msgstr "các địa điểm kỳ thi chính thức" msgstr "các địa điểm kỳ thi chính thức"
#: judge/models/contest.py:1027 #: judge/models/contest.py:1034
msgid "contest category" msgid "contest category"
msgstr "loại kỳ thi" msgstr "loại kỳ thi"
#: judge/models/contest.py:1030 #: judge/models/contest.py:1037
msgid "year" msgid "year"
msgstr "năm" msgstr "năm"
#: judge/models/contest.py:1033 #: judge/models/contest.py:1040
msgid "contest location" msgid "contest location"
msgstr "địa điểm kỳ thi" msgstr "địa điểm kỳ thi"
#: judge/models/contest.py:1038 #: judge/models/contest.py:1045
msgid "official contest" msgid "official contest"
msgstr "kỳ thi chính thức" msgstr "kỳ thi chính thức"
#: judge/models/contest.py:1039 #: judge/models/contest.py:1046
msgid "official contests" msgid "official contests"
msgstr "các kỳ thi chính thức" msgstr "các kỳ thi chính thức"
@ -2854,7 +2857,7 @@ msgid "You already voted."
msgstr "Bạn đã vote." msgstr "Bạn đã vote."
#: judge/views/comment.py:267 judge/views/organization.py:881 #: judge/views/comment.py:267 judge/views/organization.py:881
#: judge/views/organization.py:1031 judge/views/organization.py:1226 #: judge/views/organization.py:1034 judge/views/organization.py:1229
msgid "Edited from site" msgid "Edited from site"
msgstr "Chỉnh sửa từ web" msgstr "Chỉnh sửa từ web"
@ -3059,9 +3062,11 @@ msgstr "Điểm trong <a href='%(url)s'>%(course_name)s</a>"
msgid "Grades of %(lesson_name)s in %(course_name)s" msgid "Grades of %(lesson_name)s in %(course_name)s"
msgstr "Chỉnh sửa bài học cho %(course_name)s" msgstr "Chỉnh sửa bài học cho %(course_name)s"
#: judge/views/course.py:382 #: judge/views/course.py:383
#, fuzzy, python-format #, fuzzy, python-format
msgid "Grades of %(lesson_name)s</a> in <a href='%(url)s'>%(course_name)s</a>" msgid ""
"Grades of <a href='%(url_lesson)s'>%(lesson_name)s</a> in <a "
"href='%(url_course)s'>%(course_name)s</a>"
msgstr "Điểm trong <a href='%(url)s'>%(course_name)s</a>" msgstr "Điểm trong <a href='%(url)s'>%(course_name)s</a>"
#: judge/views/custom_file_upload.py:42 #: judge/views/custom_file_upload.py:42
@ -3317,7 +3322,7 @@ msgstr "Bạn có chắc muốn rời tổ chức?"
msgid "Kicked member" msgid "Kicked member"
msgstr "Thêm thành viên" msgstr "Thêm thành viên"
#: judge/views/organization.py:864 judge/views/organization.py:1020 #: judge/views/organization.py:864 judge/views/organization.py:1023
#, python-format #, python-format
msgid "Edit %s" msgid "Edit %s"
msgstr "Chỉnh sửa %s" msgstr "Chỉnh sửa %s"
@ -3336,7 +3341,7 @@ msgid "You created too many groups. You can only create at most %d groups"
msgstr "" msgstr ""
#: judge/views/organization.py:913 judge/views/organization.py:938 #: judge/views/organization.py:913 judge/views/organization.py:938
#: judge/views/organization.py:1111 #: judge/views/organization.py:1114
msgid "Added from site" msgid "Added from site"
msgstr "Thêm từ web" msgstr "Thêm từ web"
@ -3345,7 +3350,7 @@ msgstr "Thêm từ web"
msgid "Add contest" msgid "Add contest"
msgstr "Thêm kỳ thi" msgstr "Thêm kỳ thi"
#: judge/views/organization.py:972 judge/views/organization.py:1158 #: judge/views/organization.py:972 judge/views/organization.py:1161
msgid "Permission denied" msgid "Permission denied"
msgstr "Truy cập bị từ chối" msgstr "Truy cập bị từ chối"
@ -3355,7 +3360,7 @@ msgstr "Truy cập bị từ chối"
msgid "You are not allowed to edit this contest" msgid "You are not allowed to edit this contest"
msgstr "Bạn không được phép chỉnh sửa tổ chức này." msgstr "Bạn không được phép chỉnh sửa tổ chức này."
#: judge/views/organization.py:1024 templates/blog/blog.html:31 #: judge/views/organization.py:1027 templates/blog/blog.html:31
#: templates/comments/content-list.html:53 #: templates/comments/content-list.html:53
#: templates/comments/content-list.html:66 #: templates/comments/content-list.html:66
#: templates/contest/contest-tabs.html:36 templates/contest/macros.html:14 #: templates/contest/contest-tabs.html:36 templates/contest/macros.html:14
@ -3366,27 +3371,27 @@ msgstr "Bạn không được phép chỉnh sửa tổ chức này."
msgid "Edit" msgid "Edit"
msgstr "Chỉnh sửa" msgstr "Chỉnh sửa"
#: judge/views/organization.py:1100 #: judge/views/organization.py:1103
#, python-format #, python-format
msgid "Add blog for %s" msgid "Add blog for %s"
msgstr "Thêm bài đăng cho %s" msgstr "Thêm bài đăng cho %s"
#: judge/views/organization.py:1152 #: judge/views/organization.py:1155
#, fuzzy #, fuzzy
#| msgid "Those who can edit this organization" #| msgid "Those who can edit this organization"
msgid "This blog does not belong to this organization" msgid "This blog does not belong to this organization"
msgstr "Những người có thể chỉnh sửa tổ chức" msgstr "Những người có thể chỉnh sửa tổ chức"
#: judge/views/organization.py:1154 #: judge/views/organization.py:1157
msgid "Not allowed to edit this blog" msgid "Not allowed to edit this blog"
msgstr "Bạn không được phép chỉnh sửa bài đăng này." msgstr "Bạn không được phép chỉnh sửa bài đăng này."
#: judge/views/organization.py:1211 #: judge/views/organization.py:1214
#, python-format #, python-format
msgid "Edit blog %s" msgid "Edit blog %s"
msgstr "Chỉnh sửa %s" msgstr "Chỉnh sửa %s"
#: judge/views/organization.py:1257 #: judge/views/organization.py:1260
#, python-format #, python-format
msgid "Pending blogs in %s" msgid "Pending blogs in %s"
msgstr "Bài đang đợi duyệt trong %s" msgstr "Bài đang đợi duyệt trong %s"
@ -4642,17 +4647,17 @@ msgstr "Bài học"
msgid "Total achieved points" msgid "Total achieved points"
msgstr "Tổng điểm" msgstr "Tổng điểm"
#: templates/course/edit_lesson.html:50 #: templates/course/edit_lesson.html:57
msgid "Add new" msgid "Add new"
msgstr "Thêm mới" msgstr "Thêm mới"
#: templates/course/edit_lesson.html:58 #: templates/course/edit_lesson.html:65
#: templates/organization/contest/edit.html:41 #: templates/organization/contest/edit.html:41
#: templates/organization/form.html:6 #: templates/organization/form.html:6
msgid "Please fix below errors" msgid "Please fix below errors"
msgstr "Vui lòng sửa các lỗi bên dưới" msgstr "Vui lòng sửa các lỗi bên dưới"
#: templates/course/edit_lesson.html:107 #: templates/course/edit_lesson.html:114
#: templates/markdown_editor/markdown_editor.html:122 #: templates/markdown_editor/markdown_editor.html:122
#: templates/organization/blog/edit.html:36 #: templates/organization/blog/edit.html:36
#: templates/organization/contest/edit.html:87 #: templates/organization/contest/edit.html:87

View file

@ -21,9 +21,6 @@ msgstr "Nhóm"
msgid "About" msgid "About"
msgstr "Giới thiệu" msgstr "Giới thiệu"
msgid "Status"
msgstr "Máy chấm"
msgid "Courses" msgid "Courses"
msgstr "Khóa học" msgstr "Khóa học"
@ -600,6 +597,9 @@ msgstr ""
msgid "z-function" msgid "z-function"
msgstr "" msgstr ""
#~ msgid "Status"
#~ msgstr "Máy chấm"
#~ msgid "Insert Image" #~ msgid "Insert Image"
#~ msgstr "Chèn hình ảnh" #~ msgstr "Chèn hình ảnh"