Commit 5da8de01 by cahrens

Don't pass variables to gettext.

parent 3eb00186
...@@ -87,7 +87,7 @@ define ["jquery", "jquery.ui", "gettext", "backbone", ...@@ -87,7 +87,7 @@ define ["jquery", "jquery.ui", "gettext", "backbone",
@$newComponentItem.removeClass('adding') @$newComponentItem.removeClass('adding')
@$newComponentItem.find('.rendered-component').remove() @$newComponentItem.find('.rendered-component').remove()
createComponent: (event, data, message, success_callback) => createComponent: (event, data, notification_message, analytics_message, success_callback) =>
event.preventDefault() event.preventDefault()
editor = new ModuleEditView( editor = new ModuleEditView(
...@@ -96,14 +96,14 @@ define ["jquery", "jquery.ui", "gettext", "backbone", ...@@ -96,14 +96,14 @@ define ["jquery", "jquery.ui", "gettext", "backbone",
) )
notification = new NotificationView.Mini notification = new NotificationView.Mini
title: gettext(message) + '…' title: notification_message
notification.show() notification.show()
callback = -> callback = ->
notification.hide() notification.hide()
success_callback() success_callback()
analytics.track message, analytics.track analytics_message,
course: course_location_analytics course: course_location_analytics
unit_id: unit_location_analytics unit_id: unit_location_analytics
type: editor.$el.data('locator') type: editor.$el.data('locator')
...@@ -121,7 +121,8 @@ define ["jquery", "jquery.ui", "gettext", "backbone", ...@@ -121,7 +121,8 @@ define ["jquery", "jquery.ui", "gettext", "backbone",
@$newComponentItem.before(editor.$el) @$newComponentItem.before(editor.$el)
editor = @createComponent( editor = @createComponent(
event, $(event.currentTarget).data(), event, $(event.currentTarget).data(),
"Adding", gettext('Adding…'),
"Creating new component",
success_callback success_callback
) )
@closeNewComponent(event) @closeNewComponent(event)
...@@ -137,7 +138,8 @@ define ["jquery", "jquery.ui", "gettext", "backbone", ...@@ -137,7 +138,8 @@ define ["jquery", "jquery.ui", "gettext", "backbone",
editor = @createComponent( editor = @createComponent(
event, event,
{duplicate_source_locator: source_locator}, {duplicate_source_locator: source_locator},
"Duplicating", gettext('Duplicating…')
"Duplicating " + source_locator,
success_callback success_callback
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment