diff --git a/lam/help/help.inc b/lam/help/help.inc index dd403a52..53ae5be9 100644 --- a/lam/help/help.inc +++ b/lam/help/help.inc @@ -182,7 +182,7 @@ $helpArray = array ( character because it's impossible to create a homedirectory starting with a number. Lam doesn't allow capital letters A-Z because it can cause several problems. If username is allready used username will expanded with a number. The next free number will be used.")), "401" => array ("ext" => "FALSE", "Headline" => _("UID Number"), - "Text" => _("If empty UID Number will be generated automaticly. Valid values are between ").$_SESSION['config']->get_minUID()._(" and ").$_SESSION['config']->get_maxUID()."."), + "Text" => _("If empty UID Number will be generated automaticly. Valid values are between").' '.$_SESSION['config']->get_minUID()._(" and ").$_SESSION['config']->get_maxUID()."."), "402" => array ("ext" => "FALSE", "Headline" => _("Additional Groupmembership"), "Text" => _("Can be left empty. Hold the CTRL-key to (de)select multiple groups.")), "403" => array ("ext" => "FALSE", "Headline" => _("Home Directory"), @@ -191,57 +191,57 @@ $helpArray = array ( "Text" => _("User descriptopn. If left empty sur- and givename will be used.")), "405" => array ("ext" => "FALSE", "Headline" => _("Login shell"), "Text" => _("To disable login use /bin/false.")), - "406" => array ("ext" => "FALSE", "Headline" => _("Primary Group"), + "406" => array ("ext" => "FALSE", "Headline" => _("Primary group"), "Text" => _("The Primary Group the user should be member of.")), "407" => array ("ext" => "FALSE", "Headline" => _("Groupname"), "Text" => _("Groupname of the group which should be created. Valid characters are: a-z,0-9, .-_. Lam doesn't allow a number as first character because it's impossible to create a homedirectory starting with a number. Lam doesn't allow capital letters A-Z because it can cause several problems. If groupname is allready used username will expanded with a number. The next free number will be used.")), - "408" => array ("ext" => "FALSE", "Headline" => _("GID Number"), - "Text" => _("If empty GID Number will be generated automaticly. Valid values are between ").$_SESSION['config']->get_minGID()._(" and ").$_SESSION['config']->get_maxGID()."."), + "408" => array ("ext" => "FALSE", "Headline" => _("GID number"), + "Text" => _("If empty GID Number will be generated automaticly. Valid values are between").' '.$_SESSION['config']->get_minGID()._(" and ").$_SESSION['config']->get_maxGID()."."), "409" => array ("ext" => "FALSE", "Headline" => _("Gecos"), - "Text" => _("Group descriptopn. If left empty groupname will be used.")), - "410" => array ("ext" => "FALSE", "Headline" => _("Hostname"), + "Text" => _("Group description. If left empty group name will be used.")), + "410" => array ("ext" => "FALSE", "Headline" => _("Host name"), "Text" => _("Groupname of the group which should be created. Valid characters are: a-z,0-9, .-_$. Lam doesn't allow a number as first character because it's impossible to create a homedirectory starting with a number. Lam doesn't allow capital letters A-Z because it can cause several problems. Hostnames are always ending with $. If last character isn't $ it will be added. If hostname is allready used username will expanded with a number. The next free number will be used.")), - "411" => array ("ext" => "FALSE", "Headline" => _("UID Number"), - "Text" => _("If empty UID Number will be generated automaticly. Valid values are between ").$_SESSION['config']->get_minMachine()._(" and ").$_SESSION['config']->get_maxMachine()."."), - "412" => array ("ext" => "FALSE", "Headline" => _("Primary Group"), + "411" => array ("ext" => "FALSE", "Headline" => _("UID number"), + "Text" => _("If empty UID Number will be generated automaticly. Valid values are between").' '.$_SESSION['config']->get_minMachine()._(" and ").$_SESSION['config']->get_maxMachine()."."), + "412" => array ("ext" => "FALSE", "Headline" => _("Primary group"), "Text" => _("The Prmary Group the host should be member of.")), "413" => array ("ext" => "FALSE", "Headline" => _("Gecos"), - "Text" => _("Host descriptopn. If left empty hostname will be used.")), - "414" => array ("ext" => "FALSE", "Headline" => _("Password Warn"), + "Text" => _("Host description. If left empty host name will be used.")), + "414" => array ("ext" => "FALSE", "Headline" => _("Password warn"), "Text" => _("Days before password is to expire that user is warned of pending password expiration. Value must be 0<.")), - "415" => array ("ext" => "FALSE", "Headline" => _("Password Expire"), + "415" => array ("ext" => "FALSE", "Headline" => _("Password expire"), "Text" => _("Number of days a user can login even his password has expired. -1=always")), - "416" => array ("ext" => "FALSE", "Headline" => _("Maximum Passwordage"), + "416" => array ("ext" => "FALSE", "Headline" => _("Maximum passwordage"), "Text" => _("Number of days after a user has to change his password again Value must be 0<.")), - "417" => array ("ext" => "FALSE", "Headline" => _("Minimum Passwordage"), + "417" => array ("ext" => "FALSE", "Headline" => _("Minimum passwordage"), "Text" => _("Number of days a user has to wait until he\'s allowed to change his password again. Value must be 0<.")), "418" => array ("ext" => "FALSE", "Headline" => _("Expire date"), "Text" => _("Account expire date.")), - "419" => array ("ext" => "FALSE", "Headline" => _("Password Warn"), + "419" => array ("ext" => "FALSE", "Headline" => _("Password warn"), "Text" => _("Days before password is to expire that host is warned of pending password expiration. Value must be 0<.")), - "420" => array ("ext" => "FALSE", "Headline" => _("Password Expire"), + "420" => array ("ext" => "FALSE", "Headline" => _("Password expire"), "Text" => _("Number of days a host can login even his password has expired. -1=always")), - "421" => array ("ext" => "FALSE", "Headline" => _("Maximum Passwordage"), + "421" => array ("ext" => "FALSE", "Headline" => _("Maximum passwordage"), "Text" => _("Number of days after a host has to change his password again Value must be 0< and should be higher as the value on client-side.")), - "422" => array ("ext" => "FALSE", "Headline" => _("Minimum Passwordage"), + "422" => array ("ext" => "FALSE", "Headline" => _("Minimum passwordage"), "Text" => _("Number of days a host has to wait until he\'s allowed to change his password again. Value must be 0<.")), - "423" => array ("ext" => "FALSE", "Headline" => _("Expire Date"), + "423" => array ("ext" => "FALSE", "Headline" => _("Expire date"), "Text" => _("Account expire date.")), "424" => array ("ext" => "FALSE", "Headline" => _("Surname"), "Text" => _("Surname")), - "425" => array ("ext" => "FALSE", "Headline" => _("Givenname"), - "Text" => _("Givenname")), + "425" => array ("ext" => "FALSE", "Headline" => _("Given name"), + "Text" => _("Given name")), "426" => array ("ext" => "FALSE", "Headline" => _("Use no password"), "Text" => _("Use no password")), "427" => array ("ext" => "FALSE", "Headline" => _("Account deactivated"), "Text" => _("Account deactivated")), - "428" => array ("ext" => "FALSE", "Headline" => _("Use no Password"), - "Text" => _("Use no Password.")), - "429" => array ("ext" => "FALSE", "Headline" => _("Password doesn't expire"), + "428" => array ("ext" => "FALSE", "Headline" => _("Use no password"), + "Text" => _("Use no password.")), + "429" => array ("ext" => "FALSE", "Headline" => _("Password does not expire"), "Text" => _("Password doesn't expire.")), "430" => array ("ext" => "FALSE", "Headline" => _("User can change password"), "Text" => _("User can change password.")), @@ -249,15 +249,15 @@ $helpArray = array ( "Text" => _("User must change password.")), "432" => array ("ext" => "FALSE", "Headline" => _("Account is deactivated"), "Text" => _("Account is deactivated.")), - "433" => array ("ext" => "FALSE", "Headline" => _("Home Drive"), - "Text" => _("Driveletter assigned on Windows-Workstations as Homedirectory.")), - "434" => array ("ext" => "FALSE", "Headline" => _("Script Path"), + "433" => array ("ext" => "FALSE", "Headline" => _("Home drive"), + "Text" => _("Driveletter assigned on windows-workstations as homedirectory.")), + "434" => array ("ext" => "FALSE", "Headline" => _("Script path"), "Text" => _("Filename and -path relative to netlogon-share which should be executed on logon. $user and $group are replaced with user- and groupname. Can be left empty.")), - "435" => array ("ext" => "FALSE", "Headline" => _("Profile Path"), + "435" => array ("ext" => "FALSE", "Headline" => _("Profile path"), "Text" => _("Path of the userprofile. Can be a local absolute path or a UNC-path (\\\\server\\share). $user and $group are replaced with user- and groupname. Can be left empty.")), - "436" => array ("ext" => "FALSE", "Headline" => _("User Workstations"), + "436" => array ("ext" => "FALSE", "Headline" => _("User workstations"), "Text" => _("Komma-separated list of workstations the user is allowed to login. Empty means every workstation. Can be left empty.")), - "437" => array ("ext" => "FALSE", "Headline" => _("smb Home"), + "437" => array ("ext" => "FALSE", "Headline" => _("smb home"), "Text" => _("UNC-path (\\\\server\\share) of homedirectory. $user and $group are replaced with user- and groupname. Can be left empty.")), "438" => array ("ext" => "FALSE", "Headline" => _("Domain"), "Text" => _("Windows-Domain of user. Can be left empty.")), @@ -274,47 +274,47 @@ $helpArray = array ( "444" => array ("ext" => "FALSE", "Headline" => _("used inodes"), "Text" => _("used inodes")), "445" => array ("ext" => "FALSE", "Headline" => _("soft inode limit"), - "Text" => _("sofr inode limit")), + "Text" => _("soft inode limit")), "446" => array ("ext" => "FALSE", "Headline" => _("hard inode limit"), "Text" => _("hard inode limit")), "447" => array ("ext" => "FALSE", "Headline" => _("grace inode period"), "Text" => _("grace inode period")), "448" => array ("ext" => "FALSE", "Headline" => _("Title"), "Text" => _("Title")), - "449" => array ("ext" => "FALSE", "Headline" => _("Employee Type"), - "Text" => _("Employee Type")), + "449" => array ("ext" => "FALSE", "Headline" => _("Employee type"), + "Text" => _("Employee type")), "450" => array ("ext" => "FALSE", "Headline" => _("Street"), "Text" => _("Street")), - "451" => array ("ext" => "FALSE", "Headline" => _("Postal Code"), - "Text" => _("Postal Code")), - "452" => array ("ext" => "FALSE", "Headline" => _("Postal Address"), - "Text" => _("Postal Address")), - "453" => array ("ext" => "FALSE", "Headline" => _("Telephone Number"), - "Text" => _("Telephone Number")), - "454" => array ("ext" => "FALSE", "Headline" => _("Mobile Phonenumber"), - "Text" => _("Mobile Phonenumber")), - "455" => array ("ext" => "FALSE", "Headline" => _("Facsimile Number"), - "Text" => _("Facsimile Number")), - "456" => array ("ext" => "FALSE", "Headline" => _("eMail Address"), - "Text" => _("eMail Address")), - "457" => array ("ext" => "FALSE", "Headline" => _("Save Profile"), - "Text" => _("Save Profile")), - "458" => array ("ext" => "FALSE", "Headline" => _("Host can change Password"), - "Text" => _("Host can change Password")), - "459" => array ("ext" => "FALSE", "Headline" => _("Host must change Password"), - "Text" => _("Host must change Password")), - "460" => array ("ext" => "FALSE", "Headline" => _("Windows Domain"), - "Text" => _("Windows Domain of host. Can be left empty.")), + "451" => array ("ext" => "FALSE", "Headline" => _("Postal code"), + "Text" => _("Postal code")), + "452" => array ("ext" => "FALSE", "Headline" => _("Postal address"), + "Text" => _("Postal address")), + "453" => array ("ext" => "FALSE", "Headline" => _("Telephone number"), + "Text" => _("Telephone number")), + "454" => array ("ext" => "FALSE", "Headline" => _("Mobile phonenumber"), + "Text" => _("Mobile phonenumber")), + "455" => array ("ext" => "FALSE", "Headline" => _("Facsimile number"), + "Text" => _("Facsimile number")), + "456" => array ("ext" => "FALSE", "Headline" => _("eMail address"), + "Text" => _("eMail address")), + "457" => array ("ext" => "FALSE", "Headline" => _("Save profile"), + "Text" => _("Save profile")), + "458" => array ("ext" => "FALSE", "Headline" => _("Host can change password"), + "Text" => _("Host can change password")), + "459" => array ("ext" => "FALSE", "Headline" => _("Host must change password"), + "Text" => _("Host must change password")), + "460" => array ("ext" => "FALSE", "Headline" => _("Windows domain"), + "Text" => _("Windows domain of host. Can be left empty.")), "461" => array ("ext" => "FALSE", "Headline" => _("Suffix"), "Text" => _("Suffix")), "462" => array ("ext" => "FALSE", "Headline" => _("Suffix"), "Text" => _("Suffix")), "463" => array ("ext" => "FALSE", "Headline" => _("Suffix"), "Text" => _("Suffix")), - "464" => array ("ext" => "FALSE", "Headline" => _("Windows Well Known Group"), - "Text" => _("Windows Well Known Group")), - "465" => array ("ext" => "FALSE", "Headline" => _("Windows Groupname"), - "Text" => _("Windows Groupname")), + "464" => array ("ext" => "FALSE", "Headline" => _("Windows well known group"), + "Text" => _("Windows well known group")), + "465" => array ("ext" => "FALSE", "Headline" => _("Windows groupname"), + "Text" => _("Windows groupname")), // 600 - 699 // Roland Gruber // OU-editor, domain page diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 8da43a09..478b93d7 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -173,18 +173,18 @@ function checkglobal($values, $type, $values_old=false) { // This functions chec $return->general_homedir = str_replace('$group', $values->general_group, $values->general_homedir); if ($values->general_username != '') $return->general_homedir = str_replace('$user', $values->general_username, $values->general_homedir); - if ($return->general_homedir != $values->general_homedir) $errors[] = array('INFO', _('Homedir'), _('Replaced $user or $group in homedir.')); + if ($return->general_homedir != $values->general_homedir) $errors[] = array('INFO', _('Home Directory'), _('Replaced $user or $group in homedir.')); if ( !ereg('^[/]([a-z]|[A-Z])([a-z]|[A-Z]|[0-9]|[.]|[-]|[_])*([/]([a-z]|[A-Z])([a-z]|[A-Z]|[0-9]|[.]|[-]|[_])*)*$', $return->general_homedir )) - $errors[] = array('ERROR', _('Homedir'), _('Homedirectory contents invalid characters.')); + $errors[] = array('ERROR', _('Home Directory'), _('Homedirectory contents invalid characters.')); // Check if givenname is valid - if ( !ereg('^([a-z]|[A-Z])+$', $values->general_givenname)) $errors[] = array('ERROR', _('Givenname'), _('Givenname contents invalid characters')); + if ( !ereg('^([a-z]|[A-Z])+$', $values->general_givenname)) $errors[] = array('ERROR', _('Given name'), _('Givenname contents invalid characters')); // Check if surname is valid if ( !ereg('^([a-z]|[A-Z])+$', $values->general_surname)) $errors[] = array('ERROR', _('Surname'), _('Surname contents invalid characters')); if ( ($values->general_gecos=='') || ($values->general_gecos==' ')) { $return->general_gecos = $values->general_givenname . " " . $values->general_surname ; $errors[] = array('INFO', _('Gecos'), _('Inserted sur- and givenname in gecos-field.')); } - if ($values->general_group=='') $errors[] = array('ERROR', _('Primary Group'), _('No primary Group defined!')); + if ($values->general_group=='') $errors[] = array('ERROR', _('Primary group'), _('No primary group defined!')); // Check if Username contents only valid characters if ( !ereg('^([a-z]|[0-9]|[.]|[-]|[_])*$', $values->general_username)) $errors[] = array('ERROR', _('Username'), _('Username contents invalid characters. Valid characters are: a-z, 0-9 and .-_ !')); @@ -247,12 +247,12 @@ function checkglobal($values, $type, $values_old=false) { // This functions chec case 'host' : if ( substr($values->general_username, strlen($values->general_username)-1, strlen($values->general_username)) != '$' ) { $values->general_username = $values->general_username . '$'; - $errors[] = array('WARN', _('Hostname'), _('Added $ to hostname.')); + $errors[] = array('WARN', _('Host name'), _('Added $ to hostname.')); } $return->general_username = $values->general_username; // Check if Hostname contents only valid characters if ( !ereg('^([a-z]|[0-9]|[.]|[-]|[$])*$', $values->general_username)) - $errors[] = array('ERROR', _('Hostname'), _('Hostname contents invalid characters. Valid characters are: a-z, 0-9 and .-_ !')); + $errors[] = array('ERROR', _('Host name'), _('Hostname contents invalid characters. Valid characters are: a-z, 0-9 and .-_ !')); // Check if Hostname already exists $return->general_homedir = '/dev/null'; $return->general_shell = '/bin/false'; @@ -281,7 +281,7 @@ function checkglobal($values, $type, $values_old=false) { // This functions chec $return->general_username = $firstchars . (intval($lastchars)+1). '$'; } } - if ($values->general_username != $return->general_username) $errors[] = array('WARN', _('Hostname'), _('Hostname allready in use. Selected next free hostname.')); + if ($values->general_username != $return->general_username) $errors[] = array('WARN', _('Host name'), _('Hostname allready in use. Selected next free hostname.')); break; } // Check if UID is valid. If none value was entered, the next useable value will be inserted @@ -337,31 +337,31 @@ function checksamba($values, $type) { // This function checks all samba account switch ($type) { case 'user' : $return->smb_scriptPath = str_replace('$user', $values->general_username, $values->smb_scriptPath); - if ($values->smb_scriptPath != $return->smb_scriptPath) $errors[] = array('INFO', _('Scriptpath'), _('Inserted username in scriptpath.')); + if ($values->smb_scriptPath != $return->smb_scriptPath) $errors[] = array('INFO', _('Script path'), _('Inserted username in scriptpath.')); $return->smb_scriptPath = str_replace('$group', $values->general_group, $return->smb_scriptPath); - if ($values->smb_scriptPath != $return->smb_scriptPath) $errors[] = array('INFO', _('Scriptpath'), _('Inserted groupname in scriptpath.')); + if ($values->smb_scriptPath != $return->smb_scriptPath) $errors[] = array('INFO', _('Script path'), _('Inserted groupname in scriptpath.')); $return->smb_profilePath = str_replace('$user', $values->general_username, $values->smb_profilePath); - if ($values->smb_profilePath != $return->smb_profilePath) $errors[] = array('INFO', _('Profilepath'), _('Inserted username in profilepath.')); + if ($values->smb_profilePath != $return->smb_profilePath) $errors[] = array('INFO', _('Profile path'), _('Inserted username in profilepath.')); $return->smb_profilePath = str_replace('$group', $return->general_group, $return->smb_profilePath); - if ($values->smb_profilePath != $return->smb_profilePath) $errors[] = array('INFO', _('Profilepath'), _('Inserted groupname in profilepath.')); + if ($values->smb_profilePath != $return->smb_profilePath) $errors[] = array('INFO', _('Profile path'), _('Inserted groupname in profilepath.')); $return->smb_smbHome = str_replace('$user', $values->general_username, $values->smb_smbHome); - if ($values->smb_smbHome != $return->smb_smbHome) $errors[] = array('INFO', _('smbHome'), _('Inserted username in smbhome.')); + if ($values->smb_smbHome != $return->smb_smbHome) $errors[] = array('INFO', _('smb home'), _('Inserted username in smbhome.')); $return->smb_smbHome = str_replace('$group', $return->general_group, $return->smb_smbHome); - if ($values->smb_smbHome != $return->smb_smbHome) $errors[] = array('INFO', _('smbHome'), _('Inserted groupname in smbhome.')); + if ($values->smb_smbHome != $return->smb_smbHome) $errors[] = array('INFO', _('smb home'), _('Inserted groupname in smbhome.')); if ( !ereg('^([a-z]|[A-Z]|[0-9]|[\|]|[\#]|[\*]|[\,]|[\.]|[\;]|[\:]|[\_]|[\-]|[\+]|[\!]|[\%]|[\&]|[\/]|[\?]|[\{]|[\[]|[\(]|[\)]|[\]]|[\}])*$', $values->smb_password)) $errors[] = array('ERROR', _('Password'), _('Password contents invalid characters. Valid characters are: a-z, A-Z, 0-9 and #*,.;:_-+!$%&/|?{[()]}= !')); if ( (!$return->smb_scriptPath=='') && (!ereg('^([/])*[a-z]([a-z]|[0-9]|[.]|[-]|[_]|[%])*([/][a-z]([a-z]|[0-9]|[.]|[-]|[_]|[%])*)*$', $return->smb_scriptPath))) - $errors[] = array('ERROR', _('Scriptpath'), _('Scriptpath is invalid')); + $errors[] = array('ERROR', _('Scriptpath'), _('Script path is invalid.')); if ( (!$return->smb_profilePath=='') && (!ereg('^[/][a-z]([a-z]|[0-9]|[.]|[-]|[_]|[%])*([/][a-z]([a-z]|[0-9]|[.]|[-]|[_]|[%])*)*$', $return->smb_profilePath)) && (!ereg('^[\][\]([a-z]|[A-Z]|[0-9]|[.]|[-]|[%])+([\]([a-z]|[A-Z]|[0-9]|[.]|[-]|[%])+)+$', $return->smb_profilePath))) - $errors[] = array('ERROR', _('Profilepath'), _('ProfilePath is invalid.')); + $errors[] = array('ERROR', _('Profile path'), _('Profile path is invalid.')); if ( (!$return->smb_smbHome=='') && !ereg('^[\][\]([a-z]|[A-Z]|[0-9]|[.]|[-])+([\]([a-z]|[A-Z]|[0-9]|[.]|[-])+)+$', $return->smb_smbhome)) - $errors[] = array('ERROR', _('smbHome'), _('smbHome is invalid.')); + $errors[] = array('ERROR', _('smb home'), _('smb home is invalid.')); if ((!$values->smb_smbuserworkstations=='') && !ereg('^([a-z]|[A-Z]|[0-9]|[.]|[-])+(([,])+([a-z]|[A-Z]|[0-9]|[.]|[-])+)*$', $values->smb_smbuserworkstations)) - $errors[] = array('ERROR', _('User Workstations'), _('User Workstations is invalid.')); + $errors[] = array('ERROR', _('User workstations'), _('User workstations is invalid.')); $return->smb_flagsW = 0; if ((!$values->smb_domain=='') && !ereg('^([a-z]|[A-Z]|[0-9]|[-])+$', $values->smb_domain)) - $errors[] = array('ERROR', _('Domain Name'), _('Domain Name contents invalid characters. Valid characters are: a-z, A-Z, 0-9 and -.')); + $errors[] = array('ERROR', _('Domain name'), _('Domain name contents invalid characters. Valid characters are: a-z, A-Z, 0-9 and -.')); if ($values->smb_useunixpwd) $return->smb_useunixpwd = 1; else $return->smb_useunixpwd = 0; if ($values->smb_password) { // Encrypt password @@ -494,9 +494,9 @@ function getquotas($type,$user='+') { // Whis function will return the quotas fr $return->quota[$i][$j] = $vals2[$j]; } if ($return->quota[$i][4]<$time) $return->quota[$i][4] = ''; - else $return->quota[$i][4] = strval(($return->quota[$i][4]-$time)/3600) . _(' hours'); + else $return->quota[$i][4] = strval(($return->quota[$i][4]-$time)/3600) .' '. _('hours'); if ($return->quota[$i][8]<$time) $return->quota[$i][8] = ''; - else $return->quota[$i][8] = strval(($return->quota[$i][8]-$time)/3600) . _(' hours'); + else $return->quota[$i][8] = strval(($return->quota[$i][8]-$time)/3600) .' '. _('hours'); } return $return; } @@ -558,8 +558,8 @@ function ldapexists($values, $type, $values_old=false) { // This function will s $entry = ldap_first_entry($_SESSION['ldap']->server(), $result); if ($entry) $dn = (ldap_get_dn($_SESSION['ldap']->server(), $entry)); if ($dn) { - if ($values_old->general_username != $values->general_username) return _($type . ' already exists!'); - if (!$values_old) return _($type . ' already exists!'); + if ($values_old->general_username != $values->general_username) return $type .' '. _('already exists!'); + if (!$values_old) return $type .' '. _('already exists!'); } return 0; } @@ -645,10 +645,11 @@ function checkid($values, $type, $values_old=false) { // if value is empty will $entry = ldap_first_entry($_SESSION['ldap']->server(), $result); if ($entry) { // Entry with same ID found $dn = (ldap_get_dn($_SESSION['ldap']->server(), $entry)); - if (!$values_old) return _('ID is used from ' . $dn . ' !'); - else if ($dn!=$values_old->general_dn) return _('ID is used from ' . $dn . ' !'); + $string = _('ID is used from') .' '. $dn . ' !'; + if (!$values_old) return $string; + else if ($dn!=$values_old->general_dn) return $string; } - if ( $values->general_uidNumber < $minID || $values->general_uidNumber > $maxID) return _('Please enter a value between '. $minID . ' and ' . $maxID . '!'); + if ( $values->general_uidNumber < $minID || $values->general_uidNumber > $maxID) return _('Please enter a value between').' '. $minID .' '. _('and') .' '. $maxID . '!'; return intval($values->general_uidNumber); } diff --git a/lam/templates/account.php b/lam/templates/account.php index a321db8b..d9db4ffc 100644 --- a/lam/templates/account.php +++ b/lam/templates/account.php @@ -413,7 +413,7 @@ switch ($select_local) { // Select which part of page will be loaded $profilelist = getUserProfiles(); // Create HTML-page echo ''; - echo _('Username*'); + echo _('Username').'*'; echo "\n". ''. ''. @@ -425,19 +425,19 @@ switch ($select_local) { // Select which part of page will be loaded ''."\n".''. ''._('Help').''. ''."\n".''; - echo _('Surname*'); + echo _('Surname').'*'; echo ''."\n".''. ''. ''. ''._('Help').''. ''."\n".''; - echo _('Given name*'); + echo _('Given name').'*'; echo ''."\n".''. ''. ''."\n".''. ''._('Help').''. ''."\n".''."\n".''; - echo _('Primary Group*'); + echo _('Primary group').'*'; echo ''."\n".''."\n".''. ''._('Help').''. ''."\n".''; - echo _('Home Directory*'); + echo _('Home Directory').'*'; echo ''."\n".''. ''."\n".''. ''._('Help').''. @@ -470,7 +470,7 @@ switch ($select_local) { // Select which part of page will be loaded ''."\n".''. ''._('Help').''. ''."\n".''; - echo _('Login Shell*'); + echo _('Login shell').'*'; echo ''."\n".''. ''. @@ -543,7 +543,7 @@ switch ($select_local) { // Select which part of page will be loaded $profilelist = getHostProfiles(); // Create HTML-page echo ''; - echo _('Hostname*'); + echo _('Host name').'*'; echo ''."\n".''. ''. ''. @@ -555,7 +555,7 @@ switch ($select_local) { // Select which part of page will be loaded ''."\n".''. ''._('Help').''. ''."\n".''; - echo _('Primary Group*'); + echo _('Primary group').'*'; echo ''."\n".''."\n".''; echo ''._('Help').''. ''."\n".''; - echo _('User must change Password'); + echo _('User must change password'); echo ''."\n".''."\n".''; echo ''._('Help').''. ''."\n".''; - echo _('Accout is deactivated'); + echo _('Account is deactivated'); echo ''."\n".'smb_flagsD) echo ' checked '; echo '>'."\n".''. ''._('Help').''. ''."\n".''; - echo _('Home Drive'); + echo _('Home drive'); echo ''."\n".''."\n".''. ''._('Help').''. ''."\n".''; - echo _('Script Path'); + echo _('Script path'); echo ''."\n".''. ''."\n".''. ''._('Help').''. ''."\n".''; - echo _('Profile Path'); + echo _('Profile path'); echo ''."\n".''. ''."\n".''. ''._('Help').''. ''."\n".''; - echo _('User Workstations'); + echo _('User workstations'); echo ''."\n".''. ''."\n".''. ''._('Help').''. ''."\n".''; - echo _('smb Home'); + echo _('smb home'); echo ''."\n".''. ''."\n".''. ''._('Help').''. @@ -909,7 +909,7 @@ switch ($select_local) { // Select which part of page will be loaded echo ''."\n".''; echo ''._('Help').''. ''."\n".''; - echo _('Accout is deactivated'); + echo _('Account is deactivated'); echo ''."\n".'smb_flagsD) echo ' checked '; echo '>'. @@ -1090,40 +1090,40 @@ switch ($select_local) { // Select which part of page will be loaded echo ''; echo _('User '); echo $_SESSION['account']->general_username; - if ($_SESSION['account_old']) echo _(' has been modified. '); - else echo _(' has been created. '); + if ($_SESSION['account_old']) echo ' '._('has been modified').'.'; + else echo ' '._('has been created').'.'; if (!$_SESSION['account_old']) { echo ''; } echo ''."\n".''. - ''. + ''. ''."\n".''. - ''. + ''. ''."\n"; break; case 'group' : echo ''; echo _('Group '); echo $_SESSION['account']->general_username; - if ($_SESSION['account_old']) echo _(' has been modified. '); - else echo _(' has been created. '); + if ($_SESSION['account_old']) echo ' '._('has been modified').'.'; + else echo ' '._('has been created').'.'; echo ''."\n".''; if (!$_SESSION['account_old']) { echo' '; } echo ''. - ''. + ''. ''."\n"; break; case 'host' : echo ''; - echo _('Host '); - echo $_SESSION['account']->general_username; - if ($_SESSION['account_old']) echo _(' has been modified. '); - else echo _(' has been created. '); + echo _('Host'); + echo ' '.$_SESSION['account']->general_username.' '; + if ($_SESSION['account_old']) echo ' '._('has been modified').'.'; + else echo ' '._('has been created').'.'; echo ''."\n".''; if (!$_SESSION['account_old']) { echo ''; } echo ''."\n".''. - ''. + ''. ''."\n"; break; } diff --git a/lam/templates/delete.php b/lam/templates/delete.php index 1658df52..8763257b 100644 --- a/lam/templates/delete.php +++ b/lam/templates/delete.php @@ -100,11 +100,11 @@ if ($_POST['delete_yes']) { $entry = ldap_next_entry($_SESSION['ldap']->server(), $entry); } $success = ldap_delete($_SESSION['ldap']->server(), $dn); - if (!$success) $error = _('Could not delete user: ').$dn; + if (!$success) $error = _('Could not delete user:').' '.$dn; break; case 'host': $success = ldap_delete($_SESSION['ldap']->server(), $dn); - if (!$success) $error = _('Could not delete host: ').$dn; + if (!$success) $error = _('Could not delete host:').' '.$dn; break; case 'group': $temp=explode(',', $dn); @@ -113,17 +113,17 @@ if ($_POST['delete_yes']) { $entry = ldap_first_entry($_SESSION['ldap']->server(), $result); while ($entry) { $attr2 = ldap_get_attributes($_SESSION['ldap']->server(), $entry); - if ($attr2['gidNumber']==getgid($groupname)) $error = _('Could not delete group. Still users in group: ').$dn; + if ($attr2['gidNumber']==getgid($groupname)) $error = _('Could not delete group. Still users in group:').' '.$dn; $entry = ldap_next_entry($_SESSION['ldap']->server(), $entry); } if (!$error) { if ($_SESSION['config']->scriptServer) remquotas($groupname, $_POST['type5']); $success = ldap_delete($_SESSION['ldap']->server(), $dn); - if (!$success) $error = _('Could not delete group: ').$dn; + if (!$success) $error = _('Could not delete group:').' '.$dn; } break; } - if (!$error) echo $dn. _(' deleted.'); + if (!$error) echo $dn.' '. _('deleted').'.'; else echo $error; echo ''."\n".''; } diff --git a/lam/templates/masscreate.php b/lam/templates/masscreate.php index 5c31a094..f43fcd17 100644 --- a/lam/templates/masscreate.php +++ b/lam/templates/masscreate.php @@ -189,12 +189,12 @@ switch ($select) { for ($i=0; $igeneral_group!='') StatusMessage('INFO', _('Group '). - $_SESSION['accounts'][$i]->general_group._(' not found!'), _('It will be created.')); + $_SESSION['accounts'][$i]->general_group.' '._('not found!'), _('It will be created.')); if ($_FILES['userfile']['size']>0) { fclose($handle); unlink($_FILES['userfile']['tmp_name']); } - echo ''._('row').''. _('Surname'). ''. _('Givenname'). ''. _('Username'). ''. _('Primary Group'). ''. + echo ''._('row').''. _('Surname'). ''. _('Given name'). ''. _('User name'). ''. _('Primary group'). ''. _('Details'). '' . _('Warnings'). '' . _('Errors') . ''; for ($row=0; $row'.$row.''. @@ -267,7 +267,7 @@ switch ($select) { for ($j=0; $j'; - if (!$noerrors) { echo ''. _('There are some errors!!') . ''; } + if (!$noerrors) { echo ''. _('There are some errors.') . ''; } if (!$nowarn) { echo ''. _('There are some warnings.') . ''; } echo '
'. ''; } break; diff --git a/lam/templates/massdetail.php b/lam/templates/massdetail.php index 9c370250..a543957f 100644 --- a/lam/templates/massdetail.php +++ b/lam/templates/massdetail.php @@ -114,7 +114,7 @@ switch ($select) { ''."\n".'\n
'; - echo ''; + echo ''; break; }
'; @@ -297,7 +297,7 @@ switch ($select) { if ($error==1) $_SESSION['pointer']++; else { $stay = false; - StatusMessage('ERROR', _('Could not create user'), _('Was unable to create ').$_SESSION['accounts'][$row]->general_username); + StatusMessage('ERROR', _('Could not create user'), _('Was unable to create').' '.$_SESSION['accounts'][$row]->general_username); } } else $stay=false; @@ -309,7 +309,7 @@ switch ($select) { echo _('All Users have been created'); echo '
'; echo '
'; - echo ''; + echo ''; echo '
'. ''._('Help').''. '
'; - echo _('Primary Group*'); + echo _('Primary group*'); echo "". ''. ''. @@ -174,8 +174,8 @@ switch ($select) { ''. ''._('Help').''. '
'; - echo '
'; + echo '