1. Current code uses type name as the display names for XBlock buttons, so the name of these five buttons can't be localized. This fix contains code that adds a 'display_name' field for the buttons, and makes their names localizable. 2. The display names of components in advanced, html and problem types can be localized now.
20 lines
622 B
JavaScript
20 lines
622 B
JavaScript
define(["js/views/baseview"],
|
|
function (BaseView) {
|
|
|
|
return BaseView.extend({
|
|
tagName: "li",
|
|
initialize: function () {
|
|
BaseView.prototype.initialize.call(this);
|
|
this.template = this.loadTemplate("add-xblock-component-button");
|
|
this.$el.html(
|
|
this.template({
|
|
type: this.model.type,
|
|
templates: this.model.templates,
|
|
display_name: this.model.display_name
|
|
})
|
|
);
|
|
}
|
|
});
|
|
|
|
}); // end define();
|