mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-31 03:34:18 +00:00
Translatability improvements from Matthias Mohr.
This commit is contained in:
parent
4f885d055c
commit
526d4dce6f
@ -8,7 +8,7 @@ require_once("interactive-page.php");
|
|||||||
$user_no = ( isset($_GET['user_no']) ? intval($_GET['user_no']) : 0 );
|
$user_no = ( isset($_GET['user_no']) ? intval($_GET['user_no']) : 0 );
|
||||||
|
|
||||||
if ( !$session->AllowedTo("Admin") && ($user_no == 0 || $user_no != $session->user_no) ) {
|
if ( !$session->AllowedTo("Admin") && ($user_no == 0 || $user_no != $session->user_no) ) {
|
||||||
$c->messages[] = "You may only review the contents of your own collections in this interface.";
|
$c->messages[] = i18n('You may only review the contents of your own collections in this interface.');
|
||||||
include("page-header.php");
|
include("page-header.php");
|
||||||
include("page-footer.php");
|
include("page-footer.php");
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
@ -29,10 +29,6 @@ if(isset($_POST['import_from_directory'])){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
include("page-header.php");
|
|
||||||
$Tools = new Tools();
|
|
||||||
|
|
||||||
$Tools->render();
|
|
||||||
class Tools {
|
class Tools {
|
||||||
|
|
||||||
function render(){
|
function render(){
|
||||||
@ -132,17 +128,17 @@ class Tools {
|
|||||||
if ( check_string($ics) ) {
|
if ( check_string($ics) ) {
|
||||||
$path = "/".substr($file,0,-4).$path_ics;
|
$path = "/".substr($file,0,-4).$path_ics;
|
||||||
dbg_error_log( "importFromDirectory", "importing to $path");
|
dbg_error_log( "importFromDirectory", "importing to $path");
|
||||||
include_once("caldav-PUT-functions.php");
|
require_once("caldav-PUT-functions.php");
|
||||||
if ( $user = getUserByName(substr($file,0,-4),'importFromDirectory',__LINE__,__FILE__)) {
|
if ( $user = getUserByName(substr($file,0,-4),'importFromDirectory',__LINE__,__FILE__)) {
|
||||||
$user_no = $user->user_no;
|
$user_no = $user->user_no;
|
||||||
}
|
}
|
||||||
if(controlRequestContainer(substr($file,0,-4),$user_no, $path,false) === -1)
|
if(controlRequestContainer(substr($file,0,-4),$user_no, $path,false) === -1)
|
||||||
continue;
|
continue;
|
||||||
import_collection($ics,$user_no,$path,1);
|
import_collection($ics,$user_no,$path,1);
|
||||||
$c->messages[] = sprintf(translate("all events of user %s were deleted and replaced by those from file %s"),substr($file,0,-4),$dir.'/'.$file);
|
$c->messages[] = sprintf(translate('all events of user %s were deleted and replaced by those from file %s'),substr($file,0,-4),$dir.'/'.$file);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$c->messages[] = sprintf(translate("the file %s is not UTF-8 encoded, please check error for more details"),$dir.'/'.$file);
|
$c->messages[] = sprintf(translate('the file %s is not UTF-8 encoded, please check error for more details'),$dir.'/'.$file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -151,5 +147,8 @@ class Tools {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
include("page-footer.php");
|
$Tools = new Tools();
|
||||||
|
|
||||||
|
include("page-header.php");
|
||||||
|
$Tools->render();
|
||||||
|
include("page-footer.php");
|
||||||
|
|||||||
@ -464,7 +464,7 @@ EOSQL;
|
|||||||
$c->messages[] = sprintf(translate('Calendar "%s" for user "%s" was created.'), $path_ics, $this->Get('username'));
|
$c->messages[] = sprintf(translate('Calendar "%s" for user "%s" was created.'), $path_ics, $this->Get('username'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$c->messages[] = sprintf(translate('The file is not UTF-8 encoded, please check the error for more details.') );
|
$c->messages[] = i18n('The file is not UTF-8 encoded, please check the error for more details.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -40,7 +40,7 @@ function rollback_on_error( $caldav_context, $user_no, $path, $message='', $erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
global $c;
|
global $c;
|
||||||
$c->messages[] = sprintf('Status: %d, Message: %s, User: %d, Path: %s', $error_no, $message, $user_no, $path);
|
$c->messages[] = sprintf(translate('Status: %d, Message: %s, User: %d, Path: %s'), $error_no, $message, $user_no, $path);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ class ldapDrivers
|
|||||||
$this->connect=ldap_connect($host);
|
$this->connect=ldap_connect($host);
|
||||||
|
|
||||||
if (! $this->connect){
|
if (! $this->connect){
|
||||||
$c->messages[] = sprintf(i18n( "drivers_ldap : Unable to connect to LDAP with port %s on host %s"), $port,$host );
|
$c->messages[] = sprintf(translate( 'drivers_ldap : Unable to connect to LDAP with port %s on host %s'), $port, $host );
|
||||||
$this->valid=false;
|
$this->valid=false;
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
@ -73,12 +73,12 @@ class ldapDrivers
|
|||||||
// Start TLS if desired (requires protocol version 3)
|
// Start TLS if desired (requires protocol version 3)
|
||||||
if (isset($config['startTLS'])) {
|
if (isset($config['startTLS'])) {
|
||||||
if (!ldap_set_option($this->connect, LDAP_OPT_PROTOCOL_VERSION, 3)) {
|
if (!ldap_set_option($this->connect, LDAP_OPT_PROTOCOL_VERSION, 3)) {
|
||||||
$c->messages[] = sprintf(i18n( "drivers_ldap : Failed to set LDAP to use protocol version 3, TLS not supported") );
|
$c->messages[] = i18n('drivers_ldap : Failed to set LDAP to use protocol version 3, TLS not supported');
|
||||||
$this->valid=false;
|
$this->valid=false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!ldap_start_tls($this->connect)) {
|
if (!ldap_start_tls($this->connect)) {
|
||||||
$c->messages[] = sprintf(i18n( "drivers_ldap : Could not start TLS: ldap_start_tls() failed") );
|
$c->messages[] = i18n('drivers_ldap : Could not start TLS: ldap_start_tls() failed');
|
||||||
$this->valid=false;
|
$this->valid=false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -129,8 +129,12 @@ class ldapDrivers
|
|||||||
foreach($this->baseDNUsers as $baseDNUsers) {
|
foreach($this->baseDNUsers as $baseDNUsers) {
|
||||||
$entry = $query($this->connect,$baseDNUsers,$this->filterUsers,$attributes);
|
$entry = $query($this->connect,$baseDNUsers,$this->filterUsers,$attributes);
|
||||||
|
|
||||||
if (!ldap_first_entry($this->connect,$entry))
|
if (!ldap_first_entry($this->connect,$entry)) {
|
||||||
$c->messages[] = sprintf(i18n("Error NoUserFound with filter >%s<, attributes >%s< , dn >%s<"),$this->filterUsers,join(', ',$attributes), $baseDNUsers);
|
$c->messages[] = sprintf(translate('Error NoUserFound with filter >%s<, attributes >%s< , dn >%s<'),
|
||||||
|
$this->filterUsers,
|
||||||
|
join(', ', $attributes),
|
||||||
|
$baseDNUsers);
|
||||||
|
}
|
||||||
|
|
||||||
for($i = ldap_first_entry($this->connect,$entry);
|
for($i = ldap_first_entry($this->connect,$entry);
|
||||||
$i && $arr = ldap_get_attributes($this->connect,$i);
|
$i && $arr = ldap_get_attributes($this->connect,$i);
|
||||||
|
|||||||
@ -39,7 +39,7 @@ class squidPamDrivers
|
|||||||
{
|
{
|
||||||
global $c;
|
global $c;
|
||||||
if (! file_exists($config)){
|
if (! file_exists($config)){
|
||||||
$c->messages[] = sprintf(i18n( "drivers_squid_pam : Unable to find %s file"), $config );
|
$c->messages[] = sprintf(i18n( 'drivers_squid_pam : Unable to find %s file'), $config );
|
||||||
$this->valid=false;
|
$this->valid=false;
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user