diff --git a/CHANGELOG.md b/CHANGELOG.md index 13f65ae..0ef4623 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ -Les dernières améliorations d'OpenSondage +# Changelog de framadate + +## Version 0.9 (... JosephK - OlivierPerez) + - Technique : Réorganisation des classes + - Technique : Découpage en MVC sur la majeur partie de framadate + Installation de Smarty + - Technique : Refonte de la partie données + Rempalcement de Adodb par PDO + - Amélioration : Refonte de l'administration + - Amélioration : Notification de l'utilisation si JAvascript ou les cookies sont désactivés + - Amélioration : Découpage en 2 options pour recevoir ou non les nouveaux vote et commentaires + - Amélioration : Utilisation de jetons CSRF sur certaines actions + - Fix : Purge en 2 étapes. 1. Verrouillage du sondage, 2. 60 jours plus tard suppression du sondage + - Fix : Correction de la date d'expiration qui devient nulle quand on ajoute une colonne + - Fix : clic/focus sur oui/non/si nécessaire → retour à gauche de la barre de scroll sur Chromium + - Fix : Correction sur le choix de la date - Changelog version 0.8 (juillet 2014 Pascal Chevrel - Armony Altinier - JosephK) +## Version 0.8 (juillet 2014 Pascal Chevrel - Armony Altinier - JosephK) - Améliorations sur l'accessibilité - Améliorations sur l'ergonomie - Améliorations sur l'internationalisation (nombreuses phrases en français dans le code) @@ -17,7 +30,7 @@ Les dernières améliorations d'OpenSondage - Restructuration - Fix (partiel) bug modification du premier vote en tapant Entrée - Changelog version 0.7 (mars 2013) +## Version 0.7 (mars 2013) - Fix : le sondage supprimé n'était pas forcément le sondage sélectionné (cfévrier) - Fix : suppression de STUDS_DIR pour éviter toute confusion - Fix : corrections l'en-tete et de l'encodage des e-mails (cfévrier) @@ -30,9 +43,8 @@ Les dernières améliorations d'OpenSondage - Amélioration : possibilité de faire des liens directs vers les types de sondages à créer (pascalchevrel) - Amélioration : meilleure intégration de la framanav (pyg) - Amélioration : nombreuses modifications CSS pour un meilleur affichage (pyg) - - Changelog des 22 et 23 juin (pyg@framasoft.net) +## Changelog des 22 et 23 juin (pyg@framasoft.net) - très nombreuses modifications CSS - ajout de buttons.css pour des boutons plus propres - ajout de print.css pour une impression sans la classe "corps" @@ -47,24 +59,23 @@ Les dernières améliorations d'OpenSondage - modification du titre en image - ajout de htmlspecialchars_decode avec param ENT_QUOTES pour l'envoi des emails - Changelog du 21 juin 2011 (pyg@framasoft.net) +## Changelog du 21 juin 2011 (pyg@framasoft.net) - très nombreuses modifications CSS - modification adminstuds.php : ajout de classes aux formulaires et ajout de stripslashes à l'affichage (TODO: à généraliser) - modification infos_sondages.php : simplification du tableau de choix, ajouts de CSS, ajouts de labels pour faciliter la selection - - Changelog version 0.6.7 (mai 2011) +## Changelog version 0.6.7 (mai 2011) - fork du projet STUdS (https://sourcesup.cru.fr/projects/studs/) de la version trunk du 15 mai 2011) - - reprise par Simon Leblanc - - nettoyage du code (indentation, cohérence de la convention de codage) - - suppression des warning php - - résolution d'une faille de sécurité par injection SQL - - résolution d'une faille de sécurité par injection mail - - correction dans le fichier de langue (merci à Julien Reitzel) - - possibilité de mettre un texte libre pour les horaires - - version Framasoft + - reprise par Simon Leblanc + - nettoyage du code (indentation, cohérence de la convention de codage) + - suppression des warning php + - résolution d'une faille de sécurité par injection SQL + - résolution d'une faille de sécurité par injection mail + - correction dans le fichier de langue (merci à Julien Reitzel) + - possibilité de mettre un texte libre pour les horaires + - version Framasoft -Les dernières améliorations de STUdS +# Les dernières améliorations de STUdS Changelog version 0.6.6 (XXX 2011) : - internationalisation avec gettext - abstraction de la base de données avec ADOdb diff --git a/admin/logs.php b/admin/logs.php index e4be44d..ca60653 100644 --- a/admin/logs.php +++ b/admin/logs.php @@ -25,4 +25,7 @@ $content = ob_get_clean(); $smarty->assign('title', _('Administration')); $smarty->assign('logs', $content); + +$smarty->assign('title', __('Admin\\Logs')); + $smarty->display('admin/logs.tpl'); \ No newline at end of file diff --git a/admin/migration.php b/admin/migration.php index 9c34f97..4d3f042 100644 --- a/admin/migration.php +++ b/admin/migration.php @@ -19,7 +19,7 @@ use Framadate\Migration\From_0_0_to_0_8_Migration; use Framadate\Migration\From_0_8_to_0_9_Migration; -use Framadate\Migration\From_0_9_to_0_9_1_Migration; +use Framadate\Migration\AddColumn_receiveNewComments_For_0_9; use Framadate\Migration\Migration; use Framadate\Utils; @@ -31,7 +31,7 @@ set_time_limit(300); $migrations = [ new From_0_0_to_0_8_Migration(), new From_0_8_to_0_9_Migration(), - new From_0_9_to_0_9_1_Migration() + new AddColumn_receiveNewComments_For_0_9() ]; // --------------------------------------- @@ -102,6 +102,6 @@ $smarty->assign('countSkipped', $countSkipped); $smarty->assign('countTotal', $countTotal); $smarty->assign('time', $total_time = round((microtime(true)-$_SERVER['REQUEST_TIME_FLOAT']), 4)); -$smarty->assign('title', _('Migration')); +$smarty->assign('title', __('Admin\\Migration')); $smarty->display('admin/migration.tpl'); diff --git a/admin/polls.php b/admin/polls.php index d2a617b..bec7daa 100644 --- a/admin/polls.php +++ b/admin/polls.php @@ -75,4 +75,6 @@ $smarty->assign('pages', ceil($count / POLLS_PER_PAGE)); $smarty->assign('poll_to_delete', $poll_to_delete); $smarty->assign('crsf', $securityService->getToken('admin')); +$smarty->assign('title', __('Admin\\Polls')); + $smarty->display('admin/polls.tpl'); diff --git a/admin/purge.php b/admin/purge.php index b97dcb2..a799256 100644 --- a/admin/purge.php +++ b/admin/purge.php @@ -53,4 +53,6 @@ if ($action === 'purge' && $securityService->checkCsrf('admin', $_POST['csrf'])) $smarty->assign('message', $message); $smarty->assign('crsf', $securityService->getToken('admin')); +$smarty->assign('title', __('Admin\\Purge')); + $smarty->display('admin/purge.tpl'); \ No newline at end of file diff --git a/adminstuds.php b/adminstuds.php index f8501dd..a26bbd2 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -52,7 +52,7 @@ if (!empty($_GET['poll']) && strlen($_GET['poll']) === 24) { } if (!$poll) { - $smarty->assign('error', _('This poll doesn\'t exist !')); + $smarty->assign('error', __('Error\\This poll doesn\'t exist !')); $smarty->display('error.tpl'); exit; } @@ -63,7 +63,7 @@ if (!$poll) { if (isset($_POST['update_poll_info'])) { $updated = false; - $field = $inputService->filterAllowedValues($_POST['update_poll_info'], ['title', 'admin_mail', 'comment', 'rules', 'expiration_date', 'name']); + $field = $inputService->filterAllowedValues($_POST['update_poll_info'], ['title', 'admin_mail', 'description', 'rules', 'expiration_date', 'name']); // Update the right poll field if ($field == 'title') { @@ -78,10 +78,10 @@ if (isset($_POST['update_poll_info'])) { $poll->admin_mail = $admin_mail; $updated = true; } - } elseif ($field == 'comment') { - $comment = strip_tags($_POST['comment']); - if ($comment) { - $poll->comment = $comment; + } elseif ($field == 'description') { + $description = strip_tags($_POST['description']); + if ($description) { + $poll->description = $description; $updated = true; } } elseif ($field == 'rules') { @@ -120,9 +120,9 @@ if (isset($_POST['update_poll_info'])) { // Update poll in database if ($updated && $adminPollService->updatePoll($poll)) { - $message = new Message('success', _('Poll saved.')); + $message = new Message('success', __('adminstuds\\Poll saved')); } else { - $message = new Message('danger', _('Failed to save poll.')); + $message = new Message('danger', __('Error\\Failed to save poll')); $poll = $pollService->findById($poll_id); } } @@ -145,19 +145,19 @@ if (!empty($_POST['save'])) { // Save edition of an old vote $choices = $inputService->filterArray($_POST['choices'], FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => CHOICE_REGEX]]); if (empty($editedVote)) { - $message = new Message('danger', _('Something is going wrong...')); + $message = new Message('danger', __('Error\\Something is going wrong...')); } if (count($choices) != count($_POST['choices'])) { - $message = new Message('danger', _('There is a problem with your choices.')); + $message = new Message('danger', __('Error\\There is a problem with your choices')); } if ($message == null) { // Update vote $result = $pollService->updateVote($poll_id, $editedVote, $name, $choices); if ($result) { - $message = new Message('success', _('Update vote successfully.')); + $message = new Message('success', __('adminstuds\\Vote updated')); } else { - $message = new Message('danger', _('Update vote failed.')); + $message = new Message('danger', __('Error\\Update vote failed')); } } } elseif (isset($_POST['save'])) { // Add a new vote @@ -165,19 +165,19 @@ if (!empty($_POST['save'])) { // Save edition of an old vote $choices = $inputService->filterArray($_POST['choices'], FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => CHOICE_REGEX]]); if (empty($name)) { - $message = new Message('danger', _('The name is invalid.')); + $message = new Message('danger', __('Error\\The name is invalid')); } if (count($choices) != count($_POST['choices'])) { - $message = new Message('danger', _('There is a problem with your choices.')); + $message = new Message('danger', __('Error\\There is a problem with your choices')); } if ($message == null) { // Add vote $result = $pollService->addVote($poll_id, $name, $choices); if ($result) { - $message = new Message('success', _('Update vote successfully.')); + $message = new Message('success', __('adminstuds\\Vote added')); } else { - $message = new Message('danger', _('Update vote failed.')); + $message = new Message('danger', __('Error\\Adding vote failed')); } } } @@ -189,9 +189,9 @@ if (!empty($_POST['save'])) { // Save edition of an old vote if (!empty($_POST['delete_vote'])) { $vote_id = filter_input(INPUT_POST, 'delete_vote', FILTER_VALIDATE_INT); if ($adminPollService->deleteVote($poll_id, $vote_id)) { - $message = new Message('success', _('Vote delete.')); + $message = new Message('success', __('adminstuds\\Vote deleted')); } else { - $message = new Message('danger', _('Failed to delete the vote.')); + $message = new Message('danger', __('Error\\Failed to delete the vote')); } } @@ -202,15 +202,15 @@ if (!empty($_POST['delete_vote'])) { if (isset($_POST['remove_all_votes'])) { $smarty->assign('poll_id', $poll_id); $smarty->assign('admin_poll_id', $admin_poll_id); - $smarty->assign('title', _('Poll') . ' - ' . $poll->title); + $smarty->assign('title', __('Generic\\Poll') . ' - ' . $poll->title); $smarty->display('confirm/delete_votes.tpl'); exit; } if (isset($_POST['confirm_remove_all_votes'])) { if ($adminPollService->cleanVotes($poll_id)) { - $message = new Message('success', _('All votes deleted.')); + $message = new Message('success', __('adminstuds\\All votes deleted')); } else { - $message = new Message('danger', _('Failed to delete all votes.')); + $message = new Message('danger', __('Error\\Failed to delete all votes')); } } @@ -223,16 +223,16 @@ if (isset($_POST['add_comment'])) { $comment = strip_tags($_POST['comment']); if (empty($name)) { - $message = new Message('danger', _('The name is invalid.')); + $message = new Message('danger', __('Error\\The name is invalid')); } if ($message == null) { // Add comment $result = $pollService->addComment($poll_id, $name, $comment); if ($result) { - $message = new Message('success', _('Comment added.')); + $message = new Message('success', __('Comments\\Comment added')); } else { - $message = new Message('danger', _('Comment failed.')); + $message = new Message('danger', __('Error\\Comment failed')); } } @@ -246,9 +246,9 @@ if (!empty($_POST['delete_comment'])) { $comment_id = filter_input(INPUT_POST, 'delete_comment', FILTER_VALIDATE_INT); if ($adminPollService->deleteComment($poll_id, $comment_id)) { - $message = new Message('success', _('Comment deleted.')); + $message = new Message('success', __('adminstuds\\Comment deleted')); } else { - $message = new Message('danger', _('Failed to delete the comment.')); + $message = new Message('danger', __('Error\\Failed to delete the comment')); } } @@ -259,15 +259,15 @@ if (!empty($_POST['delete_comment'])) { if (isset($_POST['remove_all_comments'])) { $smarty->assign('poll_id', $poll_id); $smarty->assign('admin_poll_id', $admin_poll_id); - $smarty->assign('title', _('Poll') . ' - ' . $poll->title); + $smarty->assign('title', __('Generic\\Poll') . ' - ' . $poll->title); $smarty->display('confirm/delete_comments.tpl'); exit; } if (isset($_POST['confirm_remove_all_comments'])) { if ($adminPollService->cleanComments($poll_id)) { - $message = new Message('success', _('All comments deleted.')); + $message = new Message('success', __('All comments deleted')); } else { - $message = new Message('danger', _('Failed to delete all comments.')); + $message = new Message('danger', __('Error\\Failed to delete all comments')); } } @@ -278,19 +278,19 @@ if (isset($_POST['confirm_remove_all_comments'])) { if (isset($_POST['delete_poll'])) { $smarty->assign('poll_id', $poll_id); $smarty->assign('admin_poll_id', $admin_poll_id); - $smarty->assign('title', _('Poll') . ' - ' . $poll->title); + $smarty->assign('title', __('Generic\\Poll') . ' - ' . $poll->title); $smarty->display('confirm/delete_poll.tpl'); exit; } if (isset($_POST['confirm_delete_poll'])) { if ($adminPollService->deleteEntirePoll($poll_id)) { - $message = new Message('success', _('Poll fully deleted.')); + $message = new Message('success', __('Generic\\Poll fully deleted')); } else { - $message = new Message('danger', _('Failed to delete the poll.')); + $message = new Message('danger', __('Error\\Failed to delete the poll')); } $smarty->assign('poll_id', $poll_id); $smarty->assign('admin_poll_id', $admin_poll_id); - $smarty->assign('title', _('Poll') . ' - ' . $poll->title); + $smarty->assign('title', __('Generic\\Poll') . ' - ' . $poll->title); $smarty->assign('message', $message); $smarty->display('poll_deleted.tpl'); exit; @@ -316,9 +316,9 @@ if (!empty($_POST['delete_column'])) { } if ($result) { - $message = new Message('success', _('Column deleted.')); + $message = new Message('success', __('Column deleted')); } else { - $message = new Message('danger', _('Failed to delete the column.')); + $message = new Message('danger', __('Error\\Failed to delete the column')); } } @@ -330,7 +330,7 @@ if (isset($_POST['add_slot'])) { $smarty->assign('poll_id', $poll_id); $smarty->assign('admin_poll_id', $admin_poll_id); $smarty->assign('format', $poll->format); - $smarty->assign('title', _('Poll') . ' - ' . $poll->title); + $smarty->assign('title', __('Generic\\Poll') . ' - ' . $poll->title); $smarty->display('add_slot.tpl'); exit; } @@ -347,9 +347,9 @@ if (isset($_POST['confirm_add_slot'])) { } if ($result) { - $message = new Message('success', _('Column added.')); + $message = new Message('success', __('adminstuds\\Choice added')); } else { - $message = new Message('danger', _('Failed to add the column.')); + $message = new Message('danger', __('Error\\Failed to add the column')); } } @@ -363,7 +363,7 @@ $comments = $pollService->allCommentsByPollId($poll_id); $smarty->assign('poll_id', $poll_id); $smarty->assign('admin_poll_id', $admin_poll_id); $smarty->assign('poll', $poll); -$smarty->assign('title', _('Poll') . ' - ' . $poll->title); +$smarty->assign('title', __('Generic\\Poll') . ' - ' . $poll->title); $smarty->assign('expired', strtotime($poll->end_date) < time()); $smarty->assign('deletion_date', $poll->end_date + PURGE_DELAY * 86400); $smarty->assign('slots', $poll->format === 'D' ? $pollService->splitSlots($slots) : $slots); diff --git a/app/classes/Framadate/FramaDB.php b/app/classes/Framadate/FramaDB.php index 6b7c4c3..d4a198f 100644 --- a/app/classes/Framadate/FramaDB.php +++ b/app/classes/Framadate/FramaDB.php @@ -90,7 +90,7 @@ class FramaDB { } function updatePoll($poll) { - $prepared = $this->prepare('UPDATE `' . Utils::table('poll') . '` SET title=?, admin_name=?, admin_mail=?, description=?, end_date=FROM_UNIXTIME(?), active=?, editable=? WHERE id = ?'); + $prepared = $this->prepare('UPDATE `' . Utils::table('poll') . '` SET title=?, admin_name=?, admin_mail=?, description=?, end_date=?, active=?, editable=? WHERE id = ?'); return $prepared->execute([$poll->title, $poll->admin_name, $poll->admin_mail, $poll->description, $poll->end_date, $poll->active, $poll->editable, $poll->id]); } diff --git a/app/classes/Framadate/Migration/From_0_9_to_0_9_1_Migration.php b/app/classes/Framadate/Migration/AddColumn_receiveNewComments_For_0_9.php similarity index 58% rename from app/classes/Framadate/Migration/From_0_9_to_0_9_1_Migration.php rename to app/classes/Framadate/Migration/AddColumn_receiveNewComments_For_0_9.php index 49896ba..9f698f9 100644 --- a/app/classes/Framadate/Migration/From_0_9_to_0_9_1_Migration.php +++ b/app/classes/Framadate/Migration/AddColumn_receiveNewComments_For_0_9.php @@ -1,14 +1,32 @@ =5.6 $ALLOWED_LANGUAGES = [ diff --git a/app/inc/constants.php b/app/inc/constants.php index f395541..60bab3c 100644 --- a/app/inc/constants.php +++ b/app/inc/constants.php @@ -18,7 +18,7 @@ */ // FRAMADATE version -const VERSION = '0.9.1'; +const VERSION = '0.9'; // Regex const POLL_REGEX = '/^[a-z0-9]+$/'; diff --git a/app/inc/i18n.php b/app/inc/i18n.php index 02446c5..dde6247 100644 --- a/app/inc/i18n.php +++ b/app/inc/i18n.php @@ -17,62 +17,33 @@ * Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft) */ +// Sort languages asort($ALLOWED_LANGUAGES); +// Prepare I18N instance +$i18n = \o80\i18n\I18N::instance(); +$i18n->setDefaultLang(DEFAULT_LANGUAGE); +$i18n->setPath(__DIR__ . '/../../locale'); + +// Change langauge when user asked for it if (isset($_POST['lang']) && is_string($_POST['lang']) && in_array($_POST['lang'], array_keys($ALLOWED_LANGUAGES))) { - $mlocale = $_POST['lang']; + $locale = $_POST['lang']; $_SESSION['lang'] = $_POST['lang']; -} elseif (isset($_SESSION['lang']) && is_string($_SESSION['lang']) && in_array($_SESSION['lang'], array_keys($ALLOWED_LANGUAGES))) { - $mlocale = $_SESSION['lang']; +} elseif (!empty($_SESSION['lang'])) { + $locale = $_SESSION['lang']; } else { - - $mlocale = LANGUE; - // Replace config language by browser language if possible - foreach ($ALLOWED_LANGUAGES as $k => $v) { - if (substr($k, 0, 2) == substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2)) { - $mlocale = $k; - break; - } - } - + $locale = DEFAULT_LANGUAGE; } -/* Tell PHP which locale to use */ -$domain = 'Studs'; -$locale = $mlocale . '.utf8'; //unix format - -if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { - putenv("LC_ALL=$mlocale"); //Windows env. needed to switch between languages - switch ($mlocale) { - case 'fr_FR' : - $locale = "fra"; - break; //$locale in windows locale format, needed to use php function that handle text : strftime() - case 'en_GB' : - $locale = "english"; - break; //see http://msdn.microsoft.com/en-us/library/39cwe7zf%28v=vs.90%29.aspx - case 'de_DE' : - $locale = "deu"; - break; - case 'es_ES' : - $locale = "esp"; - break; - } -} -putenv('LANG=' . $locale); -setlocale(LC_ALL, $locale); -bindtextdomain($domain, ROOT_DIR . 'locale'); -bind_textdomain_codeset($domain, 'UTF-8'); -textdomain($domain); - /* */ $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('#(?' : ''; echo '
'; - if(count($ALLOWED_LANGUAGES)>1){ + if(count($ALLOWED_LANGUAGES) > 1){ echo '
- + - +
'; } echo ' -

