Commit 3cfadb8a by David Baumgold

Migrated internationalization text into template for section name

parent fa330784
CMS.Views.SectionShow = Backbone.View.extend({
template: _.template('<span data-tooltip="<%= tooltip %>" class="section-name-span"><%= name %></span>'),
template: _.template('<span data-tooltip="<%= gettext("Edit this section\'s name") %>" class="section-name-span"><%= name %></span>'),
render: function() {
var attrs = {
name: this.model.escape('name'),
tooltip: gettext("Edit this section's name")
name: this.model.escape('name')
};
this.$el.html(this.template(attrs));
this.delegateEvents();
......@@ -25,9 +24,7 @@ CMS.Views.SectionShow = Backbone.View.extend({
CMS.Views.SectionEdit = Backbone.View.extend({
render: function() {
var attrs = {
name: this.model.escape('name'),
save: gettext("Save"),
cancel: gettext("Cancel")
name: this.model.escape('name')
};
this.$el.html(this.template(attrs));
this.delegateEvents();
......
<form class="section-name-edit">
<input type="text" value="<%= name %>" autocomplete="off"/>
<input type="submit" class="save-button" value="<%= save %>" />
<input type="button" class="cancel-button" value="<%= cancel %>" />
<input type="submit" class="save-button" value="<%= gettext("Save") %>" />
<input type="button" class="cancel-button" value="<%= gettext("Cancel") %>" />
</form>
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