From e683cccf3520812b6f031ce780bf8575e5f6c8db Mon Sep 17 00:00:00 2001 From: Ernesto Ruiz Date: Mon, 26 Sep 2022 07:59:13 -0600 Subject: [PATCH 1/3] fix: add translate function to book appointment html --- erpnext/www/book_appointment/index.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/erpnext/www/book_appointment/index.html b/erpnext/www/book_appointment/index.html index 207175f89d..ad964d9370 100644 --- a/erpnext/www/book_appointment/index.html +++ b/erpnext/www/book_appointment/index.html @@ -12,8 +12,8 @@
-

Book an appointment

-

Select the date and your timezone

+

{{ _("Book an appointment") }}

+

{{ _("Select the date and your timezone") }}

@@ -31,7 +31,7 @@
- +
@@ -39,24 +39,24 @@
-

Add details

-

Selected date is at +

{{ _("Add details") }}

+

{{ _("Selected date is") }} {{ _("at") }}

- + - + + placeholder="{{ _('Notes') }}">
-
-
+
+
From 728ef46048d04b17a583c018d4201e868aa20605 Mon Sep 17 00:00:00 2001 From: Ernesto Ruiz Date: Mon, 26 Sep 2022 08:01:48 -0600 Subject: [PATCH 2/3] fix: add translate function to book appointment index.js --- erpnext/www/book_appointment/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/www/book_appointment/index.js b/erpnext/www/book_appointment/index.js index 5562cbd471..46ac15518c 100644 --- a/erpnext/www/book_appointment/index.js +++ b/erpnext/www/book_appointment/index.js @@ -69,7 +69,7 @@ function on_date_or_timezone_select() { window.selected_timezone = timezone.value; update_time_slots(date_picker.value, timezone.value); let lead_text = document.getElementById('lead-text'); - lead_text.innerHTML = "Select Time" + lead_text.innerHTML = __("Select Time") } async function get_time_slots(date, timezone) { @@ -89,7 +89,7 @@ async function update_time_slots(selected_date, selected_timezone) { clear_time_slots(); if (window.slots.length <= 0) { let message_div = document.createElement('p'); - message_div.innerHTML = "There are no slots available on this date"; + message_div.innerHTML = __("There are no slots available on this date"); timeslot_container.appendChild(message_div); return } @@ -128,7 +128,7 @@ function get_slot_layout(time) { let start_time_string = moment(time).tz(timezone).format("LT"); let end_time = moment(time).tz(timezone).add(window.appointment_settings.appointment_duration, 'minutes'); let end_time_string = end_time.format("LT"); - return `${start_time_string}
to ${end_time_string}`; + return `${start_time_string}
${__("to") } ${end_time_string}`; } function select_time() { @@ -227,9 +227,9 @@ async function submit() { }, callback: (response)=>{ if (response.message.status == "Unverified") { - frappe.show_alert("Please check your email to confirm the appointment") + frappe.show_alert(__("Please check your email to confirm the appointment")) } else { - frappe.show_alert("Appointment Created Successfully"); + frappe.show_alert(__("Appointment Created Successfully")); } setTimeout(()=>{ let redirect_url = "/"; @@ -239,7 +239,7 @@ async function submit() { window.location.href = redirect_url;},5000) }, error: (err)=>{ - frappe.show_alert("Something went wrong please try again"); + frappe.show_alert(__("Something went wrong please try again")); button.disabled = false; } }); From 499ce5139c16b7ac60eb7f062919a3298dca739a Mon Sep 17 00:00:00 2001 From: Ernesto Ruiz Date: Mon, 26 Sep 2022 08:04:14 -0600 Subject: [PATCH 3/3] fix: add translate function to book appointment verify html --- erpnext/www/book_appointment/verify/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/www/book_appointment/verify/index.html b/erpnext/www/book_appointment/verify/index.html index 9bcd3d202e..58c07e85cc 100644 --- a/erpnext/www/book_appointment/verify/index.html +++ b/erpnext/www/book_appointment/verify/index.html @@ -8,11 +8,11 @@ {% if success==True %}
- Your email has been verified and your appointment has been scheduled + {{ _("Your email has been verified and your appointment has been scheduled") }}
{% else %}
- Verification failed please check the link + {{ _("Verification failed please check the link") }}
{% endif %} {% endblock%}