From 9a8799686756f1705d7292974a1117a5b19270d9 Mon Sep 17 00:00:00 2001 From: Charles-Henri Decultot Date: Wed, 13 Mar 2024 21:43:46 +0100 Subject: [PATCH] fix: translatable strings --- .../repost_accounting_ledger/repost_accounting_ledger.py | 2 +- ...rvation_de_ressource___notification_gestionnaire.html | 5 +++-- ...vation_de_ressources___notification_utilisateurs.html | 9 +++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index 8190ecedcd6..60e0d44ecb6 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -184,7 +184,7 @@ def validate_docs_for_voucher_types(doc_voucher_types): # Validate voucher types voucher_types = set(doc_voucher_types) if disallowed_types := voucher_types.difference(allowed_types): - message = "are" if len(disallowed_types) > 1 else "is" + message = _("are") if len(disallowed_types) > 1 else _("is") frappe.throw( _("{0} {1} not allowed to be reposted. Modify {2} to enable reposting.").format( frappe.bold(comma_and(list(disallowed_types))), diff --git a/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.html b/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.html index f1b1dd3c795..e0dd85e1c21 100644 --- a/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.html +++ b/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.html @@ -8,11 +8,12 @@ {% if item.item_booking %} {% set booking = frappe.get_doc("Item Booking", item.item_booking) %}
{{ booking.item_name }}
-
{{ _("Start") }}: {{ frappe.utils.format_datetime(booking.starts_on) }}
-
{{ _("End") }}: {{ frappe.utils.format_datetime(booking.ends_on) }}
+
{{ _("Start", context="Item Booking Notification") }}: {{ frappe.utils.format_datetime(booking.starts_on) }}
+
{{ _("End", context="Item Booking Notification") }}: {{ frappe.utils.format_datetime(booking.ends_on) }}
{% if booking.notes %}
{{ _("Notes") }}: {{ booking.notes }}
{% endif %} + {% endif%} {% endfor %} \ No newline at end of file diff --git a/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.html b/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.html index 4a2d247e9f8..72c95dc3ca7 100644 --- a/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.html +++ b/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.html @@ -8,14 +8,15 @@ {% if item.item_booking %} {% set booking = frappe.get_doc("Item Booking", item.item_booking) %}
{{ booking.item_name }}
-
{{ _("Start") }}: {{ frappe.utils.format_datetime(booking.starts_on) }}
-
{{ _("End") }}: {{ frappe.utils.format_datetime(booking.ends_on) }}
+
{{ _("Start", context="Item Booking Notification") }}: {{ frappe.utils.format_datetime(booking.starts_on) }}
+
{{ _("End", context="Item Booking Notification") }}: {{ frappe.utils.format_datetime(booking.ends_on) }}
{% if booking.notes %}
{{ _("Notes") }}: {{ booking.notes }}
{% endif %} {% if booking.status in ("Confirmed", "Not confirmed") %}
{{ booking.status }}
- {% endif%} - {% endif%} + {% endif %} + + {% endif %} {% endfor %} \ No newline at end of file -- GitLab