From 8498863ca531e7e909aa5bb71d7ed6c3910b7d4a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Dec 2004 17:56:40 +0000 Subject: [PATCH] =?UTF-8?q?Trad:=20Traduction=20compl=E8te=20de=20la=20pag?= =?UTF-8?q?e=20setup=20du=20module=20webcalendar.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/admin/webcalendar.php | 140 +++++++++++++++++----------------- htdocs/langs/en_US/admin.lang | 12 ++- htdocs/langs/en_US/other.lang | 5 +- htdocs/langs/fr_FR/admin.lang | 10 +++ htdocs/langs/fr_FR/other.lang | 3 +- 5 files changed, 94 insertions(+), 76 deletions(-) diff --git a/htdocs/admin/webcalendar.php b/htdocs/admin/webcalendar.php index a813bdf5338..0eacd9fb70d 100644 --- a/htdocs/admin/webcalendar.php +++ b/htdocs/admin/webcalendar.php @@ -3,7 +3,7 @@ * Copyright (C) 2003 Éric Seigne * Copyright (C) 2004 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio - * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2004 Benoit Mortier * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ * $Source$ */ -/*! +/** \file htdocs/admin/webcalendar.php \ingroup webcal \brief Page de configuration du module webcalendar @@ -35,10 +35,12 @@ require("./pre.inc.php"); if (!$user->admin) accessforbidden(); +$langs->load("admin"); +$langs->load("other"); llxHeader(); -print_titre("Configuration du lien vers le calendrier partagé"); +print_titre($langs->trans("WebCalSetup")); print '
'; $def = array(); @@ -53,55 +55,53 @@ $phpwebcalendar_syncro=trim($_POST["phpwebcalendar_syncro"]); $actionsave=$_POST["save"]; $actiontest=$_POST["test"]; -// Positionne la variable pour le test d'affichage de l'icone -if ($actionsave) +// Test saisie mot de passe +if ($phpwebcalendar_pass != $phpwebcalendar_pass2) { - if ($phpwebcalendar_pass == $phpwebcalendar_pass2) - { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'PHPWEBCALENDAR_URL';"; - $db->query($sql); - - $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('PHPWEBCALENDAR_URL','".$phpwebcalendar_url."',0);"; - $result=$db->query($sql); - - $sql1 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'PHPWEBCALENDAR_HOST';"; - $db->query($sql1); - - $sql1 = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('PHPWEBCALENDAR_HOST','".$phpwebcalendar_host."',0);"; - $result1=$db->query($sql1); - - $sql2 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'PHPWEBCALENDAR_DBNAME';"; - $db->query($sql2); - - $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('PHPWEBCALENDAR_DBNAME','".$phpwebcalendar_dbname."',0);"; - $result2=$db->query($sql2); - - $sql3 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'PHPWEBCALENDAR_USER' ;"; - $db->query($sql3); - - $sql3 = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('PHPWEBCALENDAR_USER','".$phpwebcalendar_user."',0);"; - $result3=$db->query($sql3); - - $sql4 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'PHPWEBCALENDAR_PASS';"; - $db->query($sql4); - - $sql4 = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('PHPWEBCALENDAR_PASS','".$phpwebcalendar_pass."',0);"; - $result4=$db->query($sql4); + $ok="".$langs->trans("ErrorPasswordDiffers").""; +} +// Positionne la variable pour le test d'affichage de l'icone +elseif ($actionsave) +{ + $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'PHPWEBCALENDAR_URL';"; + $db->query($sql); + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('PHPWEBCALENDAR_URL','".$phpwebcalendar_url."',0);"; + $result=$db->query($sql); + + $sql1 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'PHPWEBCALENDAR_HOST';"; + $db->query($sql1); + + $sql1 = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('PHPWEBCALENDAR_HOST','".$phpwebcalendar_host."',0);"; + $result1=$db->query($sql1); + + $sql2 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'PHPWEBCALENDAR_DBNAME';"; + $db->query($sql2); + + $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('PHPWEBCALENDAR_DBNAME','".$phpwebcalendar_dbname."',0);"; + $result2=$db->query($sql2); + + $sql3 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'PHPWEBCALENDAR_USER' ;"; + $db->query($sql3); + + $sql3 = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('PHPWEBCALENDAR_USER','".$phpwebcalendar_user."',0);"; + $result3=$db->query($sql3); + + $sql4 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'PHPWEBCALENDAR_PASS';"; + $db->query($sql4); + + $sql4 = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('PHPWEBCALENDAR_PASS','".$phpwebcalendar_pass."',0);"; + $result4=$db->query($sql4); - $sql5 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'PHPWEBCALENDAR_SYNCRO';"; - $db->query($sql5); - - $sql5 = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('PHPWEBCALENDAR_SYNCRO','".$phpwebcalendar_syncro."',0);"; - $result5=$db->query($sql5); + $sql5 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'PHPWEBCALENDAR_SYNCRO';"; + $db->query($sql5); + + $sql5 = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('PHPWEBCALENDAR_SYNCRO','".$phpwebcalendar_syncro."',0);"; + $result5=$db->query($sql5); - if ($result && $result1 && $result2 && $result3 && $result4 && $result5) - { - $ok = "
Les identifiants Webcalendar ont été sauvegardés avec succès."; - } - } - else + if ($result && $result1 && $result2 && $result3 && $result4 && $result5) { - $ok="
Le mot de passe n'est pas identique, veuillez le saisir à nouveau
\n"; + $ok = "".$langs->trans("WebCalSetupSaved").""; } } @@ -111,7 +111,7 @@ if (! $phpwebcalendar_dbname) { $phpwebcalendar_dbname=PHPWEBCALENDAR_DBNAME; if (! $phpwebcalendar_user) { $phpwebcalendar_user=PHPWEBCALENDAR_USER; } if (! $phpwebcalendar_pass) { $phpwebcalendar_pass=PHPWEBCALENDAR_PASS; } if (! $phpwebcalendar_pass2) { $phpwebcalendar_pass2=PHPWEBCALENDAR_PASS; } -if (! $phpwebcalendar_syncro) { $phpwebcalendar_syncro="nobydefault"; } +if (! $phpwebcalendar_syncro) { $phpwebcalendar_syncro=PHPWEBCALENDAR_SYNCRO; } /** @@ -124,19 +124,19 @@ print " - + - + - + - + @@ -151,46 +151,42 @@ print "
".$langs->trans("Value")."
Adresse URL d'accès au calendrier".$langs->trans("WebCalURL")."
Serveur où la base du calendrier est hébergée".$langs->trans("WebCalServer")."
Nom de la base de données".$langs->trans("WebCalDatabaseName")."
Identifiant d'accès à la base".$langs->trans("WebCalUser")."
- - - - -
".$langs->trans("WebCalSyncro")." "; print ''; -print "
-trans("TestConnection")."\"> -trans("Save")."\"> -
-\n"; +print ''; +print '
'; +print "trans("TestConnection")."\">"; +print "   "; +print "trans("Save")."\">"; +print "\n"; clearstatcache(); -if ($ok) print "$ok
"; +if ($ok) print "
$ok
"; // Test de la connection a la database webcalendar -if ($actiontest) +if ($actiontest && ($phpwebcalendar_pass == $phpwebcalendar_pass2)) { $webcal = new DoliDb('',$phpwebcalendar_host,$phpwebcalendar_user,$phpwebcalendar_pass,$phpwebcalendar_dbname); if ($webcal->connected == 1 && $webcal->database_selected == 1) { - print "
La connection au serveur '$phpwebcalendar_host' sur la base '$phpwebcalendar_dbname' a réussi.
"; + print "
".$langs->trans("WebCalTestOk",$phpwebcalendar_host,$phpwebcalendar_dbname,$phpwebcalendar_user)."
"; $webcal->close(); } elseif ($webcal->connected == 1) { - print "
La connection au serveur '$phpwebcalendar_host' a réussi mais la base '$phpwebcalendar_dbname' n'a pu être accédée.
"; + print "
".$langs->trans("WebCalTestKo1",$phpwebcalendar_host,$phpwebcalendar_dbname)."
"; $webcal->close(); } else { - print "
La connection au serveur '$phpwebcalendar_host' à échoué.
"; + print "
".$langs->trans("WebCalTestKo2",$phpwebcalendar_host,$phpwebcalendar_user)."
"; } } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5a436331a57..117693fd0aa 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -74,8 +74,18 @@ MenuTopManager=Top menu manager MessageOfDay=Message of day DefaultLanguage=Default language to use (language code) SystemSuccessfulyUpdated=Your sustem has been updated successfully +##### Webcal setup ##### +WebCal Setup=Webcalendar link setup WebCalSyncro=Add Dolibarr Event to WebCalendar WebCalAllways=Always, no asking WebCalYesByDefault=On demand (yes by default) WebCalNoByDefault=On demand (no by default) -WebCalNever=Never \ No newline at end of file +WebCalNever=Never +WebCalURL=URL for calendar access +WebCalServer=Server hosting calendar database +WebCalDatabaseName=Database name +WebCalUser=User to access database +WebCalSetupSaved=Webcalendar setup saved successfully. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. +WebCalTestKo2=Connection to server '%s' with user '%s' failed. \ No newline at end of file diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index cd540fc13dc..eb7b5924f12 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -1,8 +1,9 @@ # Dolibarr language file - en_US - other Calendar=Calendar LoginWebcal=Login for Webcalendar -ErrorWebcalLoginNotDefined=The Webcalendar login associated to your Dolibarr login %s is not defined. AddCalendarEntry=Add entry in calendar +ErrorWebcalLoginNotDefined=The Webcalendar login associated to your Dolibarr login %s is not defined. +ErrorPasswordDiffers=Passwords differs, please type them again. Mailing=Mailing MailingDesc=This page allows you to send mailings to a group of people. MailingResult=Sending mails result @@ -12,4 +13,4 @@ MailTo=Receiver(s) MailCC=Copy to MailTopic=Subject MailText=Message -MailFile=Attach a file +MailFile=Attach a file \ No newline at end of file diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 24219624f70..febae08a98f 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -74,8 +74,18 @@ MenuTopManager=Gestionnaire du menu du haut MessageOfDay=Message du jour DefaultLanguage=Langue par défaut à utiliser (code langue) SystemSuccessfulyUpdated=Votre système a été mis à jour avec succès +##### Webcal setup ##### +WebCalSetup=Configuration du lien vers le calendrier Webcalendar WebCalSyncro=Intégrer les évênements Dolibarr dans WebCalendar WebCalAllways=Toujours, sans demander WebCalYesByDefault=Sur demande (oui par défaut) WebCalNoByDefault=Sur demande (non par défaut) WebCalNever=Jamais +WebCalURL=Adresse URL d'accès au calendrier +WebCalServer=Serveur où la base du calendrier est hébergée +WebCalDatabaseName=Nom de la base de données +WebCalUser=Identifiant d'accès à la base +WebCalSetupSaved=Les identifiants Webcalendar ont été sauvegardés avec succès. +WebCalTestOk=La connection au serveur '%s' sur la base '%s' par le user '%s' a réussi. +WebCalTestKo1=La connection au serveur '%s' a réussi mais la base '%s' n'a pu être accédée. +WebCalTestKo2=La connection au serveur '%s' par le user '%s' à échoué. \ No newline at end of file diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 39d71b531ab..f0b3f11306e 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -3,6 +3,7 @@ Calendar=Calendrier LoginWebcal=Login Webcalendar AddCalendarEntry=Ajouter entrée dans le calendrier ErrorWebcalLoginNotDefined=Le login Webcalendar associé à votre login Dolibarr %s n'est pas défini. +ErrorPasswordDiffers=Les mots de passe ne sont pas identiques, veuillez les saisir à nouveau Mailing=Mailing MailingDesc=Cet écran vous permet d'envoyer des mailing à un groupe de personne. MailingResult=Résultat de l'envoi du mailing @@ -12,4 +13,4 @@ MailTo=Destinataire(s) MailCC=Copie à MailTopic=Sujet MailText=Message -MailFile=Joindre un fichier +MailFile=Joindre un fichier \ No newline at end of file