feat: Enabled translation on html files in LMS [Proposal] (#21582)
* :fix: translation fix for html files in LMS * fix: typo in translation * Update content.html * Update content.html * Update profile.html Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com> Co-authored-by: Marica <maricadsouza221197@gmail.com>
This commit is contained in:
parent
7f94765d02
commit
43be163b32
@ -59,7 +59,7 @@
|
|||||||
{% macro title() %}
|
{% macro title() %}
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<a href="/lms/course?name={{ course }}&program={{ program }}" class="text-muted">
|
<a href="/lms/course?name={{ course }}&program={{ program }}" class="text-muted">
|
||||||
Back to Course
|
{{_('Back to Course')}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -69,15 +69,15 @@
|
|||||||
|
|
||||||
{% macro navigation() %}
|
{% macro navigation() %}
|
||||||
{% if previous %}
|
{% if previous %}
|
||||||
<a href="/lms/content?program={{ program }}&course={{ course }}&topic={{ topic }}&type={{ previous.content_type }}&content={{ previous.content }}" class='btn text-muted' style="box-shadow: none;">Previous</a>
|
<a href="/lms/content?program={{ program }}&course={{ course }}&topic={{ topic }}&type={{ previous.content_type }}&content={{ previous.content }}" class='btn text-muted' style="box-shadow: none;">{{_('Previous')}}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="/lms/course?name={{ course }}&program={{ program }}" class='btn text-muted' style="box-shadow: none;">Back to Course</a>
|
<a href="/lms/course?name={{ course }}&program={{ program }}" class='btn text-muted' style="box-shadow: none;">{{ _('Back to Course') }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if next %}
|
{% if next %}
|
||||||
<button id="nextButton" onclick="handle('/lms/content?program={{ program }}&course={{ course }}&topic={{ topic }}&type={{ next.content_type }}&content={{ next.content }}')" class='btn btn-primary' disabled="true">Next</button>
|
<button id="nextButton" onclick="handle('/lms/content?program={{ program }}&course={{ course }}&topic={{ topic }}&type={{ next.content_type }}&content={{ next.content }}')" class='btn btn-primary' disabled="true">{{_('Next')}}</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
<button id="nextButton" onclick="handle('/lms/course?name={{ course }}&program={{ program }}')" class='btn btn-primary' disabled="true">Finish Topic</button>
|
<button id="nextButton" onclick="handle('/lms/course?name={{ course }}&program={{ program }}')" class='btn btn-primary' disabled="true">{{_('Finish Topic')}}</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
@ -86,7 +86,7 @@
|
|||||||
{{ title() }}
|
{{ title() }}
|
||||||
<div class="text-muted">
|
<div class="text-muted">
|
||||||
{% if content.duration %}
|
{% if content.duration %}
|
||||||
{{ content.duration }} Mins
|
{{ content.duration }} {{_('Mins')}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if content.publish_date and content.duration%}
|
{% if content.publish_date and content.duration%}
|
||||||
@ -94,7 +94,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if content.publish_date %}
|
{% if content.publish_date %}
|
||||||
Published on {{ content.publish_date.strftime('%d, %b %Y') }}
|
{{_('Published on')}} {{ content.publish_date.strftime('%d, %b %Y') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -109,13 +109,13 @@
|
|||||||
{{ title() }}
|
{{ title() }}
|
||||||
<div class="text-muted">
|
<div class="text-muted">
|
||||||
{% if content.author or content.publish_date %}
|
{% if content.author or content.publish_date %}
|
||||||
Published
|
{{_('Published')}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if content.author %}
|
{% if content.author %}
|
||||||
by {{ content.author }}
|
{{_('by')}} {{ content.author }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if content.publish_date %}
|
{% if content.publish_date %}
|
||||||
on {{ content.publish_date.strftime('%d, %b %Y') }}
|
{{_('on')}} {{ content.publish_date.strftime('%d, %b %Y') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -205,4 +205,4 @@
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -72,11 +72,11 @@
|
|||||||
{% if has_access %}
|
{% if has_access %}
|
||||||
<div class='card-footer'>
|
<div class='card-footer'>
|
||||||
{% if progress[topic.name].completed %}
|
{% if progress[topic.name].completed %}
|
||||||
<span class="indicator green">Completed</span>
|
<span class="indicator green">{{_('Completed')}}</span>
|
||||||
{% elif progress[topic.name].started %}
|
{% elif progress[topic.name].started %}
|
||||||
<span class="indicator orange">In Progress</span>
|
<span class="indicator orange">{{_('In Progress')}}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="indicator blue">Start</span>
|
<span class="indicator blue">{{_('Start')}}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
<p class='lead'>{{ education_settings.description }}</p>
|
<p class='lead'>{{ education_settings.description }}</p>
|
||||||
<p class="mt-4">
|
<p class="mt-4">
|
||||||
{% if frappe.session.user == 'Guest' %}
|
{% if frappe.session.user == 'Guest' %}
|
||||||
<a class="btn btn-primary btn-lg" href="'/login#signup'">Sign Up</a>
|
<a class="btn btn-primary btn-lg" href="'/login#signup'">{{_('Sign Up')}}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{% if has_access or program.intro_video%}
|
{% if has_access or program.intro_video%}
|
||||||
<div class='card-footer'>
|
<div class='card-footer'>
|
||||||
{% if has_access %} <span class="indicator green">Enrolled</span>
|
{% if has_access %} <span class="indicator green">{{_('Enrolled')}}</span>
|
||||||
{% elif program.intro_video %} <span><a href="{{ program.intro_video }}" target="blank">Watch Intro</a></span>
|
{% elif program.intro_video %} <span><a href="{{ program.intro_video }}" target="blank">{{_('Watch Intro')}}</a></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
<div class='container pb-5'>
|
<div class='container pb-5'>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<a href="{{ back.url }}" class="text-muted">
|
<a href="{{ back.url }}" class="text-muted">
|
||||||
Back to {{ back.name }}
|
{{_('Back to')}} {{ _(back.name) }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<h1>{{ title }}</h1>
|
<h1>{{ title }}</h1>
|
||||||
<p class='lead' style="max-width: 100%;">{{ description or ''}}</p>
|
<p class='lead' style="max-width: 100%;">{{ description or ''}}</p>
|
||||||
<p class="mt-4">
|
<p class="mt-4">
|
||||||
{% if frappe.session.user == 'Guest' %}
|
{% if frappe.session.user == 'Guest' %}
|
||||||
<a id="signup" class="btn btn-primary btn-lg" href="/login#signup">Sign Up</a>
|
<a id="signup" class="btn btn-primary btn-lg" href="/login#signup">{{_('Sign Up')}}</a>
|
||||||
{% elif not has_access %}
|
{% elif not has_access %}
|
||||||
<button id="enroll" class="btn btn-primary btn-lg" onclick="enroll()" disabled>Enroll</button>
|
<button id="enroll" class="btn btn-primary btn-lg" onclick="enroll()" disabled>{{_('Enroll')}}</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
let btn = document.getElementById('enroll');
|
let btn = document.getElementById('enroll');
|
||||||
btn.disbaled = true;
|
btn.disbaled = true;
|
||||||
btn.innerText = 'Enrolling...'
|
btn.innerText = __('Enrolling...')
|
||||||
|
|
||||||
let opts = {
|
let opts = {
|
||||||
method: 'erpnext.education.utils.enroll_in_program',
|
method: 'erpnext.education.utils.enroll_in_program',
|
||||||
@ -44,7 +44,7 @@
|
|||||||
window.location.reload()
|
window.location.reload()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
success_dialog.set_message('You have successfully enrolled for the program ');
|
success_dialog.set_message(__('You have successfully enrolled for the program '));
|
||||||
success_dialog.$message.show()
|
success_dialog.$message.show()
|
||||||
success_dialog.show();
|
success_dialog.show();
|
||||||
btn.disbaled = false;
|
btn.disbaled = false;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class='card-footer'>
|
<div class='card-footer'>
|
||||||
<span class="small">{{ program.completion }}% Complete</span>
|
<span class="small">{{ program.completion }}{{_('% Complete')}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
@ -43,11 +43,11 @@
|
|||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<a href="/lms" class="text-muted">
|
<a href="/lms" class="text-muted">
|
||||||
Back to Home
|
{{_('Back to Home')}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5 text-right">
|
<div class="col-md-5 text-right">
|
||||||
<a href="/update-profile?name={{ frappe.session.user }}" target="blank" class="mt-0 text-muted">Edit Profile</a>
|
<a href="/update-profile?name={{ frappe.session.user }}" target="blank" class="mt-0 text-muted">{{_('Edit Profile')}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h1>{{ student.first_name }} {{ student.last_name or '' }}</h1>
|
<h1>{{ student.first_name }} {{ student.last_name or '' }}</h1>
|
||||||
@ -61,4 +61,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -55,11 +55,11 @@
|
|||||||
{% if has_access and progress[course.name] %}
|
{% if has_access and progress[course.name] %}
|
||||||
<div class='card-footer'>
|
<div class='card-footer'>
|
||||||
{% if progress[course.name].completed %}
|
{% if progress[course.name].completed %}
|
||||||
<span class="indicator green">Completed</span>
|
<span class="indicator green">{{_('Completed')}}</span>
|
||||||
{% elif progress[course.name].started %}
|
{% elif progress[course.name].started %}
|
||||||
<span class="indicator orange">In Progress</span>
|
<span class="indicator orange">{{_('In Progress')}}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="indicator blue">Start</span>
|
<span class="indicator blue">{{_('Start')}}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -23,13 +23,13 @@
|
|||||||
{% if has_access %}
|
{% if has_access %}
|
||||||
<div class='card-footer'>
|
<div class='card-footer'>
|
||||||
{% if content.content_type == 'Quiz' %}
|
{% if content.content_type == 'Quiz' %}
|
||||||
{% if content.result == 'Fail' %} <span class="indicator red">Fail <span class="text-muted">({{ content.score }}/100)</span></span>
|
{% if content.result == 'Fail' %} <span class="indicator red">{{_('Fail')}} <span class="text-muted">({{ content.score }}/100)</span></span>
|
||||||
{% elif content.result == 'Pass' %} <span class="indicator green">Pass <span class="text-muted">({{ content.score }}/100)</span>
|
{% elif content.result == 'Pass' %} <span class="indicator green">{{_('Pass')}} <span class="text-muted">({{ content.score }}/100)</span>
|
||||||
{% else %} <span class="indicator blue">Start</span>
|
{% else %} <span class="indicator blue">{{_('Start')}}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if content.completed %} <span class="indicator green">Completed</span>
|
{% if content.completed %} <span class="indicator green">{{_('Completed')}}</span>
|
||||||
{% else %} <span class="indicator blue">Start</span>
|
{% else %} <span class="indicator blue">{{_('Start')}}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user