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/poll/poll.module | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'modules/poll') diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 5b75f69d8..3162bbe33 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -14,14 +14,14 @@ function poll_help($section) { switch ($section) { case 'admin/help#poll': $output = '

'. t('The poll module can be used to create simple polls for site users. A poll is a simple multiple choice questionnaire which displays the cumulative results of the answers to the poll. Having polls on the site is a good way to get instant feedback from community members.') .'

'; - $output .= '

'. t('Users can create a poll. The title of the poll should be the question, then enter the answers and the "base" vote counts. You can also choose the time period over which the vote will run.The poll item in the navigation menu will take you to a page where you can see all the current polls, vote on them (if you haven\'t already) and view the results.', array('%poll' => url('poll'))) .'

'; + $output .= '

'. t('Users can create a poll. The title of the poll should be the question, then enter the answers and the "base" vote counts. You can also choose the time period over which the vote will run.The poll item in the navigation menu will take you to a page where you can see all the current polls, vote on them (if you haven\'t already) and view the results.', array('@poll' => url('poll'))) .'

'; $output .= t('

You can

-', array('%poll' => url('poll'), '%admin-node-configure-types-poll' => url('admin/content/types/poll'))); - $output .= '

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

'; +', array('@poll' => url('poll'), '@admin-node-configure-types-poll' => url('admin/content/types/poll'))); + $output .= '

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

'; return $output; case 'admin/settings/modules#description': return t("Allows your site to capture votes on different topics in the form of multiple choice questions."); @@ -143,9 +143,9 @@ function poll_form(&$node) { // Poll choices $form['choice'] += array('#type' => 'fieldset', '#title' => t('Choices'), '#prefix' => '
', '#suffix' => '
', '#tree' => TRUE); for ($a = 0; $a < $node->choices; $a++) { - $form['choice'][$a]['chtext'] = array('#type' => 'textfield', '#title' => t('Choice %n', array('%n' => ($a + 1))), '#default_value' => $node->choice[$a]['chtext']); + $form['choice'][$a]['chtext'] = array('#type' => 'textfield', '#title' => t('Choice @n', array('@n' => ($a + 1))), '#default_value' => $node->choice[$a]['chtext']); if ($admin) { - $form['choice'][$a]['chvotes'] = array('#type' => 'textfield', '#title' => t('Votes for choice %n', array('%n' => ($a + 1))), '#default_value' => (int)$node->choice[$a]['chvotes'], '#size' => 5, '#maxlength' => 7); + $form['choice'][$a]['chvotes'] = array('#type' => 'textfield', '#title' => t('Votes for choice @n', array('@n' => ($a + 1))), '#default_value' => (int)$node->choice[$a]['chvotes'], '#size' => 5, '#maxlength' => 7); } } @@ -291,7 +291,7 @@ function poll_page() { $result = pager_query($sql, 15); $output = ''; $output .= theme("pager", NULL, 15); @@ -368,7 +368,7 @@ function poll_view_results(&$node, $teaser, $page, $block) { foreach ($node->choice as $i => $choice) { if ($choice['chtext'] != '') { - $poll_results .= theme('poll_bar', check_plain($choice['chtext']), round($choice['chvotes'] * 100 / max($total_votes, 1)), format_plural($choice['chvotes'], '1 vote', '%count votes'), $block); + $poll_results .= theme('poll_bar', check_plain($choice['chtext']), round($choice['chvotes'] * 100 / max($total_votes, 1)), format_plural($choice['chvotes'], '1 vote', '@count votes'), $block); } } -- cgit v1.2.3