From dd7be996c21dfee44a9beeb1281c50035c84271d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 15:27:26 +0100 Subject: [PATCH] Improved translation of opensurvey module --- htdocs/langs/en_US/errors.lang | 3 ++- htdocs/langs/en_US/opensurvey.lang | 8 ++++++++ htdocs/opensurvey/public/choix_autre.php | 12 ++++++------ htdocs/opensurvey/public/choix_date.php | 10 +++++----- htdocs/opensurvey/public/create_survey.php | 13 +++++++------ 5 files changed, 28 insertions(+), 18 deletions(-) diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index ac4d439a208..8eb265013c5 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -127,6 +127,7 @@ ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setu ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s ErrorWarehouseMustDiffers=Source and target warehouses must differs +ErrorBadFormat=Bad format! # Warnings WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined @@ -143,4 +144,4 @@ WarningUntilDirRemoved=All security warnings (visible by admin users only) will WarningCloseAlways=Warning, closing is done even if amount differs between source and target elements. Enable this feature with caution. WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box. WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card). -WarningNotRelevant=Irrelevant operation for this dataset +WarningNotRelevant=Irrelevant operation for this dataset \ No newline at end of file diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index 1e1900296dd..db1140097a7 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -44,6 +44,8 @@ PourContreList=List (empty/for/against) AddNewColumn=Add new column TitleChoice=Choice label InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. +InfoExpiration=Your poll will be automatically removed after 6 months.
You can fix another removal date for it. +RemovalDate=Removal date (optional) ExportSpreadsheet=Export result spreadsheet ExpireDate=Limit date NbOfVoters=Nb of voters @@ -67,3 +69,9 @@ CanEditVotes=Can change vote of others SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. BackToCurrentMonth=Back to current month PublicLinkToCreateSurvey=Public link to allow everybody to create a survey +ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation +ErrorOpenSurveyOneChoice=Enter at least one choice +ErrorOpenSurveyDateFormat=Date must be have the format DD/MM/YYYY +ErrorOpenSurveyInvalidChars=Characters \" < and > are not permitted +MoreChoices=Enter more choices for the voters +AfterCreationInfo=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
Then, you will receive quickly an email contening the link to your poll for sending it to the voters. \ No newline at end of file diff --git a/htdocs/opensurvey/public/choix_autre.php b/htdocs/opensurvey/public/choix_autre.php index e120bd7ec20..622c1c02f06 100644 --- a/htdocs/opensurvey/public/choix_autre.php +++ b/htdocs/opensurvey/public/choix_autre.php @@ -125,7 +125,7 @@ llxHeaderSurvey($langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); if (empty($_SESSION['titre']) || empty($_SESSION['nom']) || empty($_SESSION['adresse'])) { - dol_print_error('',"You haven't filled the first section of the poll creation"); + dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection')); llxFooterSurvey(); exit; } @@ -179,25 +179,25 @@ for ($i=0;$i<$_SESSION["nbrecases"];$i++) //message d'erreur si aucun champ renseigné if ($testremplissage != "ok" && (isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"]))) { - print "
" . $langs->trans("Enter at least one choice") . "

"."\n"; + print "
" . $langs->trans("ErrorOpenSurveyOneChoice") . "

"."\n"; $erreur = true; } //message d'erreur si mauvaise date if ($testdate === false) { - print "
" . _("Date must be have the format DD/MM/YYYY") . "

"."\n"; + print "
" . $langs->trans("ErrorOpenSurveyDateFormat") . "

"."\n"; } if ($erreur_injection) { - print "" . _("Characters \" < and > are not permitted") . "

\n"; + print "" . $langs->trans("ErrorOpenSurveyInvalidChars") . "

\n"; } if ((isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"])) && !$erreur && !$erreur_injection) { //demande de la date de fin du sondage print '
'."\n"; print '
'."\n"; - print '
'. _("Your poll will be automatically removed after 6 months.
You can fix another removal date for it.") .'

'."\n"; - print _("Removal date (optional)") .' : '. _("(DD/MM/YYYY)") ."\n"; + print '
'. $langs->trans("InfoExpiration") .'

'."\n"; + print $langs->trans("RemovalDate") .' : DD/MM/YYYY'; print '
'."\n"; print '
'."\n"; print ''. $langs->trans("InfoAfterCreate") .''."\n"; diff --git a/htdocs/opensurvey/public/choix_date.php b/htdocs/opensurvey/public/choix_date.php index f651a91899d..6f0ca322d53 100644 --- a/htdocs/opensurvey/public/choix_date.php +++ b/htdocs/opensurvey/public/choix_date.php @@ -86,7 +86,7 @@ if (GETPOST('reset')) { if (! isset($_SESSION['nom']) && ! isset($_SESSION['adresse']) && ! isset($_SESSION['commentaires']) && ! isset($_SESSION['mail'])) { - dol_print_error('',"You haven't filled the first section of the poll creation"); + dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection')); exit; } @@ -542,7 +542,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) && (!issetAndNoEmpty('choixheur } if ($affichageerreurfindeligne) { - print ''. _("Bad format!") .''."\n"; + print ''. $langs->trans("ErrorBadFormat") .''."\n"; } print ''."\n"; @@ -560,7 +560,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) && (!issetAndNoEmpty('choixheur //si un seul jour et aucunes horaires choisies, : message d'erreur if ((GETPOST('choixheures') || GETPOST('choixheures_x')) && (count($_SESSION["totalchoixjour"])=="1" && $_POST["horaires0"][0]=="" && $_POST["horaires0"][1]=="" && $_POST["horaires0"][2]=="" && $_POST["horaires0"][3]=="" && $_POST["horaires0"][4]=="")) { - print '
'. _("Enter more choices for the voters") .'
'."\n"; + print '
'. $langs->trans("MoreChoices") .'
'."\n"; $erreur=true; } } @@ -574,14 +574,14 @@ if (!$erreur && (GETPOST('choixheures') || GETPOST('choixheures_x'))) { print '
'. $langs->trans("PollWillExpire",2) .'
'. $langs->trans("RemovalDate") .' : '.$date_fin.'
'."\n"; print '
'."\n"; print '
'."\n"; - print ''. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
Then, you will receive quickly an email contening the link to your poll for sending it to the voters.") .'
'."\n"; + print ''. $langs->trans("AfterCreationInfo") .''."\n"; print'
'."\n"; // print'

'."\n"; // print 'Pour finir la création du sondage, cliquez sur le bouton ajout ci-dessous'."\n"; // print '

'."\n"; print ''."\n"; print ''."\n"; - print''."\n"; + print''."\n"; print '
'. $langs->trans("BackToHoursSetup") .'
'. $langs->trans("CreatePoll") .'
'. $langs->trans("CreatePoll") .'
'."\n"; } diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index f601602144c..bc6b9df5f67 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -147,7 +147,8 @@ if (!$_SESSION["adresse"] && (GETPOST('creation_sondage_date') || GETPOST('creat print "" .$langs->trans("FieldMandatory") . " "."\n"; } elseif ($erreur_adresse && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) { - print "" . _("The address is not correct! (You should enter a valid email address in order to receive the link to your poll)") . ""."\n"; + $langs->load('errors'); + print "" . $langs->trans("ErrorBadEMail", $adresse) . ""."\n"; } print ''."\n"; @@ -180,11 +181,11 @@ if (GETPOST('choix_sondage')) else { //affichage des boutons pour choisir sondage date ou autre - print '
'."\n"; - print ' '."\n"; - print ''."\n"; - print ' '."\n"; - print ''."\n"; + print '
'. _("Schedule an event") .'
'. _("Make a choice") .'
'."\n"; + print ' '."\n"; + print ''."\n"; + print ' '."\n"; + print ''."\n"; print '
'. $langs->trans("CreateSurveyDate") .'
'. $langs->trans("CreateSurveyStandard") .'
'."\n"; } print '


'."\n";