'.$img.'

+

' . $img . '

'. $titre .'

@@ -48,7 +48,7 @@ function bandeau_titre($titre) $tables = $connect->allTables(); $diff = array_diff([Utils::table('comment'), Utils::table('poll'), Utils::table('slot'), Utils::table('vote')], $tables); if (0 != count($diff)) { - echo '
'. _('Framadate is not properly installed, please check the "INSTALL" to setup the database before continuing.') .'
'; + echo '
'. __('Error\\Framadate is not properly installed, please check the "INSTALL" to setup the database before continuing.') .'
'; bandeau_pied(); die(); } @@ -72,7 +72,7 @@ function liste_lang() return $str; } -function bandeau_pied($admin=false) +function bandeau_pied() { echo ' diff --git a/choix_autre.php b/choix_autre.php index 9c04118..38beabb 100644 --- a/choix_autre.php +++ b/choix_autre.php @@ -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 '
-

' . _('You haven\'t filled the first section of the poll creation.') . ' !

-

' . _('Back to the homepage of') . ' ' . NOMAPPLICATION . '

+

' . __('You haven\'t filled the first section of the poll creation.') . ' !

+

' . __('Back to the homepage of') . ' ' . NOMAPPLICATION . '

' . "\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 = '' . $li_subject_text . ''; } 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 = '' . $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 = '' . $li_subject_text . ''; } else { // text only @@ -184,33 +184,33 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
-

