diff --git a/cms/static/js/models/section.js b/cms/static/js/models/section.js index f789eecaa4..07bea5045e 100644 --- a/cms/static/js/models/section.js +++ b/cms/static/js/models/section.js @@ -4,7 +4,7 @@ CMS.Models.Section = Backbone.Model.extend({ }, validate: function(attrs, options) { if (!attrs.name) { - return "You must specify a name"; + return gettext("You must specify a name"); } }, url: "/save_item", @@ -25,7 +25,7 @@ CMS.Models.Section = Backbone.Model.extend({ if(!this.msg) { this.msg = new CMS.Models.SystemFeedback({ type: "saving", - title: "Saving…" + title: gettext("Saving…") }); } if(!this.msgView) { diff --git a/cms/static/js/views/section.js b/cms/static/js/views/section.js index 9b40a9cbf2..96f28d62c8 100644 --- a/cms/static/js/views/section.js +++ b/cms/static/js/views/section.js @@ -1,7 +1,11 @@ CMS.Views.SectionShow = Backbone.View.extend({ - template: _.template('<%= name %>'), + template: _.template('<%= name %>'), render: function() { - this.$el.html(this.template(this.model.attributes)); + var attrs = { + tooltip: gettext("Edit this section's name") + }; + attrs = $.extend(attrs, this.model.attributes); + this.$el.html(this.template(attrs)); this.delegateEvents(); return this; }, @@ -20,7 +24,12 @@ CMS.Views.SectionShow = Backbone.View.extend({ CMS.Views.SectionEdit = Backbone.View.extend({ render: function() { - this.$el.html(this.template(this.model.attributes)); + var attrs = { + save: gettext("Save"), + cancel: gettext("Cancel") + }; + attrs = $.extend(attrs, this.model.attributes); + this.$el.html(this.template(attrs)); this.delegateEvents(); return this; }, @@ -61,11 +70,11 @@ CMS.Views.SectionEdit = Backbone.View.extend({ showInvalidMessage: function(model, error, options) { var that = this; var msg = new CMS.Models.ErrorMessage({ - title: "Validation Error", + title: gettext("Validation Error"), message: error, actions: { primary: { - text: "Dismiss", + text: gettext("Dismiss"), click: function(view) { view.hide(); that.$("input[type=text]").focus(); diff --git a/cms/templates/base.html b/cms/templates/base.html index fd8f517a06..7829b79258 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -69,7 +69,7 @@