fix: make report's "printed on" translatable (#46913)

* fix: make report's "printed on" translatable

* fix: go for lower case "on" because we already have translations for that

* fix: remove redundant letter head

* fix(General Ledger): make table header translatable
This commit is contained in:
Raffael Meyer
2025-04-08 15:22:13 +02:00
committed by GitHub
5 changed files with 15 additions and 25 deletions

View File

@@ -282,4 +282,4 @@
{% } %} {% } %}
</tbody> </tbody>
</table> </table>
<p class="text-right text-muted">{{ __("Printed On ") }}{%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p> <p class="text-right text-muted">{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}</p>

View File

@@ -1,6 +1,3 @@
<div style="margin-bottom: 7px;">
{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
</div>
<h2 class="text-center">{%= __("Bank Reconciliation Statement") %}</h2> <h2 class="text-center">{%= __("Bank Reconciliation Statement") %}</h2>
<h4 class="text-center">{%= filters.account && (filters.account + ", "+filters.report_date) || "" %} {%= filters.company %}</h4> <h4 class="text-center">{%= filters.account && (filters.account + ", "+filters.report_date) || "" %} {%= filters.company %}</h4>
<hr> <hr>
@@ -46,4 +43,4 @@
{% } %} {% } %}
</tbody> </tbody>
</table> </table>
<p class="text-right text-muted">Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p> <p class="text-right text-muted">{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}</p>

View File

@@ -67,5 +67,5 @@
</tbody> </tbody>
</table> </table>
<p class="text-right text-muted"> <p class="text-right text-muted">
Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %} {%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}
</p> </p>

View File

@@ -71,23 +71,21 @@
</div> </div>
<div style="text-align:center; font-size:13px;"> <div style="text-align:center; font-size:13px;">
<b> <b>
{%= frappe.datetime.str_to_user(filters.from_date) %} {%= __("{0} to {1}", [frappe.datetime.str_to_user(filters.from_date), frappe.datetime.str_to_user(filters.to_date)]) %}<br><br>
{%= __("to") %}
{%= frappe.datetime.str_to_user(filters.to_date) %}<br><br>
</b> </b>
</div> </div>
</div> </div>
<table style="width:100%; font-size: 11px"> <table style="width:100%; font-size: 11px">
<thead> <thead>
<tr class="title-letter-spacing" style="text-align: center; font-weight:bold"> <tr class="title-letter-spacing" style="text-align: center; font-weight:bold">
<td style="border: 1.5px solid black; width: 7em">DATE</td> <td style="border: 1.5px solid black; width: 7em">{%= __("Date").toLocaleUpperCase() %}</td>
<td style="border: 1.5px solid black">PARTICULARS</td> <td style="border: 1.5px solid black">{%= __("Particulars").toLocaleUpperCase() %}</td>
{% if(filters.show_remarks) { %} {% if(filters.show_remarks) { %}
<td style="border: 1.5px solid black">REMARKS</td> <td style="border: 1.5px solid black">{%= __("Remarks").toLocaleUpperCase() %}</td>
{% } %} {% } %}
<td style="border: 1.5px solid black; width: 9em">DEBIT</td> <td style="border: 1.5px solid black; width: 9em">{%= __("Debit").toLocaleUpperCase() %}</td>
<td style="border: 1.5px solid black; width: 9em">CREDIT</td> <td style="border: 1.5px solid black; width: 9em">{%= __("Credit").toLocaleUpperCase() %}</td>
<td style="border: 1.5px solid black; width: 10.2em">BALANCE</td> <td style="border: 1.5px solid black; width: 10.2em">{%= __("Balance").toLocaleUpperCase() %}</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -131,10 +129,10 @@
</td> </td>
<td style="text-align: left; border-right: 1px dotted black"><b> <td style="text-align: left; border-right: 1px dotted black"><b>
{% if(i == l-2) { %} {% if(i == l-2) { %}
{%= "Total" %} {%= __("Total") %}
{% } else { %} {% } else { %}
{% if(i == l-1) { %} {% if(i == l-1) { %}
{%= "Closing [Opening + Total] " %} {%= __("Closing [Opening + Total] ") %}
{% } else { %} {% } else { %}
{%= frappe.format(data[i].account, {fieldtype: "Link"}) || "&nbsp;" %} {%= frappe.format(data[i].account, {fieldtype: "Link"}) || "&nbsp;" %}
{% } %} {% } %}
@@ -173,5 +171,5 @@
{% endfor%} {% endfor%}
</tbody> </tbody>
</table> </table>
<p class="text-right text-muted">Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p> <p class="text-right text-muted">{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}</p>
</div> </div>

View File

@@ -94,9 +94,6 @@
</script> </script>
</head> </head>
<div style="margin-bottom: 7px;" class="text-center">
{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
</div>
<h2 class="text-center">{%= __(report.report_name) %}</h2> <h2 class="text-center">{%= __(report.report_name) %}</h2>
<h4 class="text-center">{%= filters.item %} </h4> <h4 class="text-center">{%= filters.item %} </h4>
@@ -124,9 +121,7 @@
</tbody> </tbody>
</table> </table>
<h4 class="text-center"> Analysis Chart </h4> <h4 class="text-center">{%= __("Analysis Chart") %}</h4>
<div id="chart_div"></div> <div id="chart_div"></div>
<p class="text-right text-muted">{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}</p>
<p class="text-right text-muted">Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p>