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):
course_title = frappe.db.get_value("LMS Course", req.course, "title")
frappe.throw(
_(
f"You already have an evaluation on {format_date(req.date, 'medium')} at {format_time(req.start_time, 'short')} for the course {course_title}."
_("You already have an evaluation on {0} at {1} for the course {2}.").format(
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) => {
if (!exp.current && !exp.to_date) {
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)
def sign_up(email, full_name, verify_terms, user_category):
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})
if user:
@@ -351,7 +352,7 @@ def get_user_details(users):
def get_users(or_filters, start, page_length, text):
# nosemgrep
users = frappe.db.sql(
"""
SELECT DISTINCT u.name

View File

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