Skip to content

Commit

Permalink
Merge pull request #1107 from dsenalik/tripaltypos20201015
Browse files Browse the repository at this point in the history
October corrections for typos
  • Loading branch information
spficklin committed Oct 15, 2020
2 parents 8eab8f8 + 70e4b3c commit b8c1c67
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions docs/dev_guide/custom_field/manual_field_creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Sometimes a field is meant to provide a visualization or some other functionalit
.. note::
Be sure to only set this to TRUE when you are absolutely certain the contents would not be needed in web services. Tripal was designed so that what appears on the page will always appear in web services. Aside form the formatting we see on the website, the content should be the same.
Be sure to only set this to TRUE when you are absolutely certain the contents would not be needed in web services. Tripal was designed so that what appears on the page will always appear in web services. Aside from the formatting we see on the website, the content should be the same.

Finally, the last item in our Class variables is the **download_formatters**. Tripal provides an API that allows tools to group entities into data collections. Data collections are like "baskets" or "shopping carts". Entities that are in data collections can be downloaded into files. If your field is compatible with specific file downloaders you can specify those here. A file downloader is a special TripalFieldDownloader class that "speaks" certain file formats. Tripal, by default, provides the TripalTabDownloader (for tab-delimited files), the TripalCSVDownloader (for CSV files), a TripalNucFASTADownloader for creating nucleotide FASTA files and a TripalProteinFASTADownloader for protein FASTA files. If your field is compatible with any of these formatters you can specify them in the following array:

Expand Down Expand Up @@ -198,7 +198,7 @@ Next, let's initialize our field's value to be empty. When setting a field valu
);
Notice that our field has some sub elements. The first is 'und'. This element corresponds to the "language" of the text. Drupal supports multiple spoken languages and wants to know the language of text we provide. For Tripal fields we always use 'und' meaning 'undefined'. The next element is the delta index number. Field have a cardinality, or in other words they can have multiple values. For every value we add we increment that index, always starting at zero. The last element is our 'value' element and it is here where we put our element. You may notice that our **delta** index is hard coded to 0. This is because an entity can only always have one organism that it is associated with. We will never have more than one.
Notice that our field has some sub elements. The first is 'und'. This element corresponds to the "language" of the text. Drupal supports multiple spoken languages and wants to know the language of text we provide. For Tripal fields we always use 'und' meaning 'undefined'. The next element is the delta index number. Fields have a cardinality, or in other words they can have multiple values. For every value we add we increment that index, always starting at zero. The last element is our 'value' element and it is here where we put our element. You may notice that our **delta** index is hard coded to 0. This is because an entity can only always have one organism that it is associated with. We will never have more than one.

Now that we've got some preliminary values and we've initialized our value array we can start adding values! Before we do though, let's double check that we have a record. If we don't have a record for this entity, we can't get a value.

Expand All @@ -222,7 +222,7 @@ We can easily get all of the values we need from this organism object. We can

