? translationable_5.patch
Index: ipauth.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ipAuthenticator/ipauth.module,v
retrieving revision 1.2.2.7
diff -u -p -r1.2.2.7 ipauth.module
--- ipauth.module	11 Jul 2008 15:35:37 -0000	1.2.2.7
+++ ipauth.module	12 Oct 2008 10:28:22 -0000
@@ -72,7 +72,7 @@ function ipauth_menu($may_cache) {
     $items[] = array(
       'path' => 'admin/user/ip_authenticator',
       'description' => t('IP based role authenticator; it assigns roles based on IP address.'),
-      'title' => 'IP Authenticator',
+      'title' => t('IP Authenticator'),
       'callback' => 'drupal_get_form',
       'callback arguments' => array('ipauth_admin_settings'),
       'access' => user_access('administer ip_authenticator'),
@@ -81,7 +81,7 @@ function ipauth_menu($may_cache) {
   
     $items[] = array(
       'path' => 'admin/user/ip_authenticator/edit',
-      'title' => 'IP Authenticator -- Modify',
+      'title' => t('IP Authenticator -- Modify'),
       'callback' => 'drupal_get_form',
       'callback arguments' => array('ipauth_admin_edit'),
       'access' => user_access('administer ip_authenticator'),
@@ -90,7 +90,7 @@ function ipauth_menu($may_cache) {
   
     $items[] = array(
       'path' => 'admin/user/ip_authenticator/delete',
-      'title' => 'IP Authenticator -- Delete',
+      'title' => t('IP Authenticator -- Delete'),
       'callback' => 'drupal_get_form',
       'callback arguments' => array('ipauth_admin_delete'),
       'access' => user_access('administer ip_authenticator'),
@@ -162,7 +162,7 @@ function ipauth_admin_settings() {
     '#prefix' => '<div class="floatLeft">',
     '#type' => 'textfield',
     '#title' => 'IP 2',
-    '#description' => 'Leave blank for<br/>individual IPs',
+    '#description' => t('Leave blank for<br/>individual IPs'),
     '#size' => '15',
     '#suffix' => '</div><div class="floatLeft" id="formSeperator">&nbsp; &nbsp; &nbsp; &nbsp;</div>',
   );
@@ -172,7 +172,7 @@ function ipauth_admin_settings() {
     '#type' => 'select',
     '#title' => t('Assign to Role'),
     '#options' => $roles,
-    '#description' => "Select a role to assign the ips",
+    '#description' => t("Select a role to assign the ips"),
     '#suffix' => '</div>',
   );
   
@@ -187,12 +187,12 @@ function ipauth_admin_settings() {
  */
 function ipauth_admin_settings_validate($form_id, $form_values) {
   if (!preg_match("/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\$/x", $form_values['ip1'])) {
-    form_set_error('ip1', "You must enter an ip address in the first field.");
+    form_set_error('ip1', t("You must enter an ip address in the first field."));
   }
   
   if ((trim($form_values['ip2']) != "") && (!preg_match("/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\$/x", trim($form_values['ip2'])))) {
-    form_set_error('ip2', "You must enter a valid IP address in the second field, or leave the second field blank.");
-  }  
+    form_set_error('ip2', t("You must enter a valid IP address in the second field, or leave the second field blank."));
+  } 
 } //end function ipauth_admin_settings_validate
 
 /**
@@ -219,7 +219,7 @@ function ipauth_admin_settings_submit($f
 function ipauth_admin_edit() {
   $args = func_get_args();
   if (!preg_match("/^[0-9]+\$/", $args[0])) {
-    drupal_set_message("Please select your authenticator again");
+    drupal_set_message(t("Please select your authenticator again"));
     drupal_goto('admin/user/ip_authenticator');
   }
   
@@ -299,7 +299,7 @@ function ipauth_admin_edit_submit($form_
 function ipauth_admin_delete() {    
   $args = func_get_args();
   if (!preg_match("/^[0-9]+\$/", $args[0])) {
-    drupal_set_message("Please select your authenticator again");
+    drupal_set_message(t("Please select your authenticator again"));
     drupal_goto("admin/user/ip_authenticator");
   }
   
@@ -307,12 +307,19 @@ function ipauth_admin_delete() {    
   $roles = user_roles();
   
   $ip2_text = ($row["ip2"] != "") ? " - ". $row["ip2"] : "";
-  $title = "<li>" . $row['ip1'] . $ip2_text ." authenticates to: ". $roles[$row["roles"]];
+  $title = t('%ip1 %ip2_text authenticates to: %roles', 
+              array(
+                '%ip1' => $row['ip1'],
+                '%ip2_text' => $ip2_text,
+                '%roles' => $roles[$row['roles']]
+              ),
+            );
 
   $form["markup"] = array(
     '#prefix' => "<div id='confirmbox'>",
     '#suffix' => "",
-    '#value' => "Are you certain that you wish to delete this ip authenticator? <ul>". $title ."</ul>"    
+    '#value' => t("Are you certain that you wish to delete this ip authenticator? !list", array(
+      '!list' => theme('item_list', $title)));    
   );
   
   $form["accept"] = array(
@@ -344,7 +351,7 @@ function ipauth_admin_delete() {    
  */
 function ipauth_admin_delete_validate($form_id, $form_values) {
   if (!preg_match("/^[0-9]+\$/", $form_values["id"]))
-    form_set_error("id", "Please return to the ". l("admin/user/ip_authenticator", "ip_authenticator") ." page and then navigate back here. A form value was lost.");
+    form_set_error("id", t("Please return to the !link page and then navigate back here. A form value was lost.", array('!link' => . l("admin/user/ip_authenticator", "ip_authenticator"))));
 } // end function ipauth_admin_delete_validate
 
 /**
@@ -353,10 +360,10 @@ function ipauth_admin_delete_validate($f
 function ipauth_admin_delete_submit($form_id, $form_values) {
   $result = db_query("DELETE FROM {ip_authenticator} WHERE id = '%s'", $form_values['id']);
   if (db_affected_rows() < 1) {
-    drupal_set_message("Error in execution of sql statement -- no changes made.");
+    drupal_set_message(t("Error in execution of sql statement -- no changes made."));
   }
   else {
-    drupal_set_message("The IP Authenticator item has been deleted.");
+    drupal_set_message(t("The IP Authenticator item has been deleted."));
   }
   drupal_goto("admin/user/ip_authenticator");
 } // end function ipauth_admin_delete_submit
