Translate fr only strings

This commit is contained in:
nemunaire 2023-12-09 11:04:27 +01:00
commit 9000fbd752
5 changed files with 68 additions and 10 deletions

29
i18n/en.yml Normal file
View file

@ -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"

29
i18n/fr.yml Normal file
View file

@ -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"

View file

@ -22,14 +22,14 @@
</div> </div>
{{ end }} {{ end }}
<span class="meta"> <span class="meta">
Par {{ i18n "by" }}
{{ if .Params.author }} {{ if .Params.author }}
{{ .Params.author }} {{ .Params.author }}
{{ else }} {{ else }}
{{ .Site.Title }} {{ .Site.Title }}
{{ end }} {{ end }}
le {{ i18n "on" }}
{{ .Date.Format "2 Jan 2006" }} {{ .Date.Format (i18n "date_fmt") }}
{{ if .Site.Params.page_view_conter }} {{ if .Site.Params.page_view_conter }}
{{ partial "page_view_counter.html" . }} {{ partial "page_view_counter.html" . }}
{{ end }} {{ end }}
@ -59,7 +59,7 @@
{{ if not (eq (.Param "showtoc") false) }} {{ if not (eq (.Param "showtoc") false) }}
<header> <header>
<h2>Sommaire</h2> <h2>{{ i18n "toc" }}</h2>
</header> </header>
{{.TableOfContents}} {{.TableOfContents}}
{{ end }} {{ end }}
@ -69,12 +69,12 @@
<div> <div>
{{ if .PrevInSection }} {{ if .PrevInSection }}
<a class="mb-2 btn btn-outline-primary float-left" href="{{ .PrevInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">&larr; <a class="mb-2 btn btn-outline-primary float-left" href="{{ .PrevInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">&larr;
Article précédent {{ i18n "prev_article" }}
</a> </a>
{{ end }} {{ end }}
{{ if .NextInSection }} {{ if .NextInSection }}
<a class="mb-2 btn btn-outline-primary float-right" href="{{ .NextInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title}}"> <a class="mb-2 btn btn-outline-primary float-right" href="{{ .NextInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title}}">
Article suivant &rarr; {{ i18n "next_article" }} &rarr;
</a> </a>
{{ end }} {{ end }}
</div> </div>

View file

@ -4,12 +4,12 @@
<div style="clear: both"> <div style="clear: both">
{{ if $pag.HasPrev }} {{ if $pag.HasPrev }}
<a class="mb-2 btn btn-outline-primary float-left" href="{{ $pag.Prev.URL }}"> <a class="mb-2 btn btn-outline-primary float-left" href="{{ $pag.Prev.URL }}">
&larr; Articles plus récents &larr; {{ i18n "prev_articles" }}
</a> </a>
{{ end }} {{ end }}
{{ if $pag.HasNext }} {{ if $pag.HasNext }}
<a class="mb-2 btn btn-outline-primary float-right" href="{{ $pag.Next.URL }}"> <a class="mb-2 btn btn-outline-primary float-right" href="{{ $pag.Next.URL }}">
Articles plus anciens &rarr; {{ i18n "next_articles" }} &rarr;
</a> </a>
{{ end }} {{ end }}
</div> </div>

View file

@ -19,10 +19,10 @@
</div> </div>
</a> </a>
<p class="post-meta text-right"> <p class="post-meta text-right">
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") }}
<!-- Don't show "Last Modified on" if update happened on the same day. --> <!-- Don't show "Last Modified on" if update happened on the same day. -->
{{ if (and (not .Lastmod.IsZero) (not (eq (dateFormat "2006-01-02" .Lastmod) (dateFormat "2006-01-02" .Date)))) }} {{ if (and (not .Lastmod.IsZero) (not (eq (dateFormat "2006-01-02" .Lastmod) (dateFormat "2006-01-02" .Date)))) }}
<br>Mise à jour le {{ dateFormat "2 Jan 2006" .Params.LastMod }} <br>{{ i18n "updated_on" }} {{ dateFormat (i18n "date_fmt") .Params.LastMod }}
{{ end }} {{ end }}
</p> </p>