.. code-block:: php
$label = tripal_replace_chado_tokens($string, $organism);
$label = chado_replace_tokens($string, $organism);
$entity->{$field_name}['und'][0]['value'] = array(
$label_term => $label,
$genus_term => $organism->genus,
Expand Down Expand Up @@ -278,7 +278,7 @@ We do this because anything in the 'value' element is intended for the end-user.

1. Does the user need this value? If yes, put it in the 'value' element.
2. Does Tripal need the value when writing back to the Chado table? If yes, put it as a hidden element.
3. Does the user need to see the value an will this same value need to be written to the table? If yes, then you have to put the value in both places.
3. Does the user need to see the value and will this same value need to be written to the table? If yes, then you have to put the value in both places.

For our **obi__organism** field it is for entities with records in the **feature, stock, library**, etc. tables. Those tables only have an **organism_id** to represent the organism. So, that's the database column this field is supporting. We therefore, need to put that field as a hidden field, and all the others are just helpful to the user and don't get saved in the feature, stock or library tables. So, those go in the values array.

Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/install_tripal/custom_theme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Drupal makes it easy to change the look-and-feel of your site by providing Theme

Customizing a Theme
-------------------
If you want to make customizations to the theme you should create your own sub theme. A sub theme borrows from an existing **base theme** (e.g. Bartik) and allows you to make your customizations. Thus, when updates for a theme are released you can easily upgrade your base theme without losing your changes. To create a sub theme, follow the instructions on the `Creating a sub-theme page <https://www.drupal.org/docs/7/theming/creating-a-sub-theme>`_ on the Drupal website. Alternatively, completely custom themes do not borrow from any other theme, you can create your own full-blown theme by following the `Themeing instructions <https://www.drupal.org/docs/7/theming>`_ at the Drupal website.
If you want to make customizations to the theme you should create your own sub theme. A sub theme borrows from an existing **base theme** (e.g. Bartik) and allows you to make your customizations. Thus, when updates for a theme are released you can easily upgrade your base theme without losing your changes. To create a sub theme, follow the instructions on the `Creating a sub-theme page <https://www.drupal.org/docs/7/theming/creating-a-sub-theme>`_ on the Drupal website. Alternatively, completely custom themes do not borrow from any other theme, you can create your own full-blown theme by following the `Theming instructions <https://www.drupal.org/docs/7/theming>`_ at the Drupal website.

.. note::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function chado_add_node_form_properties(&$form, &$form_state, $details) {
// make sure the property table exists before proceeding.
if (!chado_table_exists($details['property_table'])) {
drupal_set_message("Cannot add property elements to the form. The property table, '" .
$details['property_table'] . "', does not exists", "error");
$details['property_table'] . "', does not exist", "error");
tripal_report_error('tcprops_form', TRIPAL_ERROR,
"Cannot add property elements to the form. The property table, '%name', cannot be found.",
['%name' => $details['property_table']]);
Expand All @@ -203,7 +203,7 @@ function chado_add_node_form_properties(&$form, &$form_state, $details) {
$result = chado_select_record('cv', ['cv_id'], ['name' => $details['cv_name']]);
if (count($result) == 0) {
drupal_set_message("Cannot add property elements to the form. The CV name, '" .
$details['cv_name'] . "', does not exists", "error");
$details['cv_name'] . "', does not exist", "error");
tripal_report_error('tcprops_form', TRIPAL_ERROR,
"Cannot add property elements to the form. The CV named, '%name', cannot be found.",
['%name' => $details['cv_name']]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function chado_add_node_form_relationships(&$form, &$form_state, $details) {
// make sure the relationship table exists before proceeding.
if (!chado_table_exists($details['relationship_table'])) {
drupal_set_message("Cannot add relationship elements to the form. The relationship table, '" .
$details['relationship_table'] . "', does not exists", "error");
$details['relationship_table'] . "', does not exist", "error");
tripal_report_error('tcrel_form', TRIPAL_ERROR, "Cannot add relationship elements to the form.
The relationship table, '%name', cannot be found.", ['%name' => $details['relationship_table']]);
return;
Expand All @@ -167,7 +167,7 @@ function chado_add_node_form_relationships(&$form, &$form_state, $details) {
$result = chado_select_record('cv', ['cv_id'], ['name' => $details['cv_name']]);
if (count($result) == 0) {
drupal_set_message("Cannot add relationship elements to the form. The CV name, '" .
$details['cv_name'] . "', does not exists", "error");
$details['cv_name'] . "', does not exist", "error");
tripal_report_error('tcrel_form', TRIPAL_ERROR, "Cannot add relationship elements to the form.
The CV named, '%name', cannot be found.", ['%name' => $details['cv_name']]);
return;
Expand Down
4 changes: 2 additions & 2 deletions legacy/tripal_phylogeny/tripal_phylogeny.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function drush_tripal_phylogeny_trp_update_phylotree() {
$options['phylotree_id'] = $phylotree[0]->phylotree_id;
}
else {
drush_print('A phylotree record with this name does not exists.');
drush_print('A phylotree record with this name does not exist.');
}
}

Expand Down Expand Up @@ -234,7 +234,7 @@ function drush_tripal_phylogeny_trp_delete_phylotree() {
$options['phylotree_id'] = $phylotree[0]->phylotree_id;
}
else {
drush_print('A phylotree record with this name does not exists.');
drush_print('A phylotree record with this name does not exist.');
}
}

Expand Down
2 changes: 1 addition & 1 deletion tripal/tripal.module
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ function tripal_theme($existing, $type, $theme, $path) {
'tripal_add_list' => array(
'variables' => array('content' => NULL),
),
// Themeing for all fields.
// Theming for all fields.
'tripal_field_default' => array(
'render element' => 'element',
'file' => 'includes/tripal.fields.inc',
Expand Down
4 changes: 2 additions & 2 deletions tripal_chado/api/modules/tripal_chado.cv.api.inc
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ function chado_insert_cv($name, $definition) {
$sel_values = ['name' => $name];
$results = chado_select_record('cv', ['*'], $sel_values);

// If it does not exists then add it.
// If it does not exist then add it.
if (count($results) == 0) {
$success = chado_insert_record('cv', $ins_values);
if (!$success) {
Expand Down Expand Up @@ -963,7 +963,7 @@ function chado_insert_cvterm($term, $options = []) {
'is_for_definition' => 1,
];
$result = chado_select_record('cvterm_dbxref', ['*'], $values);
// if the cvterm_dbxref record does not exists then add it
// if the cvterm_dbxref record does not exist then add it
if (count($result) == 0) {
$options = [
'return_record' => FALSE,
Expand Down
2 changes: 1 addition & 1 deletion tripal_chado/api/modules/tripal_chado.db.api.inc
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ function chado_insert_db($values, $options = []) {
$sel_values = ['name' => $dbname];
$result = chado_select_record('db', ['*'], $sel_values);

// If it does not exists then add it.
// If it does not exist then add it.
if (count($result) == 0) {
$ins_options = ['statement_name' => 'ins_db_nadeurur'];
$success = chado_insert_record('db', $ins_values, $ins_options);
Expand Down
2 changes: 1 addition & 1 deletion tripal_chado/api/modules/tripal_chado.phylotree.api.inc
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function chado_validate_phylotree($val_type, &$options, &$errors, &$warnings) {
// If this is a numeric Drupal file then all is good, no need to check.
if (!is_numeric($options['tree_file'])) {
if (!file_exists($options['tree_file'])) {
$errors['tree_file'] = t('The file provided does not exists.');
$errors['tree_file'] = t('The file provided does not exist.');
return FALSE;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class sbo__relationship_formatter extends ChadoFieldFormatter {

// Add bold font to the object and subject names.
// @todo add back in bolding...
// @todo Fix Current Bug: if type name is in the object name, wierd bolding happens.
// @todo Fix Current Bug: if type name is in the object name, weird bolding happens.
// $phrase = preg_replace("/$subject_type/", "<b>$subject_type</b>", $phrase);
// $phrase = preg_replace("/$object_type/", "<b>$object_type</b>", $phrase);

Expand Down
6 changes: 3 additions & 3 deletions tripal_chado/includes/tripal_chado.fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ function tripal_chado_bundle_fields_info_linker(&$info, $details, $entity_type,
}

// RELATIONSHIPS
// If the linker table does not exists then we don't want to add attach.
// If the linker table does not exist then we don't want to add attach.
$rel_table = $table_name . '_relationship';
if (chado_table_exists($rel_table)) {
$field_name = 'sbo__relationship';
Expand Down Expand Up @@ -1110,7 +1110,7 @@ function tripal_chado_bundle_instances_info_base(&$info, $entity_type, $bundle,
if ($column_name == 'uniquename') {
$base_info['label'] = 'Unique Local Identifier';
$base_info['required'] = TRUE;
$base_info['description'] = 'This publication is housed in Chado whic requires a unique identifer (or name) be provided for every publication. This identifier need not be shown to end-users but it is required. Each site must decide on a format for this unique name.';
$base_info['description'] = 'This publication is housed in Chado which requires a unique identifer (or name) be provided for every publication. This identifier need not be shown to end-users but it is required. Each site must decide on a format for this unique name.';
}
if ($column_name == 'title') {
$base_info['description'] = 'The title of the published work.';
Expand Down Expand Up @@ -2676,7 +2676,7 @@ function tripal_chado_bundle_instances_info_linker(&$info, $entity_type, $bundle
}

// RELATIONSHIPS
// If the linker table does not exists then we don't want to add attach.
// If the linker table does not exist then we don't want to add attach.
$rel_table = $table_name . '_relationship';
if (chado_table_exists($rel_table)) {
$field_name = 'sbo__relationship';
Expand Down
2 changes: 1 addition & 1 deletion tripal_chado/includes/tripal_chado.phylotree.inc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function tripal_phylogeny_ajax_get_tree_json($phylotree_id)
// features and organisms with which it is associated. Each phylonode
// can be associated with an organism in one of two ways: 1) via a
// feature linked by the phylonode.feature_id field or 2) via a
// a record in the phylonde_organism table. Therefore both types of
// a record in the phylonode_organism table. Therefore both types of
// organism records are returned in the query below, but those
// retrieved via a FK link on features are prefixed with 'fo_'.
$sql = "
Expand Down
2 changes: 1 addition & 1 deletion tripal_daemon/theme/tripal_daemon.log_block.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Themeing for the Tripal Daemon Log Block.
* Theming for the Tripal Daemon Log Block.
*/

#trpdaemon-display-log-form {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class remote__data_formatter extends WebServicesFieldFormatter {
$field_name = $this->field['field_name'];

// Get any subfields and the header label. Shift the array because the
// results should already be the value of the fisrt entry.
// results should already be the value of the first entry.
$rd_field_name = $this->instance['settings']['data_info']['rd_field_name'];
$subfields = explode(',', $rd_field_name);
$header_label = $this->getHeaderLabel($subfields);
Expand Down
2 changes: 1 addition & 1 deletion tripal_ws/includes/TripalWebService.inc
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class TripalWebService {
* An implementation of a TripalWebServiceResource.
*/
public function setResource($resource) {
// Make sure the $service provides is a TripalWebServcie class.
// Make sure the $service provides is a TripalWebService class.
if (!is_a($resource, 'TripalWebServiceResource')) {
throw new Exception("Cannot add a new resource to this web service as it is not a TripalWebServiceResource.");
}
Expand Down
2 changes: 1 addition & 1 deletion tripal_ws/includes/TripalWebServiceCollection.inc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class TripalWebServiceCollection extends TripalWebServiceResource {
* resource
*/
public function addMember($member) {
// Make sure the $service provides is a TripalWebServcie class.
// Make sure the $service provides is a TripalWebService class.
if (!is_a($member, 'TripalWebServiceResource')) {
throw new Exception("Cannot add a new member to this resource collection as it is not a TripalWebServiceResource.");
}
Expand Down

0 comments on commit b8c1c67

Please sign in to comment.