? phpbb2drupal_strings.patch
Index: phpbb2drupal.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/phpbb2drupal/phpbb2drupal.module,v
retrieving revision 1.43
diff -u -p -w -r1.43 phpbb2drupal.module
--- phpbb2drupal.module	2 Jun 2007 05:36:55 -0000	1.43
+++ phpbb2drupal.module	20 Aug 2007 11:10:09 -0000
@@ -71,8 +71,8 @@ function phpbb2drupal_reset() {
   global $db_url;
   variable_set('phpbb2drupal_db_url', $db_url);
   variable_set('phpbb2drupal_ready', 0);
-  return '<p>'. t('The phpBB2 database URL has been reset. You may now <a href="%configlink">go back to the configuration page</a>.',
-      array('%configlink' => url('admin/settings/phpbb2drupal'))) .'</p>';
+  return '<p>'. t('The phpBB2 database URL has been reset. You may now <a href="@configlink">go back to the configuration page</a>.',
+      array('@configlink' => url('admin/settings/phpbb2drupal'))) .'</p>';
 }
 
 /**
@@ -131,15 +131,15 @@ function phpbb2drupal_main() {
   $output .= l(t('Post migration configuration'), 'admin/phpbb2drupal/postconfiguration');
   $output .= '</li>';
   $output .= '<li>';
-  $output .= t('<a href="%cleanuplink">Cleanup</a> (Accessing this link will delete all the saved phpbb2drupal settings and temporary tables: click only when you\'re done with all the above.)', array('%cleanuplink' => url('admin/phpbb2drupal/cleanup')));
+  $output .= t('<a href="@cleanuplink">Cleanup</a> (Accessing this link will delete all the saved phpbb2drupal settings and temporary tables: click only when you\'re done with all the above.)', array('@cleanuplink' => url('admin/phpbb2drupal/cleanup')));
   $output .= '</li>';
   $output .= '<li>'. t('If your data migration has proceeded smoothly, please post a "thank you" note in <a href="" target="_blank">this forum topic at drupal.org</a>.');
   $output .= '</li>';
   $output .= '</ol>';
 
   // process will die() if the link to the phpBB2 database is wrong:
-  $output .= '<p>'. t('If the phpBB2 data is in another data base, but you made a mistake while setting up the data base url, you may be unable to access the setting page due to some limitations of the core of Drupal. <a href="%reseturl">Click here to reset the database url</a>.',
-      array('%reseturl' => url('admin/phpbb2drupal/reset'))) .'</p>';
+  $output .= '<p>'. t('If the phpBB2 data is in another data base, but you made a mistake while setting up the data base url, you may be unable to access the setting page due to some limitations of the core of Drupal. <a href="@reseturl">Click here to reset the database url</a>.',
+      array('@reseturl' => url('admin/phpbb2drupal/reset'))) .'</p>';
 
   return $output;
 }
@@ -220,7 +220,7 @@ function phpbb2drupal_admin_settings() {
     '#collapsible' => TRUE,
     '#collapsed' => TRUE,
   );
-  $output = '<p>'. t('Select which <a href="%link">input format</a> should the imported messages be set:', array('%link' => url('admin/filters'))) .'</p>';
+  $output = '<p>'. t('Select which <a href="@link">input format</a> should the imported messages be set:', array('@link' => url('admin/filters'))) .'</p>';
   $form['input']['intro'] = array('#value' => $output);
   $output = '';
 
@@ -277,25 +277,25 @@ function phpbb2drupal_admin_settings() {
       $form['bbcode']['#collapsed']= FALSE;
       $output .= '<p><span class="marker">';
       $output .= t('<a href="http://drupal.org/project/bbcode" target="_blank">The bbcode module</a> is required to transform BBcode into HTML. 
-        You first need to <a href="%adminmodules">enable the bbcode module</a>', array('%adminmodules' => url('admin/modules')));
+        You first need to <a href="@adminmodules">enable the bbcode module</a>', array('@adminmodules' => url('admin/modules')));
       $output .= '</span></p>';
     }
     $sql = 'SELECT * FROM {filters} WHERE module = \'bbcode\' AND format = %d';
     $result = db_query($sql, $input_format);
     if (!db_num_rows($result)) {
       $form['bbcode']['#collapsed']= FALSE;
-      $output .= '<p class="marker">'. t('You need to <a href="%formatenable">enable bbcode in the selected input format</a> <a href="%formatconfigure">THEN click on configure to see bbcode options</a>', array('%formatenable' => $link_input_format_enable, '%formatconfigure' => $link_input_format_configure)) .'</p>';
+      $output .= '<p class="marker">'. t('You need to <a href="@formatenable">enable bbcode in the selected input format</a> <a href="@formatconfigure">THEN click on configure to see bbcode options</a>', array('@formatenable' => $link_input_format_enable, '@formatconfigure' => $link_input_format_configure)) .'</p>';
     }
-    $output .= '<p>'. t('For best results, <a href="%bbcodeconfig">all four BBcode configure options should be disabled</a>.', array('%bbcodeconfig' => url('admin/filters/'. $input_format .'/configure'))) .'</p>';
+    $output .= '<p>'. t('For best results, <a href="@bbcodeconfig">all four BBcode configure options should be disabled</a>.', array('@bbcodeconfig' => url('admin/filters/'. $input_format .'/configure'))) .'</p>';
     
   }
   else {
     if ($result7['result'] == 0) {
       $form['bbcode']['#collapsed']= FALSE;
-      $output .= '<p>'. t('<a href="http://drupal.org/project/bbcode" target="_blank">The bbcode module</a> is only recommanded. You may <a href="%adminmodules">enable the bbcode module</a> after having installed it.', array('%adminmodules' => url('admin/modules'))) .'</p>';
+      $output .= '<p>'. t('<a href="http://drupal.org/project/bbcode" target="_blank">The bbcode module</a> is only recommanded. You may <a href="@adminmodules">enable the bbcode module</a> after having installed it.', array('@adminmodules' => url('admin/modules'))) .'</p>';
     }
-    $output .= t('<p>Don\'t forget to <a href="%formatenable">enable bbcode in the selected input format</a> (admin > input formats > configure) and enable bbcode for the format selected for the imported posts.  <a href="%formatconfigure">Then click on configure to see bbcode options</a></p>
-      <p>You may want to enable it for other input formats, too.</p>', array('%formatenable' => $link_input_format_enable, '%formatconfigure' => $link_input_format_configure));
+    $output .= t('<p>Don\'t forget to <a href="@formatenable">enable bbcode in the selected input format</a> (admin > input formats > configure) and enable bbcode for the format selected for the imported posts.  <a href="@formatconfigure">Then click on configure to see bbcode options</a></p>
+      <p>You may want to enable it for other input formats, too.</p>', array('@formatenable' => $link_input_format_enable, '@formatconfigure' => $link_input_format_configure));
   }
   $output .= '<p><em>'. t('This setting will be applied to all posts, private messages and the users\' signature.') .'</em></p>';
   $form['bbcode']['result'] = array('#value' => $output);
@@ -328,7 +328,7 @@ function phpbb2drupal_admin_settings() {
     $ready_for_migration = 0;
     $form['modules']['#collapsed']= FALSE;
     $output .= '<p class="marker">';
-    $output .= t('Some of the modules are not enabled. <a href="%adminmodules">Got to the admin/modules page to enable them</a>', array('%adminmodules' => url('admin/modules')));
+    $output .= t('Some of the modules are not enabled. <a href="@adminmodules">Got to the admin/modules page to enable them</a>', array('@adminmodules' => url('admin/modules')));
     $output .= '</p>';
   }
   $form['modules']['result'] = array('#value' => $output);
@@ -504,7 +504,7 @@ function phpbb2drupal_admin_settings() {
       $ready_for_migration = 0;
       $form['attachments']['#collapsed']= FALSE;
       $output .= '<span class="marker">';
-      $output .= t('The comment_upload.module is not enabled. You can <a href="http://drupal.org/node/37197" target="_blank">go to the module Home Page to download it</a>. <a href="%adminmodules">After having installed it, go to the admin/module page to enable it</a>', array('%adminmodules' => url('admin/modules')));
+      $output .= t('The comment_upload.module is not enabled. You can <a href="http://drupal.org/node/37197" target="_blank">go to the module Home Page to download it</a>. <a href="@adminmodules">After having installed it, go to the admin/module page to enable it</a>', array('@adminmodules' => url('admin/modules')));
       $output .= '</span>';
     }
   }
@@ -635,7 +635,7 @@ function phpbb2drupal_admin_settings() {
         $ready_for_migration = 0;
         $form['pm']['#collapsed']= FALSE;
         $output .= '<p class="marker">';
-        $output .= t('The private message module is not enabled. You can <a href="http://drupal.org/project/privatemsg" target="_blank">go to the module Home Page to download it</a>. <a href="%adminmodules">After having installed it, go to the admin/module page to enable it</a>.', array('%adminmodules' => url('admin/modules')));
+        $output .= t('The private message module is not enabled. You can <a href="http://drupal.org/project/privatemsg" target="_blank">go to the module Home Page to download it</a>. <a href="@adminmodules">After having installed it, go to the admin/module page to enable it</a>.', array('@adminmodules' => url('admin/modules')));
         $output .= '</p>';
       }
       $pre = variable_get('phpbb2drupal_table_prefix', 'phpbb_');
@@ -675,7 +675,7 @@ function phpbb2drupal_admin_settings() {
   variable_set('phpbb2drupal_ready', $ready_for_migration);
   if ($ready_for_migration) {
     $form['migration']['#collapsed']= FALSE;
-    $output .= '<p>'. t('Check again all the settings above, and if everything is ok, <a href="%migratelink">you can now proceed with the migration</a>', array('%migratelink' => url('admin/phpbb2drupal/migrate'))) .'</p>';
+    $output .= '<p>'. t('Check again all the settings above, and if everything is ok, <a href="@migratelink">you can now proceed with the migration</a>', array('@migratelink' => url('admin/phpbb2drupal/migrate'))) .'</p>';
   }
   else {
     $output = '<p class="marker">'. t('You are not ready for the migration yet. Check the settings above.') .'</p>';
@@ -701,10 +701,10 @@ function _phpbb2drupal_check_module($mod
   $result = db_num_rows($result);
   $out['result'] = $result;
   if ($result == 1) {
-    $out['html'] .= '<li>'. t('Module %module is enabled. OK!', array('%module' => $module)) .'</li>';
+    $out['html'] .= '<li>'. t('Module @module is enabled. OK!', array('@module' => $module)) .'</li>';
   }
   else {
-    $out['html'] .= '<li><span class="marker">'. t('Module %module is disabled.', array('%module' => $module)) .'</span></li>';
+    $out['html'] .= '<li><span class="marker">'. t('Module @module is disabled.', array('@module' => $module)) .'</span></li>';
   }
   $out['html'] .= '</ul>';
   return $out;
@@ -736,10 +736,10 @@ function _phpbb2drupal_check_tables( $ta
     $result = db_query($query, $table);
     $result = db_num_rows($result);
     if ($result) {
-      $out['html'] .= '<li>'. t('Table %table: OK!', array('%table' => $table)) .'</li>';
+      $out['html'] .= '<li>'. t('Table @table: OK!', array('@table' => $table)) .'</li>';
     }
     else {
-      $out['html'] .= '<li><span class="marker">'. t('Table <strong>%table</strong> does not exist!', array('%table' => $table)) .'</span></li>';
+      $out['html'] .= '<li><span class="marker">'. t('Table <strong>@table</strong> does not exist!', array('@table' => $table)) .'</span></li>';
       $out['result']= 0;
     }
   }
@@ -752,7 +752,7 @@ function _phpbb2drupal_check_tables( $ta
 
 function phpbb2drupal_migrate() {
   if (!variable_get('phpbb2drupal_ready', 0)) {
-    return '<p>'. t('You cannot migrate the data now. Please <a href="%settings">complete the setup first</a>', array('%settings' => url('admin/settings/phpbb2drupal'))) .'</p>';
+    return '<p>'. t('You cannot migrate the data now. Please <a href="@settings">complete the setup first</a>', array('@settings' => url('admin/settings/phpbb2drupal'))) .'</p>';
   }
 
   $output = 'Phpbb 2 Drupal Migration Form';
@@ -985,7 +985,7 @@ function phpbb2drupal_import_users() {
       return t('There were no users found: Aborting script.');
   }
 
-  drupal_set_message(t('Found %user_count users: Beginning Import', array('%user_count' => $user_count + 1)));
+  drupal_set_message(t('Found @user_count users: Beginning Import', array('@user_count' => $user_count + 1)));
   
   $import_spammers = variable_get('phpbb2drupal_import_spammers', 1);
   
@@ -1088,7 +1088,7 @@ function phpbb2drupal_import_users() {
   variable_set('phpbb2drupal_import_user_successful', '1');
 
   $count = db_result(db_query('SELECT COUNT(*) FROM {phpbb2drupal_temp_user}'));
-  drupal_set_message(t('Successfully Imported %count Users', array('%count' => $count)));
+  drupal_set_message(t('Successfully Imported @count Users', array('@count' => $count)));
 }
 
 /**
@@ -1115,13 +1115,13 @@ function phpbb2drupal_import_categories(
   // Retrieve the vocabulary vid named "Forum"
   $forum_vid = _forum_get_vid();
 
-  drupal_set_message(t('Forum vid: %forum_vid', array('%forum_vid' => $forum_vid)));
+  drupal_set_message(t('Forum vid: @forum_vid', array('@forum_vid' => $forum_vid)));
 
   // Get Categories/Forums from PHPBB
   db_set_active('phpbb');
   $category_results = db_query('SELECT * FROM %scategories ORDER BY cat_order', $pre);
   $cat_count = db_num_rows($category_results);
-  drupal_set_message(t('Found %cat_count categories: Beginning Import', array('%cat_count' => $cat_count)));
+  drupal_set_message(t('Found @cat_count categories: Beginning Import', array('@cat_count' => $cat_count)));
   
   $forum_count = 0;
 
@@ -1139,7 +1139,7 @@ function phpbb2drupal_import_categories(
     $phpbb2_categories[$cat_id] = array_merge($category_result, array('forums' => $phpbb2_forums));
   }
 
-  drupal_set_message(t('Found %forum_count forums: Beginning Import', array('%forum_count' => $forum_count)));
+  drupal_set_message(t('Found @forum_count forums: Beginning Import', array('@forum_count' => $forum_count)));
 
   // Insert the Containers / Forum into Drupal
   db_set_active('default');
@@ -1195,7 +1195,7 @@ function phpbb2drupal_import_categories(
   variable_set('phpbb2drupal_import_category_successful', '1');
 
   $count = db_result(db_query('SELECT COUNT(*) FROM {phpbb2drupal_temp_forum}'));
-  drupal_set_message(t('Successfully Imported %count forums.', array('%count' => $count)));
+  drupal_set_message(t('Successfully Imported @count forums.', array('@count' => $count)));
 }
 
 /**
@@ -1227,7 +1227,7 @@ function phpbb2drupal_import_topics() {
 
   $topic_count = db_num_rows($topic_ids);
 
-  drupal_set_message(t('Found %topic_count topics: Beginning Import', array('%topic_count' => $topic_count)));
+  drupal_set_message(t('Found @topic_count topics: Beginning Import', array('@topic_count' => $topic_count)));
 
   // Import the topics into drupal
   $counter = 0;
@@ -1265,7 +1265,7 @@ function phpbb2drupal_import_topics() {
         $topic = db_fetch_object($query);
     }
     else {
-      drupal_set_message(t('Could not find post details of topic: %topic_id', array('%topic_id' => $result->topic_id)));    
+      drupal_set_message(t('Could not find post details of topic: @topic_id', array('@topic_id' => $result->topic_id)));
       continue;
     }
     
@@ -1345,7 +1345,7 @@ function phpbb2drupal_import_topics() {
     taxonomy_node_save($node->nid, array($tid));
 
     if (!$node->nid) {
-      drupal_set_message(t('Failed importing %topic_id', array('%topic_id' => $topic->topic_id)));
+      drupal_set_message(t('Failed importing @topic_id', array('@topic_id' => $topic->topic_id)));
     }
 
     // Handle attachments
@@ -1383,7 +1383,7 @@ function phpbb2drupal_import_topics() {
   variable_set('phpbb2drupal_import_topic_successful', '1');
 
   $count = db_result(db_query('SELECT COUNT(*) FROM {phpbb2drupal_temp_topic}'));
-  drupal_set_message(t('Successfully Imported %count topics', array('%count' => $count)));
+  drupal_set_message(t('Successfully Imported @count topics', array('@count' => $count)));
 }
 
 /**
@@ -1408,7 +1408,7 @@ function phpbb2drupal_import_polls() {
   db_set_active('phpbb');
   $topics = db_query('SELECT * FROM %stopics t WHERE topic_vote = 1 ORDER BY topic_id', $pre);
   $topic_count = db_num_rows($topics);
-  drupal_set_message(t('Found %poll_count polls: Beginning Import', array('%poll_count' => $topic_count)));
+  drupal_set_message(t('Found @poll_count polls: Beginning Import', array('@poll_count' => $topic_count)));
 
   // insert into polls
   while ($topic = db_fetch_object($topics)) {
@@ -1417,7 +1417,7 @@ function phpbb2drupal_import_polls() {
     db_set_active('default');
     $count = db_result(db_query('SELECT count(*) FROM {phpbb2drupal_temp_topic} WHERE topic_id = %d', $topic->topic_id));
     if ($count > 0) {
-      drupal_set_message(t('Poll %topic_id has already been imported', array('%topic_id' => $result->topic_id)));    
+      drupal_set_message(t('Poll @topic_id has already been imported', array('@topic_id' => $result->topic_id)));
       db_set_active('phpbb');
       continue;
     } 
@@ -1430,7 +1430,7 @@ function phpbb2drupal_import_polls() {
       $poll = db_fetch_object($query);
     }
     else {
-      drupal_set_message(t('Could not find details of poll: %topic_id', array('%topic_id' => $topic->topic_id)));    
+      drupal_set_message(t('Could not find details of poll: @topic_id', array('@topic_id' => $topic->topic_id)));
       continue;
     }
 
@@ -1447,7 +1447,7 @@ function phpbb2drupal_import_polls() {
       }
     }
     else {
-        drupal_set_message(t('Could not find vote_results details of poll: %vote_id', array('%vote_id' => $poll->vote_id)));    
+        drupal_set_message(t('Could not find vote_results details of poll: @vote_id', array('@vote_id' => $poll->vote_id)));
         continue;
     }
 
@@ -1527,7 +1527,7 @@ function phpbb2drupal_import_polls() {
     taxonomy_node_save($node->nid, array($tid));
 
     if (!$node->nid) {
-      drupal_set_message(t('Failed importing %topic_id', array('%topic_id' => $topic->topic_id)));
+      drupal_set_message(t('Failed importing @topic_id', array('@topic_id' => $topic->topic_id)));
     }
 
 
@@ -1595,7 +1595,7 @@ function phpbb2drupal_import_posts() {
     ORDER BY topic_id', $pre);
 
   $topic_count = db_num_rows($topic_ids);
-  drupal_set_message(t('Found %post_count posts: Beginning Import', array('%post_count' => $topic_count)));
+  drupal_set_message(t('Found @post_count posts: Beginning Import', array('@post_count' => $topic_count)));
 
   $errors = 0;
   $loops = 0;
@@ -1633,7 +1633,7 @@ function phpbb2drupal_import_posts() {
       }
       else {
         $errors++;
-        drupal_set_message(t("Couldn't find post text for %post_id", array('%post_id' => $result->post_id)));
+        drupal_set_message(t("Couldn't find post text for @post_id", array('@post_id' => $result->post_id)));
         continue;
       }
 
@@ -1642,7 +1642,7 @@ function phpbb2drupal_import_posts() {
       $count = db_result(db_query('SELECT COUNT(*) FROM {phpbb2drupal_temp_post} WHERE post_id = %d', $post->post_id));
       if ($count > 0) {
         $errors++;
-        drupal_set_message(t('Post %post_id was already inserted', array('%post_id' => $post->post_id)));
+        drupal_set_message(t('Post @post_id was already inserted', array('@post_id' => $post->post_id)));
         db_set_active('phpbb');
         continue;
       }
@@ -1693,7 +1693,7 @@ function phpbb2drupal_import_posts() {
 
       if (!$cid) {
         $errors++;
-        drupal_set_message(t('Failed importing %post_id', array('%post_id' => $post->post_id)));
+        drupal_set_message(t('Failed importing @post_id', array('@post_id' => $post->post_id)));
       }
             
       // Handle attachments
@@ -1726,9 +1726,9 @@ function phpbb2drupal_import_posts() {
   // set the post import successful flag in the variable table
   db_set_active('default');
   variable_set('phpbb2drupal_import_post_successful', '1');
-  drupal_set_message(t('Successfully Imported %imported posts', array('%imported' => $imported)));
-  drupal_set_message(t('The were %loops loops executed', array('%loops' => $loops)));
-  drupal_set_message(t('There %errors errors while importing posts', array('%errors' => $errors)));
+  drupal_set_message(t('Successfully Imported @imported posts', array('@imported' => $imported)));
+  drupal_set_message(t('The were @loops loops executed', array('@loops' => $loops)));
+  drupal_set_message(t('There @errors errors while importing posts', array('@errors' => $errors)));
 }
 
 /**