' . _('List of your choices') . '

+

' . __('Step 3\\List of your choices') . '

' . $summary . '
-

' . _('Your poll will be automatically removed after') . ' ' . $config['default_poll_duration'] . ' ' . _('days') . '.
' . _('You can set a closer removal date for it.') . '

+

' . __('Step 3\\Your poll will be automatically removed after') . ' ' . $config['default_poll_duration'] . ' ' . __('Generic\\days') . '.
' . __('Step 3\\You can set a closer removal date for it.') . '

- +
- +
- ' . _('(dd/mm/yyyy)') . ' + ' . __('Date\\dd/mm/yyyy') . '
-

' . _('Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.') . '

'; +

' . __('Step 3\\Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.') . '

'; if ($config['use_smtp'] == true) { echo ' -

' . _('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.') . '

'; +

' . __('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.') . '

'; } echo '

- - + +

@@ -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 '
@@ -229,10 +229,10 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
'; echo '
-

' . _("To make a generic poll you need to propose at least two choices between differents subjects.") . '

-

' . _("You can add or remove additional choices with the buttons") . ' ' . _("Remove") . ' ' . _("Add") . '

'; +

' . __('Step 2 classic\\To make a generic poll you need to propose at least two choices between differents subjects.') . '

+

' . __('Step 2 classic\\You can add or remove additional choices with the buttons') . ' ' . __('Generic\\Remove') . ' ' . __('Generic\\Add') . '

