mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
fix style and wording
This commit is contained in:
@@ -173,12 +173,12 @@ var View = Backbone.View.extend({
|
||||
self._submit("datatype", form);
|
||||
}
|
||||
}),
|
||||
submit_datatype_sniff: new Ui.ButtonIcon({
|
||||
tooltip: _l("Sniff the datatype and change it."),
|
||||
title: _l("Sniff datatype"),
|
||||
submit_datatype_detect: new Ui.ButtonIcon({
|
||||
tooltip: _l("Detect the datatype and change it."),
|
||||
title: _l("Detect datatype"),
|
||||
icon: "fa-undo",
|
||||
onclick: function() {
|
||||
self._submit("datatype_sniff", form);
|
||||
self._submit("datatype_detect", form);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ from galaxy import (
|
||||
util,
|
||||
web
|
||||
)
|
||||
from galaxy.datatypes.display_applications.util import decode_dataset_user, encode_dataset_user
|
||||
from galaxy.datatypes import sniff
|
||||
from galaxy.datatypes.display_applications.util import decode_dataset_user, encode_dataset_user
|
||||
from galaxy.exceptions import RequestParameterInvalidException
|
||||
from galaxy.model.item_attrs import UsesAnnotations, UsesItemRatings
|
||||
from galaxy.util import (
|
||||
@@ -461,8 +461,8 @@ class DatasetInterface(BaseUIController, UsesAnnotations, UsesItemRatings, UsesE
|
||||
message = 'Changed the type to %s.' % datatype
|
||||
else:
|
||||
return self.message_exception(trans, 'You are unable to change datatypes in this manner. Changing %s to %s is not allowed.' % (data.extension, datatype))
|
||||
elif operation == 'datatype_sniff':
|
||||
# The user clicked the Sniff button on the 'Change data type' form
|
||||
elif operation == 'datatype_detect':
|
||||
# The user clicked the 'Detect datatype' button on the 'Change data type' form
|
||||
if data.datatype.allow_datatype_change:
|
||||
# prevent modifying datatype when dataset is queued or running as input/output
|
||||
if not __ok_to_edit_metadata(data.id):
|
||||
@@ -476,9 +476,9 @@ class DatasetInterface(BaseUIController, UsesAnnotations, UsesItemRatings, UsesE
|
||||
trans.app.datatypes_registry.set_external_metadata_tool.tool_action.execute(
|
||||
trans.app.datatypes_registry.set_external_metadata_tool, trans, incoming={'input1': data},
|
||||
overwrite=False) # overwrite is False as per existing behavior
|
||||
message = 'Sniffed and changed the type to %s.' % datatype
|
||||
message = 'Detection was finished and changed the datatype to %s.' % datatype
|
||||
else:
|
||||
return self.message_exception(trans, 'Changing datatype %s is not allowed.' % (data.extension))
|
||||
return self.message_exception(trans, 'Changing datatype "%s" is not allowed.' % (data.extension))
|
||||
elif operation == 'autodetect':
|
||||
# The user clicked the Auto-detect button on the 'Edit Attributes' form
|
||||
# prevent modifying metadata when dataset is queued or running as input/output
|
||||
|
||||
Reference in New Issue
Block a user