Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace ugettext with gettext #33022

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cms/templates/html_error.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>
<%! from django.urls import reverse %>

<%block name="content">
Expand Down
2 changes: 1 addition & 1 deletion cms/templates/widgets/html-edit.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>

<div class="wrapper-comp-editor" id="editor-tab" data-base-asset-url="${base_asset_url}" data-editor="${editor}">
<section class="html-editor editor">
Expand Down
2 changes: 1 addition & 1 deletion cms/templates/widgets/metadata-edit.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>
<%namespace name='static' file='../static_content.html'/>

<%
Expand Down
2 changes: 1 addition & 1 deletion cms/templates/widgets/tabs-aggregator.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>
<div class="wrapper-comp-editor" id="editor-tab-${html_id}" data-html_id="${html_id}">
<section class="editor-with-tabs">
<div class="edit-header">
Expand Down
2 changes: 1 addition & 1 deletion common/templates/edxnotes_wrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<%!
import json
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from common.djangoapps.student.models import anonymous_id_for_user
from openedx.core.djangolib.js_utils import js_escaped_string, dump_js_escaped_json
%>
Expand Down
2 changes: 1 addition & 1 deletion common/templates/emails/contact_us_feedback_email_body.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>
${_("Feedback Form")}

${_("Email: {email}").format(email=email)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<%! from django.utils.translation import ugettext as _ %>${_("Feedback from user")}
<%! from django.utils.translation import gettext as _ %>${_("Feedback from user")}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>
<%! from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers %>

<p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>
<%! from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers %>

${_("Your {platform_name} account email has been updated").format(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%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
%>
<%inherit file="../main.html" />
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/annotatable.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>

<div class="annotatable-wrapper">
<div class="annotatable-header">
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/api_admin/catalogs/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%inherit file="../../main.html"/>
<%!
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from openedx.core.djangolib.js_utils import js_escaped_string
%>

Expand Down
2 changes: 1 addition & 1 deletion lms/templates/api_admin/catalogs/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%inherit file="../../main.html"/>
<%!
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
%>

<%block name="pagetitle">${_("Catalog search")}</%block>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/certificates/_about-edx.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>
<section class="about-item about-edx">
<h2 class="about-edx-title hd-4">${company_about_title}</h2>

Expand Down
2 changes: 1 addition & 1 deletion lms/templates/certificates/_accomplishment-banner.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%page expression_filter="h"/>
<%!
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from openedx.core.djangolib.js_utils import js_escaped_string
%>
<%namespace name='static' file='../static_content.html'/>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/certificates/_accomplishment-header.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>

<div class="wrapper-header">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%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
%>
<div class="wrapper-accomplishment-support">
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/certificates/invalid.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%page expression_filter="h"/>
<%inherit file="accomplishment-base.html" />
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>

<div class="wrapper-content status status-invalid">
<div class="wrapper-content-grid">
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/certificates/url_unsupported.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%page expression_filter="h"/>
<%inherit file="accomplishment-base.html" />
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>

<div class="wrapper-content status status-invalid">
<div class="wrapper-content-grid">
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/certificates/valid.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%page expression_filter="h"/>
<%inherit file="accomplishment-base.html" />
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>

% if user.is_authenticated and user.id == int(accomplishment_user_id):
<%include file="_accomplishment-banner.html" />
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/conditional_block.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%page expression_filter="h"/>
<%!
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from openedx.core.djangolib.markup import HTML, Text
%>

Expand Down
2 changes: 1 addition & 1 deletion lms/templates/course_modes/_upgrade_button.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%page args="content_gating_enabled, course_duration_limit_enabled, min_price, price_before_discount" 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
%>

Expand Down
2 changes: 1 addition & 1 deletion lms/templates/course_modes/choose.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%page expression_filter="h"/>
<%inherit file="../main.html" />
<%!
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from django.urls import reverse
from openedx.core.djangolib.js_utils import js_escaped_string
from openedx.core.djangolib.markup import HTML, Text
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/course_modes/error.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%page expression_filter="h"/>
<%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 django.urls import reverse
from openedx.core.djangolib.js_utils import js_escaped_string
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/course_modes/fbe.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<%page expression_filter="h"/>
<%inherit file="track_selection.html" />
<%!
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from openedx.core.djangolib.markup import HTML, Text
%>
<%block name="track_selection_certificate_bullets">
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/course_modes/track_selection.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%page expression_filter="h"/>
<%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 django.urls import reverse
from openedx.core.djangolib.js_utils import js_escaped_string
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/course_modes/unfbe.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<%page expression_filter="h"/>
<%inherit file="track_selection.html" />
<%!
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from openedx.core.djangolib.markup import HTML, Text
%>
<%block name="track_selection_certificate_bullets">
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/accordion.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%namespace name='static' file='../static_content.html'/>
<%!
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from django.conf import settings
from openedx.core.djangolib.markup import HTML, Text
%>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/course_about_sidebar_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%!
import six

from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from django.urls import reverse
from django.conf import settings
%>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/course_navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from django.conf import settings
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
%>

<%
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/course_updates.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>
<div class="recent-updates">
% for index, update in enumerate(visible_updates):
<article class="updates-article">
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/courses.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%page expression_filter="h"/>
<%!
import json
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from openedx.core.djangolib.js_utils import js_escaped_string, dump_js_escaped_json
%>
<%inherit file="../main.html" />
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/courseware-chromeless.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%inherit file="/main.html" />
<%namespace name='static' file='/static_content.html'/>
<%!
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _

from openedx.core.djangolib.markup import HTML
from openedx.core.djangolib.js_utils import js_escaped_string
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/courseware.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from django.conf import settings
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _

from lms.djangoapps.edxnotes.helpers import is_feature_enabled as is_edxnotes_enabled
from openedx.core.djangolib.js_utils import js_escaped_string
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/error-message.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%page expression_filter="h"/>
<%namespace name='static' file='../static_content.html'/>
<%!
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from openedx.core.djangolib.markup import HTML, Text
%>

Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/gradebook.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%inherit file="/main.html" />
<%namespace name='static' file='/static_content.html'/>
<%!
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from django.urls import reverse
%>

Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/program_marketing.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from datetime import datetime

from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from mako import exceptions

from openedx.core.djangolib.markup import HTML, Text
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/progress.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.conf import settings
from django.urls import reverse
from django.utils.http import urlquote_plus
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from pytz import UTC

from common.djangoapps.course_modes.models import CourseMode
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/tab-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<%! main_css = "css/bootstrap/lms-main.css" %>

<%!
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from openedx.core.djangolib.markup import HTML
%>

Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<%namespace name='static' file='/static_content.html'/>
<%!
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from django.urls import reverse
%>
<%page args="tab_list, active_page, default_tab, tab_image" expression_filter="h" />
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/welcome-back.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%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
%>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%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
%>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>
% if full_name is not UNDEFINED and full_name is not None:
${_(u"Hi {name},").format(name=full_name)}
% else:
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/dashboard/_dashboard_credit_info.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%page args="credit_status" 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
%>
<%namespace name='static' file='../static_content.html'/>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/dashboard/_dashboard_third_party_error.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%page expression_filter="h"/>

<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>
<div class="wrapper-msg urgency-high">
<div class="msg">
<div class="msg-content">
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/dashboard/_entitlement_reason_survey.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%page expression_filter="h"/>
<%!
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
%>
<div class="reasons_survey">
<div class="slide1 hidden">
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/discussion/_discussion_inline.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<%include file="_thread_list_template.html" />

<%!
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from json import dumps as json_dumps
from openedx.core.djangolib.js_utils import js_escaped_string
%>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/discussion/_discussion_inline_studio.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>
<%page expression_filter="h"/>

<div class="discussion-module" data-discussion-id="${discussion_id}">
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/discussion/_filter_dropdown.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%page expression_filter="h"/>
<%!
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from lms.djangoapps.discussion.django_comment_client.constants import TYPE_ENTRY
from openedx.core.djangolib.markup import HTML
%>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/discussion/_thread_list_template.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import gettext as _ %>
<script type="text/template" id="thread-list-template">
<div class="forum-nav-thread-list-wrapper" id="sort-filter-wrapper" tabindex="-1">
<div class="forum-nav-refine-bar">
Expand Down
Loading
Loading