"].join("");c.templates={skeleton:function(f){return _.template(a,f,{variable:"hda"})},body:function(f){return _.template(e,f,{variable:"hda"})}};return{HDABaseView:c}});
\ No newline at end of file
+define(["mvc/dataset/hda-model","mvc/base-mvc","utils/localization"],function(e,b,d){var c=Backbone.View.extend(b.LoggableMixin).extend({tagName:"div",className:"dataset hda history-panel-hda",id:function(){return"hda-"+this.model.get("id")},fxSpeed:"fast",initialize:function(g){if(g.logger){this.logger=this.model.logger=g.logger}this.log(this+".initialize:",g);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];this.linkTarget=g.linkTarget||"_blank";this.selectable=g.selectable||false;this.selected=g.selected||false;this.expanded=g.expanded||false;this.draggable=g.draggable||false;this._setUpListeners()},_setUpListeners:function(){this.model.on("change",function(h,g){if(this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()){this.model.fetch()}else{this.render()}},this)},render:function(i){i=(i===undefined)?(true):(i);var g=this;this.$el.find("[title]").tooltip("destroy");this.urls=this.model.urls();var h=this._buildNewRender();if(i){$(g).queue(function(j){this.$el.fadeOut(g.fxSpeed,j)})}$(g).queue(function(j){this.$el.empty().attr("class",g.className).addClass("state-"+g.model.get("state")).append(h.children());if(this.selectable){this.showSelector(0)}j()});if(i){$(g).queue(function(j){this.$el.fadeIn(g.fxSpeed,j)})}$(g).queue(function(j){this.trigger("rendered",g);if(this.model.inReadyState()){this.trigger("rendered:ready",g)}if(this.draggable){this.draggableOn()}j()});return this},_buildNewRender:function(){var g=$(c.templates.skeleton(this.model.toJSON()));g.find(".dataset-primary-actions").append(this._render_titleButtons());g.children(".dataset-body").replaceWith(this._render_body());this._setUpBehaviors(g);return g},_setUpBehaviors:function(g){g=g||this.$el;make_popup_menus(g);g.find("[title]").tooltip({placement:"bottom"})},_render_titleButtons:function(){return[this._render_displayButton()]},_render_displayButton:function(){if((this.model.get("state")===e.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(this.model.get("state")===e.HistoryDatasetAssociation.STATES.DISCARDED)||(!this.model.get("accessible"))){return null}var h={target:this.linkTarget,classes:"dataset-display"};if(this.model.get("purged")){h.disabled=true;h.title=d("Cannot display datasets removed from disk")}else{if(this.model.get("state")===e.HistoryDatasetAssociation.STATES.UPLOAD){h.disabled=true;h.title=d("This dataset must finish uploading before it can be viewed")}else{if(this.model.get("state")===e.HistoryDatasetAssociation.STATES.NEW){h.disabled=true;h.title=d("This dataset is not yet viewable")}else{h.title=d("View data");h.href=this.urls.display;var g=this;h.onclick=function(i){if(Galaxy.frame&&Galaxy.frame.active){Galaxy.frame.add({title:"Data Viewer: "+g.model.get("name"),type:"url",content:g.urls.display});i.preventDefault()}}}}}h.faIcon="fa-eye";return faIconButton(h)},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var h=this.urls,i=this.model.get("meta_files");if(_.isEmpty(i)){return $(['','',""].join(""))}var j="dataset-"+this.model.get("id")+"-popup",g=['
"].join("");c.templates={skeleton:function(g){return _.template(a,g,{variable:"hda"})},body:function(g){return _.template(f,g,{variable:"hda"})}};return{HDABaseView:c}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/dataset/hda-edit.js b/static/scripts/packed/mvc/dataset/hda-edit.js
index 4ba9e970e27..b79c29bcfd7 100644
--- a/static/scripts/packed/mvc/dataset/hda-edit.js
+++ b/static/scripts/packed/mvc/dataset/hda-edit.js
@@ -1 +1 @@
-define(["mvc/dataset/hda-model","mvc/dataset/hda-base","mvc/tags","mvc/annotations"],function(f,b,a,e){var g=b.HDABaseView.extend({initialize:function(h){b.HDABaseView.prototype.initialize.call(this,h);this.hasUser=h.hasUser;this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton,this._render_rerunButton];this.tagsEditorShown=h.tagsEditorShown||false;this.annotationEditorShown=h.annotationEditorShown||false},_render_titleButtons:function(){return b.HDABaseView.prototype._render_titleButtons.call(this).concat([this._render_editButton(),this._render_deleteButton()])},_render_editButton:function(){if((this.model.get("state")===f.HistoryDatasetAssociation.STATES.DISCARDED)||(this.model.get("state")===f.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var j=this.model.get("purged"),h=this.model.get("deleted"),i={title:_l("Edit attributes"),href:this.urls.edit,target:this.linkTarget,classes:"dataset-edit"};if(h||j){i.disabled=true;if(j){i.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(h){i.title=_l("Undelete dataset to edit attributes")}}}else{if(this.model.get("state")===f.HistoryDatasetAssociation.STATES.UPLOAD){i.disabled=true;i.title=_l("This dataset must finish uploading before it can be edited")}else{if(this.model.get("state")===f.HistoryDatasetAssociation.STATES.NEW){i.disabled=true;i.title=_l("This dataset is not yet editable")}}}i.faIcon="fa-pencil";return faIconButton(i)},_render_deleteButton:function(){if((this.model.get("state")===f.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var h=this,i={title:_l("Delete"),classes:"dataset-delete",onclick:function(){h.$el.find(".icon-btn.dataset-delete").trigger("mouseout");h.model["delete"]()}};if(this.model.get("deleted")||this.model.get("purged")){i={title:_l("Dataset is already deleted"),disabled:true}}i.faIcon="fa-times";return faIconButton(i)},_render_errButton:function(){if(this.model.get("state")!==f.HistoryDatasetAssociation.STATES.ERROR){return null}return faIconButton({title:_l("View or report this error"),href:this.urls.report_error,classes:"dataset-report-error-btn",target:this.linkTarget,faIcon:"fa-bug"})},_render_rerunButton:function(){return faIconButton({title:_l("Run this job again"),href:this.urls.rerun,classes:"dataset-rerun-btn",target:this.linkTarget,faIcon:"fa-refresh"})},_render_visualizationsButton:function(){var h=this.model.get("visualizations");if((!this.hasUser)||(!this.model.hasData())||(_.isEmpty(h))){return null}if(_.isObject(h[0])){return this._render_visualizationsFrameworkButton(h)}if(!this.urls.visualization){return null}var j=this.model.get("dbkey"),n=this.urls.visualization,k={},o={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(j){o.dbkey=j}var i=faIconButton({title:_l("Visualize"),classes:"dataset-visualize-btn",faIcon:"fa-bar-chart-o"});function l(p){if(p==="trackster"){return c(n,o,j)}return function(){Galaxy.frame.add({title:"Visualization",type:"url",content:n+"/"+p+"?"+$.param(o)})}}function m(p){return p.charAt(0).toUpperCase()+p.slice(1)}if(h.length===1){i.attr("data-original-title",_l("Visualize in ")+_l(m(h[0])));i.click(l(h[0]))}else{_.each(h,function(p){k[_l(m(p))]=l(p)});make_popupmenu(i,k)}return i},_render_visualizationsFrameworkButton:function(h){if(!(this.model.hasData())||!(h&&!_.isEmpty(h))){return null}var j=faIconButton({title:_l("Visualize"),classes:"dataset-visualize-btn",faIcon:"fa-bar-chart-o"});if(h.length===1){var i=h[0];j.attr("data-original-title",_l("Visualize in ")+i.html);j.attr("href",i.href)}else{var k=[];_.each(h,function(l){l.func=function(m){if(Galaxy.frame&&Galaxy.frame.active){Galaxy.frame.add({title:"Visualization",type:"url",content:l.href});m.preventDefault();return false}return true};k.push(l);return false});PopupMenu.create(j,k)}return j},_buildNewRender:function(){var h=b.HDABaseView.prototype._buildNewRender.call(this);h.find(".dataset-deleted-msg").append(_l(' Click here to undelete it or here to immediately remove it from disk'));h.find(".dataset-hidden-msg").append(_l(' Click here to unhide it'));return h},_render_body_failed_metadata:function(){var i=$("").attr({href:this.urls.edit,target:this.linkTarget}).text(_l("set it manually or retry auto-detection")),h=$("").text(". "+_l("You may be able to")+" ").append(i),j=b.HDABaseView.prototype._render_body_failed_metadata.call(this);j.find(".warningmessagesmall strong").append(h);return j},_render_body_error:function(){var h=b.HDABaseView.prototype._render_body_error.call(this);h.find(".dataset-actions .left").prepend(this._render_errButton());return h},_render_body_ok:function(){var h=b.HDABaseView.prototype._render_body_ok.call(this);if(this.model.isDeletedOrPurged()){return h}this.makeDbkeyEditLink(h);if(this.hasUser){h.find(".dataset-actions .left").append(this._render_visualizationsButton());this._renderTags(h);this._renderAnnotation(h)}return h},_renderTags:function(h){var i=this;this.tagsEditor=new a.TagsEditor({model:this.model,el:h.find(".tags-display"),onshowFirstTime:function(){this.render()},onshow:function(){i.tagsEditorShown=true},onhide:function(){i.tagsEditorShown=false},$activator:faIconButton({title:_l("Edit dataset tags"),classes:"dataset-tag-btn",faIcon:"fa-tags"}).appendTo(h.find(".dataset-actions .right"))});if(this.tagsEditorShown){this.tagsEditor.toggle(true)}},_renderAnnotation:function(h){var i=this;this.annotationEditor=new e.AnnotationEditor({model:this.model,el:h.find(".annotation-display"),onshowFirstTime:function(){this.render()},onshow:function(){i.annotationEditorShown=true},onhide:function(){i.annotationEditorShown=false},$activator:faIconButton({title:_l("Edit dataset annotation"),classes:"dataset-annotate-btn",faIcon:"fa-comment"}).appendTo(h.find(".dataset-actions .right"))});if(this.annotationEditorShown){this.annotationEditor.toggle(true)}},makeDbkeyEditLink:function(i){if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){var h=$('?').attr("href",this.urls.edit).attr("target",this.linkTarget);i.find(".dataset-dbkey .value").replaceWith(h)}},events:_.extend(_.clone(b.HDABaseView.prototype.events),{"click .dataset-undelete":function(h){this.model.undelete();return false},"click .dataset-unhide":function(h){this.model.unhide();return false},"click .dataset-purge":"confirmPurge"}),confirmPurge:function d(h){this.model.purge();return false},toString:function(){var h=(this.model)?(this.model+""):("(no model)");return"HDAView("+h+")"}});function c(h,j,i){return function(){var k={};if(i){k["f-dbkey"]=i}$.ajax({url:h+"/list_tracks?"+$.param(k),dataType:"html",error:function(){alert(("Could not add this dataset to browser")+".")},success:function(l){var m=window.parent;m.Galaxy.modal.show({title:"View Data in a New or Saved Visualization",buttons:{Cancel:function(){m.Galaxy.modal.hide()},"View in saved visualization":function(){m.Galaxy.modal.show({title:"Add Data to Saved Visualization",body:l,buttons:{Cancel:function(){m.Galaxy.modal.hide()},"Add to visualization":function(){$(m.document).find("input[name=id]:checked").each(function(){m.Galaxy.modal.hide();var n=$(this).val();j.id=n;m.Galaxy.frame.add({title:"Trackster",type:"url",content:h+"/trackster?"+$.param(j)})})}}})},"View in new visualization":function(){m.Galaxy.modal.hide();var n=h+"/trackster?"+$.param(j);m.Galaxy.frame.add({title:"Trackster",type:"url",content:n})}}})}});return false}}return{HDAEditView:g}});
\ No newline at end of file
+define(["mvc/dataset/hda-model","mvc/dataset/hda-base","mvc/tags","mvc/annotations","utils/localization"],function(g,b,a,e,f){var h=b.HDABaseView.extend({initialize:function(i){b.HDABaseView.prototype.initialize.call(this,i);this.hasUser=i.hasUser;this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton,this._render_rerunButton];this.tagsEditorShown=i.tagsEditorShown||false;this.annotationEditorShown=i.annotationEditorShown||false},_render_titleButtons:function(){return b.HDABaseView.prototype._render_titleButtons.call(this).concat([this._render_editButton(),this._render_deleteButton()])},_render_editButton:function(){if((this.model.get("state")===g.HistoryDatasetAssociation.STATES.DISCARDED)||(this.model.get("state")===g.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var k=this.model.get("purged"),i=this.model.get("deleted"),j={title:f("Edit attributes"),href:this.urls.edit,target:this.linkTarget,classes:"dataset-edit"};if(i||k){j.disabled=true;if(k){j.title=f("Cannot edit attributes of datasets removed from disk")}else{if(i){j.title=f("Undelete dataset to edit attributes")}}}else{if(this.model.get("state")===g.HistoryDatasetAssociation.STATES.UPLOAD){j.disabled=true;j.title=f("This dataset must finish uploading before it can be edited")}else{if(this.model.get("state")===g.HistoryDatasetAssociation.STATES.NEW){j.disabled=true;j.title=f("This dataset is not yet editable")}}}j.faIcon="fa-pencil";return faIconButton(j)},_render_deleteButton:function(){if((this.model.get("state")===g.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var i=this,j={title:f("Delete"),classes:"dataset-delete",onclick:function(){i.$el.find(".icon-btn.dataset-delete").trigger("mouseout");i.model["delete"]()}};if(this.model.get("deleted")||this.model.get("purged")){j={title:f("Dataset is already deleted"),disabled:true}}j.faIcon="fa-times";return faIconButton(j)},_render_errButton:function(){if(this.model.get("state")!==g.HistoryDatasetAssociation.STATES.ERROR){return null}return faIconButton({title:f("View or report this error"),href:this.urls.report_error,classes:"dataset-report-error-btn",target:this.linkTarget,faIcon:"fa-bug"})},_render_rerunButton:function(){return faIconButton({title:f("Run this job again"),href:this.urls.rerun,classes:"dataset-rerun-btn",target:this.linkTarget,faIcon:"fa-refresh"})},_render_visualizationsButton:function(){var i=this.model.get("visualizations");if((!this.hasUser)||(!this.model.hasData())||(_.isEmpty(i))){return null}if(_.isObject(i[0])){return this._render_visualizationsFrameworkButton(i)}if(!this.urls.visualization){return null}var k=this.model.get("dbkey"),o=this.urls.visualization,l={},p={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(k){p.dbkey=k}var j=faIconButton({title:f("Visualize"),classes:"dataset-visualize-btn",faIcon:"fa-bar-chart-o"});function m(q){if(q==="trackster"){return c(o,p,k)}return function(){Galaxy.frame.add({title:"Visualization",type:"url",content:o+"/"+q+"?"+$.param(p)})}}function n(q){return q.charAt(0).toUpperCase()+q.slice(1)}if(i.length===1){j.attr("data-original-title",f("Visualize in ")+f(n(i[0])));j.click(m(i[0]))}else{_.each(i,function(q){l[f(n(q))]=m(q)});make_popupmenu(j,l)}return j},_render_visualizationsFrameworkButton:function(i){if(!(this.model.hasData())||!(i&&!_.isEmpty(i))){return null}var k=faIconButton({title:f("Visualize"),classes:"dataset-visualize-btn",faIcon:"fa-bar-chart-o"});if(i.length===1){var j=i[0];k.attr("data-original-title",f("Visualize in ")+j.html);k.attr("href",j.href)}else{var l=[];_.each(i,function(m){m.func=function(n){if(Galaxy.frame&&Galaxy.frame.active){Galaxy.frame.add({title:"Visualization",type:"url",content:m.href});n.preventDefault();return false}return true};l.push(m);return false});PopupMenu.create(k,l)}return k},_buildNewRender:function(){var i=b.HDABaseView.prototype._buildNewRender.call(this);i.find(".dataset-deleted-msg").append(f(' Click here to undelete it or here to immediately remove it from disk'));i.find(".dataset-hidden-msg").append(f(' Click here to unhide it'));return i},_render_body_failed_metadata:function(){var j=$("").attr({href:this.urls.edit,target:this.linkTarget}).text(f("set it manually or retry auto-detection")),i=$("").text(". "+f("You may be able to")+" ").append(j),k=b.HDABaseView.prototype._render_body_failed_metadata.call(this);k.find(".warningmessagesmall strong").append(i);return k},_render_body_error:function(){var i=b.HDABaseView.prototype._render_body_error.call(this);i.find(".dataset-actions .left").prepend(this._render_errButton());return i},_render_body_ok:function(){var i=b.HDABaseView.prototype._render_body_ok.call(this);if(this.model.isDeletedOrPurged()){return i}this.makeDbkeyEditLink(i);if(this.hasUser){i.find(".dataset-actions .left").append(this._render_visualizationsButton());this._renderTags(i);this._renderAnnotation(i)}return i},_renderTags:function(i){var j=this;this.tagsEditor=new a.TagsEditor({model:this.model,el:i.find(".tags-display"),onshowFirstTime:function(){this.render()},onshow:function(){j.tagsEditorShown=true},onhide:function(){j.tagsEditorShown=false},$activator:faIconButton({title:f("Edit dataset tags"),classes:"dataset-tag-btn",faIcon:"fa-tags"}).appendTo(i.find(".dataset-actions .right"))});if(this.tagsEditorShown){this.tagsEditor.toggle(true)}},_renderAnnotation:function(i){var j=this;this.annotationEditor=new e.AnnotationEditor({model:this.model,el:i.find(".annotation-display"),onshowFirstTime:function(){this.render()},onshow:function(){j.annotationEditorShown=true},onhide:function(){j.annotationEditorShown=false},$activator:faIconButton({title:f("Edit dataset annotation"),classes:"dataset-annotate-btn",faIcon:"fa-comment"}).appendTo(i.find(".dataset-actions .right"))});if(this.annotationEditorShown){this.annotationEditor.toggle(true)}},makeDbkeyEditLink:function(j){if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){var i=$('?').attr("href",this.urls.edit).attr("target",this.linkTarget);j.find(".dataset-dbkey .value").replaceWith(i)}},events:_.extend(_.clone(b.HDABaseView.prototype.events),{"click .dataset-undelete":function(i){this.model.undelete();return false},"click .dataset-unhide":function(i){this.model.unhide();return false},"click .dataset-purge":"confirmPurge"}),confirmPurge:function d(i){this.model.purge();return false},toString:function(){var i=(this.model)?(this.model+""):("(no model)");return"HDAView("+i+")"}});function c(i,k,j){return function(){var l={};if(j){l["f-dbkey"]=j}$.ajax({url:i+"/list_tracks?"+$.param(l),dataType:"html",error:function(){alert(("Could not add this dataset to browser")+".")},success:function(m){var n=window.parent;n.Galaxy.modal.show({title:"View Data in a New or Saved Visualization",buttons:{Cancel:function(){n.Galaxy.modal.hide()},"View in saved visualization":function(){n.Galaxy.modal.show({title:"Add Data to Saved Visualization",body:m,buttons:{Cancel:function(){n.Galaxy.modal.hide()},"Add to visualization":function(){$(n.document).find("input[name=id]:checked").each(function(){n.Galaxy.modal.hide();var o=$(this).val();k.id=o;n.Galaxy.frame.add({title:"Trackster",type:"url",content:i+"/trackster?"+$.param(k)})})}}})},"View in new visualization":function(){n.Galaxy.modal.hide();var o=i+"/trackster?"+$.param(k);n.Galaxy.frame.add({title:"Trackster",type:"url",content:o})}}})}});return false}}return{HDAEditView:h}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/dataset/hda-model.js b/static/scripts/packed/mvc/dataset/hda-model.js
index b18acfe35a1..9ccec412b2e 100644
--- a/static/scripts/packed/mvc/dataset/hda-model.js
+++ b/static/scripts/packed/mvc/dataset/hda-model.js
@@ -1 +1 @@
-define(["mvc/base-mvc"],function(b){var e=Backbone.Model.extend(b.LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"(unnamed dataset)",state:"new",deleted:false,visible:true,accessible:true,purged:false,data_type:"",file_size:0,file_ext:"",meta_files:[],misc_blurb:"",misc_info:"",tags:[],annotation:""},urlRoot:galaxy_config.root+"api/histories/",url:function(){return this.urlRoot+this.get("history_id")+"/contents/"+this.get("id")},urls:function(){var j=this.get("id");if(!j){return{}}var i={purge:galaxy_config.root+"datasets/"+j+"/purge_async",display:galaxy_config.root+"datasets/"+j+"/display/?preview=True",edit:galaxy_config.root+"datasets/"+j+"/edit",download:galaxy_config.root+"datasets/"+j+"/display?to_ext="+this.get("file_ext"),report_error:galaxy_config.root+"dataset/errors?id="+j,rerun:galaxy_config.root+"tool_runner/rerun?id="+j,show_params:galaxy_config.root+"datasets/"+j+"/show_params",visualization:galaxy_config.root+"visualization",annotation:{get:galaxy_config.root+"dataset/get_annotation_async?id="+j,set:galaxy_config.root+"dataset/annotate_async?id="+j},meta_download:galaxy_config.root+"dataset/get_metadata_file?hda_id="+j+"&metadata_name="};return i},initialize:function(i){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",e.STATES.NOT_VIEWABLE)}this._setUpListeners()},_setUpListeners:function(){this.on("change:state",function(j,i){this.log(this+" has changed state:",j,i);if(this.inReadyState()){this.trigger("state:ready",j,i,this.previous("state"))}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(j,k){var i=true;if((!j)&&(this.get("deleted")||this.get("purged"))){i=false}if((!k)&&(!this.get("visible"))){i=false}return i},hidden:function(){return !this.get("visible")},inReadyState:function(){var i=_.contains(e.READY_STATES,this.get("state"));return(this.isDeletedOrPurged()||i)},hasDetails:function(){return _.has(this.attributes,"genome_build")},hasData:function(){return(this.get("file_size")>0)},"delete":function d(i){if(this.get("deleted")){return jQuery.when()}return this.save({deleted:true},i)},undelete:function a(i){if(!this.get("deleted")||this.get("purged")){return jQuery.when()}return this.save({deleted:false},i)},hide:function c(i){if(!this.get("visible")){return jQuery.when()}return this.save({visible:false},i)},unhide:function h(i){if(this.get("visible")){return jQuery.when()}return this.save({visible:true},i)},purge:function g(i){if(this.get("purged")){return jQuery.when()}i=i||{};i.url=galaxy_config.root+"datasets/"+this.get("id")+"/purge_async";var j=this,k=jQuery.ajax(i);k.done(function(n,l,m){j.set({deleted:true,purged:true})});k.fail(function(p,l,o){var m=_l("Unable to purge dataset");var n=("Removal of datasets by users is not allowed in this Galaxy instance");if(p.responseJSON&&p.responseJSON.error){m=p.responseJSON.error}else{if(p.responseText.indexOf(n)!==-1){m=n}}p.responseText=m;j.trigger("error",j,p,i,_l(m),{error:m})});return k},searchAttributes:["name","file_ext","genome_build","misc_blurb","misc_info","annotation","tags"],searchAliases:{title:"name",format:"file_ext",database:"genome_build",blurb:"misc_blurb",description:"misc_blurb",info:"misc_info",tag:"tags"},searchAttribute:function(k,i){var j=this.get(k);if(!i||(j===undefined||j===null)){return false}if(_.isArray(j)){return this._searchArrayAttribute(j,i)}return(j.toString().toLowerCase().indexOf(i.toLowerCase())!==-1)},_searchArrayAttribute:function(j,i){i=i.toLowerCase();return _.any(j,function(k){return(k.toString().toLowerCase().indexOf(i.toLowerCase())!==-1)})},search:function(i){var j=this;return _.filter(this.searchAttributes,function(k){return j.searchAttribute(k,i)})},matches:function(j){var l="=",i=j.split(l);if(i.length>=2){var k=i[0];k=this.searchAliases[k]||k;return this.searchAttribute(k,i[1])}return !!this.search(j).length},matchesAll:function(j){var i=this;j=j.match(/(".*"|\w*=".*"|\S*)/g).filter(function(k){return !!k});return _.all(j,function(k){k=k.replace(/"/g,"");return i.matches(k)})},toString:function(){var i=this.get("id")||"";if(this.get("name")){i=this.get("hid")+' :"'+this.get("name")+'",'+i}return"HDA("+i+")"}});e.STATES={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",PAUSED:"paused",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};e.READY_STATES=[e.STATES.OK,e.STATES.EMPTY,e.STATES.PAUSED,e.STATES.FAILED_METADATA,e.STATES.NOT_VIEWABLE,e.STATES.DISCARDED,e.STATES.ERROR];e.NOT_READY_STATES=[e.STATES.UPLOAD,e.STATES.QUEUED,e.STATES.RUNNING,e.STATES.SETTING_METADATA,e.STATES.NEW];var f=Backbone.Collection.extend(b.LoggableMixin).extend({model:e,urlRoot:galaxy_config.root+"api/histories",url:function(){return this.urlRoot+"/"+this.historyId+"/contents"},initialize:function(j,i){i=i||{};this.historyId=i.historyId},ids:function(){return this.map(function(i){return i.id})},notReady:function(){return this.filter(function(i){return !i.inReadyState()})},running:function(){var i=[];this.each(function(j){if(!j.inReadyState()){i.push(j.get("id"))}});return i},getByHid:function(i){return _.first(this.filter(function(j){return j.get("hid")===i}))},getVisible:function(i,l,k){k=k||[];var j=new f(this.filter(function(m){return m.isVisible(i,l)}));_.each(k,function(m){if(!_.isFunction(m)){return}j=new f(j.filter(m))});return j},haveDetails:function(){return this.all(function(i){return i.hasDetails()})},fetchAllDetails:function(j){j=j||{};var i={details:"all"};j.data=(j.data)?(_.extend(j.data,i)):(i);return this.fetch(j)},ajaxQueue:function(l,k){var j=jQuery.Deferred(),i=this.length,n=[];if(!i){j.resolve([]);return j}var m=this.chain().reverse().map(function(p,o){return function(){var q=l.call(p,k);q.done(function(r){j.notify({curr:o,total:i,response:r,model:p})});q.always(function(r){n.push(r);if(m.length){m.shift()()}else{j.resolve(n)}})}}).value();m.shift()();return j},matches:function(i){return this.filter(function(j){return j.matches(i)})},set:function(k,i){var j=this;k=_.map(k,function(m){var n=j.get(m.id);if(!n){return m}var l=n.toJSON();_.extend(l,m);return l});Backbone.Collection.prototype.set.call(this,k,i)},toString:function(){return(["HDACollection(",[this.historyId,this.length].join(),")"].join(""))}});return{HistoryDatasetAssociation:e,HDACollection:f}});
\ No newline at end of file
+define(["mvc/base-mvc","utils/localization"],function(d,b){var i=Backbone.Model.extend(d.LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"(unnamed dataset)",state:"new",deleted:false,visible:true,accessible:true,purged:false,data_type:"",file_size:0,file_ext:"",meta_files:[],misc_blurb:"",misc_info:"",tags:[],annotation:""},urlRoot:galaxy_config.root+"api/histories/",url:function(){return this.urlRoot+this.get("history_id")+"/contents/"+this.get("id")},urls:function(){var k=this.get("id");if(!k){return{}}var j={purge:galaxy_config.root+"datasets/"+k+"/purge_async",display:galaxy_config.root+"datasets/"+k+"/display/?preview=True",edit:galaxy_config.root+"datasets/"+k+"/edit",download:galaxy_config.root+"datasets/"+k+"/display?to_ext="+this.get("file_ext"),report_error:galaxy_config.root+"dataset/errors?id="+k,rerun:galaxy_config.root+"tool_runner/rerun?id="+k,show_params:galaxy_config.root+"datasets/"+k+"/show_params",visualization:galaxy_config.root+"visualization",annotation:{get:galaxy_config.root+"dataset/get_annotation_async?id="+k,set:galaxy_config.root+"dataset/annotate_async?id="+k},meta_download:galaxy_config.root+"dataset/get_metadata_file?hda_id="+k+"&metadata_name="};return j},initialize:function(j){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",i.STATES.NOT_VIEWABLE)}this._setUpListeners()},_setUpListeners:function(){this.on("change:state",function(k,j){this.log(this+" has changed state:",k,j);if(this.inReadyState()){this.trigger("state:ready",k,j,this.previous("state"))}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(k,l){var j=true;if((!k)&&(this.get("deleted")||this.get("purged"))){j=false}if((!l)&&(!this.get("visible"))){j=false}return j},hidden:function(){return !this.get("visible")},inReadyState:function(){var j=_.contains(i.READY_STATES,this.get("state"));return(this.isDeletedOrPurged()||j)},hasDetails:function(){return _.has(this.attributes,"genome_build")},hasData:function(){return(this.get("file_size")>0)},"delete":function e(j){if(this.get("deleted")){return jQuery.when()}return this.save({deleted:true},j)},undelete:function h(j){if(!this.get("deleted")||this.get("purged")){return jQuery.when()}return this.save({deleted:false},j)},hide:function c(j){if(!this.get("visible")){return jQuery.when()}return this.save({visible:false},j)},unhide:function g(j){if(this.get("visible")){return jQuery.when()}return this.save({visible:true},j)},purge:function f(j){if(this.get("purged")){return jQuery.when()}j=j||{};j.url=galaxy_config.root+"datasets/"+this.get("id")+"/purge_async";var k=this,l=jQuery.ajax(j);l.done(function(o,m,n){k.set({deleted:true,purged:true})});l.fail(function(q,m,p){var n=b("Unable to purge dataset");var o=("Removal of datasets by users is not allowed in this Galaxy instance");if(q.responseJSON&&q.responseJSON.error){n=q.responseJSON.error}else{if(q.responseText.indexOf(o)!==-1){n=o}}q.responseText=n;k.trigger("error",k,q,j,b(n),{error:n})});return l},searchAttributes:["name","file_ext","genome_build","misc_blurb","misc_info","annotation","tags"],searchAliases:{title:"name",format:"file_ext",database:"genome_build",blurb:"misc_blurb",description:"misc_blurb",info:"misc_info",tag:"tags"},searchAttribute:function(l,j){var k=this.get(l);if(!j||(k===undefined||k===null)){return false}if(_.isArray(k)){return this._searchArrayAttribute(k,j)}return(k.toString().toLowerCase().indexOf(j.toLowerCase())!==-1)},_searchArrayAttribute:function(k,j){j=j.toLowerCase();return _.any(k,function(l){return(l.toString().toLowerCase().indexOf(j.toLowerCase())!==-1)})},search:function(j){var k=this;return _.filter(this.searchAttributes,function(l){return k.searchAttribute(l,j)})},matches:function(k){var m="=",j=k.split(m);if(j.length>=2){var l=j[0];l=this.searchAliases[l]||l;return this.searchAttribute(l,j[1])}return !!this.search(k).length},matchesAll:function(k){var j=this;k=k.match(/(".*"|\w*=".*"|\S*)/g).filter(function(l){return !!l});return _.all(k,function(l){l=l.replace(/"/g,"");return j.matches(l)})},toString:function(){var j=this.get("id")||"";if(this.get("name")){j=this.get("hid")+' :"'+this.get("name")+'",'+j}return"HDA("+j+")"}});i.STATES={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",PAUSED:"paused",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};i.READY_STATES=[i.STATES.OK,i.STATES.EMPTY,i.STATES.PAUSED,i.STATES.FAILED_METADATA,i.STATES.NOT_VIEWABLE,i.STATES.DISCARDED,i.STATES.ERROR];i.NOT_READY_STATES=[i.STATES.UPLOAD,i.STATES.QUEUED,i.STATES.RUNNING,i.STATES.SETTING_METADATA,i.STATES.NEW];var a=Backbone.Collection.extend(d.LoggableMixin).extend({model:i,urlRoot:galaxy_config.root+"api/histories",url:function(){return this.urlRoot+"/"+this.historyId+"/contents"},initialize:function(k,j){j=j||{};this.historyId=j.historyId},ids:function(){return this.map(function(j){return j.id})},notReady:function(){return this.filter(function(j){return !j.inReadyState()})},running:function(){var j=[];this.each(function(k){if(!k.inReadyState()){j.push(k.get("id"))}});return j},getByHid:function(j){return _.first(this.filter(function(k){return k.get("hid")===j}))},getVisible:function(j,m,l){l=l||[];var k=new a(this.filter(function(n){return n.isVisible(j,m)}));_.each(l,function(n){if(!_.isFunction(n)){return}k=new a(k.filter(n))});return k},haveDetails:function(){return this.all(function(j){return j.hasDetails()})},fetchAllDetails:function(k){k=k||{};var j={details:"all"};k.data=(k.data)?(_.extend(k.data,j)):(j);return this.fetch(k)},ajaxQueue:function(m,l){var k=jQuery.Deferred(),j=this.length,o=[];if(!j){k.resolve([]);return k}var n=this.chain().reverse().map(function(q,p){return function(){var r=m.call(q,l);r.done(function(s){k.notify({curr:p,total:j,response:s,model:q})});r.always(function(s){o.push(s);if(n.length){n.shift()()}else{k.resolve(o)}})}}).value();n.shift()();return k},matches:function(j){return this.filter(function(k){return k.matches(j)})},set:function(l,j){var k=this;l=_.map(l,function(n){var o=k.get(n.id);if(!o){return n}var m=o.toJSON();_.extend(m,n);return m});Backbone.Collection.prototype.set.call(this,l,j)},toString:function(){return(["HDACollection(",[this.historyId,this.length].join(),")"].join(""))}});return{HistoryDatasetAssociation:i,HDACollection:a}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/history/annotated-history-panel.js b/static/scripts/packed/mvc/history/annotated-history-panel.js
index 4c08408a2c8..467032b7269 100644
--- a/static/scripts/packed/mvc/history/annotated-history-panel.js
+++ b/static/scripts/packed/mvc/history/annotated-history-panel.js
@@ -1 +1 @@
-define(["mvc/dataset/hda-model","mvc/dataset/hda-base","mvc/history/readonly-history-panel"],function(c,a,b){var d=b.ReadOnlyHistoryPanel.extend({className:"annotated-history-panel",HDAViewClass:a.HDABaseView,renderModel:function(){this.$el.addClass(this.className);var g=b.ReadOnlyHistoryPanel.prototype.renderModel.call(this),e=this.$datasetsList(g),f=$("
").addClass("additional-info").text(e)]);this.$datasetsList(f).append(g)},events:_.extend(_.clone(b.ReadOnlyHistoryPanel.prototype.events),{"click tr":function(e){$(e.currentTarget).find(".dataset-title-bar").click()},"click .icon-btn":function(e){e.stopPropagation()}}),toString:function(){return"AnnotatedHistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});return{AnnotatedHistoryPanel:d}});
\ No newline at end of file
+define(["mvc/dataset/hda-model","mvc/dataset/hda-base","mvc/history/readonly-history-panel","utils/localization"],function(d,a,b,c){var e=b.ReadOnlyHistoryPanel.extend({className:"annotated-history-panel",HDAViewClass:a.HDABaseView,renderModel:function(){this.$el.addClass(this.className);var h=b.ReadOnlyHistoryPanel.prototype.renderModel.call(this),f=this.$datasetsList(h),g=$("
',d("You are currently viewing a deleted history!"),"
","<% } %>",'
',"<% if( history.message ){ %>",'
<%= history.message %>
',"<% } %>","
",'
',d("You are over your disk quota."),d("Tool execution is on hold until your disk usage drops below your allocated quota."),"
",'','','
','
','",'","
",'","
","
",'','
',d("Your history is empty. Click 'Get Data' on the left pane to start"),"
"].join("");j.templates={historyPanel:function(l){return _.template(k,l,{variable:"history"})}};return{ReadOnlyHistoryPanel:j}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/user/user-model.js b/static/scripts/packed/mvc/user/user-model.js
index 4fff71defae..47e6d361c29 100644
--- a/static/scripts/packed/mvc/user/user-model.js
+++ b/static/scripts/packed/mvc/user/user-model.js
@@ -1 +1 @@
-define(["mvc/base-mvc"],function(a){var c=Backbone.Model.extend(a.LoggableMixin).extend({urlRoot:galaxy_config.root+"api/users",defaults:{id:null,username:"("+_l("anonymous user")+")",email:"",total_disk_usage:0,nice_total_disk_usage:"",quota_percent:null,is_admin:false},initialize:function(d){this.log("User.initialize:",d);this.on("loaded",function(e,f){this.log(this+" has loaded:",e,f)});this.on("change",function(e,f){this.log(this+" has changed:",e,f.changes)})},isAnonymous:function(){return(!this.get("email"))},isAdmin:function(){return(this.get("is_admin"))},loadFromApi:function(g,e){g=g||c.CURRENT_ID_STR;e=e||{};var d=this,f=e.success;e.success=function(i,h){d.trigger("loaded",i,h);if(f){f(i,h)}};if(g===c.CURRENT_ID_STR){e.url=this.urlRoot+"/"+c.CURRENT_ID_STR}return Backbone.Model.prototype.fetch.call(this,e)},clearSessionStorage:function(){for(var d in sessionStorage){if(d.indexOf("history:")===0){sessionStorage.removeItem(d)}else{if(d==="history-panel"){sessionStorage.removeItem(d)}}}},toString:function(){var d=[this.get("username")];if(this.get("id")){d.unshift(this.get("id"));d.push(this.get("email"))}return"User("+d.join(":")+")"}});c.CURRENT_ID_STR="current";c.getCurrentUserFromApi=function(e){var d=new c();d.loadFromApi(c.CURRENT_ID_STR,e);return d};var b=Backbone.Collection.extend(a.LoggableMixin).extend({model:c,urlRoot:galaxy_config.root+"api/users"});return{User:c}});
\ No newline at end of file
+define(["mvc/base-mvc","utils/localization"],function(a,b){var d=Backbone.Model.extend(a.LoggableMixin).extend({urlRoot:galaxy_config.root+"api/users",defaults:{id:null,username:"("+b("anonymous user")+")",email:"",total_disk_usage:0,nice_total_disk_usage:"",quota_percent:null,is_admin:false},initialize:function(e){this.log("User.initialize:",e);this.on("loaded",function(f,g){this.log(this+" has loaded:",f,g)});this.on("change",function(f,g){this.log(this+" has changed:",f,g.changes)})},isAnonymous:function(){return(!this.get("email"))},isAdmin:function(){return(this.get("is_admin"))},loadFromApi:function(h,f){h=h||d.CURRENT_ID_STR;f=f||{};var e=this,g=f.success;f.success=function(j,i){e.trigger("loaded",j,i);if(g){g(j,i)}};if(h===d.CURRENT_ID_STR){f.url=this.urlRoot+"/"+d.CURRENT_ID_STR}return Backbone.Model.prototype.fetch.call(this,f)},clearSessionStorage:function(){for(var e in sessionStorage){if(e.indexOf("history:")===0){sessionStorage.removeItem(e)}else{if(e==="history-panel"){sessionStorage.removeItem(e)}}}},toString:function(){var e=[this.get("username")];if(this.get("id")){e.unshift(this.get("id"));e.push(this.get("email"))}return"User("+e.join(":")+")"}});d.CURRENT_ID_STR="current";d.getCurrentUserFromApi=function(f){var e=new d();e.loadFromApi(d.CURRENT_ID_STR,f);return e};var c=Backbone.Collection.extend(a.LoggableMixin).extend({model:d,urlRoot:galaxy_config.root+"api/users"});return{User:d}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/user/user-quotameter.js b/static/scripts/packed/mvc/user/user-quotameter.js
index c26f3ca19bf..96ac00b2d16 100644
--- a/static/scripts/packed/mvc/user/user-quotameter.js
+++ b/static/scripts/packed/mvc/user/user-quotameter.js
@@ -1 +1 @@
-define(["mvc/base-mvc"],function(a){var b=Backbone.View.extend(a.LoggableMixin).extend({options:{warnAtPercent:85,errorAtPercent:100},initialize:function(c){this.log(this+".initialize:",c);_.extend(this.options,c);this.model.bind("change:quota_percent change:total_disk_usage",this.render,this)},update:function(c){this.log(this+" updating user data...",c);this.model.loadFromApi(this.model.get("id"),c);return this},isOverQuota:function(){return(this.model.get("quota_percent")!==null&&this.model.get("quota_percent")>=this.options.errorAtPercent)},_render_quota:function(){var c=this.model.toJSON(),e=c.quota_percent,d=$(this._templateQuotaMeter(c)),f=d.find(".progress-bar");if(this.isOverQuota()){f.attr("class","progress-bar progress-bar-danger");d.find(".quota-meter-text").css("color","white");this.trigger("quota:over",c)}else{if(e>=this.options.warnAtPercent){f.attr("class","progress-bar progress-bar-warning");this.trigger("quota:under quota:under:approaching",c)}else{f.attr("class","progress-bar progress-bar-success");this.trigger("quota:under quota:under:ok",c)}}return d},_render_usage:function(){var c=$(this._templateUsage(this.model.toJSON()));this.log(this+".rendering usage:",c);return c},render:function(){var c=null;this.log(this+".model.quota_percent:",this.model.get("quota_percent"));if((this.model.get("quota_percent")===null)||(this.model.get("quota_percent")===undefined)){c=this._render_usage()}else{c=this._render_quota()}this.$el.html(c);this.$el.find(".quota-meter-text").tooltip();return this},_templateQuotaMeter:function(c){return['
"].join("")},toString:function(){return"UserQuotaMeter("+this.model+")"}});return{UserQuotaMeter:b}});
\ No newline at end of file
diff --git a/static/scripts/packed/nls/ja/locale.js b/static/scripts/packed/nls/ja/locale.js
new file mode 100644
index 00000000000..b3c40b483e5
--- /dev/null
+++ b/static/scripts/packed/nls/ja/locale.js
@@ -0,0 +1 @@
+define({"Are you sure you want to delete the current history?":"現在のヒストリーを消すことに同意しますか?","collapse all":"すべてをおりたたむ","History Item Attributes":"ヒストリーアイテム変数","Edit Attributes":"変数を編集する","This will inspect the dataset and attempt to correct the above column values if they are not accurate.":"これはデータセットを調査して上記のカラムの値を修正することを試みます。",'Required metadata values are missing. Some of these values may not be editable by the user. Selecting "Auto-detect" will attempt to fix these values.':"必要なメタデータの値が不明です。それらのいくつかの値はユーザによって編集可能にはなっていません。「自動判定」を選択するとそれらの値をただしくできるかもしれません。","Convert to new format":"新しいフォーマットに変換する","Convert to":"変換する","This will create a new dataset with the contents of this dataset converted to a new format.":"新しいフォーマットに変換したデータセットを新規作成します。","Change data type":"データタイプを変更する","New Type":"新しいタイプ","This will change the datatype of the existing dataset but not modify its contents. Use this if Galaxy has incorrectly guessed the type of your dataset.":"これは既存のデータセットのデータタイプを変更します。しかしデータセットの中身は変更しません。データセットのタイプの誤判定があったときに使用します。","Copy History Item":"ヒストリーアイテムをコピーする","Your saved histories":"保存したヒストリー","Stored Histories":"格納してあるヒストリー","hide deleted":"削除したヒストリーを隠す","show deleted":"削除したヒストリーを表示する",Name:"名前",Size:"サイズ","Last modified":"最終更新日",Actions:"操作",rename:"名称変更する","switch to":"変更する","delete":"削除する",undelete:"削除から戻す",Action:"操作",Share:"共有",Rename:"名称変更する",Delete:"削除する",Undelete:"削除から戻す","You have no stored histories":"保管してあるヒストリーはありません","History Options":"ヒストリーオプション","You must be ":"あなたは","logged in":"ログイン"," to store or switch histories.":"しないとヒストリーの保管や変更ができません。",' current history (stored as "%s")':' 現在のヒストリー("%s" として保管されています)',List:"リストする"," previously stored histories":" 以前に保管したヒストリー",Create:"作成する"," a new empty history":" 新規ヒストリー","Construct workflow":"ワークフローを構築する"," from the current history":" 現在のヒストリーから"," current history":" 現在のヒストリー","Show deleted":"削除したヒストリーを表示する"," datasets in history":" ヒストリーのデータセット","Rename History":"ヒストリーの名称変更をする","Rename Histories":"名称変更する","Perform Action":"操作を実行する",Submit:"登録する","Current Name":"現在の名称","New Name":"新しい名称","Share histories":"ヒストリーを共有する","Share Histories":"ヒストリーを共有する","History Name:":"ヒストリー名","Number of Datasets:":"データセット数","Share Link":"共有リンク","This history contains no data.":"このヒストリーにはデータがありません。","copy link to share":"共有リンクをコピーする","Email of User to share with:":"共有したいユーザのEメール:","Galaxy History":"Galaxy ヒストリー",refresh:"リフレッシュ","You are currently viewing a deleted history!":"消去したヒストリーをみています。","Your history is empty. Click 'Get Data' on the left pane to start":"ヒストリーは空です。解析をはじめるには、左パネルの 'データ取得' をクリック","Job is waiting to run":"ジョブは実行待ちです","Job is currently running":"ジョブは実行中です","An error occurred running this job: ":"このジョブの実行中に発生したエラー: ","report this error":"このエラーを報告する","No data: ":"データ無し: ","format: ":"フォーマット: ","database: ":"データベース: ","Info: ":"情報: ",'Error: unknown dataset state "%s".':'エラー: 不明なデータ状態 "%s"。',Options:"オプション",History:"ヒストリー","report bugs":"バグを報告する",wiki:"wiki",screencasts:"スクリーンキャスト",blog:"ブログ","Logged in as %s: ":"%s としてログイン中: ",manage:"管理",logout:"ログアウト","Account: ":"アカウント: ",create:"作成",login:"ログイン","Galaxy Tools":"Galaxy ツール群",Workflow:"ワークフロー",Manage:"管理",workflows:"ワークフロー","Account settings":"アカウント設定","You are currently logged in as %s.":"%s としてログイン中。","Change your password":"パスワード変更","Update your email address":"メールアドレス変更",Logout:"ログアウト",Login:"ログイン","Create new account":"新規アカウントを作成する"});
\ No newline at end of file
diff --git a/static/scripts/packed/nls/locale.js b/static/scripts/packed/nls/locale.js
new file mode 100644
index 00000000000..4b6b6bfe7ca
--- /dev/null
+++ b/static/scripts/packed/nls/locale.js
@@ -0,0 +1 @@
+define({root:{history:false,"Are you sure you want to delete the current history?":false,"collapse all":false,"History Item Attributes":false,"Edit Attributes":false,"This will inspect the dataset and attempt to correct the above column values if they are not accurate.":false,'Required metadata values are missing. Some of these values may not be editable by the user. Selecting "Auto-detect" will attempt to fix these values.':false,"Convert to new format":false,"Convert to":false,"This will create a new dataset with the contents of this dataset converted to a new format.":false,"Change data type":false,"New Type":false,"This will change the datatype of the existing dataset but not modify its contents. Use this if Galaxy has incorrectly guessed the type of your dataset.":false,"Copy History Item":false,"Your saved histories":false,"Stored Histories":false,"hide deleted":false,"show deleted":false,Name:false,Size:false,"Last modified":false,Actions:false,rename:false,"switch to":false,"delete":false,undelete:false,Action:false,Share:false,Rename:false,Delete:false,Undelete:false,"You have no stored histories":false,"History Options":false,"You must be ":false,"logged in":false," to store or switch histories.":false,' current history (stored as "%s")':false,List:false," previously stored histories":false,Create:false," a new empty history":false,"Construct workflow":false," from the current history":false," current history":false,"Show deleted":false," datasets in history":false,"Rename History":false,"Rename Histories":false,"Perform Action":false,Submit:false,"Current Name":false,"New Name":false,"Share histories":false,"Share Histories":false,"History Name:":false,"Number of Datasets:":false,"Share Link":false,"This history contains no data.":false,"copy link to share":false,"Email of User to share with:":false,"Galaxy History":false,refresh:false,"You are currently viewing a deleted history!":false,"Your history is empty. Click 'Get Data' on the left pane to start":false,"Job is waiting to run":false,"Job is currently running":false,"An error occurred running this job: ":false,"report this error":false,"No data: ":false,"format: ":false,"database: ":false,"Info: ":false,'Error: unknown dataset state "%s".':false,Options:false,History:false,"report bugs":false,wiki:false,screencasts:false,blog:false,"Logged in as %s: ":false,manage:false,logout:false,"Account: ":false,create:false,login:false,"Galaxy Tools":false,Workflow:false,Manage:false,workflows:false,"Account settings":false,"You are currently logged in as %s.":false,"Change your password":false,"Update your email address":false,Logout:false,Login:false,"Create new account":false,"anonymous user":false,"Using ":false,"There was an error getting the data for this dataset":false,"This dataset has been deleted and removed from disk.":false,"This dataset has been deleted.":false,"This dataset has been hidden.":false,format:false,database:false,"This history is empty":false,"No matching datasets found":false,"You are over your disk quota.":false,"Tool execution is on hold until your disk usage drops below your allocated quota.":false,All:false,None:false,"For all selected":false,"This history is empty. Click 'Get Data' on the left tool menu to start":false,"Include Deleted Datasets":false,"Include Hidden Datasets":false,"Edit history tags":false,"Edit history Annotation":false,"Operations on multiple datasets":false,"Search datasets":false,"clear search (esc)":false,"loading...":false,"Hide datasets":false,"Unhide datasets":false,"Delete datasets":false,"Undelete datasets":false,"Permanently delete datasets":false,"Click to rename history":false,"View data":false,"Edit attributes":false,"View details":false,"Run this job again":false,"Edit dataset tags":false,"Edit dataset annotation":false,' Click here to undelete it or here to immediately remove it from disk':false,' Click here to unhide it':false,Download:false,Visualize:false},ja:true,zh:true});
\ No newline at end of file
diff --git a/static/scripts/packed/nls/zh/locale.js b/static/scripts/packed/nls/zh/locale.js
new file mode 100644
index 00000000000..9e8a8038061
--- /dev/null
+++ b/static/scripts/packed/nls/zh/locale.js
@@ -0,0 +1 @@
+define({Galaxy:"Galaxy","Are you sure you want to delete the current history?":"确认要删除当前的历史记录吗?","collapse all":"全部收缩",Tools:"工具","Get Data":"获取数据","Get ENCODE Data":"获取ENCODE数据","ENCODE Tools":"ENCODE工具","Lift-Over":"版本转换","Text Manipulation":"文本操作","Filter and Sort":"过滤和排序","Join, Subtract and Group":"结合,差集与分组","Convert Formats":"格式转换","Extract Features":"特征提取","Fetch Sequences":"获取序列","Fetch Alignments":"获取比对上的序列","Get Genomic Scores":"获得基因组分数","Operate on Genomic Intervals":"基因组区间操作",Statistics:"统计量","Graph/Display Data":"图形/数据","Regional Variation":"区域多态性","Evolution: HyPhy":"进化: HyPhy","Taxonomy manipulation":"分类处理","Solexa tools":"Solexa工具","FASTA manipulation":"FASTA处理","Short Read QC and Manipulation":"短片段数据质量控制及处理","Short Read Mapping":"短片段回贴","Galaxy Administration":"Galaxy 管理","Admin password: ":"管理员密码: ","Reload tool: ":"重新载入工具",Reload:"重新载入","History Item Attributes":"历史项目属性","Edit attributes":"编辑属性","This will inspect the dataset and attempt to correct the above column values if they are not accurate.":"数据集检查,若有错误,更正上述栏中的值。",'Required metadata values are missing. Some of these values may not be editable by the user. Selecting "Auto-detect" will attempt to fix these values.':"缺少所需的metadata的值。用户可能无法对这些值进行编辑。选择“自动检测”来尝试修正这些值。","Convert to new format":"转换为新格式","Convert to":"转换为","This will create a new dataset with the contents of this dataset converted to a new format.":"这将产生一个转换格式后的新数据集,","Change data type":"改变数据类型","New Type":"新类型","This will change the datatype of the existing dataset but not modify its contents. Use this if Galaxy has incorrectly guessed the type of your dataset.":"这将改变已有数据集的数据类型,但不改变其内容。当Galaxy不能正确判断你的数据类型时,设置该参数。","Copy History Item":"复制历史记录项","Saved Histories":"已保存的历史","hide deleted":"隐藏已删除的数据","show deleted":"显示已删除的数据",Name:"名称",Size:"大小","Last modified":"最后修改时间",Actions:"操作",rename:"重命名","switch to":"切换到","delete":"删除",undelete:"还原",Action:"操作",Share:"共享",Rename:"重命名",Delete:"删除",Undelete:"还原","You have no stored histories":"没有存储的历史记录","History Options":"历史记录选项","You must be ":"你必须成为","logged in":"登录"," to store or switch histories.":"以存储或切换历史记录",' current history (stored as "%s")':' 当前历史(以"%s"形式存储)',List:"列表"," previously stored histories":" 以前存储的历史记录",Create:"创建"," a new empty history":" 一个新的空白历史记录","Construct workflow":"构建工作流程"," from the current history":" 来源于当前历史"," current history":" 当前历史","Show deleted":"显示已删除"," datasets in history":" 历史中的数据集","Rename History":"重命名历史","Rename Histories":"重命名历史记录","Perform Action":"运行操作",Submit:"提交","Current Name":"当前名称","New Name":"新名称","Share histories":"共享历史记录","Share Histories":"共享历史记录","History Name:":"历史名称","Number of Datasets:":"数据集数量","Share Link":"共享链接","This history contains no data.":"这项历史中没有数据","copy link to share":"复制链接以共享","Email of User to share with:":"发送到这些Email地址进行分享","Galaxy History":"Galaxy 历史",refresh:"刷新","You are currently viewing a deleted history!":"正在查看已删除的历史","Your history is empty. Click 'Get Data' on the left pane to start":"历史已空,请单击左边窗格中‘获取数据’","Job is waiting to run":"等待运行的进程","Job is currently running":"正在运行的进程","An error occurred running this job: ":"进程运行时出错 ","report this error":"报告错误","No data: ":"没有数据: ","format: ":"格式: ","database: ":"数据库: ","Info: ":"信息: ",'Error: unknown dataset state "%s".':'错误:未知的数据集状态 "%s"。',Options:"选项",History:"历史","report bugs":"错误报告",wiki:"wiki",screencasts:"演示视频",blog:"博客","Logged in as %s: ":"以%s的身份登录: ",manage:"管理",logout:"注销","Account: ":"帐户: ",create:"创建",login:"登录","Galaxy Tools":"Galaxy 工具",Workflow:"工作流程",Manage:"管理",workflows:"工作流程","Account settings":"帐户设置","You are currently logged in as %s.":"当前以%s的身份登录","Change your password":"修改密码","Update your email address":"更新电子邮件地址",Logout:"注销",Login:"登录","Create new account":"创建新帐户","Show Tool Search":"显示工具搜索","Analyze Data":"分析数据",analysis:"分析","History Lists":"历史记录清单","Histories Shared with Me":"共享的数据","Current History":"当前历史记录","Create New":"创建",Clone:"复制","Share or Publish":"共享或发布","Extract Workflow":"提取工作流程","Dataset Security":"数据安全性","Show Deleted Datasets":"显示已删除的数据","Show Hidden Datasets":"显示隐藏的数据","Show Structure":"显示结构","Export to File":"导出为文件","Other Actions":"其他","Import from File":"导入文件","Shared Data":"数据共享","Data Libraries":"数据仓库","Published Histories":"已发布的历史记录","Published Workflows":"已发布的工作流程","Published Pages":"已发布的页面",Help:"帮助","Email comments, bug reports, or suggestions":"发邮件进行意见反馈或错误报告",User:"用户",Register:"注册",Support:"技术支持","Galaxy Wiki":"Galaxy百科","Video tutorials (screencasts)":"视频教程(动画演示)","How to Cite Galaxy":"如何引用Galaxy",});
\ No newline at end of file
diff --git a/static/scripts/packed/utils/localization.js b/static/scripts/packed/utils/localization.js
index 525a2771016..c893777f451 100644
--- a/static/scripts/packed/utils/localization.js
+++ b/static/scripts/packed/utils/localization.js
@@ -1 +1 @@
-var GalaxyLocalization=jQuery.extend({},{ALIAS_NAME:"_l",localizedStrings:{},setLocalizedString:function(b,a){var c=this;var d=function(f,e){if(f!==e){c.localizedStrings[f]=e}};if(jQuery.type(b)==="string"){d(b,a)}else{if(jQuery.type(b)==="object"){jQuery.each(b,function(e,f){d(e,f)})}else{throw ("Localization.setLocalizedString needs either a string or object as the first argument, given: "+b)}}},localize:function(a){return this.localizedStrings[a]||a},addAliasToNamespace:function(a){a[GalaxyLocalization.ALIAS_NAME]=function(b){return GalaxyLocalization.localize(b)}},toString:function(){return"GalaxyLocalization"}});GalaxyLocalization.addAliasToNamespace(window);
\ No newline at end of file
+define(["i18n!nls/locale"],function(b){var a=function(c){if(a.cacheNonLocalized&&!b.hasOwnProperty(c)){if(!a.nonLocalized){a.nonLocalized={}}a.nonLocalized[c]=navigator.language}return b[c]||c};a.cacheNonLocalized=false;return a});
\ No newline at end of file
diff --git a/static/scripts/utils/localization.js b/static/scripts/utils/localization.js
index 6a7f9fc314b..445148a7eb9 100644
--- a/static/scripts/utils/localization.js
+++ b/static/scripts/utils/localization.js
@@ -1,82 +1,28 @@
+define([
+ 'i18n!nls/locale'
+], function( localeStrings ){
// =============================================================================
-/** @class string localizer (and global short form alias)
- *
- * @example
- * // set with either:
- * GalaxyLocalization.setLocalizedString( original, localized )
- * GalaxyLocalization.setLocalizedString({ original1 : localized1, original2 : localized2 })
- * // get with either:
- * GalaxyLocalization.localize( string )
- * _l( string )
- *
- * @constructs
+/** Attempt to get a localized string for strToLocalize. If not found, return
+ * the original strToLocalize.
+ * @param {String} strToLocalize the string to localize
+ * @returns either the localized string if found or strToLocalize if not found
*/
-//TODO: move to Galaxy.Localization (maybe galaxy.base.js)
-var GalaxyLocalization = jQuery.extend( {}, {
- /** shortened, alias reference to GalaxyLocalization.localize */
- ALIAS_NAME : '_l',
- /** map of available localized strings (english -> localized) */
- localizedStrings : {},
+var localize = function( strToLocalize ){
+ //console.debug( this + '.localize:', strToLocalize );
- /** Set a single English string -> localized string association, or set an entire map of those associations
- * @param {String or Object} str_or_obj english (key) string or a map of english -> localized strings
- * @param {String} localized string if str_or_obj was a string
- */
- setLocalizedString : function( str_or_obj, localizedString ){
- //console.debug( this + '.setLocalizedString:', str_or_obj, localizedString );
- var self = this;
+ // cache strings that need to be localized but haven't been?
+ if( localize.cacheNonLocalized && !localeStrings.hasOwnProperty( strToLocalize ) ){
+ //console.debug( 'localization NOT found:', strToLocalize );
+ // add nonCached as hash directly to this function
+ if( !localize.nonLocalized ){ localize.nonLocalized = {}; }
+ localize.nonLocalized[ strToLocalize ] = navigator.language;
+ }
+ // return the localized version from the closure if it's there, the strToLocalize if not
+ return localeStrings[ strToLocalize ] || strToLocalize;
+};
+localize.cacheNonLocalized = false;
- // DRY non-duplicate assignment function
- var setStringIfNotDuplicate = function( original, localized ){
- // do not set if identical - strcmp expensive but should only happen once per page per word
- if( original !== localized ){
- self.localizedStrings[ original ] = localized;
- }
- };
- if( jQuery.type( str_or_obj ) === "string" ){
- setStringIfNotDuplicate( str_or_obj, localizedString );
-
- } else if( jQuery.type( str_or_obj ) === "object" ){
- jQuery.each( str_or_obj, function( key, val ){
- //console.debug( 'key=>val', key, '=>', val );
- // could recurse here but no reason
- setStringIfNotDuplicate( key, val );
- });
-
- } else {
- throw( 'Localization.setLocalizedString needs either a string or object as the first argument,' +
- ' given: ' + str_or_obj );
- }
- },
-
- /** Attempt to get a localized string for strToLocalize. If not found, return the original strToLocalize.
- * @param {String} strToLocalize the string to localize
- * @returns either the localized string if found or strToLocalize if not found
- */
- localize : function( strToLocalize ){
- //console.debug( this + '.localize:', strToLocalize );
-
- //// uncomment this section to cache strings that need to be localized but haven't been
- //if( !_.has( this.localizedStrings, strToLocalize ) ){
- // //console.debug( 'localization NOT found:', strToLocalize );
- // if( !this.nonLocalized ){ this.nonLocalized = {}; }
- // this.nonLocalized[ strToLocalize ] = false;
- //}
-
- // return the localized version if it's there, the strToLocalize if not
- return this.localizedStrings[ strToLocalize ] || strToLocalize;
- },
-
- /** Add the localization function alias (GalaxyLocalization.ALIAS_NAME) to the given namespace.
- * @param {Object} namespace the object/namespace to add the alias to
- */
- addAliasToNamespace : function( namespace ){
- namespace[ GalaxyLocalization.ALIAS_NAME ] = function( str ){ return GalaxyLocalization.localize( str ); };
- },
-
- /** String representation. */
- toString : function(){ return 'GalaxyLocalization'; }
+// =============================================================================
+ return localize;
});
-
-GalaxyLocalization.addAliasToNamespace( window );
diff --git a/templates/base/base_panels.mako b/templates/base/base_panels.mako
index 0c7aa8cf7e4..1b33ed2b217 100644
--- a/templates/base/base_panels.mako
+++ b/templates/base/base_panels.mako
@@ -1,5 +1,6 @@
+<%namespace name="galaxy_client" file="../galaxy_client_app.mako" />
<%
self.has_left_panel = hasattr( self, 'left_panel' )
self.has_right_panel = hasattr( self, 'right_panel' )
@@ -58,6 +59,7 @@
'libs/require',
"mvc/ui"
)}
+ ${ galaxy_client.bootstrap() }
+<%def name="current_history_panel( selector_to_attach_to=None, options )">
%def>
## ----------------------------------------------------------------------------
-<%def name="history_panel( history_id, selector_to_attach_to=None, \
- show_deleted=None, show_hidden=None, hda_id=None )">
-
-${history_panel_javascripts()}
-
-
+<%def name="history_panel( history_id, selector_to_attach_to=None, options )">
%def>
## ----------------------------------------------------------------------------
-<%def name="bootstrapped_history_panel( history, hdas, selector_to_attach_to=None, \
- show_deleted=None, show_hidden=None, hda_id=None )">
-
-${history_panel_javascripts()}
-
-
-%def>
-
-
-## ----------------------------------------------------------------------------- generic 'base' function
-<%def name="history_panel_javascripts()">
-${h.js(
- "utils/localization",
-)}
-
-${localize_js_strings([
- # not needed?: "Galaxy History",
- 'refresh',
- 'collapse all',
- 'hide deleted',
- 'hide hidden',
- 'You are currently viewing a deleted history!',
- "Your history is empty. Click 'Get Data' on the left pane to start",
-
- # from history_common.mako
- 'Download',
- 'Display Data',
- 'View data',
- 'Edit attributes',
- 'Delete',
- 'Job is waiting to run',
- 'View Details',
- 'Job is currently running',
- #'Run this job again',
- 'Metadata is being Auto-Detected.',
- 'No data: ',
- 'format: ',
- 'database: ',
- #TODO localized data.dbkey??
- 'Info: ',
- #TODO localized display_app.display_name??
- # _( link_app.name )
- # localized peek...ugh
- 'Error: unknown dataset state'
-])}
-
-
+<%def name="bootstrapped_history_panel( history, hdas, selector_to_attach_to=None, options )">
%def>
diff --git a/templates/webapps/galaxy/history/view.mako b/templates/webapps/galaxy/history/view.mako
index 980aebb24a4..18802cc80f3 100644
--- a/templates/webapps/galaxy/history/view.mako
+++ b/templates/webapps/galaxy/history/view.mako
@@ -1,4 +1,3 @@
-<%namespace file="/history/history_panel.mako" import="history_panel_javascripts" />
<%namespace file="/galaxy.masthead.mako" import="get_user_json" />
## ----------------------------------------------------------------------------
@@ -70,7 +69,6 @@ a.btn {
## ----------------------------------------------------------------------------
<%def name="javascripts()">
${parent.javascripts()}
-${history_panel_javascripts()}
%if not use_panels:
-%def>