Skip to content

Commit

Permalink
Prev / Next links added to the translation files + Italian translatio…
Browse files Browse the repository at this point in the history
…n added (#46)

* Italian translation added

* Prev/Next links added to the translation files + Italian translation added

* Italian translation updated

* Use T instead of i18n for consistency

Co-authored-by: Carson Ip <carsonip@users.noreply.github.com>
  • Loading branch information
fmaida and carsonip committed Apr 21, 2020
1 parent 58e5c7d commit a812f37
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
6 changes: 6 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ other = "Comments"

[ReadMore]
other = "Read More"

[Prev]
other = "Prev"

[Next]
other = "Next"
14 changes: 14 additions & 0 deletions i18n/it.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Contents]
other = "Indice"

[Comments]
other = "Commenti"

[ReadMore]
other = "Continua a leggere"

[Prev]
other = "Precedente"

[Next]
other = "Successivo"
6 changes: 3 additions & 3 deletions layouts/partials/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{ if gt $pag.TotalPages 1 }}
<nav id="page-nav">
{{ if $pag.HasPrev }}
<a href="{{ $pag.Prev.URL }}" rel="prev" class="extend prev">&laquo; Prev</a>
<a href="{{ $pag.Prev.URL }}" rel="prev" class="extend prev">&laquo; {{ T "Prev" }}</a>
{{ end }}
{{ range $pag.Pagers }}
{{ if eq . $pag }}
Expand All @@ -13,7 +13,7 @@
{{ end }}

{{ if $pag.HasNext }}
<a href="{{ $pag.Next.URL }}" rel="next" class="extend next">Next &raquo;</a>
<a href="{{ $pag.Next.URL }}" rel="next" class="extend next">{{ T "Next" }} &raquo;</a>
{{ end }}
</nav>
{{ end }}
{{ end }}

0 comments on commit a812f37

Please sign in to comment.