git: 09db844c01 - main - Add message indicating that possibly the translation is obsolete
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 04 Mar 2023 12:07:34 UTC
The branch main has been updated by carlavilla: URL: https://cgit.FreeBSD.org/doc/commit/?id=09db844c018312d33dbe92806f2ed43418389b95 commit 09db844c018312d33dbe92806f2ed43418389b95 Author: Sergio Carlavilla Delgado <carlavilla@FreeBSD.org> AuthorDate: 2023-03-04 12:05:49 +0000 Commit: Sergio Carlavilla Delgado <carlavilla@FreeBSD.org> CommitDate: 2023-03-04 12:07:25 +0000 Add message indicating that possibly the translation is obsolete Approved by: doceng(implicit) --- documentation/themes/beastie/i18n/en.toml | 6 ++++++ documentation/themes/beastie/layouts/articles/list.html | 9 +++++++++ documentation/themes/beastie/layouts/articles/single.html | 9 +++++++++ documentation/themes/beastie/layouts/books/list.html | 13 +++++++++---- documentation/themes/beastie/layouts/books/single.html | 9 +++++++++ 5 files changed, 42 insertions(+), 4 deletions(-) diff --git a/documentation/themes/beastie/i18n/en.toml b/documentation/themes/beastie/i18n/en.toml index 38aad89d87..69fe0caa60 100644 --- a/documentation/themes/beastie/i18n/en.toml +++ b/documentation/themes/beastie/i18n/en.toml @@ -52,6 +52,12 @@ other = "by" [search] other = "Search" +[stale-warning-message] +other = "This translation may be out of date. To help with the translations please access the" + +[translation-instance] +other = "FreeBSD translations instance" + # --------------------------------------------------- # Header # --------------------------------------------------- diff --git a/documentation/themes/beastie/layouts/articles/list.html b/documentation/themes/beastie/layouts/articles/list.html index 5ef60849a6..deecb60507 100644 --- a/documentation/themes/beastie/layouts/articles/list.html +++ b/documentation/themes/beastie/layouts/articles/list.html @@ -2,6 +2,15 @@ <main class="main-wrapper-article"> <div class="article"> <h1 class="title">{{ .Title }}</h1> + {{ $siteLanguage := string $.Site.Language }} + {{ if ne $siteLanguage "en" }} + <div class="admonitionblock note"> + <p> + <i class="fa fa-exclamation-circle" aria-hidden="true"></i> + {{ i18n "stale-warning-message" }} <a href="https://translate-dev.freebsd.org/" target="_blank">{{ i18n "translation-instance" }}</a>. + </p> + </div> + {{ end }} {{ if .Params.subtitle }} <h3 class="subtitle">{{ .Params.subtitle }}</h3> {{ end }} diff --git a/documentation/themes/beastie/layouts/articles/single.html b/documentation/themes/beastie/layouts/articles/single.html index 5ef60849a6..deecb60507 100644 --- a/documentation/themes/beastie/layouts/articles/single.html +++ b/documentation/themes/beastie/layouts/articles/single.html @@ -2,6 +2,15 @@ <main class="main-wrapper-article"> <div class="article"> <h1 class="title">{{ .Title }}</h1> + {{ $siteLanguage := string $.Site.Language }} + {{ if ne $siteLanguage "en" }} + <div class="admonitionblock note"> + <p> + <i class="fa fa-exclamation-circle" aria-hidden="true"></i> + {{ i18n "stale-warning-message" }} <a href="https://translate-dev.freebsd.org/" target="_blank">{{ i18n "translation-instance" }}</a>. + </p> + </div> + {{ end }} {{ if .Params.subtitle }} <h3 class="subtitle">{{ .Params.subtitle }}</h3> {{ end }} diff --git a/documentation/themes/beastie/layouts/books/list.html b/documentation/themes/beastie/layouts/books/list.html index ea5653a6ed..2668a3de8a 100644 --- a/documentation/themes/beastie/layouts/books/list.html +++ b/documentation/themes/beastie/layouts/books/list.html @@ -24,6 +24,15 @@ </div> {{ end }} <h1 class="title">{{ .Title }}</h1> + {{ $siteLanguage := string $.Site.Language }} + {{ if ne $siteLanguage "en" }} + <div class="admonitionblock note"> + <p> + <i class="fa fa-exclamation-circle" aria-hidden="true"></i> + {{ i18n "stale-warning-message" }} <a href="https://translate-dev.freebsd.org/" target="_blank">{{ i18n "translation-instance" }}</a>. + </p> + </div> + {{ end }} {{ if .Params.copyright }} <div class="copyright"> Copyright © {{ .Params.copyright }} @@ -121,10 +130,6 @@ <h3>{{ i18n "resources" }}</h3> <ul class="contents"> {{ $pathSections := split .Page.File "/" }} - {{ if $.Site.Params.isOnline }} - {{ $singlePagePath := printf "%s/%s/book/" (index $pathSections 0) (index $pathSections 1) }} - <li><i class="fa fa fa-book" aria-hidden="true" title="{{ i18n "single-html" }}"></i><a href={{ $singlePagePath | absLangURL }}>{{ i18n "single-html" }}</a></li> - {{ end }} {{ $path := printf "%s/%s/%s_%s.pdf" (index $pathSections 0) (index $pathSections 1) (index $pathSections 1) $.Site.Home.Language }} {{ $pdfUrl := printf "%s%s/%s" $.Site.Params.downloadBaseUrl $.Site.Home.Language $path }} <li><i class="fa fa-file-pdf-o" aria-hidden="true" title="{{ i18n "download-pdf" }}"></i><a href="{{ $pdfUrl }}">{{ i18n "download-pdf" }}</a></li> diff --git a/documentation/themes/beastie/layouts/books/single.html b/documentation/themes/beastie/layouts/books/single.html index 70793376f1..2668a3de8a 100644 --- a/documentation/themes/beastie/layouts/books/single.html +++ b/documentation/themes/beastie/layouts/books/single.html @@ -24,6 +24,15 @@ </div> {{ end }} <h1 class="title">{{ .Title }}</h1> + {{ $siteLanguage := string $.Site.Language }} + {{ if ne $siteLanguage "en" }} + <div class="admonitionblock note"> + <p> + <i class="fa fa-exclamation-circle" aria-hidden="true"></i> + {{ i18n "stale-warning-message" }} <a href="https://translate-dev.freebsd.org/" target="_blank">{{ i18n "translation-instance" }}</a>. + </p> + </div> + {{ end }} {{ if .Params.copyright }} <div class="copyright"> Copyright © {{ .Params.copyright }}