updates for better translation

This commit is contained in:
Roland Gruber 2003-07-04 16:25:05 +00:00
parent 1304dfc41f
commit 091cc18bb0
5 changed files with 45 additions and 48 deletions

View File

@ -371,26 +371,26 @@ class Config {
// prints current preferences
function printconf() {
echo _("<b>ServerURL: </b>") . $this->ServerURL . "<br>";
echo _("<b>Samba3: </b>") . $this->samba3 . "<br>";
echo _("<b>Domain SID: </b>") . $this->domainSID . "<br>";
echo _("<b>UserSuffix: </b>") . $this->Suff_users . "<br>";
echo _("<b>GroupSuffix: </b>") . $this->Suff_groups . "<br>";
echo _("<b>HostSuffix: </b>") . $this->Suff_hosts . "<br>";
echo _("<b>minUID: </b>") . $this->MinUID . "<br>";
echo _("<b>maxUID: </b>") . $this->MaxUID . "<br>";
echo _("<b>minGID: </b>") . $this->MinGID . "<br>";
echo _("<b>maxGID: </b>") . $this->MaxGID . "<br>";
echo _("<b>minMachine: </b>") . $this->MinMachine . "<br>";
echo _("<b>maxMachine: </b>") . $this->MaxMachine . "<br>";
echo _("<b>userlistAttributes: </b>") . $this->userlistAttributes . "<br>";
echo _("<b>grouplistAttributes: </b>") . $this->grouplistAttributes . "<br>";
echo _("<b>hostlistAttributes: </b>") . $this->hostlistAttributes . "<br>";
echo _("<b>maxlistentries: </b>") . $this->maxlistentries . "<br>";
echo _("<b>defaultLanguage: </b>") . $this->defaultLanguage . "<br>";
echo _("<b>scriptPath: </b>") . $this->scriptPath . "<br>";
echo _("<b>scriptServer: </b>") . $this->scriptServer . "<br>";
echo _("<b>Admins: </b>") . $this->Adminstring;
echo "<b>" . _("ServerURL") . ": </b>" . $this->ServerURL . "<br>";
echo "<b>" . _("Samba3") . ": </b>" . $this->samba3 . "<br>";
echo "<b>" . _("Domain SID") . ": </b>" . $this->domainSID . "<br>";
echo "<b>" . _("UserSuffix") . ": </b>" . $this->Suff_users . "<br>";
echo "<b>" . _("GroupSuffix") . ": </b>" . $this->Suff_groups . "<br>";
echo "<b>" . _("HostSuffix") . ": </b>" . $this->Suff_hosts . "<br>";
echo "<b>" . _("minUID") . ": </b>" . $this->MinUID . "<br>";
echo "<b>" . _("maxUID") . ": </b>" . $this->MaxUID . "<br>";
echo "<b>" . _("minGID") . ": </b>" . $this->MinGID . "<br>";
echo "<b>" . _("maxGID") . ": </b>" . $this->MaxGID . "<br>";
echo "<b>" . _("minMachine") . ": </b>" . $this->MinMachine . "<br>";
echo "<b>" . _("maxMachine") . ": </b>" . $this->MaxMachine . "<br>";
echo "<b>" . _("userlistAttributes") . ": </b>" . $this->userlistAttributes . "<br>";
echo "<b>" . _("grouplistAttributes") . ": </b>" . $this->grouplistAttributes . "<br>";
echo "<b>" . _("hostlistAttributes") . ": </b>" . $this->hostlistAttributes . "<br>";
echo "<b>" . _("maxlistentries") . ": </b>" . $this->maxlistentries . "<br>";
echo "<b>" . _("defaultLanguage") . ": </b>" . $this->defaultLanguage . "<br>";
echo "<b>" . _("scriptPath") . ": </b>" . $this->scriptPath . "<br>";
echo "<b>" . _("scriptServer") . ": </b>" . $this->scriptServer . "<br>";
echo "<b>" . _("Admins") . ": </b>" . $this->Adminstring;
}
// functions to read/write preferences

View File

@ -296,7 +296,7 @@ function loadHostProfile($profile) {
function saveUserProfile($account, $profile) {
if (!eregi("^([0-9]|[a-z]|-|_)*$", $profile)) exit;
if (!is_object($account)) {
StatusMessage("ERROR", "", _("saveUserProfile: \$account has wrong type!"));
StatusMessage("ERROR", "", _("saveUserProfile: account has wrong type!"));
exit;
}
$path = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/config/profiles/users/" . $profile . ".pru";
@ -357,7 +357,7 @@ function saveGroupProfile($account, $profile) {
function saveHostProfile($account, $profile) {
if (!eregi("^[0-9a-z\\-_]+$", $profile)) exit;
if (!is_object($account)) {
StatusMessage ("ERROR", "", _("saveHostProfile: \$account has wrong type!"));
StatusMessage ("ERROR", "", _("saveHostProfile: account has wrong type!"));
exit;
}
$path = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/config/profiles/hosts/" . $profile . ".prh";

View File

@ -75,95 +75,95 @@ echo ("<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"new_window\">"
// check new preferences
if (!$serverurl) {
echo _("<font color=\"red\"><b>" . _("Server Address is empty!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("Server Address is empty!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$admins) {
echo _("<font color=\"red\"><b>" . _("List of admin users is empty!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("List of admin users is empty!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$suffusers) {
echo _("<font color=\"red\"><b>" . _("UserSuffix is empty!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("UserSuffix is empty!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$suffgroups) {
echo _("<font color=\"red\"><b>" . _("UserSuffix is empty!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("UserSuffix is empty!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$suffhosts) {
echo _("<font color=\"red\"><b>" . _("HostSuffix is empty!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("HostSuffix is empty!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$minUID) {
echo _("<font color=\"red\"><b>" . _("MinUID is empty!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("MinUID is empty!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$maxUID) {
echo _("<font color=\"red\"><b>" . _("MaxUID is empty!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("MaxUID is empty!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$minGID) {
echo _("<font color=\"red\"><b>" . _("MinGID is empty!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("MinGID is empty!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$maxGID) {
echo _("<font color=\"red\"><b>" . _("MaxGID is empty!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("MaxGID is empty!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$minMach) {
echo _("<font color=\"red\"><b>" . _("MinMachine is empty!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("MinMachine is empty!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$maxMach) {
echo _("<font color=\"red\"><b>" . _("MaxMachine is empty!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("MaxMachine is empty!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$usrlstattr) {
echo _("<font color=\"red\"><b>" . _("No attributes in user list!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("No attributes in user list!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$grplstattr) {
echo _("<font color=\"red\"><b>" . _("No attributes in group list!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("No attributes in group list!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$hstlstattr) {
echo _("<font color=\"red\"><b>" . _("No attributes in host list!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("No attributes in host list!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$maxlistentries) {
echo _("<font color=\"red\"><b>" . _("Max list entries is empty!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("Max list entries is empty!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$language) {
echo _("<font color=\"red\"><b>" . _("Language is not defined!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("Language is not defined!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (!$samba3) {
echo _("<font color=\"red\"><b>" . _("Samba version is not defined!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("Samba version is not defined!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
if (($samba3 == "yes") && (!$domainSID)) {
echo _("<font color=\"red\"><b>" . _("Samba 3 needs a domain SID!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("Samba 3 needs a domain SID!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
@ -197,7 +197,7 @@ else $conf->set_scriptserver("");
// check if password was changed
if ($pass1 != $pass2) {
echo _("<b>" . _("Passwords are different!") . "</b>");
echo ("<b>" . _("Passwords are different!") . "</b>");
exit;
}
// set new password

View File

@ -153,10 +153,7 @@ if ($_SESSION["userlist"] && $_GET["norefresh"]) {
if ($sr) {
$userinfo = ldap_get_entries ($_SESSION["ldap"]->server, $sr);
ldap_free_result ($sr);
if ($userinfo["count"] == 0)
StatusMessage ("WARN", "",
_("No User(s) found with applied search filter <") .
$filter . ">");
if ($userinfo["count"] == 0) StatusMessage("WARN", "", _("No Users found!"));
// delete first array entry which is "count"
array_shift($userinfo);

View File

@ -243,7 +243,7 @@ if ($_GET['type'] == "user") {
}
// save profile
saveUserProfile($acct, $profname);
echo ("<br><br><p align=\"center\"><big><b>" . _("Profile ") . $profname . _(" was saved.") . "</b></big></p>");
echo ("<br><br><p align=\"center\"><big><b>" . _("Profile $profname was saved.") . "</b></big></p>");
echo ("<br><p><a href=\"profilemain.php\">" . _("Back to profile editor") . "</a></p>");
}
@ -269,7 +269,7 @@ elseif ($_GET['type'] == "host") {
}
// save profile
saveHostProfile($acct, $profname);
echo ("<br><br><p align=\"center\"><big><b>" . _("Profile ") . $profname . _(" was saved.") . "</b></big></p>");
echo ("<br><br><p align=\"center\"><big><b>" . _("Profile $profname was saved.") . "</b></big></p>");
echo ("<br><p><a href=\"profilemain.php\">" . _("Back to profile editor") . "</a></p>");
}