* Makefile creates/updates po/davadmin.pot, .po, and .mo files
 * admin/i18n.inc.php sets the locale and puts it in the session
 * admin/common.inc.php and admin/getgroups.php use admin/i18n.inc.php
 * po/pot.sed replaces generated header of po/davadmin.pot
This commit is contained in:
Jan Dittberner 2007-11-30 21:25:52 +00:00
parent 83251502e9
commit a978fb5ef0
6 changed files with 344 additions and 14 deletions

View file

@ -27,6 +27,9 @@
* 02110-1301 USA.
*/
/** Include common internationalization code. */
require_once("i18n.inc.php");
if (!isset($_SERVER['DavAdminConfDir'])) {
header('HTTP/1.0 500 Internal Server Error');
header('Status: 500 Internal Server Error');
@ -79,7 +82,7 @@ function getFullPath($dirname) {
$errmsgs = array();
if (!isset($davconfig['digest.file'])) {
array_push($errmsgs,
_("digest.file is not defined."));
sprintf(_("%s is not defined."), "digest.file"));
} elseif (!is_readable($davconfig['digest.file']) ||
!is_writable($davconfig['digest.file'])) {
array_push($errmsgs,
@ -87,7 +90,7 @@ if (!isset($davconfig['digest.file'])) {
}
if (!isset($davconfig['group.file'])) {
array_push($errmsgs,
_("group.file is not defined."));
sprintf(_("%s is not defined."), "group.file"));
} elseif (!is_readable($davconfig['group.file']) ||
!is_writable($davconfig['group.file'])) {
array_push($errmsgs,
@ -95,7 +98,7 @@ if (!isset($davconfig['group.file'])) {
}
if (!isset($davconfig['namemap.file'])) {
array_push($errmsgs,
_("namemap.file is not defined."));
sprintf(_("%s is not defined."), "namemap.file"));
} elseif (!is_readable($davconfig['namemap.file']) ||
!is_writable($davconfig['namemap.file'])) {
array_push($errmsgs,
@ -103,7 +106,7 @@ if (!isset($davconfig['namemap.file'])) {
}
if (!isset($davconfig['dav.dir'])) {
array_push($errmsgs,
_("dav.dir is not defined."));
sprintf(_("%s is not defined."), "dav.dir"));
} elseif (!is_dir($davconfig['dav.dir']) ||
!is_readable($davconfig['dav.dir']) ||
!is_writable($davconfig['dav.dir'])) {
@ -112,11 +115,11 @@ if (!isset($davconfig['dav.dir'])) {
}
if (empty($davconfig['dav.realm'])) {
array_push($errmsgs,
_("dav.realm is not defined."));
sprintf(_("%s is not defined."), "dav.realm"));
}
if (empty($davconfig['dav.uri'])) {
array_push($errmsgs,
_("dav.uri is not defined."));
sprintf(_("%s is not defined."), "dav.uri"));
}
if (!empty($errmsgs)) {
errorAsHtml(implode("<br />", $errmsgs));