diff options
| author | 2013-04-27 13:40:48 +0200 | |
|---|---|---|
| committer | 2013-04-27 13:40:48 +0200 | |
| commit | 19407e1ab6df2c239017fb20e47d6201bdaab223 (patch) | |
| tree | 976a70c10a5aead037acab4e732bf9cae26e0c9a /app/views/helpers | |
| parent | f73d490a640b40abd074a9b2c83c3dae26ecc638 (diff) | |
Structure pour l'internationalisation terminée (voir bug #38) : il reste à faire la traduction en anglais notamment, rajouter une option pour changer la langue, détecter la langue préférée de l'utilisateur et voir si on peut migrer facilement l'installateur aussi
Diffstat (limited to 'app/views/helpers')
| -rwxr-xr-x | app/views/helpers/pagination.phtml | 14 | ||||
| -rwxr-xr-x | app/views/helpers/rss.phtml | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml index f91e3d95d..d5428d304 100755 --- a/app/views/helpers/pagination.phtml +++ b/app/views/helpers/pagination.phtml @@ -2,13 +2,23 @@ $c = Request::controllerName (); $a = Request::actionName (); $params = Request::params (); + + $conf = new RSSConfiguration (); + $order = Session::param ('order', $conf->sortOrder ()); + if ($order == 'low_to_high') { + $first_link = Translate::t ('newer'); + $second_link = Translate::t ('older'); + } else { + $first_link = Translate::t ('older'); + $second_link = Translate::t ('newer'); + } ?> <ul class="pagination"> <li class="item pager-previous"> <?php if ($this->currentPage > 1) { ?> <?php $params[$getteur] = $this->currentPage - 1; ?> - <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">‹ plus récents</a> + <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">‹ <?php echo $first_link ?></a> <?php } else { ?> <?php } ?> @@ -19,7 +29,7 @@ <li class="item pager-next"> <?php if ($this->currentPage < $this->nbPage) { ?> <?php $params[$getteur] = $this->currentPage + 1; ?> - <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">plus anciens ›</a> + <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo $second_link; ?> ›</a> <?php } else { ?> <?php } ?> diff --git a/app/views/helpers/rss.phtml b/app/views/helpers/rss.phtml index 1aa0ac44a..83de6de2e 100755 --- a/app/views/helpers/rss.phtml +++ b/app/views/helpers/rss.phtml @@ -3,7 +3,7 @@ <channel> <title><?php echo View::title(); ?></title> <link><?php echo Url::display(); ?></link> - <description>Flux RSS de <?php echo View::title(); ?></description> + <description><?php echo Translate::t ('rss_feeds_of', View::title()); ?></description> <pubDate><?php echo date('D, d M Y H:i:s O'); ?></pubDate> <lastBuildDate><?php echo gmdate('D, d M Y H:i:s'); ?> GMT</lastBuildDate> <atom:link href="<?php echo _url ('index', 'index', 'output', 'rss'); ?>" rel="self" type="application/rss+xml" /> |