'; if ($config['user_can_add_img_or_link']) { - echo '

' . _("It's possible to propose links or images by using ") . '' . _("the Markdown syntax") . '.

'; + echo '

' . __('Step 2 classic\\It\'s possible to propose links or images by using') . ' ' . __('Step 2 classic\\the Markdown syntax') . '.

'; } echo '
' . "\n"; @@ -243,11 +243,11 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || ( $choice = isset($choices[$i]) ? $choices[$i] : new Choice(); echo '
- +
'; if ($config['user_can_add_img_or_link']) { - echo ' '; + echo ' '; } echo '
@@ -257,13 +257,13 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || ( echo '
- - + +
- ' . _('Back') . ' - + ' . __('Generic\\Back') . ' +
@@ -271,32 +271,36 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || ( -
' . "\n"; + + + + + ' . "\n"; bandeau_pied(); diff --git a/choix_date.php b/choix_date.php index b94658f..66cdd31 100644 --- a/choix_date.php +++ b/choix_date.php @@ -43,13 +43,13 @@ if (is_readable('bandeaux_local.php')) { // Step 1/4 : error if $_SESSION from info_sondage are not valid if (!isset($_SESSION['form']->title) || !isset($_SESSION['form']->admin_name) || ($config['use_smtp'] && !isset($_SESSION['form']->admin_mail))) { - Utils::print_header ( _('Error!') ); - bandeau_titre(_('Error!')); + Utils::print_header ( __('Error\\Error!') ); + bandeau_titre(__('Error\\Error!')); echo '
-

' . _('You haven\'t filled the first section of the poll creation.') . ' !

-

' . _('Back to the homepage of ') . ' ' . '' . NOMAPPLICATION . '.

+

' . __('Error\\You haven\'t filled the first section of the poll creation.') . ' !

+

' . __('Error\\Back to the homepage of') . ' ' . '' . NOMAPPLICATION . '.

'; @@ -94,20 +94,20 @@ if (!isset($_SESSION['form']->title) || !isset($_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 = __("Mail\\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')) . ' ' . __('Mail\\hast just created a poll called') . ' : "' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)) . "\".\n"; + $message .= __('Mail\\Thanks for filling the poll at the link above') . " :\n\n%s\n\n" . __('Mail\\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 = __("Mail\\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" . __('Mail\\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 . '][' . __('Mail\\Author\'s message') . '] ' . __('Generic\\Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message_admin); + $mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail\\For sending to the polled users') . '] ' . __('Generic\\Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message); } } @@ -154,8 +154,8 @@ if (!isset($_SESSION['form']->title) || !isset($_SESSION['form']->admin_name) || // Step 3/4 : Confirm poll creation if (!empty($_POST['choixheures']) && !isset($_SESSION['form']->totalchoixjour)) { - 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)')); $_SESSION['form']->sortChoices(); $last_date = $_SESSION['form']->lastChoice()->getName(); @@ -181,34 +181,34 @@ if (!isset($_SESSION['form']->title) || !isset($_SESSION['form']->admin_name) ||
-

'. _('Confirm the creation of your poll') .'

+

'. __('Step 3\\Confirm the creation of your poll') .'

-

'. _('List of your choices').'

+

'. __('Step 3\\List of your choices').'

'. $summary .'
-

' . _('Your poll will be automatically removed '). $config['default_poll_duration'] . ' ' . _('days') . ' ' ._('after the last date of your poll') . '.
' . _('You can set a closer removal date for it.') .'

+

' . __('Step 3\\Your poll will be automatically removed after') . ' ' . $config['default_poll_duration'] . ' ' . __('Generic\\days') . ' ' .__('Step 3\\after the last date of your poll:') . '
' . __('Step 3\\You can set a closer removal date for it.') .'

- +
- +
- '. _("(dd/mm/yyyy)") .' + ('. __("Date\\dd/mm/yyyy") .')
-

'. _('Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.'). '

'; +

'. __('Step 3\\Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.'). '

'; if($config['use_smtp'] == true) { - echo '

' . _('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.') .'

'; + echo '

' . __('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.') .'

'; } echo '

- - + +

@@ -218,77 +218,82 @@ if (!isset($_SESSION['form']->title) || !isset($_SESSION['form']->admin_name) || // Step 2/4 : Select dates of the poll } else { - Utils::print_header ( _('Poll dates (2 on 3)') ); - bandeau_titre(_('Poll dates (2 on 3)')); + Utils::print_header(__('Step 2 date\\Poll dates (2 on 3)')); + bandeau_titre(__('Step 2 date\\Poll dates (2 on 3)')); echo '
-

'. _('Choose the dates of your poll') .'

+

'. __('Step 2 date\\Choose the dates of your poll') .'

-

'. _('To schedule an event you need to propose at least two choices (two hours for one day or two days).').'

-

'. _('You can add or remove additionnal days and hours with the buttons') .' '. _('Remove') .' '. _('Add') .'

-

'. _('For each selected day, you can choose, or not, meeting hours (e.g.: "8h", "8:30", "8h-10h", "evening", etc.)').'

+

'. __('Step 2 date\\To schedule an event you need to propose at least two choices (two hours for one day or two days).').'

+

'. __('Step 2 date\\You can add or remove additionnal days and hours with the buttons') .' '. __('Remove') .' '. __('Add') .'

+

'. __('Step 2 date\\For each selected day, you can choose, or not, meeting hours (e.g.: "8h", "8:30", "8h-10h", "evening", etc.)').'

'; // Fields days : 3 by default $nb_days = (isset($_SESSION['totalchoixjour'])) ? count($_SESSION['totalchoixjour']) : 3; - for ($i=0;$i<$nb_days;$i++) { + for ($i = 0; $i < $nb_days; $i++) { $day_value = isset($_SESSION['totalchoixjour'][$i]) ? strftime('%d/%m/%Y', $_SESSION['totalchoixjour'][$i]) : ''; echo '
- +
- +
- '. _('(dd/mm/yyyy)') .' + ('. __('Date\\dd/mm/yyyy') .')
'."\n"; // Fields hours : 3 by default - for ($j=0;$j - - + +
'."\n"; } echo '
- - + +
'; } echo '
- +
- - + +
-
'."\n"; + + + + + '."\n"; bandeau_pied(); diff --git a/composer.json b/composer.json index df41b50..620b1c0 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,8 @@ "type": "project", "require": { - "smarty/smarty": "3.1.21" + "smarty/smarty": "3.1.21", + "o80/i18n": "dev-develop" }, "autoload": { diff --git a/composer.lock b/composer.lock index c4f9e50..8da7369 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,54 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "4bf9a3fa30eb400c9ed140dd2d6fa266", + "hash": "4771fa2616869cff821e2bf1daa6245c", "packages": [ + { + "name": "o80/i18n", + "version": "dev-develop", + "source": { + "type": "git", + "url": "https://github.com/olivierperez/o80-i18n.git", + "reference": "45335ac7a2d24d8ed85861f737758c15cd4f52f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/olivierperez/o80-i18n/zipball/45335ac7a2d24d8ed85861f737758c15cd4f52f6", + "reference": "45335ac7a2d24d8ed85861f737758c15cd4f52f6", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "o80\\": "src/o80" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache License 2.0" + ], + "authors": [ + { + "name": "Olivier Perez", + "email": "olivier@olivierperez.fr", + "homepage": "http://github.com/olivierperez" + } + ], + "description": "Easy library to manage i18n with PHP.", + "homepage": "https://github.com/olivierperez/o80-i18n", + "keywords": [ + "i18n", + "internationalization", + "php" + ], + "time": "2015-03-21 22:37:40" + }, { "name": "smarty/smarty", "version": "v3.1.21", @@ -65,7 +111,9 @@ "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "o80/i18n": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": [], diff --git a/css/style.css b/css/style.css index 43b400d..00b3790 100644 --- a/css/style.css +++ b/css/style.css @@ -14,7 +14,10 @@ * Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ * Auteurs d'OpenSondage : Framasoft (https://github.com/framasoft) */ - +@font-face { + font-family: "DejaVu Sans"; + src: url('../fonts/DejaVuSans.ttf'); +} body { font-family: "DejaVu Sans", Verdana, Geneva, sans-serif; color:#333; diff --git a/fonts/DejaVu Fonts License.txt b/fonts/DejaVu Fonts License.txt new file mode 100644 index 0000000..6939980 --- /dev/null +++ b/fonts/DejaVu Fonts License.txt @@ -0,0 +1,97 @@ +Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. +Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) + +Bitstream Vera Fonts Copyright +------------------------------ + +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is +a trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the fonts accompanying this license ("Fonts") and associated +documentation files (the "Font Software"), to reproduce and distribute the +Font Software, including without limitation the rights to use, copy, merge, +publish, distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to the +following conditions: + +The above copyright and trademark notices and this permission notice shall +be included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular +the designs of glyphs or characters in the Fonts may be modified and +additional glyphs or characters may be added to the Fonts, only if the fonts +are renamed to names not containing either the words "Bitstream" or the word +"Vera". + +This License becomes null and void to the extent applicable to Fonts or Font +Software that has been modified and is distributed under the "Bitstream +Vera" names. + +The Font Software may be sold as part of a larger software package but no +copy of one or more of the Font Software typefaces may be sold by itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME +FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING +ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE +FONT SOFTWARE. + +Except as contained in this notice, the names of Gnome, the Gnome +Foundation, and Bitstream Inc., shall not be used in advertising or +otherwise to promote the sale, use or other dealings in this Font Software +without prior written authorization from the Gnome Foundation or Bitstream +Inc., respectively. For further information, contact: fonts at gnome dot +org. + +Arev Fonts Copyright +------------------------------ + +Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the fonts accompanying this license ("Fonts") and +associated documentation files (the "Font Software"), to reproduce +and distribute the modifications to the Bitstream Vera Font Software, +including without limitation the rights to use, copy, merge, publish, +distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to +the following conditions: + +The above copyright and trademark notices and this permission notice +shall be included in all copies of one or more of the Font Software +typefaces. + +The Font Software may be modified, altered, or added to, and in +particular the designs of glyphs or characters in the Fonts may be +modified and additional glyphs or characters may be added to the +Fonts, only if the fonts are renamed to names not containing either +the words "Tavmjong Bah" or the word "Arev". + +This License becomes null and void to the extent applicable to Fonts +or Font Software that has been modified and is distributed under the +"Tavmjong Bah Arev" names. + +The Font Software may be sold as part of a larger software package but +no copy of one or more of the Font Software typefaces may be sold by +itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL +TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +Except as contained in this notice, the name of Tavmjong Bah shall not +be used in advertising or otherwise to promote the sale, use or other +dealings in this Font Software without prior written authorization +from Tavmjong Bah. For further information, contact: tavmjong @ free +. fr. \ No newline at end of file diff --git a/fonts/DejaVuSans-Bold.ttf b/fonts/DejaVuSans-Bold.ttf new file mode 100644 index 0000000..c0d8e5e Binary files /dev/null and b/fonts/DejaVuSans-Bold.ttf differ diff --git a/fonts/DejaVuSans-BoldOblique.ttf b/fonts/DejaVuSans-BoldOblique.ttf new file mode 100644 index 0000000..7e3bcc1 Binary files /dev/null and b/fonts/DejaVuSans-BoldOblique.ttf differ diff --git a/fonts/DejaVuSans-ExtraLight.ttf b/fonts/DejaVuSans-ExtraLight.ttf new file mode 100644 index 0000000..f4b3041 Binary files /dev/null and b/fonts/DejaVuSans-ExtraLight.ttf differ diff --git a/fonts/DejaVuSans-Oblique.ttf b/fonts/DejaVuSans-Oblique.ttf new file mode 100644 index 0000000..1a0f0e3 Binary files /dev/null and b/fonts/DejaVuSans-Oblique.ttf differ diff --git a/fonts/DejaVuSans.ttf b/fonts/DejaVuSans.ttf new file mode 100644 index 0000000..9d40c32 Binary files /dev/null and b/fonts/DejaVuSans.ttf differ diff --git a/index.php b/index.php index 4e46fbe..b0199c4 100644 --- a/index.php +++ b/index.php @@ -27,22 +27,22 @@ if (is_readable('bandeaux_local.php')) { } // affichage de la page -Utils::print_header( _("Home") ); -bandeau_titre(_("Make your polls")); +Utils::print_header( __('Generic\\Home') ); +bandeau_titre(__('Generic\\Make your polls')); echo '


- '. _('Schedule an event') . ' + '. __('Homepage\\Schedule an event') . '


- '. _('Make a classic poll') . ' + '. __('Homepage\\Make a classic poll') . '

@@ -54,26 +54,26 @@ echo ' } if($config['show_what_is_that'] == true){ echo '
-

'. _('What is that?') . '

+

'. __('1st section\\What is that?') . '

-

'. _('Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required.') .'

-

'. _('Here is how it works:') . '

+

'. __('1st section\\Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required.') .'

+

'. __('1st section\\Here is how it works:') . '

    -
  1. '. _('Make a poll') . '
  2. -
  3. '. _('Define dates or subjects to choose') . '
  4. -
  5. '. _('Send the poll link to your friends or colleagues') . '
  6. -
  7. '. _('Discuss and make a decision') . '
  8. +
  9. '. __('1st section\\Make a poll') . '
  10. +
  11. '. __('1st section\\Define dates or subjects to choose') . '
  12. +
  13. '. __('1st section\\Send the poll link to your friends or colleagues') . '
  14. +
  15. '. __('1st section\\Discuss and make a decision') . '
-

'. _('Do you want to ') . ''. _("view an example?") .'

+

'. __('1st section\\Do you want to ') . ''. __('1st section\\view an example?') .'

'; } if($config['show_the_software'] == true){ echo '
-

'. _('The software') .'

+

'. __('2nd section\\The software') .'

-

'. _('Framadate was initially based on '). 'Studs'. _(' a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft') .'.

-

'. _('This software needs javascript and cookies enabled. It is compatible with the following web browsers:') .'

+

'. __('2nd section\\Framadate was initially based on '). 'Studs'. __('2nd section\\ a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft') .'.

+

'. __('2nd section\\This software needs javascript and cookies enabled. It is compatible with the following web browsers:') .'

-

'. _('It is governed by the ').''. _('CeCILL-B license').'.

+

'. __('2nd section\\It is governed by the ').''. __('2nd section\\CeCILL-B license').'.

'; } if($config['show_cultivate_your_garden'] == true){ echo '
-

'. _('Cultivate your garden') .'

+

'. __('3rd section\\Cultivate your garden') .'

-

'. _('To participate in the software development, suggest improvements or simply download it, please visit ') .''._('the development site').'.

+

'. __('3rd section\\To participate in the software development, suggest improvements or simply download it, please visit ') .''.__('3rd section\\the development site').'.


-

'. _('If you want to install the software for your own use and thus increase your independence, we help you on:') .'

+

'. __('3rd section\\If you want to install the software for your own use and thus increase your independence, we help you on:') .'

framacloud.org

'; } diff --git a/infos_sondage.php b/infos_sondage.php index d53140d..0a0058c 100644 --- a/infos_sondage.php +++ b/infos_sondage.php @@ -110,14 +110,14 @@ if (!empty($_POST['poursuivre'])) { } else { // Title Erreur ! - Utils::print_header( _('Error!').' - '._('Poll creation (1 on 3)') ); + Utils::print_header( __('Generic\\Error!').' - '.__('Step 1\\Poll creation (1 on 3)') ); } } else { // Title OK (formulaire pas encore rempli) - Utils::print_header( _('Poll creation (1 on 3)') ); + Utils::print_header( __('Step 1\\Poll creation (1 on 3)') ); } -bandeau_titre( _('Poll creation (1 on 3)') ); +bandeau_titre( __('Step 1\\Poll creation (1 on 3)') ); /* * Préparation des messages d'erreur @@ -150,37 +150,37 @@ if (!empty($_POST['poursuivre'])) { if (empty($_POST['title'])) { $errors['title']['aria'] = 'aria-describeby="poll_title_error" '; $errors['title']['class'] = ' has-error'; - $errors['title']['msg'] = '

' . _('Enter a title') . '

'; + $errors['title']['msg'] = '

' . __('Error\\Enter a title') . '

'; } elseif ($error_on_title) { $errors['title']['aria'] = 'aria-describeby="poll_title_error" '; $errors['title']['class'] = ' has-error'; - $errors['title']['msg'] = '

' . _('Something is wrong with the format') . '

'; + $errors['title']['msg'] = '

' . __('Error\\Something is wrong with the format') . '

'; } if ($error_on_description) { $errors['description']['aria'] = 'aria-describeby="poll_comment_error" '; $errors['description']['class'] = ' has-error'; - $errors['description']['msg'] = '

' . _('Something is wrong with the format') . '

'; + $errors['description']['msg'] = '

' . __('Error\\Something is wrong with the format') . '

'; } if (empty($_POST['name'])) { $errors['name']['aria'] = 'aria-describeby="poll_name_error" '; $errors['name']['class'] = ' has-error'; - $errors['name']['msg'] = '

' . _('Enter a name') . '

'; + $errors['name']['msg'] = '

' . __('Error\\Enter a name') . '

'; } elseif ($error_on_name) { $errors['name']['aria'] = 'aria-describeby="poll_name_error" '; $errors['name']['class'] = ' has-error'; - $errors['name']['msg'] = '

' . _('Something is wrong with the format') . '

'; + $errors['name']['msg'] = '

' . __('Error\\Something is wrong with the format') . '

'; } if (empty($_POST['mail'])) { $errors['email']['aria'] = 'aria-describeby="poll_name_error" '; $errors['email']['class'] = ' has-error'; - $errors['email']['msg'] = '

' . _('Enter an email address') . '

'; + $errors['email']['msg'] = '

' . __('Error\\Enter an email address') . '

'; } elseif ($error_on_mail) { $errors['email']['aria'] = 'aria-describeby="poll_email_error" '; $errors['email']['class'] = ' has-error'; - $errors['email']['msg'] = '

' . _('The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.') . '

'; + $errors['email']['msg'] = '

' . __('Error\\The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.') . '

'; } } /* @@ -215,30 +215,30 @@ if ($_SESSION['form']->receiveNewComments) { // Display form echo ' -
+