From dd65352920fe24826392ad8166011d9f459e6a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Witz?= <regis.witz@free.fr> Date: Sun, 13 Mar 2022 22:55:34 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=F0=9F=9A=A7=F0=9F=8C=90=20Premiers=20?= =?UTF-8?q?principes=20d'internationalisation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.yaml | 23 +++++++++++++++---- content/_index.en.md | 9 ++++++++ content/_index.md | 13 +++++------ themes/beautifulhugo/i18n/fr.yaml | 38 +++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 11 deletions(-) create mode 100644 content/_index.en.md create mode 100644 themes/beautifulhugo/i18n/fr.yaml diff --git a/config.yaml b/config.yaml index f5384c3..de9f5a2 100644 --- a/config.yaml +++ b/config.yaml @@ -2,22 +2,18 @@ baseURL: "https://wiztigers.gitlab.io/hugo-template/" contentdir: "content" layoutdir: "layouts" publishdir: "public" -title: "Je suis sur le web !" canonifyURLs: true #relativeURLs: true #uglyURLs: true -defaultContentLanguage: "en" theme: "beautifulhugo" metaDataFormat: "yaml" pygmentsUseClasses: true pygmentCodeFences: true params: - subtitle: "J'étais capable de faire un site sans que je n'en susse rien ..." logo: "img/avatar-icon.png" favicon: "img/favicon.ico" - dateFormat: "January 2, 2006" commit: false rss: true comments: true @@ -67,3 +63,22 @@ menu: - name: "Catégories" url: "tags" weight: 3 + + + +defaultContentLanguage: "fr" +languages: + fr: + languageName: Français + weight: 1 + title: "Je suis sur le web !" + subtitle: "J'étais capable de faire un site sans que je n'en susse rien ..." + params: + dateFormat: "2/1/2006" + en: + languageName: English + weight: 2 + title: "I'm on the Interwebs!" + subtitle: "I was able to do it all along!" + params: + dateFormat: "2006-1-2" diff --git a/content/_index.en.md b/content/_index.en.md new file mode 100644 index 0000000..19cd277 --- /dev/null +++ b/content/_index.en.md @@ -0,0 +1,9 @@ +## Front Page Content + +This website is powered by [GitLab Pages](https://about.gitlab.com/features/pages/) +/ [Hugo](https://gohugo.io) and can be built in under 1 minute. +Literally. It uses the `beautifulhugo` theme which supports content on your front page. +Edit `/content/_index.md` to change what appears here. Delete `/content/_index.md` +if you don't want any content here. + +Head over to the [GitLab project](https://gitlab.com/pages/hugo) to get started. diff --git a/content/_index.md b/content/_index.md index 19cd277..0fa2ab1 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,9 +1,8 @@ -## Front Page Content +## Bienvenue ! -This website is powered by [GitLab Pages](https://about.gitlab.com/features/pages/) -/ [Hugo](https://gohugo.io) and can be built in under 1 minute. -Literally. It uses the `beautifulhugo` theme which supports content on your front page. -Edit `/content/_index.md` to change what appears here. Delete `/content/_index.md` -if you don't want any content here. +Ce site web est construit grâce à [GitLab Pages](https://about.gitlab.com/features/pages/) +et [Hugo](https://gohugo.io) et peut être construit très rapidement. +Par vous ! +Modifiez le fichier `/content/_index.md` pour changer ce qui apparait ici. -Head over to the [GitLab project](https://gitlab.com/pages/hugo) to get started. +Pour plus de renseignements, rendez-vous sur ce [projet GitLab](https://gitlab.com/pages/hugo) ! diff --git a/themes/beautifulhugo/i18n/fr.yaml b/themes/beautifulhugo/i18n/fr.yaml new file mode 100644 index 0000000..2375163 --- /dev/null +++ b/themes/beautifulhugo/i18n/fr.yaml @@ -0,0 +1,38 @@ +# Content +- id: postedOnDate + translation: "Publié le {{ .Count }}" +- id: translationsLabel + translation: "Autres langues: " +- id: translationsSeparator + translation: ", " +- id: readMore + translation: "Lire la suite" +- id: olderPosts + translation: "Articles plus anciens" +- id: newerPosts + translation: "Articles plus récents" +- id: previousPost + translation: "Article précédent" +- id: nextPost + translation: "Article suivant" + +# 404 page +- id: pageNotFound + translation: "Oups, cette page n'existe pas ! (Erreur 404)" + +# Footer +- id: poweredBy + translation: 'Site réalisé avec <a href="http://gohugo.io">Hugo v{{ .Hugo.Version }}</a> • Thème par <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adapté à <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>' + +# Navigation +- id: toggleNavigation + translation: "Toggle navigation" +- id: languageSwitcherLabel + translation: "Langue" +- id: gcseLabelShort + translation: "Rechercher" +- id: gcseLabelLong + translation: "Rechercher {{ .Site.Title }}" +- id: gcseClose + translation: "Fermer" + -- GitLab