Change i18n system in admin pages
This commit is contained in:
parent
0ced885fe7
commit
659cf997b8
@ -25,4 +25,7 @@ $content = ob_get_clean();
|
|||||||
|
|
||||||
$smarty->assign('title', _('Administration'));
|
$smarty->assign('title', _('Administration'));
|
||||||
$smarty->assign('logs', $content);
|
$smarty->assign('logs', $content);
|
||||||
|
|
||||||
|
$smarty->assign('title', __('Admin\\Logs'));
|
||||||
|
|
||||||
$smarty->display('admin/logs.tpl');
|
$smarty->display('admin/logs.tpl');
|
@ -102,6 +102,6 @@ $smarty->assign('countSkipped', $countSkipped);
|
|||||||
$smarty->assign('countTotal', $countTotal);
|
$smarty->assign('countTotal', $countTotal);
|
||||||
$smarty->assign('time', $total_time = round((microtime(true)-$_SERVER['REQUEST_TIME_FLOAT']), 4));
|
$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');
|
$smarty->display('admin/migration.tpl');
|
||||||
|
@ -75,4 +75,6 @@ $smarty->assign('pages', ceil($count / POLLS_PER_PAGE));
|
|||||||
$smarty->assign('poll_to_delete', $poll_to_delete);
|
$smarty->assign('poll_to_delete', $poll_to_delete);
|
||||||
$smarty->assign('crsf', $securityService->getToken('admin'));
|
$smarty->assign('crsf', $securityService->getToken('admin'));
|
||||||
|
|
||||||
|
$smarty->assign('title', __('Admin\\Polls'));
|
||||||
|
|
||||||
$smarty->display('admin/polls.tpl');
|
$smarty->display('admin/polls.tpl');
|
||||||
|
@ -53,4 +53,6 @@ if ($action === 'purge' && $securityService->checkCsrf('admin', $_POST['csrf']))
|
|||||||
$smarty->assign('message', $message);
|
$smarty->assign('message', $message);
|
||||||
$smarty->assign('crsf', $securityService->getToken('admin'));
|
$smarty->assign('crsf', $securityService->getToken('admin'));
|
||||||
|
|
||||||
|
$smarty->assign('title', __('Admin\\Purge'));
|
||||||
|
|
||||||
$smarty->display('admin/purge.tpl');
|
$smarty->display('admin/purge.tpl');
|
@ -28,7 +28,11 @@
|
|||||||
"Yes": "Oui",
|
"Yes": "Oui",
|
||||||
"Ifneedbe": "Si nécessaire",
|
"Ifneedbe": "Si nécessaire",
|
||||||
"No": "Non",
|
"No": "Non",
|
||||||
"Legend:": "Légende :"
|
"Legend:": "Légende :",
|
||||||
|
"Date": "Date",
|
||||||
|
"Classic": "Classique",
|
||||||
|
"Page generated in": "Page généré en",
|
||||||
|
"secondes": "secondes"
|
||||||
},
|
},
|
||||||
"Date" : {
|
"Date" : {
|
||||||
"(dd/mm/yyyy)": "(jj/mm/aaaa)",
|
"(dd/mm/yyyy)": "(jj/mm/aaaa)",
|
||||||
@ -151,7 +155,7 @@
|
|||||||
"You can add a new scheduling date to your poll.": "Vous pouvez ajouter une date à votre sondage.",
|
"You can add a new scheduling date to your poll.": "Vous pouvez ajouter une date à votre sondage.",
|
||||||
"If you just want to add a new hour to an existant date, put the same date and choose a new hour.": "Si vous voulez juste ajouter un horaire à une date existante, mettez la même date et choisissez un autre horaire. Il sera intégré normalement au sondage existant.",
|
"If you just want to add a new hour to an existant date, put the same date and choose a new hour.": "Si vous voulez juste ajouter un horaire à une date existante, mettez la même date et choisissez un autre horaire. Il sera intégré normalement au sondage existant.",
|
||||||
"Confirm removal of the poll": "Confirmer la suppression du sondage",
|
"Confirm removal of the poll": "Confirmer la suppression du sondage",
|
||||||
"Remove the poll": "Je supprime le sondage",
|
"Delete the poll": "Je supprime le sondage",
|
||||||
"Keep the poll": "Je garde le sondage",
|
"Keep the poll": "Je garde le sondage",
|
||||||
"Your poll has been removed!": "Votre sondage a été supprimé !",
|
"Your poll has been removed!": "Votre sondage a été supprimé !",
|
||||||
"Poll saved": "Sondage sauvegardé",
|
"Poll saved": "Sondage sauvegardé",
|
||||||
@ -227,19 +231,22 @@
|
|||||||
"Removal date:": "Date de suppression :"
|
"Removal date:": "Date de suppression :"
|
||||||
},
|
},
|
||||||
"Admin": {
|
"Admin": {
|
||||||
|
"Back to administration": "Retour à l'administration",
|
||||||
"Polls": "Sondages",
|
"Polls": "Sondages",
|
||||||
"Migration": "Migration",
|
"Migration": "Migration",
|
||||||
"Confirm removal of the poll": "Confirmer la suppression du sondage",
|
"Purge": "Purge",
|
||||||
"polls in the database at this time": "sondages dans la base actuellement",
|
"Logs": "Historique",
|
||||||
"Poll ID": "ID sondage",
|
"Poll ID": "ID sondage",
|
||||||
"Format": "Format",
|
"Format": "Format",
|
||||||
"Title": "Titre",
|
"Title": "Titre",
|
||||||
"Author": "Auteur",
|
"Author": "Auteur",
|
||||||
|
"Email": "Courriel",
|
||||||
|
"Expiration date": "Date d'expiration",
|
||||||
"Users": "Utilisateurs",
|
"Users": "Utilisateurs",
|
||||||
"Actions": "Actions",
|
"Actions": "Actions",
|
||||||
"See the poll": "Voir le sondage",
|
"See the poll": "Voir le sondage",
|
||||||
"Change the poll": "Modifier le sondage",
|
"Change the poll": "Modifier le sondage",
|
||||||
"Logs": "Historique",
|
"Deleted the poll": "Supprimer le sondage",
|
||||||
"Summary": "Résumé",
|
"Summary": "Résumé",
|
||||||
"Success": "Réussite",
|
"Success": "Réussite",
|
||||||
"Fail": "Échèc",
|
"Fail": "Échèc",
|
||||||
@ -247,7 +254,10 @@
|
|||||||
"Succeeded:": "Réussit:",
|
"Succeeded:": "Réussit:",
|
||||||
"Failed:": "Échoué:",
|
"Failed:": "Échoué:",
|
||||||
"Skipped:": "Passé:",
|
"Skipped:": "Passé:",
|
||||||
"Pages:": "Pages :"
|
"Pages:": "Pages :",
|
||||||
|
"Confirm removal of the poll": "Confirmer la suppression du sondage",
|
||||||
|
"polls in the database at this time": "sondages dans la base actuellement",
|
||||||
|
"Purge the polls": "Purger les sondages"
|
||||||
},
|
},
|
||||||
"Mail": {
|
"Mail": {
|
||||||
"Poll's participation": "Participation au sondage",
|
"Poll's participation": "Participation au sondage",
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{block 'main'}
|
{block 'main'}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<a href="{'admin'|resource}">{_('Back to administration')}</a>
|
<a href="{'admin'|resource}">{__('Admin\\Back to administration')}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{block 'admin_main'}{/block}
|
{block 'admin_main'}{/block}
|
||||||
|
@ -3,17 +3,17 @@
|
|||||||
{block 'main'}
|
{block 'main'}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-xs-12">
|
<div class="col-md-6 col-xs-12">
|
||||||
<a href="./polls.php"><h2>{_('Polls')}</h2></a>
|
<a href="./polls.php"><h2>{__('Admin\\Polls')}</h2></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-xs-12">
|
<div class="col-md-6 col-xs-12">
|
||||||
<a href="./migration.php"><h2>{_('Migration')}</h2></a>
|
<a href="./migration.php"><h2>{__('Admin\\Migration')}</h2></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-xs-12">
|
<div class="col-md-6 col-xs-12">
|
||||||
<a href="./purge.php"><h2>{_('Purge')}</h2></a>
|
<a href="./purge.php"><h2>{__('Admin\\Purge')}</h2></a>
|
||||||
</div>
|
</div>
|
||||||
{if $logsAreReadable}
|
{if $logsAreReadable}
|
||||||
<div class="col-md-6 col-xs-12">
|
<div class="col-md-6 col-xs-12">
|
||||||
<a href="./logs.php"><h2>{_('Logs')}</h2></a>
|
<a href="./logs.php"><h2>{__('Admin\\Logs')}</h2></a>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,37 +3,37 @@
|
|||||||
{block 'admin_main'}
|
{block 'admin_main'}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-md-4">
|
<div class="col-xs-12 col-md-4">
|
||||||
<h2>{_('Summary')}</h2>
|
<h2>{__('Admin\\Summary')}</h2>
|
||||||
{_('Succeeded:')} <span class="label label-warning">{$countSucceeded|html} / {$countTotal|html}</span>
|
{__('Admin\\Succeeded:')} <span class="label label-warning">{$countSucceeded|html} / {$countTotal|html}</span>
|
||||||
<br/>
|
<br/>
|
||||||
{_('Failed:')} <span class="label label-danger">{$countFailed|html} / {$countTotal|html}</span>
|
{__('Admin\\Failed:')} <span class="label label-danger">{$countFailed|html} / {$countTotal|html}</span>
|
||||||
<br/>
|
<br/>
|
||||||
{_('Skipped:')} <span class="label label-info">{$countSkipped|html} / {$countTotal|html}</span>
|
{__('Admin\\Skipped:')} <span class="label label-info">{$countSkipped|html} / {$countTotal|html}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-4">
|
<div class="col-xs-12 col-md-4">
|
||||||
<h2>{_('Success')}</h2>
|
<h2>{__('Admin\\Success')}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{foreach $success as $s}
|
{foreach $success as $s}
|
||||||
<li>{$s|html}</li>
|
<li>{$s|html}</li>
|
||||||
{foreachelse}
|
{foreachelse}
|
||||||
<li>{_('Nothing')}</li>
|
<li>{__('Admin\\Nothing')}</li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-md-4">
|
<div class="col-xs-12 col-md-4">
|
||||||
<h2>{_('Fail')}</h2>
|
<h2>{__('Admin\\Fail')}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{foreach $fail as $f}
|
{foreach $fail as $f}
|
||||||
<li>{$f|html}</li>
|
<li>{$f|html}</li>
|
||||||
{foreachelse}
|
{foreachelse}
|
||||||
<li>{_('Nothing')}</li>
|
<li>{__('Admin\\Nothing')}</li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 well well-sm">
|
<div class="col-xs-12 well well-sm">
|
||||||
{_('Page generated in')} {$time} {_('secondes')}
|
{__('Generic\\Page generated in')} {$time} {__('Generic\\secondes')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
@ -5,41 +5,41 @@
|
|||||||
<input type="hidden" name="csrf" value="{$crsf}"/>
|
<input type="hidden" name="csrf" value="{$crsf}"/>
|
||||||
{if $poll_to_delete}
|
{if $poll_to_delete}
|
||||||
<div class="alert alert-warning text-center">
|
<div class="alert alert-warning text-center">
|
||||||
<h3>{_("Confirm removal of the poll ")}"{$poll_to_delete->id|html}"</h3>
|
<h3>{__('adminstuds\\Confirm removal of the poll')} "{$poll_to_delete->id|html}"</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<button class="btn btn-default" type="submit" value="1"
|
<button class="btn btn-default" type="submit" value="1"
|
||||||
name="annullesuppression">{_('Keep this poll!')}</button>
|
name="annullesuppression">{__('adminstuds\\Keep the poll')}</button>
|
||||||
<button type="submit" name="delete_confirm" value="{$poll_to_delete->id|html}"
|
<button type="submit" name="delete_confirm" value="{$poll_to_delete->id|html}"
|
||||||
class="btn btn-danger">{_('Remove this poll!')}</button>
|
class="btn btn-danger">{__('adminstuds\\Delete the poll')}</button>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
{$polls|count} / {$count} {_('polls in the database at this time')}
|
{$polls|count} / {$count} {__('Admin\\polls in the database at this time')}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<table class="table table-bordered table-polls">
|
<table class="table table-bordered table-polls">
|
||||||
<tr align="center">
|
<tr align="center">
|
||||||
<th scope="col"></th>
|
<th scope="col"></th>
|
||||||
<th scope="col">{_('Title')}</th>
|
<th scope="col">{__('Admin\\Title')}</th>
|
||||||
<th scope="col">{_('Author')}</th>
|
<th scope="col">{__('Admin\\Author')}</th>
|
||||||
<th scope="col">{_('Email')}</th>
|
<th scope="col">{__('Admin\\Email')}</th>
|
||||||
<th scope="col">{_('Expiration\'s date')}</th>
|
<th scope="col">{__('Admin\\Expiration date')}</th>
|
||||||
<th scope="col">{_('Users')}</th>
|
<th scope="col">{__('Admin\\Users')}</th>
|
||||||
<th scope="col">{_('Poll ID')}</th>
|
<th scope="col">{__('Admin\\Poll ID')}</th>
|
||||||
<th scope="col" colspan="3">{_('Actions')}</th>
|
<th scope="col" colspan="3">{__('Admin\\Actions')}</th>
|
||||||
</tr>
|
</tr>
|
||||||
{foreach $polls as $poll}
|
{foreach $polls as $poll}
|
||||||
<tr align="center">
|
<tr align="center">
|
||||||
<td class="cell-format">
|
<td class="cell-format">
|
||||||
{if $poll->format === 'D'}
|
{if $poll->format === 'D'}
|
||||||
<span class="glyphicon glyphicon-calendar" aria-hidden="true" title="{_('Date')}"></span><span class="sr-only">{_('Date')}</span>
|
<span class="glyphicon glyphicon-calendar" aria-hidden="true" title="{__('Generic\\Date')}"></span><span class="sr-only">{__('Generic\\Date')}</span>
|
||||||
{else}
|
{else}
|
||||||
<span class="glyphicon glyphicon-list-alt" aria-hidden="true" title="{_('Classic')}"></span><span class="sr-only">{_('Classic')}</span>
|
<span class="glyphicon glyphicon-list-alt" aria-hidden="true" title="{__('Generic\\Classic')}"></span><span class="sr-only">{__('Generic\\Classic')}</span>
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
<td>{$poll->title|html}</td>
|
<td>{$poll->title|html}</td>
|
||||||
@ -53,15 +53,15 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<td>{$poll->votes|html}</td>
|
<td>{$poll->votes|html}</td>
|
||||||
<td>{$poll->id|html}</td>
|
<td>{$poll->id|html}</td>
|
||||||
<td><a href="{$poll->id|poll_url|html}" class="btn btn-link" title="{_('See the poll')}"><span class="glyphicon glyphicon-eye-open"></span><span class="sr-only">{_('See the poll')}</span></a></td>
|
<td><a href="{$poll->id|poll_url|html}" class="btn btn-link" title="{__('Admin\\See the poll')}"><span class="glyphicon glyphicon-eye-open"></span><span class="sr-only">{__('Admin\\See the poll')}</span></a></td>
|
||||||
<td><a href="{$poll->admin_id|poll_url:true|html}" class="btn btn-link" title="{_('Change the poll')}"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">{_('Change the poll')}</span></a></td>
|
<td><a href="{$poll->admin_id|poll_url:true|html}" class="btn btn-link" title="{__('Admin\\Change the poll')}"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">{__('Admin\\Change the poll')}</span></a></td>
|
||||||
<td><button type="submit" name="delete_poll" value="{$poll->id|html}" class="btn btn-link" title="{_('Remove the poll')}"><span class="glyphicon glyphicon-trash text-danger"></span><span class="sr-only">{_('Remove the poll')}</span></td>
|
<td><button type="submit" name="delete_poll" value="{$poll->id|html}" class="btn btn-link" title="{__('Admin\\Deleted the poll')}"><span class="glyphicon glyphicon-trash text-danger"></span><span class="sr-only">{__('Admin\\Deleted the poll')}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
{_('Pages:')}
|
{__('Admin\\Pages:')}
|
||||||
{for $p=1 to $pages}
|
{for $p=1 to $pages}
|
||||||
{if $p===$page}
|
{if $p===$page}
|
||||||
<a href="{$SERVER_URL}{$SCRIPT_NAME}?page={$p}" class="btn btn-danger" disabled="disabled">{$p}</a>
|
<a href="{$SERVER_URL}{$SCRIPT_NAME}?page={$p}" class="btn btn-danger" disabled="disabled">{$p}</a>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<form action="" method="POST">
|
<form action="" method="POST">
|
||||||
<input type="hidden" name="csrf" value="{$crsf}"/>
|
<input type="hidden" name="csrf" value="{$crsf}"/>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<button type="submit" name="action" value="purge" class="btn btn-warning">{_('Purge all polls')} <span class="glyphicon glyphicon-trash text-danger"></span><span class="sr-only">{_('Purge all polls')}</span></button>
|
<button type="submit" name="action" value="purge" class="btn btn-warning">{__('Admin\\Purge the polls')} <span class="glyphicon glyphicon-trash text-danger"></span></button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{/block}
|
{/block}
|
Loading…
Reference in New Issue
Block a user