diff --git a/i18n/en.yml b/i18n/en.yml new file mode 100644 index 0000000..3c79a27 --- /dev/null +++ b/i18n/en.yml @@ -0,0 +1,29 @@ +- id: prev_articles + translation: "Latest articles" + +- id: next_articles + translation: "Oldest articles" + +- id: prev_article + translation: "Previous article" + +- id: next_article + translation: "Next article" + +- id: toc + translation: "Table of Contents" + +- id: posted_by + translation: "Posted by" + +- id: updated_on + translation: "Last modified on" + +- id: by + translation: "By" + +- id: "on" + translation: "on" + +- id: "date_fmt" + translation: "Jan 2 2006" diff --git a/i18n/fr.yml b/i18n/fr.yml new file mode 100644 index 0000000..0058382 --- /dev/null +++ b/i18n/fr.yml @@ -0,0 +1,29 @@ +- id: prev_articles + translation: "Articles plus récents" + +- id: next_articles + translation: "Articles plus anciens" + +- id: prev_article + translation: "Article précédent" + +- id: next_article + translation: "Article suivant" + +- id: toc + translation: "Table des matières" + +- id: posted_by + translation: "Posté par" + +- id: updated_on + translation: "Mis à jour le" + +- id: by + translation: "Par" + +- id: "on" + translation: "le" + +- id: "date_fmt" + translation: "2 Jan 2006" diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ebcc856..620aeb0 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -22,14 +22,14 @@ {{ end }} - Par + {{ i18n "by" }} {{ if .Params.author }} {{ .Params.author }} {{ else }} {{ .Site.Title }} {{ end }} - le - {{ .Date.Format "2 Jan 2006" }} + {{ i18n "on" }} + {{ .Date.Format (i18n "date_fmt") }} {{ if .Site.Params.page_view_conter }} {{ partial "page_view_counter.html" . }} {{ end }} @@ -59,7 +59,7 @@ {{ if not (eq (.Param "showtoc") false) }}
-

Sommaire

+

{{ i18n "toc" }}

{{.TableOfContents}} {{ end }} @@ -69,12 +69,12 @@
{{ if .PrevInSection }} ← - Article précédent + {{ i18n "prev_article" }} {{ end }} {{ if .NextInSection }} - Article suivant → + {{ i18n "next_article" }} → {{ end }}
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html index 07781a6..c7ee8d8 100644 --- a/layouts/partials/pagination.html +++ b/layouts/partials/pagination.html @@ -4,12 +4,12 @@
{{ if $pag.HasPrev }} - ← Articles plus récents + ← {{ i18n "prev_articles" }} {{ end }} {{ if $pag.HasNext }} - Articles plus anciens → + {{ i18n "next_articles" }} → {{ end }}
diff --git a/layouts/partials/post_list.html b/layouts/partials/post_list.html index c231970..73bbeb2 100644 --- a/layouts/partials/post_list.html +++ b/layouts/partials/post_list.html @@ -19,10 +19,10 @@

- Posté par {{ with .Params.author }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }} le {{ .Date.Format "2 Jan 2006" }} + {{ i18n "posted_by" }} {{ with .Params.author }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }} {{ i18n "on" }} {{ .Date.Format (i18n "date_fmt") }} {{ if (and (not .Lastmod.IsZero) (not (eq (dateFormat "2006-01-02" .Lastmod) (dateFormat "2006-01-02" .Date)))) }} -
Mise à jour le {{ dateFormat "2 Jan 2006" .Params.LastMod }} +
{{ i18n "updated_on" }} {{ dateFormat (i18n "date_fmt") .Params.LastMod }} {{ end }}