fix: translations

This commit is contained in:
Jannat Patel
2022-11-04 13:27:14 +05:30
parent 5916695d30
commit bd929bfa3f
4 changed files with 11 additions and 6 deletions

View File

@@ -23,8 +23,10 @@ class LMSCertificateRequest(Document):
if req.date == getdate(self.date) and getdate() <= getdate(self.date): if req.date == getdate(self.date) and getdate() <= getdate(self.date):
course_title = frappe.db.get_value("LMS Course", req.course, "title") course_title = frappe.db.get_value("LMS Course", req.course, "title")
frappe.throw( frappe.throw(
_( _("You already have an evaluation on {0} at {1} for the course {2}.").format(
f"You already have an evaluation on {format_date(req.date, 'medium')} at {format_time(req.start_time, 'short')} for the course {course_title}." format_date(req.date, "medium"),
format_time(req.start_time, "short"),
course_title,
) )
) )

View File

@@ -15,7 +15,9 @@ frappe.ready(function () {
data.work_experience.forEach((exp) => { data.work_experience.forEach((exp) => {
if (!exp.current && !exp.to_date) { if (!exp.current && !exp.to_date) {
information_missing = true; information_missing = true;
frappe.msgprint("To Date is mandatory in Work Experience."); frappe.msgprint(
__("To Date is mandatory in Work Experience.")
);
} }
}); });
} }

View File

@@ -224,7 +224,8 @@ def get_palette(full_name):
@frappe.whitelist(allow_guest=True) @frappe.whitelist(allow_guest=True)
def sign_up(email, full_name, verify_terms, user_category): def sign_up(email, full_name, verify_terms, user_category):
if is_signup_disabled(): if is_signup_disabled():
frappe.throw(_("Sign Up is disabled"), title="Not Allowed") error = _("Sign Up is disabled")
frappe.throw(error, title="Not Allowed")
user = frappe.db.get("User", {"email": email}) user = frappe.db.get("User", {"email": email})
if user: if user:
@@ -351,7 +352,7 @@ def get_user_details(users):
def get_users(or_filters, start, page_length, text): def get_users(or_filters, start, page_length, text):
# nosemgrep
users = frappe.db.sql( users = frappe.db.sql(
""" """
SELECT DISTINCT u.name SELECT DISTINCT u.name

View File

@@ -318,7 +318,7 @@ const upload_file = (file, target) => {
); );
} else if (xhr.status === 413) { } else if (xhr.status === 413) {
frappe.msgprint( frappe.msgprint(
"Size exceeds the maximum allowed file size." __("Size exceeds the maximum allowed file size.")
); );
} else { } else {
frappe.msgprint( frappe.msgprint(