diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-08-18 12:17:00 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-08-18 12:17:00 +0000 |
commit | 81938a3cdc7b9bd13d58e355c59d9835e830fea4 (patch) | |
tree | 4d6156a6edb7898d74d5b1836b80d08750aa39c2 /modules/taxonomy/taxonomy.module | |
parent | 885a29c4cd13776165c40080a00180cddd420a46 (diff) | |
download | brdo-81938a3cdc7b9bd13d58e355c59d9835e830fea4.tar.gz brdo-81938a3cdc7b9bd13d58e355c59d9835e830fea4.tar.bz2 |
#76802: Introduce placeholder magic into t()
See: http://drupal.org/node/64279#t-placeholders
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index dafc267f2..6d2f05822 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -226,12 +226,12 @@ function taxonomy_form_vocabulary($edit = array()) { '#title' => t('Hierarchy'), '#default_value' => $edit['hierarchy'], '#options' => array(t('Disabled'), t('Single'), t('Multiple')), - '#description' => t('Allows <a href="%help-url">a tree-like hierarchy</a> between terms of this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'hierarchy'))), + '#description' => t('Allows <a href="@help-url">a tree-like hierarchy</a> between terms of this vocabulary.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'hierarchy'))), ); $form['relations'] = array('#type' => 'checkbox', '#title' => t('Related terms'), '#default_value' => $edit['relations'], - '#description' => t('Allows <a href="%help-url">related terms</a> in this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'related-terms'))), + '#description' => t('Allows <a href="@help-url">related terms</a> in this vocabulary.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'related-terms'))), ); $form['tags'] = array('#type' => 'checkbox', '#title' => t('Free tagging'), @@ -271,10 +271,10 @@ function taxonomy_form_vocabulary_submit($form_id, $form_values) { $form_values['nodes'] = array_filter($form_values['nodes']); switch (taxonomy_save_vocabulary($form_values)) { case SAVED_NEW: - drupal_set_message(t('Created new vocabulary %name.', array('%name' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('Created new vocabulary %name.', array('%name' => $form_values['name']))); break; case SAVED_UPDATED: - drupal_set_message(t('Updated vocabulary %name.', array('%name' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('Updated vocabulary %name.', array('%name' => $form_values['name']))); break; } return 'admin/content/taxonomy'; @@ -335,7 +335,7 @@ function _taxonomy_confirm_del_vocabulary($vid) { $form['name'] = array('#type' => 'value', '#value' => $vocabulary->name); return confirm_form('taxonomy_vocabulary_confirm_delete', $form, t('Are you sure you want to delete the vocabulary %title?', - array('%title' => theme('placeholder', $vocabulary->name))), + array('%title' => $vocabulary->name)), 'admin/content/taxonomy', t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.'), t('Delete'), t('Cancel')); @@ -343,7 +343,7 @@ function _taxonomy_confirm_del_vocabulary($vid) { function taxonomy_vocabulary_confirm_delete_submit($form_id, $form_values) { $status = taxonomy_del_vocabulary($form_values['vid']); - drupal_set_message(t('Deleted vocabulary %name.', array('%name' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('Deleted vocabulary %name.', array('%name' => $form_values['name']))); return 'admin/content/taxonomy'; } @@ -377,7 +377,7 @@ function taxonomy_form_term($edit = array()) { $form['relations'] = _taxonomy_term_select(t('Related terms'), 'relations', array_keys(taxonomy_get_related($edit['tid'])), $vocabulary_id, NULL, 1, '<'. t('none') .'>', array($edit['tid'])); } - $form['synonyms'] = array('#type' => 'textarea', '#title' => t('Synonyms'), '#default_value' => implode("\n", taxonomy_get_synonyms($edit['tid'])), '#description' => t('<a href="%help-url">Synonyms</a> of this term, one synonym per line.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'synonyms')))); + $form['synonyms'] = array('#type' => 'textarea', '#title' => t('Synonyms'), '#default_value' => implode("\n", taxonomy_get_synonyms($edit['tid'])), '#description' => t('<a href="@help-url">Synonyms</a> of this term, one synonym per line.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'synonyms')))); $form['weight'] = array('#type' => 'weight', '#title' => t('Weight'), '#default_value' => $edit['weight'], '#description' => t('In listings, the heavier terms will sink and the lighter terms will be positioned nearer the top.')); // Add extra term form elements. @@ -410,10 +410,10 @@ function taxonomy_form_term($edit = array()) { function taxonomy_form_term_submit($form_id, $form_values) { switch (taxonomy_save_term($form_values)) { case SAVED_NEW: - drupal_set_message(t('Created new term %term.', array('%term' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('Created new term %term.', array('%term' => $form_values['name']))); break; case SAVED_UPDATED: - drupal_set_message(t('The term %term has been updated.', array('%term' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('The term %term has been updated.', array('%term' => $form_values['name']))); break; } return 'admin/content/taxonomy'; @@ -521,7 +521,7 @@ function _taxonomy_confirm_del_term($tid) { $form['tid'] = array('#type' => 'value', '#value' => $tid); return confirm_form('taxonomy_term_confirm_delete', $form, t('Are you sure you want to delete the term %title?', - array('%title' => theme('placeholder', $term->name))), + array('%title' => $term->name)), 'admin/content/taxonomy', t('Deleting a term will delete all its children if there are any. This action cannot be undone.'), t('Delete'), @@ -530,7 +530,7 @@ function _taxonomy_confirm_del_term($tid) { function taxonomy_term_confirm_delete_submit($form_id, $form_values) { taxonomy_del_term($form_values['tid']); - drupal_set_message(t('Deleted term %name.', array('%name' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('Deleted term %name.', array('%name' => $form_values['name']))); return 'admin/content/taxonomy'; } @@ -709,7 +709,7 @@ function taxonomy_node_validate(&$node) { if (!$vocabulary->tags) { // see form_get_error $key = implode('][', $element['#parents']); // on why this is the key - form_set_error("taxonomy][tags][$vid", t('The %name vocabulary can not be modified in this way.', array('%name' => theme('placeholder', $vocabulary->name)))); + form_set_error("taxonomy][tags][$vid", t('The %name vocabulary can not be modified in this way.', array('%name' => $vocabulary->name))); } } } @@ -1330,13 +1330,13 @@ function taxonomy_help($section) { $output .= '<p>'. t('A controlled vocabulary is a set of terms to use for describing content (known as descriptors in indexing lingo). Drupal allows you to describe each piece of content (blog, story, etc.) using one or many of these terms. For simple implementations, you might create a set of categories without subcategories, similar to Slashdot\'s sections. For more complex implementations, you might create a hierarchical list of categories.') .'</p>'; $output .= t('<p>You can</p> <ul> -<li>add a vocabulary at <a href="%admin-taxonomy-add-vocabulary">administer >> content management >> categories >> add vocabulary</a>.</li> -<li>administer taxonomy at <a href="%admin-taxonomy">administer >> content management >> categories</a>.</li> -<li>restrict content access by category for specific users roles using the <a href="%external-http-drupal-org-project-taxonomy_access">taxonomy access module</a>.</li> -<li>build a custom view of your categories using the <a href="%external-http-drupal-org-project-taxonomy_browser">taxonomy browser</a>.</li> +<li>add a vocabulary at <a href="@admin-taxonomy-add-vocabulary">administer >> content management >> categories >> add vocabulary</a>.</li> +<li>administer taxonomy at <a href="@admin-taxonomy">administer >> content management >> categories</a>.</li> +<li>restrict content access by category for specific users roles using the <a href="@external-http-drupal-org-project-taxonomy_access">taxonomy access module</a>.</li> +<li>build a custom view of your categories using the <a href="@external-http-drupal-org-project-taxonomy_browser">taxonomy browser</a>.</li> </ul> -', array('%admin-taxonomy-add-vocabulary' => url('admin/content/taxonomy/add/vocabulary'), '%admin-taxonomy' => url('admin/content/taxonomy'), '%external-http-drupal-org-project-taxonomy_access' => 'http://drupal.org/project/taxonomy_access', '%external-http-drupal-org-project-taxonomy_browser' => 'http://drupal.org/project/taxonomy_browser')); - $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%taxonomy">Taxonomy page</a>.', array('%taxonomy' => 'http://drupal.org/handbook/modules/taxonomy/')) .'</p>'; +', array('@admin-taxonomy-add-vocabulary' => url('admin/content/taxonomy/add/vocabulary'), '@admin-taxonomy' => url('admin/content/taxonomy'), '@external-http-drupal-org-project-taxonomy_access' => 'http://drupal.org/project/taxonomy_access', '@external-http-drupal-org-project-taxonomy_browser' => 'http://drupal.org/project/taxonomy_browser')); + $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@taxonomy">Taxonomy page</a>.', array('@taxonomy' => 'http://drupal.org/handbook/modules/taxonomy/')) .'</p>'; return $output; case 'admin/settings/modules#description': return t('Enables the categorization of content.'); |