Skip to content
Snippets Groups Projects
Verified Commit 05d9a839 authored by David Beniamine's avatar David Beniamine
Browse files

plus de traductions

parent bc41312a
Branches
No related tags found
No related merge requests found
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<section class="footnote"> <section class="footnote">
<!-- Unfortunately, CSS means everything's got to be inline. --> <!-- Unfortunately, CSS means everything's got to be inline. -->
<p>Article num&eacute;ro: <?php echo numeral(article_number(article_id()), true); ?> . <?php echo count_words(article_markdown()); ?> mots, <?php if(comments_open()): ?>, <p>Article num&eacute;ro: <?php echo article_number(article_id()); ?>, <?php echo count_words(article_markdown()); ?> mots <?php if(comments_open()): ?>,
<?php echo total_comments();?> commentaires pour le moment.<?php endif; ?> <?php echo article_custom_field('attribution'); ?></p> <?php echo total_comments();?> <?php echo pluralise(total_comments(), "commentaire", "s") ?> pour le moment.<?php endif; ?> <?php echo article_custom_field('attribution'); ?></p>
</section> </section>
</section> </section>
......
...@@ -11,7 +11,6 @@ function numeral($number, $hideIfOne = false) { ...@@ -11,7 +11,6 @@ function numeral($number, $hideIfOne = false) {
return ''; return '';
} }
$test = abs($number) % 10;
$ext = ((abs($number) % 100 < 21 and abs($number) % 100 > 4) ? 'th' : (($test < 4) ? ($test < 3) ? ($test < 2) ? ($test < 1) ? 'th' : 'st' : 'nd' : 'rd' : 'th')); $ext = ((abs($number) % 100 < 21 and abs($number) % 100 > 4) ? 'th' : (($test < 4) ? ($test < 3) ? ($test < 2) ? ($test < 1) ? 'th' : 'st' : 'nd' : 'rd' : 'th'));
return $number . $ext; return $number . $ext;
} }
...@@ -40,13 +39,13 @@ function relative_time($date) { ...@@ -40,13 +39,13 @@ function relative_time($date) {
} }
$times = array( $times = array(
31104000 => 'year', 31104000 => 'an',
2592000 => 'month', 2592000 => 'mois',
604800 => 'week', 604800 => 'semaine',
86400 => 'day', 86400 => 'jour',
3600 => 'hour', 3600 => 'heure',
60 => 'minute', 60 => 'minute',
1 => 'second' 1 => 'seconde'
); );
foreach($times as $seconds => $title) { foreach($times as $seconds => $title) {
...@@ -54,7 +53,7 @@ function relative_time($date) { ...@@ -54,7 +53,7 @@ function relative_time($date) {
if($rounded > 1) { if($rounded > 1) {
$rounded = round($rounded); $rounded = round($rounded);
return $rounded . ' ' . pluralise($rounded, $title) . ' ago'; return 'il y a ' . $rounded . ' ' . pluralise($rounded, $title);
} }
} }
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
<footer> <footer>
Posted <time datetime="<?php echo date(DATE_W3C, article_time()); ?>"><?php echo relative_time(article_time()); ?></time> by <?php echo article_author('real_name'); ?>. Posté <time datetime="<?php echo date(DATE_W3C, article_time()); ?>"><?php echo relative_time(article_time()); ?></time> par <?php echo article_author('real_name'); ?>.
</footer> </footer>
</article> </article>
</li> </li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment