diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..c3b7490 --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,59 @@ +[404message] +other = "This is not the page you were looking for" + +[searchbarTxt] +other = "Search" + +[tags] +other = "Tags" + +[date] +other = "Date" + +[continueReading] +other = "Continue reading" + +[previousPage] +other = "Previous page" + +[nextPage] +other = "Next page" + +[shareOnTheFediverse] +other = "Share on the Fediverse" + +[enterFediverseInstanceAddress] +other = "Enter your instance's address" + +[fediverseInstanceExample] +other = "Eg. mastodon.social" + +[cancel] +other = "Cancel" + +[share] +other = "Share" + +[themeCopyrightNotice] +other = "Ficurinia theme for Hugo by Gabriele Musco. Licensed under GNU AGPLv3." + +[home] +other = "Home" + +[posts] +other = "Posts" + +[search] +other = "Search" + +[tagsColumn] +other = "Tags:" + +[tagColumn] +other = "Tag:" + +[morePostsLikeThis] +other = "More posts like this" + +[noResultsFound] +other = "No results found" diff --git a/i18n/it.toml b/i18n/it.toml new file mode 100644 index 0000000..57cd38b --- /dev/null +++ b/i18n/it.toml @@ -0,0 +1,59 @@ +[404message] +other = "Questa non è la pagina che stavi cercando" + +[searchbarTxt] +other = "Cerca" + +[tags] +other = "Tag" + +[date] +other = "Data" + +[continueReading] +other = "Continua a leggere" + +[previousPage] +other = "Pagina precedente" + +[nextPage] +other = "Pagina successiva" + +[shareOnTheFediverse] +other = "Condividi sul Fediverse" + +[enterFediverseInstanceAddress] +other = "Inserisci l'indirizzo della tua istanza" + +[fediverseInstanceExample] +other = "Es. mastodon.social" + +[cancel] +other = "Annulla" + +[share] +other = "Condividi" + +[themeCopyrightNotice] +other = "Tema Ficurinia per Hugo creato da Gabriele Musco. Disponibile con licenza GNU AGPLv3." + +[home] +other = "Home" + +[posts] +other = "Post" + +[search] +other = "Cerca" + +[tagsColumn] +other = "Tag:" + +[tagColumn] +other = "Tag:" + +[morePostsLikeThis] +other = "Altri post come questo" + +[noResultsFound] +other = "Nessun risultato trovato" diff --git a/layouts/404.html b/layouts/404.html index b6a79c9..f04b7e1 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,7 +1,7 @@ {{ define "main" }}

- This is not the page you were looking for + {{ i18n "404message" }}

{{ end }} diff --git a/layouts/_default/search.html b/layouts/_default/search.html index 8b16c4b..a4fab65 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -25,7 +25,7 @@ )); if (articles.length > 0) renderArticles(articles); else document.getElementById('postlist').innerHTML = ` -

No results found

+

{{ i18n "noResultsFound" | safeJS }}

`; }); } diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c6bc4b0..39b76f2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,8 +4,8 @@

{{ .Title }}

{{ if (.Params.showDate | default true) }}

- - {{ .Date.Format "2006-01-02" }} + + {{- partial "date.html" .Date -}}

{{ end }} {{ if .Params.Image }} @@ -17,7 +17,7 @@ {{ if not .Site.Params.discreteCards }}
{{ end }}

- Tags: + {{ i18n "tagsColumn" }} {{ range sort .Params.tags }} {{ .Title }}

- - {{ .Date.Format "2006-01-02" }} + + {{- partial "date.html" .Date -}} {{ if and (site.Params.tagsInArticlePreview | default true) .Params.tags }} | - + {{ range sort .Params.tags }} #{{ . }} {{ end }} @@ -22,7 +22,7 @@ {{ if (site.Params.articleSummary | default true) }}

{{ .Summary }}

-

Continue reading 

+

{{ i18n "continueReading" }} 

{{ end }} diff --git a/layouts/partials/date.html b/layouts/partials/date.html new file mode 100644 index 0000000..a66a7b8 --- /dev/null +++ b/layouts/partials/date.html @@ -0,0 +1,5 @@ +{{ if eq site.Language.Lang "it" }} + {{ .Format "02-01-2006" }} +{{ else }} + {{ .Format "2006-01-02" }} +{{ end }} diff --git a/layouts/partials/featured_articles.html b/layouts/partials/featured_articles.html index edd3c94..afe7ab7 100644 --- a/layouts/partials/featured_articles.html +++ b/layouts/partials/featured_articles.html @@ -12,11 +12,11 @@

{{ .Title }}

- - {{ .Date.Format "2006-01-02" }} + + {{- partial "date.html" .Date -}} {{ if and (site.Params.tagsInArticlePreview | default true) .Params.tags }}
- + {{ range sort .Params.tags }} #{{ . }} {{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 6c96f05..9834367 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -6,7 +6,6 @@ {{ now.Format "2006" }} © {{ .Site.Copyright | markdownify }}

- Ficurinia theme for Hugo by Gabriele Musco. - Licensed under GNU AGPLv3. + {{ i18n "themeCopyrightNotice" | safeHTML }}

diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 6f71275..a4024c3 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -17,9 +17,9 @@ {{ end }} diff --git a/layouts/partials/js_paginator.html b/layouts/partials/js_paginator.html index e4ad8e9..3d81870 100644 --- a/layouts/partials/js_paginator.html +++ b/layouts/partials/js_paginator.html @@ -1,9 +1,10 @@