Skip to content
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
12 changes: 6 additions & 6 deletions common/lib/xmodule/xmodule/capa_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ class CapaFields(object):
scope=Scope.settings
)
matlab_api_key = String(
display_name="Matlab API key",
help="Enter the API key provided by MathWorks for accessing the MATLAB Hosted Service. "
"This key is granted for exclusive use by this course for the specified duration. "
"Please do not share the API key with other courses and notify MathWorks immediately "
"if you believe the key is exposed or compromised. To obtain a key for your course, "
"or to report an issue, please contact moocsupport@mathworks.com",
display_name=_("Matlab API key"),
help=_("Enter the API key provided by MathWorks for accessing the MATLAB Hosted Service. "
"This key is granted for exclusive use by this course for the specified duration. "
"Please do not share the API key with other courses and notify MathWorks immediately "
"if you believe the key is exposed or compromised. To obtain a key for your course, "
"or to report an issue, please contact moocsupport@mathworks.com"),
scope=Scope.settings
)

Expand Down
2 changes: 1 addition & 1 deletion common/lib/xmodule/xmodule/video_module/video_xfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class VideoFields(object):
"Specify whether access to this video is limited to browsers only, or if it can be "
"accessed from other applications including mobile apps."
),
display_name="Video Available on Web Only",
display_name=_("Video Available on Web Only"),
scope=Scope.settings,
default=False
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

<% if (window.ENABLE_DISCUSSION_HOME_PANEL) { %>
<span class="label label-settings">
<%- interpolate(gettext("How to use %(platform_name)s discussions"), {platform_name: window.PLATFORM_NAME}, true) %>
<%- interpolate(
gettext("How to use %(platform_name)s discussions"),
{platform_name: window.PLATFORM_NAME}, true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@singingwolfboy gettext doesn't work in the same line as interpolate in underscore templates. Please be sure that you're properly testing your features for i18n.

) %>
</span>
<table class="home-helpgrid">
<tr class="helpgrid-row helpgrid-row-navigation">
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/instructor/views/instructor_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def _section_analytics(course, access):
insights_message = _("For analytics about your course, go to {analytics_dashboard_name}.")

insights_message = insights_message.format(
analytics_dashboard_name='{0}{1}</a>'.format(link_start, settings.ANALYTICS_DASHBOARD_NAME)
analytics_dashboard_name=u'{0}{1}</a>'.format(link_start, settings.ANALYTICS_DASHBOARD_NAME)
)
section_data = {
'section_key': 'instructor_analytics',
Expand Down
10 changes: 8 additions & 2 deletions lms/templates/commerce/provider.underscore
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<div class="provider-wrapper">
<div class="provider-info">
<%= interpolate(gettext("You still need to visit the %s website to complete the credit process."), [display_name]) %>
<%= interpolate(
gettext("You still need to visit the %(display_name)s website to complete the credit process."),
{ display_name: displayname }, true
) %>
</div>
<div class="provider-more-info">
<%= interpolate(gettext("To finalize course credit, %s requires %s learners to submit a credit request."), [provider_id.toUpperCase(), platformName]) %>
<%= interpolate(
gettext("To finalize course credit, %(provider_id)s requires %(platform_name)s learners to submit a credit request."),
{ provider_id: provider_id.toUpperCase(), platform_name: platformName }, true
) %>
</div>
<div class="provider-instructions">
<%= fulfillment_instructions %>
Expand Down
5 changes: 4 additions & 1 deletion lms/templates/commerce/receipt.underscore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<div class="wrapper-content-main payment-confirmation-step">
<article class="content-main">
<h3 class="title">
<%= interpolate(gettext( "Thank you! We have received your payment for %s"), ["<span class='course_name_placeholder'></span>"]) %>
<%= interpolate(
gettext( "Thank you! We have received your payment for %(course_name)s."),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clintonb gettext doesn't work in the same line as interpolate in underscore templates. Please be sure that you're properly testing your features for i18n.

{ course_name: "<span class='course_name_placeholder'></span>" }, true
) %>
</h3>

<% if ( receipt ) { %>
Expand Down
7 changes: 6 additions & 1 deletion lms/templates/discovery/course_card.underscore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
<span class="course-code"><%= content.number %></span>
<span class="course-title"><%= content.display_name %></span>
</h2>
<div class="course-date" aria-hidden="true"><%= interpolate(gettext("Starts: %s"), [start]) %></div>
<div class="course-date" aria-hidden="true">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsego gettext doesn't work in the same line as interpolate in underscore templates. Please be sure that you're properly testing your features for i18n. Further, please make sure to give formatting variables proper names when used in translator comments.

<%= interpolate(
gettext("Starts: %(start_date)s"),
{ start_date: start }, true
) %>
</div>
</section>
<div class="sr">
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<%=
interpolate(
// Translators: Any text between %(screen_reader_start)s and %(screen_reader_end)s is only read by screen readers and never shown in the browser.
'%(screen_reader_start)sWarning:%(screen_reader_end)s The previously selected content group was deleted. Select another content group.',
gettext('%(screen_reader_start)sWarning:%(screen_reader_end)s The previously selected content group was deleted. Select another content group.'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@talbs @andy-armstrong the gettext was not included in these lines. Please be sure that you're properly testing your features for i18n.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sarina My bad on this one. T&L had a retro about our i18n practices and and we now have a PR check list that should ensure that this doesn't happen again.

See https://openedx.atlassian.net/wiki/display/TNL/August+27,+2015 for details.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Andy! I'm just going through and reminding everyone. I would like to
get this tooling fixed eventually but until then, we play the hand we're
dealt.

On Wed, Sep 23, 2015 at 11:55 PM, Andy Armstrong notifications@github.com
wrote:

In lms/templates/instructor/instructor_dashboard_2/cohort-form.underscore
https://github.com/edx/edx-platform/pull/9868#discussion_r40283656:

@@ -95,7 +95,7 @@
<%=
interpolate(
// Translators: Any text between %(screen_reader_start)s and %(screen_reader_end)s is only read by screen readers and never shown in the browser.

  •                                            '%(screen_reader_start)sWarning:%(screen_reader_end)s The previously selected content group was deleted. Select another content group.',
    
  •                                            gettext('%(screen_reader_start)sWarning:%(screen_reader_end)s The previously selected content group was deleted. Select another content group.'),
    

@sarina https://github.com/sarina My bad on this one. T&L had a retro
about our i18n practices and and we now have a PR check list that should
ensure that this doesn't happen again.

See https://openedx.atlassian.net/wiki/display/TNL/August+27,+2015 for
details.


Reply to this email directly or view it on GitHub
https://github.com/edx/edx-platform/pull/9868/files#r40283656.

{
screen_reader_start: '<span class="sr">',
screen_reader_end: '</span>'
Expand All @@ -115,7 +115,7 @@
<%=
interpolate(
// Translators: Any text between %(screen_reader_start)s and %(screen_reader_end)s is only read by screen readers and never shown in the browser.
'%(screen_reader_start)sWarning:%(screen_reader_end)s No content groups exist.',
gettext('%(screen_reader_start)sWarning:%(screen_reader_end)s No content groups exist.'),
{
screen_reader_start: '<span class="sr">',
screen_reader_end: '</span>'
Expand Down