steffen: server/kolab-webadmin/kolab-webadmin/www/admin/addressbook addr.php, 1.10.2.2, 1.10.2.3

cvs at intevation.de cvs at intevation.de
Thu Oct 13 03:50:27 CEST 2005


Author: steffen

Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/addressbook
In directory doto:/tmp/cvs-serv29446/kolab-webadmin/www/admin/addressbook

Modified Files:
      Tag: kolab_2_0_branch
	addr.php 
Log Message:
Fix for issue886 (i18n problem)

Index: addr.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/addressbook/addr.php,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -u -d -r1.10.2.2 -r1.10.2.3
--- addr.php	29 Aug 2005 21:28:50 -0000	1.10.2.2
+++ addr.php	13 Oct 2005 01:50:25 -0000	1.10.2.3
@@ -139,7 +139,7 @@
   if( $_REQUEST['dn'] ) {
 	$dn = $_REQUEST['dn'];
   } else {  
-	array_push($errors, _("Error: DN required for $action operation") );
+	array_push($errors, sprintf(_("Error: DN required for %s operation"), $action ) );
   }
 }
 
@@ -196,17 +196,17 @@
 				  array_push($errors, _("LDAP Error: could not rename ").$dn.
 							 " to ".$newdn." ".ldap_error($ldap->connection));
 				} else {
-				  $messages[] = _("$newdn successfully updated");
+				  $messages[] = sprintf(_("%s successfully updated"), $newdn);
 				}
 				$dn = $newdn;
 			  } else {
-				array_push($errors,_("LDAP Error: could not read ").$dn." ".ldap_error($ldap->connection));
+				array_push($errors,_("LDAP Error: could not read ").$dn.": ".ldap_error($ldap->connection));
 			  }
 			} else {
 			  if (!ldap_modify($ldap->connection, $dn, $ldap_object)) {
 				array_push($errors, _("LDAP Error: could not modify object ").$dn.": ".ldap_error($ldap->connection)); 
 			  } else {
-				$messages[] = _("$dn successfully updated");
+				$messages[] = sprintf(_("%s successfully updated"), $dn);
 			  }
 			}
 		  } 
@@ -217,7 +217,7 @@
 			if ($dn && !ldap_add($ldap->connection, $dn, $ldap_object)) {
 			  array_push($errors, _("LDAP Error: could not add object ").$dn.": ".ldap_error($ldap->connection));
 			} else {
-				  $messages[] = _("$dn successfully added");
+			  $messages[] = sprintf(_("%s successfully added"), $dn);
 			}
 		  }
 		  if ($errors) {
@@ -250,7 +250,7 @@
 		$heading = _('Modify External Address'); 
 		$content = $form->outputForm();
 	  } else {
-		array_push($errors, _("Error: Multiple results returned for DN $dn") );
+		array_push($errors, sprintf(_("Error: Multiple results returned for DN %s"), $dn) );
 	  }
 	}
 	break;
@@ -273,7 +273,7 @@
 		$heading = _('Delete External Address');
 		$content = $form->outputForm();
 	  } else {
-		array_push($errors, _("Error: Multiple results returned for DN $dn") );
+		array_push($errors, sprintf(_("Error: Multiple results returned for DN %s"),$dn) );
 	  }
 	}
 	break;
@@ -283,7 +283,7 @@
 		array_push($errors, _("LDAP Error: could not delete ").$dn.": ".ldap_error($ldap->connection));
 	  } else {
 		$heading = _('Entry Deleted');
-		$messages[] = _("Address book entry with DN $dn  was deleted");
+		$messages[] = sprintf(_("Address book entry with DN %s was deleted"), $dn);
 		$contenttemplate = 'addrdeleted.tpl';
 	  }
 	}





More information about the commits mailing list