steffen: server/kolab-webadmin/kolab-webadmin/www/admin/addressbook addr.php, 1.1, 1.2 index.php, 1.1, 1.2
cvs at intevation.de
cvs at intevation.de
Sun Jul 18 02:30:33 CEST 2004
Author: steffen
Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/addressbook
In directory doto:/tmp/cvs-serv8603/www/admin/addressbook
Modified Files:
addr.php index.php
Log Message:
started to gettextize php files
Index: addr.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/addressbook/addr.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- addr.php 17 May 2004 15:24:26 -0000 1.1
+++ addr.php 18 Jul 2004 00:30:31 -0000 1.2
@@ -13,7 +13,7 @@
$valid_actions = array('firstsave','save','modify','create','delete','kill');
if( $auth->group() != 'maintainer' && $auth->group() != 'admin') {
- array_push($errors, "Error: You don't have Permissions to access this Menu");
+ array_push($errors, _("Error: You don't have Permissions to access this Menu") );
}
require_once('admin/include/menu.php');
@@ -61,40 +61,40 @@
/**** Form/data handling ***/
if (!empty($_REQUEST['action']) &&
in_array($_REQUEST['action'],$valid_actions)) $action = trim($_REQUEST['action']);
-else array_push($errors, "Error: need valid action to proceed");
+else array_push($errors, _("Error: need valid action to proceed") );
$dn="";
if (!empty($_REQUEST['dn'])) $dn = trim($_REQUEST['dn']);
if (!$errors && $auth->group() != 'maintainer' && $auth->group() != 'admin')
- array_push($errors, "Error: You don't have the required Permissions");
+ array_push($errors, _("Error: You don't have the required Permissions") );
$attributes = array( 'title', 'cn', 'sn', 'mail', 'alias', 'o',
'ou', 'roomNumber', 'street', 'postOfficeBox',
'postalCode', 'l', 'c', 'telephoneNumber',
'facsimileTelephoneNumber' );
-$entries = array( 'firstname' => array( 'name' => 'First Name',
+$entries = array( 'firstname' => array( 'name' => _('First Name'),
'validation' => 'notempty',
- 'comment' => 'Required' ),
- 'lastname' => array( 'name' => 'Last Name',
+ 'comment' => _('Required') ),
+ 'lastname' => array( 'name' => _('Last Name'),
'validation' => 'notempty',
- 'comment' => 'Required' ),
- 'title' => array( 'name' => 'Title' ),
- 'mail' => array( 'name' => 'Primary E-Mail Address' ),
- 'alias' => array( 'name' => 'E-Mail Aliases',
+ 'comment' => _('Required') ),
+ 'title' => array( 'name' => _('Title') ),
+ 'mail' => array( 'name' => _('Primary E-Mail Address') ),
+ 'alias' => array( 'name' => _('E-Mail Aliases'),
'type' => 'textarea',
- 'comment' => 'One address per line'),
- 'o' => array( 'name' => 'Organisation' ),
- 'ou' => array( 'name' => 'Organisational Unit' ),
- 'room' => array( 'name' => 'Room Number' ),
- 'street' => array( 'name' => 'Street Address' ),
- 'postOfficeBox' => array( 'name' => 'Post Box' ),
- 'postalCode' => array( 'name' => 'Postal Code' ),
- 'l' => array( 'name' => 'City' ),
- 'c' => array( 'name' => 'Country' ),
- 'telephoneNumber' => array( 'name' => 'Telephone Number' ),
- 'facsimileTelephoneNumber' => array( 'name' => 'Fax Number' ));
+ 'comment' => _('One address per line')),
+ 'o' => array( 'name' => _('Organisation') ),
+ 'ou' => array( 'name' => _('Organisational Unit') ),
+ 'room' => array( 'name' => _('Room Number') ),
+ 'street' => array( 'name' => _('Street Address') ),
+ 'postOfficeBox' => array( 'name' => _('Post Box') ),
+ 'postalCode' => array( 'name' => _('Postal Code') ),
+ 'l' => array( 'name' => _('City') ),
+ 'c' => array( 'name' => _('Country') ),
+ 'telephoneNumber' => array( 'name' => _('Telephone Number') ),
+ 'facsimileTelephoneNumber' => array( 'name' => _('Fax Number') ));
$entries['action'] = array( 'name' => 'action',
'type' => 'hidden' );
@@ -104,7 +104,7 @@
} else if( $_REQUEST['dn'] ) {
$dn = $_REQUEST['dn'];
} else {
- array_push($errors, "Error: DN required for $action operation");
+ array_push($errors, _("Error: DN required for $action operation") );
}
}
@@ -114,7 +114,7 @@
switch( $action ) {
case 'create':
$form->entries['action']['value'] = 'firstsave';
- $heading = 'Add External Address';
+ $heading = _('Add External Address');
$content = $form->outputForm();
break;
case 'firstsave':
@@ -157,20 +157,20 @@
($entry=ldap_first_entry($ldap->connection,$result)) &&
($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.
+ array_push($errors, _("LDAP Error: could not rename ").$dn.
" to ".$newdn." ".ldap_error($ldap->connection));
} else {
- $messages[] = "$newdn successfully updated";
+ $messages[] = _("$newdn successfully updated");
}
$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));
+ array_push($errors, _("LDAP Error: could not modify object ").$dn.": ".ldap_error($ldap->connection));
} else {
- $messages[] = "$dn successfully updated";
+ $messages[] = _("$dn successfully updated");
}
}
}
@@ -178,9 +178,9 @@
if (!$errors) {
$dn = "cn=".$ldap_object['cn'].",".$addressbook_root;
if ($dn && !ldap_add($ldap->connection, $dn, $ldap_object)) {
- array_push($errors, "LDAP Error: could not add object ".$dn." ".ldap_error($ldap->connection));
+ array_push($errors, _("LDAP Error: could not add object ").$dn.": ".ldap_error($ldap->connection));
} else {
- $messages[] = "$dn successfully added";
+ $messages[] = _("$dn successfully added");
}
}
if ($errors) {
@@ -190,7 +190,7 @@
}
}
$form->entries['action']['value'] = 'modify';
- $heading = 'Modify External Address';
+ $heading = _('Modify External Address');
$form->setValues();
$form->entries['dn'] = array( 'name' => 'dn',
'type' => 'hidden',
@@ -210,10 +210,10 @@
$form->entries['dn'] = array( 'name' => 'dn',
'type' => 'hidden',
'value' => $dn );
- $heading = 'Modify External Address';
+ $heading = _('Modify External Address');
$content = $form->outputForm();
} else {
- array_push($errors, "Error: Multiple results returned for DN $dn");
+ array_push($errors, _("Error: Multiple results returned for DN $dn") );
}
}
break;
@@ -227,21 +227,21 @@
foreach( $form->entries as $key ) {
$form->entries[$key]['attrs'] = 'readonly';
}
- $form->submittext = 'Delete';
- $heading = 'Delete External Address';
+ $form->submittext = _('Delete');
+ $heading = _('Delete External Address');
$content = $form->outputForm();
} else {
- array_push($errors, "Error: Multiple results returned for DN $dn");
+ array_push($errors, _("Error: Multiple results returned for DN $dn") );
}
}
break;
case 'kill':
if (!$errors) {
if (!(ldap_delete($ldap->connection,$dn))) {
- array_push($errors, "LDAP Error: could not delete ".$dn." ".ldap_error($link));
+ array_push($errors, _("LDAP Error: could not delete ").$dn.": ".ldap_error($link));
} else {
- $heading = 'Entry Deleted';
- $messages[] = 'Address book entry with DN '.$dn.' was deleted';
+ $heading = _('Entry Deleted');
+ $messages[] = _("Address book entry with DN $dn was deleted");
$contenttemplate = 'addrdeleted.tpl';
}
}
Index: index.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/addressbook/index.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- index.php 17 May 2004 15:24:26 -0000 1.1
+++ index.php 18 Jul 2004 00:30:31 -0000 1.2
@@ -17,7 +17,7 @@
$sidx = 'addressbook';
if( $auth->group() != 'maintainer' && $auth->group() != 'admin') {
- array_push($errors, "Error: You don't have Permissions to access this Menu");
+ array_push($errors, _("Error: You don't have Permissions to access this Menu") );
}
require_once('admin/include/menu.php');
More information about the commits
mailing list