front: use ng-pluralize

This commit is contained in:
nemunaire 2017-01-05 02:18:31 +01:00 committed by nemunaire
parent 1146cc4a6f
commit 6e87f89b07
2 changed files with 8 additions and 8 deletions

View file

@ -83,8 +83,8 @@
</div>
</div>
<div class="panel-body">
<span ng-show="teams[my.team_id].rank">{{ teams[my.team_id].rank }}<sup>e</sup> sur {{ teams_count }} &ndash;</span>
{{ my.score }} points
<span ng-show="teams[my.team_id].rank">{{ teams[my.team_id].rank }}<sup><sup><ng-pluralize count="teams[my.team_id].rank" when="{'one': 're', 'other': 'e'}"></ng-pluralize></sup></sup> sur {{ teams_count }} &ndash;</span>
<ng-pluralize count="my.score" when="{'one': '{} point', 'other': '{} points'}"></ng-pluralize>
<div style="margin: -8px -10px;" class="pull-right btn-group">
<a class="btn btn-default" href="/rules"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></a>
<a class="btn btn-default" href="/rank"><span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span></a>
@ -97,7 +97,7 @@
<div class="page-header">
<h1 ng-show="(current_theme)">{{ themes[current_theme].name }} <small class="authors" ng-show="themes[current_theme].authors">{{ themes[current_theme].authors }}</small></h1>
<h1 ng-show="(!current_theme && title)">{{ title }} <small class="authors" ng-show="authors">{{ authors }}</small></h1>
<h1 ng-show="(!current_theme && !title)">Challenge forensic 2016 <small class="authors">Laboratoire SRS, Epita</small></h1>
<h1 ng-show="(!current_theme && !title)">Challenge forensic 2017 <small class="authors">Laboratoire SRS, Epita</small></h1>
</div>
</div>

View file

@ -8,8 +8,8 @@
<div style="margin-top: 15px" class="well well-lg" ng-show="(my.exercices[current_exercice])">
<p ng-bind-html="my.exercices[current_exercice].statement"></p>
<ul>
<li><strong>Gain :</strong> {{ themes[current_theme].exercices[current_exercice].gain }} points <em ng-show="themes[current_theme].happy">+50% happy hour</em> <em ng-show="themes[current_theme].exercices[current_exercice].solved < 1">+50% first blood</em></li>
<li><strong>Résolu par :</strong> {{ themes[current_theme].exercices[current_exercice].solved }} équipes</li>
<li><strong>Gain :</strong> <ng-pluralize count="themes[current_theme].exercices[current_exercice].gain" when="{'one': '{} point', 'other': '{} points'}"></ng-pluralize> <em ng-show="themes[current_theme].happy">+50% happy hour</em> <em ng-show="themes[current_theme].exercices[current_exercice].solved < 1">+50% first blood</em></li>
<li><strong>Résolu par :</strong> <ng-pluralize count="themes[current_theme].exercices[current_exercice].solved" when="{'0': 'aucune équipe', 'one': '{} équipe', 'other': '{} équipes'}"></ng-pluralize>.</li>
</ul>
</div>
@ -37,7 +37,7 @@
</form>
<h4 class="list-group-item-heading">{{ hint.title }}</h4>
<p class="list-group-item-text" ng-show="hint.unlocked" ng-bind-html="hint.content"></p>
<p class="list-group-item-text" ng-show="!hint.unlocked">Cet indice vous coûtera {{ hint.cost }}% des points de l'exercice</p>
<p class="list-group-item-text" ng-show="!hint.unlocked">Débloquer cet indice vous coûtera <ng-pluralize count="hint.cost" when="{'one': '{} point', 'other': '{} points'}"></ng-pluralize>.</p>
</li>
</ul>
</div>
@ -47,7 +47,7 @@
<div class="panel-title"><span class="glyphicon glyphicon-flag" aria-hidden="true"></span> Soumettre une solution</div>
</div>
<ul class="list-group" ng-show="(my.exercices[current_exercice].solved_number || my.exercices[current_exercice].submitted || sberr)">
<li class="list-group-item text-warning" ng-show="my.exercices[current_exercice].solved_number">{{ my.exercices[current_exercice].solved_number }} tentative(s) effectuée(s). Dernière solution envoyée à {{ my.exercices[current_exercice].solved_time | date:"mediumTime" }}.</li>
<li class="list-group-item text-warning" ng-show="my.exercices[current_exercice].solved_number"><ng-pluralize count="my.exercices[current_exercice].solved_number" when="{'one': '{} tentative effectuée', 'other': '{} tentatives effectuées'}"></ng-pluralize>. Dernière solution envoyée à {{ my.exercices[current_exercice].solved_time | date:"mediumTime" }}.</li>
<li class="list-group-item" ng-class="messageClass" ng-show="my.exercices[current_exercice].submitted || sberr"><strong ng-show="!sberr">Votre solution a bien été envoyée !</strong><strong ng-show="sberr">{{ sberr }}</strong> {{ message }}</li>
</ul>
<div class="panel-body" ng-show="!my.exercices[current_exercice].submitted || sberr">
@ -69,7 +69,7 @@
<div class="panel-title"><span class="glyphicon glyphicon-flag" aria-hidden="true"></span> Challenge réussi !</div>
</div>
<div class="panel-body">
Vous êtes la {{ my.exercices[current_exercice].solved_number }}<sup>e</sup> équipe à avoir résolu ce challenge à {{ my.exercices[current_exercice].solved_time | date:"mediumTime" }}. Vous avez marqué {{ themes[current_theme].exercices[current_exercice].gain }} points !
Vous êtes la {{ my.exercices[current_exercice].solved_number }}<sup><ng-pluralize count="my.exercices[current_exercice].solved_number" when="{'one': 're', 'other': 'e'}"></ng-pluralize></sup> équipe à avoir résolu ce challenge à {{ my.exercices[current_exercice].solved_time | date:"mediumTime" }}. Vous avez marqué <ng-pluralize count="themes[current_theme].exercices[current_exercice].gain" when="{'one': '{} point', 'other': '{} points'}"></ng-pluralize> !
</div>
</div>