Merge pull request #29603 from edx/jawayria/fix-ugettext-lms4

fix: replace 'ugettext' with 'gettext' in lms
This commit is contained in:
Jawayria
2021-12-16 13:58:53 +05:00
committed by GitHub
18 changed files with 26 additions and 26 deletions

View File

@@ -3,7 +3,7 @@
<%namespace name='static' file='/static_content.html'/> <%namespace name='static' file='/static_content.html'/>
<%def name="online_help_token()"><% return "notes" %></%def> <%def name="online_help_token()"><% return "notes" %></%def>
<%! <%!
from django.utils.translation import ugettext as _ from django.utils.translation import gettext as _
from lms.djangoapps.edxnotes.helpers import NoteJSONEncoder from lms.djangoapps.edxnotes.helpers import NoteJSONEncoder
from openedx.core.djangolib.markup import HTML, Text from openedx.core.djangolib.markup import HTML, Text
from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string

View File

@@ -1,6 +1,6 @@
<%page args="course" expression_filter="h"/> <%page args="course" expression_filter="h"/>
<%! <%!
from django.utils.translation import ugettext as _ from django.utils.translation import gettext as _
from django.urls import reverse from django.urls import reverse
from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string
%> %>

View File

@@ -1,5 +1,5 @@
<%page expression_filter="h"/> <%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ <%! from django.utils.translation import gettext as _
from openedx.core.djangolib.markup import HTML, Text from openedx.core.djangolib.markup import HTML, Text
%> %>

View File

@@ -1,7 +1,7 @@
<%page expression_filter="h"/> <%page expression_filter="h"/>
<%inherit file="main.html" /> <%inherit file="main.html" />
<%! <%!
from django.utils.translation import ugettext as _ from django.utils.translation import gettext as _
from openedx.core.djangolib.markup import HTML, Text from openedx.core.djangolib.markup import HTML, Text
from django.urls import reverse from django.urls import reverse
%> %>

View File

@@ -1,5 +1,5 @@
<%page expression_filter="h"/> <%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ <%! from django.utils.translation import gettext as _
from openedx.core.djangolib.markup import HTML, Text from openedx.core.djangolib.markup import HTML, Text
%> %>

View File

@@ -1,5 +1,5 @@
## mako ## mako
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import gettext as _ %>
<p> <p>
${_("Hi {name},").format(name=recipient_name)} ${_("Hi {name},").format(name=recipient_name)}
</p> </p>

View File

@@ -1,4 +1,4 @@
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import gettext as _ %>
${_("Sorry! The photos you submitted for ID verification were not accepted, for the following reason(s):")} ${_("Sorry! The photos you submitted for ID verification were not accepted, for the following reason(s):")}
@@ -35,4 +35,4 @@ ${_("Resubmit Verification: {reverify_url}").format(reverify_url=reverify_url)}
${_("ID Verification FAQ: {faq_url}").format(faq_url=faq_url)} ${_("ID Verification FAQ: {faq_url}").format(faq_url=faq_url)}
${_("Thank you,")} ${_("Thank you,")}
${_("The {platform_name} team").format(platform_name=platform_name)} ${_("The {platform_name} team").format(platform_name=platform_name)}

View File

@@ -1,5 +1,5 @@
## mako ## mako
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import gettext as _ %>
${_("Hi {name},").format(name=order.user.profile.name)} ${_("Hi {name},").format(name=order.user.profile.name)}
${_("Your payment was successful. You will see the charge below on your next credit or debit card statement under the company name {merchant_name}.").format(merchant_name=settings.CC_MERCHANT_NAME)} ${_("Your payment was successful. You will see the charge below on your next credit or debit card statement under the company name {merchant_name}.").format(merchant_name=settings.CC_MERCHANT_NAME)}

View File

@@ -1,4 +1,4 @@
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import gettext as _ %>
${_("Hello {full_name},").format(full_name=full_name)} ${_("Hello {full_name},").format(full_name=full_name)}

View File

@@ -1,5 +1,5 @@
## mako ## mako
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import gettext as _ %>
${_("Hi {full_name},").format(full_name=full_name)} ${_("Hi {full_name},").format(full_name=full_name)}

View File

@@ -1,5 +1,5 @@
## mako ## mako
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import gettext as _ %>
<%namespace name='static' file='../static_content.html'/> <%namespace name='static' file='../static_content.html'/>
(Not currently used) (Not currently used)

View File

@@ -1,5 +1,5 @@
## mako ## mako
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import gettext as _ %>
% if status == "approved": % if status == "approved":
${_("We have successfully verified your identity for the {assessment} assessment in the {course_name} course." ${_("We have successfully verified your identity for the {assessment} assessment in the {course_name} course."
).format(course_name=course_name, assessment=assessment)} ).format(course_name=course_name, assessment=assessment)}

View File

@@ -1,5 +1,5 @@
<%page expression_filter="h"/> <%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import gettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<%block name="pagetitle">${_("This Course Unavailable In Your Country")}</%block> <%block name="pagetitle">${_("This Course Unavailable In Your Country")}</%block>

View File

@@ -1,5 +1,5 @@
<%page expression_filter="h"/> <%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import gettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<%block name="pagetitle">${_("This Course Unavailable In Your Country")}</%block> <%block name="pagetitle">${_("This Course Unavailable In Your Country")}</%block>

View File

@@ -2,7 +2,7 @@
<%inherit file="main.html" /> <%inherit file="main.html" />
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%! <%!
from django.utils.translation import ugettext as _ from django.utils.translation import gettext as _
from django.utils.translation import pgettext from django.utils.translation import pgettext
from lms.djangoapps.courseware.courses import get_course_about_section from lms.djangoapps.courseware.courses import get_course_about_section
%> %>

View File

@@ -1,11 +1,11 @@
<%page expression_filter="h" /> <%page expression_filter="h" />
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import gettext as _ %>
<h1>${_("Student Enrollment Form")} </h1> <h1>${_("Student Enrollment Form")} </h1>
<p> ${_("Course: ") % course} <p> ${_("Course: ") % course}
<form method="POST"> <form method="POST">
<input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }"> <input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }">
<h2> ${_("Add new students")} </h2> <h2> ${_("Add new students")} </h2>
<textarea name="new_students"> <textarea name="new_students">

View File

@@ -1,5 +1,5 @@
<%page expression_filter="h" /> <%page expression_filter="h" />
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import gettext as _ %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> "http://www.w3.org/TR/html4/strict.dtd">

View File

@@ -1,17 +1,17 @@
<%page expression_filter="h"/> <%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import gettext as _ %>
<html> <html>
<h1>${_('Tracking Log')}</h1> <h1>${_('Tracking Log')}</h1>
<table border="1"><tr><th>${_('datetime')}</th><th>${_('username')}</th><th>${_('ipaddr')}</th><th>${_('source')}</th><th>${_('type')}</th></tr> <table border="1"><tr><th>${_('datetime')}</th><th>${_('username')}</th><th>${_('ipaddr')}</th><th>${_('source')}</th><th>${_('type')}</th></tr>
% for rec in records: % for rec in records:
<tr> <tr>
<td>${rec.dtstr}</td> <td>${rec.dtstr}</td>
<td>${rec.username}</td> <td>${rec.username}</td>
<td>${rec.ip}</td> <td>${rec.ip}</td>
<td>${rec.event_source}</td> <td>${rec.event_source}</td>
<td>${rec.event_type}</td> <td>${rec.event_type}</td>
</tr> </tr>
% endfor % endfor
</table> </table>
</html> </html>