Change i18n system around classical polls
This commit is contained in:
parent
bd7c401a83
commit
0aedb01933
@ -39,11 +39,11 @@ if (isset($_POST['lang']) && is_string($_POST['lang']) && in_array($_POST['lang'
|
||||
$html_lang = substr($locale, 0, 2);
|
||||
|
||||
/* Date Format */
|
||||
$date_format['txt_full'] = _('%A, den %e. %B %Y'); //summary in choix_date.php and removal date in choix_(date|autre).php
|
||||
$date_format['txt_short'] = _('%A %e %B %Y'); // radio title
|
||||
$date_format['txt_day'] = _('%a %e');
|
||||
$date_format['txt_date'] = _('%Y-%m-%d');
|
||||
$date_format['txt_year_month'] = _('%B %Y');
|
||||
$date_format['txt_full'] = __('Date\\FULL'); //summary in choix_date.php and removal date in choix_(date|autre).php
|
||||
$date_format['txt_short'] = __('Date\\SHORT'); // radio title
|
||||
$date_format['txt_day'] = __('Date\\DAY');
|
||||
$date_format['txt_date'] = __('Date\\DATE');
|
||||
$date_format['txt_month_year'] = __('Date\\MONTH_YEAR');
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { //%e can't be used on Windows platform, use %#d instead
|
||||
foreach ($date_format as $k => $v) {
|
||||
$date_format[$k] = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $v); //replace %e by %#d for windows
|
||||
|
@ -41,13 +41,13 @@ if (file_exists('bandeaux_local.php')) {
|
||||
// Step 1/4 : error if $_SESSION from info_sondage are not valid
|
||||
if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (($config['use_smtp']) ? empty($_SESSION['form']->admin_mail) : false)) {
|
||||
|
||||
Utils::print_header(_("Error!"));
|
||||
bandeau_titre(_("Error!"));
|
||||
Utils::print_header(__("Error!"));
|
||||
bandeau_titre(__("Error!"));
|
||||
|
||||
echo '
|
||||
<div class="alert alert-danger">
|
||||
<h3>' . _('You haven\'t filled the first section of the poll creation.') . ' !</h3>
|
||||
<p>' . _('Back to the homepage of') . ' <a href="' . Utils::get_server_name() . '"> ' . NOMAPPLICATION . '</a></p>
|
||||
<h3>' . __('You haven\'t filled the first section of the poll creation.') . ' !</h3>
|
||||
<p>' . __('Back to the homepage of') . ' <a href="' . Utils::get_server_name() . '"> ' . NOMAPPLICATION . '</a></p>
|
||||
</div>' . "\n";
|
||||
|
||||
bandeau_pied();
|
||||
@ -96,20 +96,20 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
|
||||
|
||||
// Send confirmation by mail if enabled
|
||||
if ($config['use_smtp'] === true) {
|
||||
$message = _("This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.");
|
||||
$message = __("This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.");
|
||||
$message .= "\n\n";
|
||||
$message .= stripslashes(html_entity_decode($_SESSION['form']->admin_name, ENT_QUOTES, "UTF-8")) . ' ' . _('hast just created a poll called') . ' : "' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)) . "\".\n";
|
||||
$message .= _('Thanks for filling the poll at the link above') . " :\n\n%s\n\n" . _('Thanks for your confidence.') . "\n" . NOMAPPLICATION;
|
||||
$message .= stripslashes(html_entity_decode($_SESSION['form']->admin_name, ENT_QUOTES, "UTF-8")) . ' ' . __('hast just created a poll called') . ' : "' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)) . "\".\n";
|
||||
$message .= __('Thanks for filling the poll at the link above') . " :\n\n%s\n\n" . __('Thanks for your confidence.') . "\n" . NOMAPPLICATION;
|
||||
|
||||
$message_admin = _("This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above");
|
||||
$message_admin .= " :\n\n" . "%s \n\n" . _('Thanks for your confidence.') . "\n" . NOMAPPLICATION;
|
||||
$message_admin = __("This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above");
|
||||
$message_admin .= " :\n\n" . "%s \n\n" . __('Thanks for your confidence.') . "\n" . NOMAPPLICATION;
|
||||
|
||||
$message = sprintf($message, Utils::getUrlSondage($poll_id));
|
||||
$message_admin = sprintf($message_admin, Utils::getUrlSondage($admin_poll_id, true));
|
||||
|
||||
if ($mailService->isValidEmail($_SESSION['form']->admin_mail)) {
|
||||
$mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . _('Author\'s message') . '] ' . _('Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message_admin);
|
||||
$mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . _('For sending to the polled users') . '] ' . _('Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message);
|
||||
$mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Author\'s message') . '] ' . __('Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message_admin);
|
||||
$mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('For sending to the polled users') . '] ' . __('Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message);
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,8 +125,8 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
|
||||
|
||||
} // Step 3/4 : Confirm poll creation and choose a removal date
|
||||
else if (isset($_POST['fin_sondage_autre'])) {
|
||||
Utils::print_header(_('Removal date and confirmation (3 on 3)'));
|
||||
bandeau_titre(_('Removal date and confirmation (3 on 3)'));
|
||||
Utils::print_header(__('Step 3\\Removal date and confirmation (3 on 3)'));
|
||||
bandeau_titre(__('Step 3\\Removal date and confirmation (3 on 3)'));
|
||||
|
||||
|
||||
// Store choices in $_SESSION
|
||||
@ -153,17 +153,17 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
|
||||
preg_match_all('/\[(.*?)\]\((.*?)\)/', $choice->getName(), $md_a); // Markdown [text](href)
|
||||
if (isset($md_a_img[2][0]) && $md_a_img[2][0] != '' && isset($md_a_img[3][0]) && $md_a_img[3][0] != '') { // [![alt](src)](href)
|
||||
|
||||
$li_subject_text = (isset($md_a_img[1][0]) && $md_a_img[1][0] != '') ? stripslashes($md_a_img[1][0]) : _('Choice') . ' ' . ($i + 1);
|
||||
$li_subject_text = (isset($md_a_img[1][0]) && $md_a_img[1][0] != '') ? stripslashes($md_a_img[1][0]) : __('Generic\\Choice') . ' ' . ($i + 1);
|
||||
$li_subject_html = '<a href="' . $md_a_img[3][0] . '"><img src="' . $md_a_img[2][0] . '" class="img-responsive" alt="' . $li_subject_text . '" /></a>';
|
||||
|
||||
} elseif (isset($md_img[2][0]) && $md_img[2][0] != '') { // ![alt](src)
|
||||
|
||||
$li_subject_text = (isset($md_img[1][0]) && $md_img[1][0] != '') ? stripslashes($md_img[1][0]) : _('Choice') . ' ' . ($i + 1);
|
||||
$li_subject_text = (isset($md_img[1][0]) && $md_img[1][0] != '') ? stripslashes($md_img[1][0]) : __('Generic\\Choice') . ' ' . ($i + 1);
|
||||
$li_subject_html = '<img src="' . $md_img[2][0] . '" class="img-responsive" alt="' . $li_subject_text . '" />';
|
||||
|
||||
} elseif (isset($md_a[2][0]) && $md_a[2][0] != '') { // [text](href)
|
||||
|
||||
$li_subject_text = (isset($md_a[1][0]) && $md_a[1][0] != '') ? stripslashes($md_a[1][0]) : _('Choice') . ' ' . ($i + 1);
|
||||
$li_subject_text = (isset($md_a[1][0]) && $md_a[1][0] != '') ? stripslashes($md_a[1][0]) : __('Generic\\Choice') . ' ' . ($i + 1);
|
||||
$li_subject_html = '<a href="' . $md_a[2][0] . '">' . $li_subject_text . '</a>';
|
||||
|
||||
} else { // text only
|
||||
@ -184,33 +184,33 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="well summary">
|
||||
<h4>' . _('List of your choices') . '</h4>
|
||||
<h4>' . __('Step 3\\List of your choices') . '</h4>
|
||||
' . $summary . '
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<p>' . _('Your poll will be automatically removed after') . ' ' . $config['default_poll_duration'] . ' ' . _('days') . '.<br />' . _('You can set a closer removal date for it.') . '</p>
|
||||
<p>' . __('Step 3\\Your poll will be automatically removed after') . ' ' . $config['default_poll_duration'] . ' ' . __('Generic\\days') . '.<br />' . __('Step 3\\You can set a closer removal date for it.') . '</p>
|
||||
<div class="form-group">
|
||||
<label for="enddate" class="col-sm-5 control-label">' . _('Removal date (optional)') . '</label>
|
||||
<label for="enddate" class="col-sm-5 control-label">' . __('Step 3\\Removal date:') . '</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group date">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar text-info"></i></span>
|
||||
<input type="text" class="form-control" id="enddate" data-date-format="' . _('dd/mm/yyyy') . '" aria-describedby="dateformat" name="enddate" value="' . $end_date_str . '" size="10" maxlength="10" placeholder="' . _("dd/mm/yyyy") . '" />
|
||||
<input type="text" class="form-control" id="enddate" data-date-format="' . __('Date\\dd/mm/yyyy') . '" aria-describedby="dateformat" name="enddate" value="' . $end_date_str . '" size="10" maxlength="10" placeholder="' . __("dd/mm/yyyy") . '" />
|
||||
</div>
|
||||
</div>
|
||||
<span id="dateformat" class="sr-only">' . _('(dd/mm/yyyy)') . '</span>
|
||||
<span id="dateformat" class="sr-only">' . __('Date\\dd/mm/yyyy') . '</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-warning">
|
||||
<p>' . _('Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.') . '</p>';
|
||||
<p>' . __('Step 3\\Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.') . '</p>';
|
||||
if ($config['use_smtp'] == true) {
|
||||
echo '
|
||||
<p>' . _('Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.') . '</p>';
|
||||
<p>' . __('Step 3\\Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.') . '</p>';
|
||||
}
|
||||
echo '
|
||||
</div>
|
||||
<p class="text-right">
|
||||
<button class="btn btn-default" onclick="javascript:window.history.back();" title="' . _('Back to step 2') . '">' . _('Back') . '</button>
|
||||
<button name="confirmecreation" value="confirmecreation" type="submit" class="btn btn-success">' . _('Create the poll') . '</button>
|
||||
<button class="btn btn-default" onclick="javascript:window.history.back();" title="' . __('Step 3\\Back to step 2') . '">' . __('Generic\\Back') . '</button>
|
||||
<button name="confirmecreation" value="confirmecreation" type="submit" class="btn btn-success">' . __('Step 3\\Create the poll') . '</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -220,8 +220,8 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
|
||||
|
||||
// Step 2/4 : Select choices of the poll
|
||||
} else {
|
||||
Utils::print_header(_('Poll subjects (2 on 3)'));
|
||||
bandeau_titre(_('Poll subjects (2 on 3)'));
|
||||
Utils::print_header(__('Step 2 classic\\Poll subjects (2 on 3)'));
|
||||
bandeau_titre(__('Step 2 classic\\Poll subjects (2 on 3)'));
|
||||
|
||||
echo '
|
||||
<form name="formulaire" action="' . Utils::get_server_name() . 'choix_autre.php" method="POST" class="form-horizontal" role="form">
|
||||
@ -229,10 +229,10 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
|
||||
<div class="col-md-8 col-md-offset-2">';
|
||||
echo '
|
||||
<div class="alert alert-info">
|
||||
<p>' . _("To make a generic poll you need to propose at least two choices between differents subjects.") . '</p>
|
||||
<p>' . _("You can add or remove additional choices with the buttons") . ' <span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">' . _("Remove") . '</span> <span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">' . _("Add") . '</span></p>';
|
||||
<p>' . __('Step 2 classic\\To make a generic poll you need to propose at least two choices between differents subjects.') . '</p>
|
||||
<p>' . __('Step 2 classic\\You can add or remove additional choices with the buttons') . ' <span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">' . __('Generic\\Remove') . '</span> <span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">' . __('Generic\\Add') . '</span></p>';
|
||||
if ($config['user_can_add_img_or_link']) {
|
||||
echo ' <p>' . _("It's possible to propose links or images by using ") . '<a href="http://' . $html_lang . '.wikipedia.org/wiki/Markdown">' . _("the Markdown syntax") . '</a>.</p>';
|
||||
echo ' <p>' . __('Step 2 classic\\It\'s possible to propose links or images by using') . ' <a href="http://' . $html_lang . '.wikipedia.org/wiki/Markdown">' . __('Step 2 classic\\the Markdown syntax') . '</a>.</p>';
|
||||
}
|
||||
echo ' </div>' . "\n";
|
||||
|
||||
@ -243,11 +243,11 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
|
||||
$choice = isset($choices[$i]) ? $choices[$i] : new Choice();
|
||||
echo '
|
||||
<div class="form-group choice-field">
|
||||
<label for="choice' . $i . '" class="col-sm-2 control-label">' . _('Choice') . ' ' . ($i + 1) . '</label>
|
||||
<label for="choice' . $i . '" class="col-sm-2 control-label">' . __('Generic\\Choice') . ' ' . ($i + 1) . '</label>
|
||||
<div class="col-sm-10 input-group">
|
||||
<input type="text" class="form-control" name="choices[]" size="40" value="' . $choice->getName() . '" id="choice' . $i . '" />';
|
||||
if ($config['user_can_add_img_or_link']) {
|
||||
echo '<span class="input-group-addon btn-link md-a-img" title="' . _('Add a link or an image') . ' - ' . _('Choice') . ' ' . ($i + 1) . '" ><span class="glyphicon glyphicon-picture"></span> <span class="glyphicon glyphicon-link"></span></span>';
|
||||
echo '<span class="input-group-addon btn-link md-a-img" title="' . __('Step 2 classic\\Add a link or an image') . ' - ' . __('Generic\\Choice') . ' ' . ($i + 1) . '" ><span class="glyphicon glyphicon-picture"></span> <span class="glyphicon glyphicon-link"></span></span>';
|
||||
}
|
||||
echo '
|
||||
</div>
|
||||
@ -257,13 +257,13 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
|
||||
echo '
|
||||
<div class="col-md-4">
|
||||
<div class="btn-group btn-group">
|
||||
<button type="button" id="remove-a-choice" class="btn btn-default" title="' . _('Remove a choice') . '"><span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">' . _('Remove') . '</span></button>
|
||||
<button type="button" id="add-a-choice" class="btn btn-default" title="' . _('Add a choice') . '"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">' . _('Add') . '</span></button>
|
||||
<button type="button" id="remove-a-choice" class="btn btn-default" title="' . __('Step 2 classic\\Remove a choice') . '"><span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">' . __('Generic\\Remove') . '</span></button>
|
||||
<button type="button" id="add-a-choice" class="btn btn-default" title="' . __('Step 2 classic\\Add a choice') . '"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">' . __('Generic\\Add') . '</span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8 text-right">
|
||||
<a class="btn btn-default" href="' . Utils::get_server_name() . 'infos_sondage.php?choix_sondage=autre" title="' . _('Back to step 1') . '">' . _('Back') . '</a>
|
||||
<button name="fin_sondage_autre" value="' . _('Next') . '" type="submit" class="btn btn-success disabled" title="' . _('Go to step 3') . '">' . _('Next') . '</button>
|
||||
<a class="btn btn-default" href="' . Utils::get_server_name() . 'infos_sondage.php?choix_sondage=autre" title="' . __('Step 2\\Back to step 1') . '">' . __('Generic\\Back') . '</a>
|
||||
<button name="fin_sondage_autre" value="' . __('Generic\\Next') . '" type="submit" class="btn btn-success disabled" title="' . __('Step 2\\Go to step 3') . '">' . __('Generic\\Next') . '</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -271,27 +271,27 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">' . _('Close') . '</span></button>
|
||||
<p class="modal-title" id="md-a-imgModalLabel">' . _("Add a link or an image") . '</p>
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">' . __('Generic\\Close') . '</span></button>
|
||||
<p class="modal-title" id="md-a-imgModalLabel">' . __('Step 2 classic\\Add a link or an image') . '</p>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p class="alert alert-info">' . _("These fields are optional. You can add a link, an image or both.") . '</p>
|
||||
<p class="alert alert-info">' . __('Step 2 classic\\These fields are optional. You can add a link, an image or both.') . '</p>
|
||||
<div class="form-group">
|
||||
<label for="md-img"><span class="glyphicon glyphicon-picture"></span> ' . _('URL of the image') . '</label>
|
||||
<label for="md-img"><span class="glyphicon glyphicon-picture"></span> ' . __('Step 2 classic\\URL of the image') . '</label>
|
||||
<input id="md-img" type="text" placeholder="http://…" class="form-control" size="40" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="md-a"><span class="glyphicon glyphicon-link"></span> ' . _('Link') . '</label>
|
||||
<label for="md-a"><span class="glyphicon glyphicon-link"></span> ' . __('Generic\\Link') . '</label>
|
||||
<input id="md-a" type="text" placeholder="http://…" class="form-control" size="40" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="md-text">' . _('Alternative text') . '</label>
|
||||
<label for="md-text">' . __('Step 2 classic\\Alternative text') . '</label>
|
||||
<input id="md-text" type="text" class="form-control" size="40" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">' . _('Cancel') . '</button>
|
||||
<button type="button" class="btn btn-primary">' . _('Add') . '</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">' . __('Generic\\Cancel') . '</button>
|
||||
<button type="button" class="btn btn-primary">' . __('Generic\\Add') . '</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -196,7 +196,7 @@ if (!isset($_SESSION['form']->title) || !isset($_SESSION['form']->admin_name) ||
|
||||
<input type="text" class="form-control" id="enddate" data-date-format="'. __('Date\\dd/mm/yyyy') .'" aria-describedby="dateformat" name="enddate" value="'.$end_date_str.'" size="10" maxlength="10" placeholder="'. __('dd/mm/yyyy') .'" />
|
||||
</div>
|
||||
</div>
|
||||
<span id="dateformat" class="sr-only">'. __("Date\\(dd/mm/yyyy)") .'</span>
|
||||
<span id="dateformat" class="sr-only">('. __("Date\\dd/mm/yyyy") .')</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-warning">
|
||||
@ -245,7 +245,7 @@ if (!isset($_SESSION['form']->title) || !isset($_SESSION['form']->admin_name) ||
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar text-info"></i></span>
|
||||
<input type="text" class="form-control" id="day'.$i.'" title="'. __('Generic\\Day') .' '. ($i+1) .'" data-date-format="'. __('Date\\dd/mm/yyyy') .'" aria-describedby="dateformat'.$i.'" name="days[]" value="'.$day_value.'" size="10" maxlength="10" placeholder="'. __('Date\\dd/mm/yyyy') .'" />
|
||||
</div>
|
||||
<span id="dateformat'.$i.'" class="sr-only">'. __('Date\\(dd/mm/yyyy)') .'</span>
|
||||
<span id="dateformat'.$i.'" class="sr-only">('. __('Date\\dd/mm/yyyy') .')</span>
|
||||
</legend>'."\n";
|
||||
|
||||
// Fields hours : 3 by default
|
||||
|
@ -18,7 +18,6 @@
|
||||
"Description": "Beschreibung",
|
||||
"Back to the homepage of": "Zurück zur Homepage von ",
|
||||
"Error!": "Fehler!",
|
||||
"(dd/mm/yyyy)": "(tt/mm/jjjj)",
|
||||
"dd/mm/yyyy": "tt/mm/jjjj",
|
||||
"%A, den %e. %B %Y": "%A %e %B %Y",
|
||||
"Expiration's date": "Verfallsdatum"
|
||||
|
@ -18,7 +18,6 @@
|
||||
"Description": "Description",
|
||||
"Back to the homepage of": "Back to the homepage of",
|
||||
"Error!": "Error!",
|
||||
"(dd/mm/yyyy)": "(dd/mm/yyyy)",
|
||||
"dd/mm/yyyy": "dd/mm/yyyy",
|
||||
"%A, den %e. %B %Y": "%A, den %e. %B %Y",
|
||||
"days": "days",
|
||||
|
@ -32,12 +32,18 @@
|
||||
"Date": "Date",
|
||||
"Classic": "Classique",
|
||||
"Page generated in": "Page généré en",
|
||||
"secondes": "secondes"
|
||||
"secondes": "secondes",
|
||||
"Choice": "Choix",
|
||||
"Link": "Lien"
|
||||
},
|
||||
"Date" : {
|
||||
"(dd/mm/yyyy)": "(jj/mm/aaaa)",
|
||||
"dd/mm/yyyy": "jj/mm/aaaa",
|
||||
"%A, den %e. %B %Y": "%A %e %B %Y"
|
||||
"%A, den %e. %B %Y": "%A %e %B %Y",
|
||||
"FULL": "%A, den %e. %B %Y",
|
||||
"SHORT": "%A %e %B %Y",
|
||||
"DAY": "%a %e",
|
||||
"DATE": "%Y-%m-%d",
|
||||
"MONTH_YEAR": "%B %Y"
|
||||
},
|
||||
"Language selector": {
|
||||
"Select the language": "Choisir la langue",
|
||||
@ -116,7 +122,6 @@
|
||||
},
|
||||
"Poll results": {
|
||||
"Votes of the poll": "Votes du sondage",
|
||||
"Remove the column": "Effacer la colonne",
|
||||
"Edit the line:": "Modifier la ligne :",
|
||||
"Remove the line:": "Supprimer la ligne :",
|
||||
"Vote no for": "Voter « non » pour",
|
||||
@ -165,6 +170,7 @@
|
||||
"All votes deleted": "Tous les votes ont été supprimés",
|
||||
"Back to the poll": "Retour au sondage",
|
||||
"Add a column": "Ajouter une colonne",
|
||||
"Remove the column": "Effacer la colonne",
|
||||
"Choice added": "Choix ajouté",
|
||||
"Confirm removal of all votes of the poll": "Confirmer la suppression de tous les votes de ce sondage",
|
||||
"Keep the votes": "Garder les votes",
|
||||
@ -208,11 +214,9 @@
|
||||
"You can add or remove additional choices with the buttons": "Vous pouvez ajouter ou supprimer des choix supplémentaires avec les boutons",
|
||||
"It's possible to propose links or images by using": "Il est possible d’insérer des liens ou des images en utilisant ",
|
||||
"the Markdown syntax": "la syntaxe Markdown",
|
||||
"Choice": "Choix",
|
||||
"Add a link or an image": "Ajouter un lien ou une image",
|
||||
"These fields are optional. You can add a link, an image or both.": "Ces champs sont facultatifs. Vous pouvez ajouter un lien, une image ou les deux.",
|
||||
"URL of the image": "URL de l'image",
|
||||
"Link": "Lien",
|
||||
"Alternative text": "Texte alternatif",
|
||||
"Remove a choice": "Supprimer le dernier choix",
|
||||
"Add a choice": "Ajouter un choix"
|
||||
@ -225,7 +229,7 @@
|
||||
"Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.": "Une fois que vous aurez confirmé la création du sondage, vous serez redirigé automatiquement vers la page d'administration de votre sondage.",
|
||||
"Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.": "En même temps, vous recevrez deux courriels : l'un contenant le lien vers votre sondage pour le faire suivre aux futurs sondés, l'autre contenant le lien vers la page d'administraion du sondage.",
|
||||
"Create the poll": "Créer le sondage",
|
||||
"Your poll will be automatically removed ": "Votre sondage sera automatiquement effacé ",
|
||||
"Your poll will be automatically removed after": "Votre sondage sera automatiquement effacé après",
|
||||
"after the last date of your poll:": "après la date la plus tardive :",
|
||||
"You can set a closer removal date for it.": "Vous pouvez décider d'une date de suppression plus proche.",
|
||||
"Removal date:": "Date de suppression :"
|
||||
|
@ -13,7 +13,7 @@
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
|
||||
<input type="text" id="newdate" data-date-format="{__('Date\\dd/mm/yyyy')}" aria-describedby="dateformat" name="newdate" class="form-control" placeholder="{__('Date\\dd/mm/yyyy')}" />
|
||||
</div>
|
||||
<span id="dateformat" class="sr-only">{__('Date\\(dd/mm/yyyy)')}</span>
|
||||
<span id="dateformat" class="sr-only">({__('Date\\dd/mm/yyyy')})</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -14,11 +14,11 @@
|
||||
<th role="presentation"></th>
|
||||
{foreach $slots as $id=>$slot}
|
||||
<td headers="C{$id}">
|
||||
<button type="submit" name="delete_column" value="{$slot->title|html}" class="btn btn-link btn-sm" title="{__('Poll results\\Remove the column')} {$slot->title|html}"><span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">{__('Remove')}</span></button>
|
||||
<button type="submit" name="delete_column" value="{$slot->title|html}" class="btn btn-link btn-sm" title="{__('adminstuds\\Remove the column')} {$slot->title|html}"><span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">{__('Genric\\Remove')}</span></button>
|
||||
</td>
|
||||
{/foreach}
|
||||
<td>
|
||||
<button type="submit" name="add_slot" class="btn btn-link btn-sm" title="{__('Poll results\\Add a column')}"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">{__('Poll results\\Add a column')}</span></button>
|
||||
<button type="submit" name="add_slot" class="btn btn-link btn-sm" title="{__('adminstuds\\Add a column')}"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">{__('Poll results\\Add a column')}</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
@ -40,7 +40,7 @@
|
||||
<td class="bg-info" style="padding:5px">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
|
||||
<input type="text" id="name" name="name" value="{$vote->name|html}" class="form-control" title="{__('Your name')}" placeholder="{__('Your name')}" />
|
||||
<input type="text" id="name" name="name" value="{$vote->name|html}" class="form-control" title="{__('Genric\\Your name')}" placeholder="{__('Genric\\Your name')}" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@ -50,26 +50,26 @@
|
||||
<ul class="list-unstyled choice">
|
||||
<li class="yes">
|
||||
<input type="radio" id="y-choice-{$id}" name="choices[{$id}]" value="2" {if $choice==2}checked {/if}/>
|
||||
<label class="btn btn-default btn-xs" for="y-choice-{$id}" title="{__('Vote yes for ')} . $radio_title[$id] . '">{* TODO Replace $radio_title *}
|
||||
<span class="glyphicon glyphicon-ok"></span><span class="sr-only">{__('Yes')}</span>
|
||||
<label class="btn btn-default btn-xs" for="y-choice-{$id}" title="{__('Poll results\\Vote yes for')} {$slots[$id]->title|html}">
|
||||
<span class="glyphicon glyphicon-ok"></span><span class="sr-only">{__('Genric\\Yes')}</span>
|
||||
</label>
|
||||
</li>
|
||||
<li class="ifneedbe">
|
||||
<input type="radio" id="i-choice-{$id}" name="choices[{$id}]" value="1" {if $choice==1}checked {/if}/>
|
||||
<label class="btn btn-default btn-xs" for="i-choice-{$id}" title="{__('Vote ifneedbe for ')} . $radio_title[$id] . '">{* TODO Replace $radio_title *}
|
||||
(<span class="glyphicon glyphicon-ok"></span>)<span class="sr-only">{__('Ifneedbe')}</span>
|
||||
<label class="btn btn-default btn-xs" for="i-choice-{$id}" title="{__('Poll results\\Vote ifneedbe for')} {$slots[$id]->title|html}">
|
||||
(<span class="glyphicon glyphicon-ok"></span>)<span class="sr-only">{__('Genric\\Ifneedbe')}</span>
|
||||
</label>
|
||||
</li>
|
||||
<li class="no">
|
||||
<input type="radio" id="n-choice-{$id}" name="choices[{$id}]" value="0" {if $choice==0}checked {/if}/>
|
||||
<label class="btn btn-default btn-xs" for="n-choice-{$id}" title="{__('Vote no for ')} . $radio_title[$id] . '">{* TODO Replace $radio_title *}
|
||||
<span class="glyphicon glyphicon-ban-circle"></span><span class="sr-only">{__('No')}</span>
|
||||
<label class="btn btn-default btn-xs" for="n-choice-{$id}" title="{__('Poll results\\Vote no for')} {$slots[$id]->title|html}">
|
||||
<span class="glyphicon glyphicon-ban-circle"></span><span class="sr-only">{__('Genric\\No')}</span>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
{/foreach}
|
||||
<td style="padding:5px"><button type="submit" class="btn btn-success btn-xs" name="save" value="{$vote->id|html}" title="{__('Save the choices')} {$vote->name|html}">{__('Save')}</button></td>
|
||||
<td style="padding:5px"><button type="submit" class="btn btn-success btn-xs" name="save" value="{$vote->id|html}" title="{__('Poll results\\Save the choices')} {$vote->name|html}">{__('Generic\\Save')}</button></td>
|
||||
{else}
|
||||
|
||||
{* Voted line *}
|
||||
@ -79,23 +79,23 @@
|
||||
{foreach $vote->choices as $id=>$choice}
|
||||
|
||||
{if $choice==2}
|
||||
<td class="bg-success text-success" headers="C{$id}"><span class="glyphicon glyphicon-ok"></span><span class="sr-only">{__('Yes')}</span></td>
|
||||
<td class="bg-success text-success" headers="C{$id}"><span class="glyphicon glyphicon-ok"></span><span class="sr-only">{__('Generic\\Yes')}</span></td>
|
||||
{elseif $choice==1}
|
||||
<td class="bg-warning text-warning" headers="C{$id}">(<span class="glyphicon glyphicon-ok"></span>)<span class="sr-only">{__('Ifneedbe')}</span></td>
|
||||
<td class="bg-warning text-warning" headers="C{$id}">(<span class="glyphicon glyphicon-ok"></span>)<span class="sr-only">{__('Generic\\Ifneedbe')}</span></td>
|
||||
{else}
|
||||
<td class="bg-danger" headers="C{$id}"><span class="sr-only">{__('No')}</span></td>
|
||||
<td class="bg-danger" headers="C{$id}"><span class="sr-only">{__('Generic\\No')}</span></td>
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
|
||||
{if $active && $poll->editable && !$expired}
|
||||
<td>
|
||||
<button type="submit" class="btn btn-link btn-sm" name="edit_vote" value="{$vote->id|html}" title="{__('Edit the line:')} {$vote->name|html}">
|
||||
<span class="glyphicon glyphicon-pencil"></span><span class="sr-only">{__('Edit')}</span>
|
||||
<button type="submit" class="btn btn-link btn-sm" name="edit_vote" value="{$vote->id|html}" title="{__('Poll results\\Edit the line:')} {$vote->name|html}">
|
||||
<span class="glyphicon glyphicon-pencil"></span><span class="sr-only">{__('Generic\\Edit')}</span>
|
||||
</button>
|
||||
{if $admin}
|
||||
<button type="submit" class="btn btn-link btn-sm" name="delete_vote" value="{$vote->id|html}" title="{__('Remove the line:')} {$vote->name|html}">
|
||||
<span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">{__('Remove')}</span>
|
||||
<button type="submit" class="btn btn-link btn-sm" name="delete_vote" value="{$vote->id|html}" title="{__('Poll results\\Remove the line:')} {$vote->name|html}">
|
||||
<span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">{__('Generic\\Remove')}</span>
|
||||
</button>
|
||||
{/if}
|
||||
</td>
|
||||
@ -113,7 +113,7 @@
|
||||
<td class="bg-info" style="padding:5px">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
|
||||
<input type="text" id="name" name="name" class="form-control" title="{__('Your name')}" placeholder="{__('Your name')}" />
|
||||
<input type="text" id="name" name="name" class="form-control" title="{__('Generic\\Your name')}" placeholder="{__('Generic\\Your name')}" />
|
||||
</div>
|
||||
</td>
|
||||
{foreach $slots as $id=>$slot}
|
||||
@ -121,26 +121,26 @@
|
||||
<ul class="list-unstyled choice">
|
||||
<li class="yes">
|
||||
<input type="radio" id="y-choice-{$id}" name="choices[{$id}]" value="2" />
|
||||
<label class="btn btn-default btn-xs" for="y-choice-{$id}" title="{__('Vote yes for')} {$slot->title|html}">
|
||||
<span class="glyphicon glyphicon-ok"></span><span class="sr-only">{__('Yes')}</span>
|
||||
<label class="btn btn-default btn-xs" for="y-choice-{$id}" title="{__('Poll results\\Vote yes for')} {$slot->title|html}">
|
||||
<span class="glyphicon glyphicon-ok"></span><span class="sr-only">{__('Generic\\Yes')}</span>
|
||||
</label>
|
||||
</li>
|
||||
<li class="ifneedbe">
|
||||
<input type="radio" id="i-choice-{$id}" name="choices[{$id}]" value="1" />
|
||||
<label class="btn btn-default btn-xs" for="i-choice-{$id}" title="{__('Vote ifneedbe for')} {$slot->title|html}">
|
||||
(<span class="glyphicon glyphicon-ok"></span>)<span class="sr-only">{__('Ifneedbe')}</span>
|
||||
<label class="btn btn-default btn-xs" for="i-choice-{$id}" title="{__('Poll results\\Vote ifneedbe for')} {$slot->title|html}">
|
||||
(<span class="glyphicon glyphicon-ok"></span>)<span class="sr-only">{__('Generic\\Ifneedbe')}</span>
|
||||
</label>
|
||||
</li>
|
||||
<li class="no">
|
||||
<input type="radio" id="n-choice-{$id}" name="choices[{$id}]" value="0" checked/>
|
||||
<label class="btn btn-default btn-xs" for="n-choice-{$id}" title="{__('Vote no for')} {$slot->title|html}">
|
||||
<span class="glyphicon glyphicon-ban-circle"></span><span class="sr-only">{__('No')}</span>
|
||||
<label class="btn btn-default btn-xs" for="n-choice-{$id}" title="{__('Poll results\\Vote no for')} {$slot->title|html}">
|
||||
<span class="glyphicon glyphicon-ban-circle"></span><span class="sr-only">{__('Generic\\No')}</span>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
{/foreach}
|
||||
<td><button type="submit" class="btn btn-success btn-md" name="save" title="{__('Save the choices')}">{__('Save')}</button></td>
|
||||
<td><button type="submit" class="btn btn-success btn-md" name="save" title="{__('Poll results\\Save the choices')}">{__('Generic\\Save')}</button></td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
@ -149,13 +149,15 @@
|
||||
{$max = max($best_choices)}
|
||||
{if $max > 0}
|
||||
<tr id="addition">
|
||||
<td>{__("Addition")}</td>
|
||||
<td>{__('Poll results\\Addition')}</td>
|
||||
{foreach $best_choices as $best_choice}
|
||||
{if $max == $best_choice}
|
||||
{$count_bests = $count_bests +1}
|
||||
<td><span class="glyphicon glyphicon-star text-warning"></span>{$best_choice|html}</td>
|
||||
{else}
|
||||
{elseif $best_choice > 0}
|
||||
<td>{$best_choice|html}</td>
|
||||
{else}
|
||||
<td></td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
@ -171,13 +173,13 @@
|
||||
{if $max > 0}
|
||||
<div class="row">
|
||||
{if $count_bests == 1}
|
||||
<div class="col-sm-12"><h3>{__("Best choice")}</h3></div>
|
||||
<div class="col-sm-12"><h3>{__('Poll results\\Best choice')}</h3></div>
|
||||
<div class="col-sm-6 col-sm-offset-3 alert alert-success">
|
||||
<p><span class="glyphicon glyphicon-star text-warning"></span>{__('The best choice at this time is:')}</p>
|
||||
<p><span class="glyphicon glyphicon-star text-warning"></span>{__('Poll results\\The best choice at this time is:')}</p>
|
||||
{elseif $count_bests > 1}
|
||||
<div class="col-sm-12"><h3>{__("Best choices")}</h3></div>
|
||||
<div class="col-sm-12"><h3>{__('Poll results\\Best choices')}</h3></div>
|
||||
<div class="col-sm-6 col-sm-offset-3 alert alert-success">
|
||||
<p><span class="glyphicon glyphicon-star text-warning"></span>{__('The bests choices at this time are:')}</p>
|
||||
<p><span class="glyphicon glyphicon-star text-warning"></span>{__('Poll results\\The bests choices at this time are:')}</p>
|
||||
{/if}
|
||||
|
||||
|
||||
@ -190,7 +192,7 @@
|
||||
{$i = $i+1}
|
||||
{/foreach}
|
||||
</ul>
|
||||
<p>{__('with')} <b>{$max|html}</b> {if $max==1}{__('vote')}{else}{__('votes')}{/if}.</p>
|
||||
<p>{__('Generic\\with')} <b>{$max|html}</b> {if $max==1}{__('Generic\\vote')}{else}{__('Generic\\votes')}{/if}.</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
@ -16,13 +16,13 @@
|
||||
{foreach $slots as $slot}
|
||||
{foreach $slot->moments as $id=>$moment}
|
||||
<td headers="M{$slot@key} D{$headersDCount} H{$headersDCount}">
|
||||
<button type="submit" name="delete_column" value="{$slot->day|html}@{$moment|html}" class="btn btn-link btn-sm" title="{__('Poll results\\Remove the column')} {$slot->day|date_format:$date_format.txt_short|html} - {$moment|html}"><span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">{__('Generic\\Remove')}</span></button>
|
||||
<button type="submit" name="delete_column" value="{$slot->day|html}@{$moment|html}" class="btn btn-link btn-sm" title="{__('adminstuds\\Remove the column')} {$slot->day|date_format:$date_format.txt_short|html} - {$moment|html}"><span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">{__('Generic\\Remove')}</span></button>
|
||||
</td>
|
||||
{$headersDCount = $headersDCount+1}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
<td>
|
||||
<button type="submit" name="add_slot" class="btn btn-link btn-sm" title="{__('Poll results\\Add a column')}"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">{__('Poll results\\Add a column')}</span></button>
|
||||
<button type="submit" name="add_slot" class="btn btn-link btn-sm" title="{__('adminstuds\\Add a column')}"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">{__('Poll results\\Add a column')}</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
@ -31,7 +31,7 @@
|
||||
{$count_same = 0}
|
||||
{$previous = 0}
|
||||
{foreach $slots as $id=>$slot}
|
||||
{$display = $slot->day|date_format:$date_format.txt_year_month|html}
|
||||
{$display = $slot->day|date_format:$date_format.txt_month_year|html}
|
||||
{if $previous !== 0 && $previous != $display}
|
||||
<th colspan="{$count_same}" class="bg-primary month" id="M{$id}">{$previous}</th>
|
||||
{$count_same = 0}
|
||||
@ -64,11 +64,13 @@
|
||||
<tr>
|
||||
<th role="presentation"></th>
|
||||
{$headersDCount=0}
|
||||
{$slots_raw = array()}
|
||||
{foreach $slots as $slot}
|
||||
{foreach $slot->moments as $id=>$moment}
|
||||
<th colspan="1" class="bg-info" id="H{$headersDCount}">{$moment|html}</th>
|
||||
{append var='headersH' value=$headersDCount}
|
||||
{$headersDCount = $headersDCount+1}
|
||||
{$slots_raw[] = $slot->day|date_format:$date_format.txt_full|cat:' - '|cat:$moment}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
<th></th>
|
||||
@ -94,19 +96,19 @@
|
||||
<ul class="list-unstyled choice">
|
||||
<li class="yes">
|
||||
<input type="radio" id="y-choice-{$k}" name="choices[{$k}]" value="2" {if $choice==2}checked {/if}/>
|
||||
<label class="btn btn-default btn-xs" for="y-choice-{$k}" title="{__('Poll results\\Vote yes for ')} . $radio_title[$k] . '">{* TODO Replace $radio_title *}
|
||||
<label class="btn btn-default btn-xs" for="y-choice-{$k}" title="{__('Poll results\\Vote yes for')} {$slots_raw[$k]}">
|
||||
<span class="glyphicon glyphicon-ok"></span><span class="sr-only">{__('Generic\\Yes')}</span>
|
||||
</label>
|
||||
</li>
|
||||
<li class="ifneedbe">
|
||||
<input type="radio" id="i-choice-{$k}" name="choices[{$k}]" value="1" {if $choice==1}checked {/if}/>
|
||||
<label class="btn btn-default btn-xs" for="i-choice-{$k}" title="{__('Poll results\\Vote ifneedbe for ')} . $radio_title[$k] . '">{* TODO Replace $radio_title *}
|
||||
<label class="btn btn-default btn-xs" for="i-choice-{$k}" title="{__('Poll results\\Vote ifneedbe for')} {$slots_raw[$k]}">
|
||||
(<span class="glyphicon glyphicon-ok"></span>)<span class="sr-only">{__('Generic\\Ifneedbe')}</span>
|
||||
</label>
|
||||
</li>
|
||||
<li class="no">
|
||||
<input type="radio" id="n-choice-{$k}" name="choices[{$k}]" value="0" {if $choice==0}checked {/if}/>
|
||||
<label class="btn btn-default btn-xs" for="n-choice-{$k}" title="{__('Poll results\\Vote no for ')} . $radio_title[$k] . '">{* TODO Replace $radio_title *}
|
||||
<label class="btn btn-default btn-xs" for="n-choice-{$k}" title="{__('Poll results\\Vote no for')} {$slots_raw[$k]}">
|
||||
<span class="glyphicon glyphicon-ban-circle"></span><span class="sr-only">{__('Generic\\No')}</span>
|
||||
</label>
|
||||
</li>
|
||||
@ -202,8 +204,10 @@
|
||||
{if $max == $best_moment}
|
||||
{$count_bests = $count_bests +1}
|
||||
<td><i class="glyphicon glyphicon-star text-warning"></i>{$best_moment|html}</td>
|
||||
{else}
|
||||
{elseif $best_moment > 0}
|
||||
<td>{$best_moment|html}</td>
|
||||
{else}
|
||||
<td></td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user