From 81938a3cdc7b9bd13d58e355c59d9835e830fea4 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Fri, 18 Aug 2006 12:17:00 +0000 Subject: #76802: Introduce placeholder magic into t() See: http://drupal.org/node/64279#t-placeholders --- modules/taxonomy/taxonomy.module | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'modules/taxonomy/taxonomy.module') 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 tree-like hierarchy between terms of this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'hierarchy'))), + '#description' => t('Allows a tree-like hierarchy 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 related terms in this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'related-terms'))), + '#description' => t('Allows related terms 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('Synonyms 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('Synonyms 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 .= '

'. 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.') .'

'; $output .= t('

You can

-', 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 .= '

'. t('For more information please read the configuration and customization handbook Taxonomy page.', array('%taxonomy' => 'http://drupal.org/handbook/modules/taxonomy/')) .'

'; +', 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 .= '

'. t('For more information please read the configuration and customization handbook Taxonomy page.', array('@taxonomy' => 'http://drupal.org/handbook/modules/taxonomy/')) .'

'; return $output; case 'admin/settings/modules#description': return t('Enables the categorization of content.'); -- cgit v1.2.3