Add trans
This commit is contained in:
parent
2ff1ed0f54
commit
0de11d26a6
4 changed files with 70 additions and 7 deletions
|
@ -3,6 +3,7 @@ from django.contrib.auth.models import User
|
||||||
from django.contrib.auth.forms import PasswordChangeForm
|
from django.contrib.auth.forms import PasswordChangeForm
|
||||||
from django.contrib.auth.views import PasswordChangeView
|
from django.contrib.auth.views import PasswordChangeView
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
|
||||||
class CustomModelBackend(ModelBackend):
|
class CustomModelBackend(ModelBackend):
|
||||||
|
|
21
judge/custom_translations.py
Normal file
21
judge/custom_translations.py
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
from django.utils.translation import gettext_lazy as _, ngettext
|
||||||
|
|
||||||
|
|
||||||
|
def custom_trans():
|
||||||
|
return [
|
||||||
|
# Password reset
|
||||||
|
ngettext(
|
||||||
|
"This password is too short. It must contain at least %(min_length)d character.",
|
||||||
|
"This password is too short. It must contain at least %(min_length)d characters.",
|
||||||
|
0,
|
||||||
|
),
|
||||||
|
ngettext(
|
||||||
|
"Your password must contain at least %(min_length)d character.",
|
||||||
|
"Your password must contain at least %(min_length)d characters.",
|
||||||
|
0,
|
||||||
|
),
|
||||||
|
_("The two password fields didn’t match."),
|
||||||
|
_("Your password can’t be entirely numeric."),
|
||||||
|
# Navbar
|
||||||
|
_("Bug Report"),
|
||||||
|
]
|
|
@ -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-01-31 08:04+0700\n"
|
"POT-Creation-Date: 2024-01-31 11:20+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"
|
||||||
|
@ -67,27 +67,27 @@ msgstr "Tiếng Việt"
|
||||||
msgid "English"
|
msgid "English"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: dmoj/urls.py:105
|
#: dmoj/urls.py:106
|
||||||
msgid "Activation key invalid"
|
msgid "Activation key invalid"
|
||||||
msgstr "Mã kích hoạt không hợp lệ"
|
msgstr "Mã kích hoạt không hợp lệ"
|
||||||
|
|
||||||
#: dmoj/urls.py:110
|
#: dmoj/urls.py:111
|
||||||
msgid "Register"
|
msgid "Register"
|
||||||
msgstr "Đăng ký"
|
msgstr "Đăng ký"
|
||||||
|
|
||||||
#: dmoj/urls.py:117
|
#: dmoj/urls.py:118
|
||||||
msgid "Registration Completed"
|
msgid "Registration Completed"
|
||||||
msgstr "Đăng ký hoàn thành"
|
msgstr "Đăng ký hoàn thành"
|
||||||
|
|
||||||
#: dmoj/urls.py:125
|
#: dmoj/urls.py:126
|
||||||
msgid "Registration not allowed"
|
msgid "Registration not allowed"
|
||||||
msgstr "Đăng ký không thành công"
|
msgstr "Đăng ký không thành công"
|
||||||
|
|
||||||
#: dmoj/urls.py:133
|
#: dmoj/urls.py:134
|
||||||
msgid "Login"
|
msgid "Login"
|
||||||
msgstr "Đăng nhập"
|
msgstr "Đăng nhập"
|
||||||
|
|
||||||
#: dmoj/urls.py:221 templates/base.html:114
|
#: dmoj/urls.py:220 templates/base.html:114
|
||||||
#: templates/organization/org-left-sidebar.html:2
|
#: templates/organization/org-left-sidebar.html:2
|
||||||
msgid "Home"
|
msgid "Home"
|
||||||
msgstr "Trang chủ"
|
msgstr "Trang chủ"
|
||||||
|
@ -510,6 +510,34 @@ msgstr "IOI mới"
|
||||||
msgid "Ultimate"
|
msgid "Ultimate"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: judge/custom_translations.py:7
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"This password is too short. It must contain at least %(min_length)d "
|
||||||
|
"character."
|
||||||
|
msgid_plural ""
|
||||||
|
"This password is too short. It must contain at least %(min_length)d "
|
||||||
|
"characters."
|
||||||
|
msgstr[0] "Mật khẩu phải chứa ít nhất %(min_length)d ký tự."
|
||||||
|
|
||||||
|
#: judge/custom_translations.py:12
|
||||||
|
#, python-format
|
||||||
|
msgid "Your password must contain at least %(min_length)d character."
|
||||||
|
msgid_plural "Your password must contain at least %(min_length)d characters."
|
||||||
|
msgstr[0] "Mật khẩu phải chứa ít nhất %(min_length)d ký tự."
|
||||||
|
|
||||||
|
#: judge/custom_translations.py:16
|
||||||
|
msgid "The two password fields didn’t match."
|
||||||
|
msgstr "Mật khẩu xác nhận không khớp."
|
||||||
|
|
||||||
|
#: judge/custom_translations.py:17
|
||||||
|
msgid "Your password can’t be entirely numeric."
|
||||||
|
msgstr "Mật khẩu không được toàn chữ số."
|
||||||
|
|
||||||
|
#: judge/custom_translations.py:19
|
||||||
|
msgid "Bug Report"
|
||||||
|
msgstr "Báo cáo lỗi"
|
||||||
|
|
||||||
#: judge/forms.py:113
|
#: judge/forms.py:113
|
||||||
msgid "File size exceeds the maximum allowed limit of 5MB."
|
msgid "File size exceeds the maximum allowed limit of 5MB."
|
||||||
msgstr "File tải lên không được quá 5MB."
|
msgstr "File tải lên không được quá 5MB."
|
||||||
|
|
|
@ -312,6 +312,19 @@ a {
|
||||||
margin-left: -20px;
|
margin-left: -20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pagedown-image-upload {
|
||||||
|
.submit-input {
|
||||||
|
display: flex;
|
||||||
|
min-width: inherit;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.deletelink-box {
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 799px) {
|
@media (max-width: 799px) {
|
||||||
.hide_texts_on_mobile .actionbar-text {
|
.hide_texts_on_mobile .actionbar-text {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
Loading…
Reference in a new issue