Skip to content

Commit

Permalink
fix: make project page translatable (backport #37743) (#37801)
Browse files Browse the repository at this point in the history
fix: make project page translatable

(cherry picked from commit e72afd0)

Co-authored-by: barredterra <[email protected]>
  • Loading branch information
mergify[bot] and barredterra authored Oct 31, 2023
1 parent 254ec2c commit 59e67cd
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions erpnext/templates/pages/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@ <h3 class="my-account-header">{{ doc.project_name }}</h3>

{% block style %}
<style>
{
% include "templates/includes/projects.css"%
}
{% include "templates/includes/projects.css" %}
</style>
{% endblock %}

{% block page_content %}
<div class="web-list-item transaction-list-item">
<div class="row align-items-center">
<div class="col-sm-4 "><b>Status: {{ doc.status }}</b></div>
<div class="col-sm-4 "><b>Progress: {{ doc.percent_complete }}%</b></div>
<div class="col-sm-4 "><b>Hours Spent: {{ doc.actual_time | round }}</b></div>
<div class="col-sm-4 "><b>{{ _("Status") }}: {{ _(doc.status) }}</b></div>
<div class="col-sm-4 "><b>{{ _("Progress") }}: {{ doc.get_formatted("percent_complete") }}</b></div>
<div class="col-sm-4 "><b>{{ _("Hours Spent") }}: {{ doc.get_formatted("actual_time") }}</b></div>
</div>
</div>

Expand All @@ -34,7 +32,7 @@ <h3 class="my-account-header">{{ doc.project_name }}</h3>
<hr>

<div class="row align-items-center">
<div class="col-sm-6 my-account-header"> <h4>Tasks</h4></div>
<div class="col-sm-6 my-account-header"> <h4>{{ _("Tasks") }}</h4></div>
<div class="col-sm-6 text-right">
<a class="btn btn-secondary btn-light btn-sm" href='/tasks/new?project={{ doc.project_name }}'>{{ _("New task") }}</a>
</div>
Expand All @@ -44,39 +42,39 @@ <h3 class="my-account-header">{{ doc.project_name }}</h3>
<div class="result">
<div class="web-list-item transaction-list-item">
<div class="row align-items-center">
<div class="col-sm-4"><b>Tasks</b></div>
<div class="col-sm-2"><b>Status</b></div>
<div class="col-sm-2"><b>End Date</b></div>
<div class="col-sm-2"><b>Assignment</b></div>
<div class="col-sm-2"><b>Modified On</b></div>
<div class="col-sm-4"><b>{{ _("Tasks") }}</b></div>
<div class="col-sm-2"><b>{{ _("Status") }}</b></div>
<div class="col-sm-2"><b>{{ _("End Date") }}</b></div>
<div class="col-sm-2"><b>{{ _("Assignment") }}</b></div>
<div class="col-sm-2"><b>{{ _("Modified On") }}</b></div>
</div>
</div>
{% include "erpnext/templates/includes/projects/project_tasks.html" %}
</div>
</div>
{% else %}
{{ empty_state('Task')}}
{{ empty_state(_("Task")) }}
{% endif %}

<h4 class="my-account-header">Timesheets</h4>
<h4 class="my-account-header">{{ _("Timesheets") }}</h4>
{% if doc.timesheets %}
<div class="website-list">
<div class="result">
<div class="web-list-item transaction-list-item">
<div class="row align-items-center">
<div class="col-xs-2"><b>Timesheet</b></div>
<div class="col-xs-2"><b>Status</b></div>
<div class="col-xs-2"><b>From</b></div>
<div class="col-xs-2"><b>To</b></div>
<div class="col-xs-2"><b>Modified By</b></div>
<div class="col-xs-2"><b>Modified On</b></div>
<div class="col-xs-2"><b>{{ _("Timesheet") }}</b></div>
<div class="col-xs-2"><b>{{ _("Status") }}</b></div>
<div class="col-xs-2"><b>{{ _("From") }}</b></div>
<div class="col-xs-2"><b>{{ _("To") }}</b></div>
<div class="col-xs-2"><b>{{ _("Modified By") }}</b></div>
<div class="col-xs-2"><b>{{ _("Modified On") }}</b></div>
</div>
</div>
{% include "erpnext/templates/includes/projects/project_timesheets.html" %}
</div>
</div>
{% else %}
{{ empty_state('Timesheet')}}
{{ empty_state(_("Timesheet")) }}
{% endif %}

{% if doc.attachments %}
Expand Down Expand Up @@ -113,7 +111,7 @@ <h4>{{ _("Attachments") }}</h4>

{% macro progress_bar(percent_complete) %}
{% if percent_complete %}
<span class="small py-2">Project Progress:</span>
<span class="small py-2">{{ _("Project Progress:") }}</span>
<div class="progress progress-hg" style="height: 15px;">
<div
class="progress-bar progress-bar-{{ 'warning' if percent_complete|round < 100 else 'success' }} active"\
Expand All @@ -133,7 +131,7 @@ <h4>{{ _("Attachments") }}</h4>
<div>
<img src="/assets/frappe/images/ui-states/list-empty-state.svg" alt="Generic Empty State" class="null-state">
</div>
<p>You haven't created a {{ section_name }} yet</p>
<p>{{ _("You haven't created a {0} yet").format(section_name) }}</p>
</div>
</div>
</div>
Expand Down

0 comments on commit 59e67cd

Please sign in to comment.