Merge pull request #9180 from surajshetty3416/fix-energy-point-summary
fix: Use _ for translation since frappe._ is not supported
This commit is contained in:
commit
446cfbb6c3
2 changed files with 6 additions and 8 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<h3>{{ _('Top Performer') }} 🏆 </h3>
|
||||
<p> {{ frappe.get_fullname(top_performer.user) }}
|
||||
<span class="text-muted">
|
||||
{{ frappe._('gained {0} points').format(frappe.utils.cint(top_performer.energy_points)) }}
|
||||
{{ _('gained {0} points').format(frappe.utils.cint(top_performer.energy_points)) }}
|
||||
</span>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<h3>{{ _('Top Reviewer') }} ❤️ </h3>
|
||||
<p> {{ frappe.get_fullname(top_reviewer.user) }}
|
||||
<span class="text-muted">
|
||||
{{ frappe._('gave {0} points').format(frappe.utils.cint(top_reviewer.given_points)) }}
|
||||
{{ _('gave {0} points').format(frappe.utils.cint(top_reviewer.given_points)) }}
|
||||
</span>
|
||||
</p>
|
||||
|
||||
|
|
@ -24,9 +24,9 @@
|
|||
<table class='table table-bordered'>
|
||||
<tr>
|
||||
<th> # </th>
|
||||
<th style='width: 70%'>{{ frappe._('User') }}</th>
|
||||
<th style='width: 15%'>{{ frappe._('Energy Points') }}</th>
|
||||
<th style='width: 15%'>{{ frappe._('Points Given') }}</th>
|
||||
<th style='width: 70%'>{{ _('User') }}</th>
|
||||
<th style='width: 15%'>{{ _('Energy Points') }}</th>
|
||||
<th style='width: 15%'>{{ _('Points Given') }}</th>
|
||||
</tr>
|
||||
{% for user in standings %}
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -48,11 +48,9 @@ def get_safe_globals():
|
|||
# make available limited methods of frappe
|
||||
json=json,
|
||||
dict=dict,
|
||||
_dict=frappe._dict,
|
||||
frappe=frappe._dict(
|
||||
_=frappe._,
|
||||
_dict=frappe._dict,
|
||||
flags=frappe.flags,
|
||||
|
||||
format=frappe.format_value,
|
||||
format_value=frappe.format_value,
|
||||
date_format=date_format,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue