steffen: server/kolab-webadmin/kolab-webadmin/www/admin/sharedfolder index.php, 1.8, 1.9 sf.php, 1.22, 1.23

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


Author: steffen

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

Modified Files:
	index.php sf.php 
Log Message:
Fix for issue886 (i18n problem)

Index: index.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/sharedfolder/index.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- index.php	8 Jul 2005 02:05:35 -0000	1.8
+++ index.php	13 Oct 2005 01:50:01 -0000	1.9
@@ -49,7 +49,7 @@
   $result = ldap_search($ldap->connection, $base_dn, $filter);
   if( $result ) {
 	$count = ldap_count_entries($ldap->connection, $result);
-	$title = _("Manage Shared Folders ($count Folders)");
+	$title = sprintf(_("Manage Shared Folders (%d Folders)"), $count);
 	$template = 'sflistall.tpl';
 	ldap_sort($ldap->connection,$result,'cn');
 	$entry = ldap_first_entry($ldap->connection, $result);

Index: sf.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/sharedfolder/sf.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- sf.php	28 Jul 2005 02:14:38 -0000	1.22
+++ sf.php	13 Oct 2005 01:50:01 -0000	1.23
@@ -98,7 +98,7 @@
 	  }
 	}
   }
-  $errors[] = _("No UID or GID $uid");
+  $errors[] = sprintf(_("No UID or GID %s"), $uid);
   return false;
 }
 
@@ -140,7 +140,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);
   }
 }
 
@@ -214,18 +214,18 @@
 				  ($oldattrs=ldap_get_attributes($ldap->connection,$entry))) {
 				if (!ldap_add($ldap->connection,$newdn, $ldap_object) 
 					|| !ldap_delete($ldap->connection,$dn)) {
-				  array_push($errors, _("LDAP Error: could not rename $dn to $newdn: ")
-							 .ldap_error($ldap->connection));
+				  array_push($errors, sprintf(_("LDAP Error: could not rename %1\$s to %2\$s: %3\$s"), $dn, $newdn,
+											  ldap_error($ldap->connection)));
 				} else {
 				  $messages[] = _('Shared folder updated');
 				}
 				$dn = $newdn;
-			  } else array_push($errors,_("LDAP Error: could not read $dn: ")
-								.ldap_error($ldap->connection));
+			  } else array_push($errors, sprintf(_("LDAP Error: could not read %s: %s"), $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)); 
+				array_push($errors, sprintf(_("LDAP Error: could not modify object %s: %s"), $dn,
+											ldap_error($ldap->connection)));
 			  else $messages[] = _('Shared folder updated');
 			}
 		  } 
@@ -234,9 +234,9 @@
 			$dn = "cn=".$ldap_object['cn'].",".$sf_root;
 			$ldap_object['kolabHomeServer'] = trim($_POST['kolabhomeserver']);
 			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[] = _("Shared folder '$cn' added");
+			  array_push($errors, sprintf(_("LDAP Error: could not add object %s: %s"), $dn, 
+										  ldap_error($ldap->connection)));
+			else $messages[] = sprintf(_("Shared folder '%s' added"), $cn);;
 		  }
 		  if ($errors) {
 			//print("<div class=\"maintitle\"> Create New Address Book Entry </div>\n");
@@ -268,7 +268,7 @@
 	  $heading = _('Modify Shared Folder');
 	  $content = $form->outputForm();
 	} else {
-	  array_push($errors, _("Error: No results returned for DN $dn"));
+	  array_push($errors, sprintf(_("Error: No results returned for DN '%s'"), $dn));
 	}
 	break;
   case 'delete':
@@ -283,7 +283,7 @@
 	  $heading = _('Delete Shared Folder');
 	  $content = $form->outputForm();
 	} else {
-	  array_push($errors, _("Error: No results returned for DN $dn"));
+	  array_push($errors, sprintf(_("Error: No results returned for DN '%s'"), $dn));
 	}
 	break;
   case 'kill':
@@ -293,7 +293,8 @@
 		$heading = _('Entry Deleted');
 		$contenttemplate = 'sfdeleted.tpl';
 	  } else {
-		array_push($errors, _("LDAP Error: Could not mark $dn for deletion: ").ldap_error($link));		
+		array_push($errors, sprintf(_("LDAP Error: Could not mark %s for deletion: %s"), $dn, 
+									ldap_error($ldap->connection)));
 	  }
 	}
 	break;





More information about the commits mailing list