diff --git a/lam/help/help.inc b/lam/help/help.inc index 62e636c3..d29500be 100644 --- a/lam/help/help.inc +++ b/lam/help/help.inc @@ -129,13 +129,13 @@ $helpArray = array ( character because useradd also does not allow it. 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 Groups"), "Text" => _("Hold the CTRL-key to (de)select multiple groups."). ' '. _("Can be left empty.")), "403" => array ("ext" => "FALSE", "Headline" => _("Home directory"), "Text" => _("$user and $group are replaced with username or primary groupname.")), "404" => array ("ext" => "FALSE", "Headline" => _("Gecos"), - "Text" => _("User descriptopn. If left empty sur- and givename will be used.")), + "Text" => _("User description. If left empty sur- and give name will be used.")), "405" => array ("ext" => "FALSE", "Headline" => _("Login shell"), "Text" => _("To disable login use /bin/false. List of shells is read from lam/config/shells")), "406" => array ("ext" => "FALSE", "Headline" => _("Primary group"), @@ -145,7 +145,7 @@ $helpArray = array ( character because groupadd also does not allow it. 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()."."), + "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 description. If left empty group name will be used.")), "410" => array ("ext" => "FALSE", "Headline" => _("Host name"), @@ -153,7 +153,7 @@ $helpArray = array ( character because useradd also does not allow it. 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()."."), + "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 Primary group the host should be member of.")), "413" => array ("ext" => "FALSE", "Headline" => _("Gecos"), @@ -180,9 +180,9 @@ $helpArray = array ( "Text" => _("If checked unix password will also be used as samba password.")), "429" => array ("ext" => "FALSE", "Headline" => _("Password does not expire"), "Text" => _("If checked password does not expire. (Setting X-Flag)")), - "430" => array ("ext" => "FALSE", "Headline" => _("User can change Password"), + "430" => array ("ext" => "FALSE", "Headline" => _("User can change password"), "Text" => _("Date after the user is able to change his password. Format: DD-MM-YYYY")), - "431" => array ("ext" => "FALSE", "Headline" => _("User must change Password"), + "431" => array ("ext" => "FALSE", "Headline" => _("User must change password"), "Text" => _("Date after the user must change his password. Format: DD-MM-YYYY")), "432" => array ("ext" => "FALSE", "Headline" => _("Account is deactivated"), "Text" => _("If checked account will be deactivated. (Setting D-Flag)")), @@ -194,7 +194,7 @@ $helpArray = array ( "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" => _("Samba workstations"), "Text" => _("Comma separated list of samba 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" => _("Home path"), "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.")), @@ -206,18 +206,18 @@ $helpArray = array ( "Text" => _("Soft block limit."), "SeeAlso" => ''. 'Quota How-To'), "442" => array ("ext" => "FALSE", "Headline" => _("Hard block limit"), - "Text" => _("Hard block limit."), "SeeAlso" => ''. + "Text" => _("Hard block limit").'.', "SeeAlso" => ''. 'Quota How-To'), "443" => array ("ext" => "FALSE", "Headline" => _("Grace block period"), "Text" => _("Grace block period. Most filesystems use a fixed maximum value of 7 days."), "SeeAlso" => ''. 'Quota How-To'), "444" => array ("ext" => "FALSE", "Headline" => _("Used inodes"), - "Text" => _("Used inodes (files).")), + "Text" => _("Used inodes (files)").'.'), "445" => array ("ext" => "FALSE", "Headline" => _("Soft inode limit"), "Text" => _("Soft inode (files) limit."), "SeeAlso" => ''. 'Quota How-To'), "446" => array ("ext" => "FALSE", "Headline" => _("Hard inode limit"), - "Text" => _("Hard inode (files) limit."), "SeeAlso" => ''. + "Text" => _("Hard inode (files) limit").'.', "SeeAlso" => ''. 'Quota How-To'), "447" => array ("ext" => "FALSE", "Headline" => _("Grace inode period"), "Text" => _("Grace inode (files) period. Most filesystems use a fixed maximum value of 7 days."), "SeeAlso" => ''. @@ -242,10 +242,6 @@ $helpArray = array ( "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"), diff --git a/lam/lib/account.inc b/lam/lib/account.inc index f09e09c9..b5cf7bd7 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -349,19 +349,19 @@ function checksamba($values, $type) { // This function checks all samba account $return->smb_profilePath = str_replace('$group', $return->general_group, $return->smb_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', _('smb home'), _('Inserted username in Home Path.')); + if ($values->smb_smbhome != $return->smb_smbhome) $errors[] = array('INFO', _('Home path'), _('Inserted username in Home Path.')); $return->smb_smbhome = str_replace('$group', $return->general_group, $return->smb_smbhome); - if ($values->smb_smbhome != $return->smb_smbhome) $errors[] = array('INFO', _('smb home'), _('Inserted groupname in HomePath.')); - if ( (!ereg('^[\][\]([a-z]|[A-Z]|[0-9]|[.]|[-]|[%])+([\]([a-z]|[A-Z]|[0-9]|[.]|[-]|[%]|[ä]|[Ä]|[ö]|[Ö]|[ü]|[Ü]|[ß])+)+$', $return->smb_smbhome))) + if ($values->smb_smbhome != $return->smb_smbhome) $errors[] = array('INFO', _('Home path'), _('Inserted groupname in HomePath.')); + if ( (!$return->smb_smbhome=='') && (!ereg('^[\][\]([a-z]|[A-Z]|[0-9]|[.]|[-]|[%])+([\]([a-z]|[A-Z]|[0-9]|[.]|[-]|[%]|[ä]|[Ä]|[ö]|[Ö]|[ü]|[Ü]|[ß])+)+$', $return->smb_smbhome))) $errors[] = array('ERROR', _('Home path'), _('Home path is invalid.')); 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]|[0-9]|[.]|[-]|[_]|[%]|[ä]|[Ä]|[ö]|[Ö]|[ü]|[Ü]|[ß])+([a-z]|[0-9]|[.]|[-]|[_]|[%]|[ä]|[Ä]|[ö]|[Ö]|[ü]|[Ü]|[ß])*'. '([/]([a-z]|[0-9]|[.]|[-]|[_]|[%]|[ä]|[Ä]|[ö]|[Ö]|[ü]|[Ü]|[ß])+([a-z]|[0-9]|[.]|[-]|[_]|[%]|[ä]|[Ä]|[ö]|[Ö]|[ü]|[Ü]|[ß])*)*$', $return->smb_scriptPath))) - $errors[] = array('ERROR', _('Scriptpath'), _('Script path is invalid.')); + $errors[] = array('ERROR', _('Script path'), _('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', _('Profile path'), _('Profile path is invalid.')); + $errors[] = array('ERROR', _('Profile path'), _('Profile path 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', _('Samba workstations'), _('Samba workstations is invalid.')); $return->smb_flagsW = 0; @@ -568,8 +568,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 sprintf (_('%s already exists!', $type)); + if (!$values_old) return sprintf (('%s already exists!'), $type); } return 0; } @@ -656,11 +656,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)); - $string = _('ID is used from') .' '. $dn . ' !'; + $string = sprint(_('ID is used from %s!'), $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 sprintf(_('Please enter a value between %s and %s!'), $minID, $maxID); return intval($values->general_uidNumber); } diff --git a/lam/templates/account.php b/lam/templates/account.php index ca98162f..d5aa0a26 100644 --- a/lam/templates/account.php +++ b/lam/templates/account.php @@ -625,7 +625,7 @@ switch ($select_local) { // Select which part of page will be loaded ''."\n".''. ''; - echo _('Use no password.'); + echo _('Use no password'); echo ''."\n".'unix_password_no) echo ' checked '; echo '>'."\n".''. @@ -725,7 +725,7 @@ switch ($select_local) { // Select which part of page will be loaded echo '>'."\n".''. ''._('Help').''; echo ''."\n".''; - echo _('Use no password.'); + echo _('Use no password'); echo ''."\n".'smb_password_no) echo ' checked '; echo '>'."\n".''. @@ -1138,7 +1138,7 @@ switch ($select_local) { // Select which part of page will be loaded ''."\n".''. ''."\n".''. ''._('Help').''. ''."\n".''. '