From b6fc85f68a0c545dc0281f9468a82d4229b057a8 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 18 Jan 2018 22:32:40 +0100 Subject: [PATCH] Added German translation for skip link --- CHANGELOG | 6 ++++++ docs/extensions/metadata.md | 4 ++-- docs/index.md | 2 +- material/partials/language.html | 3 ++- material/partials/language/de.html | 1 + src/partials/language.html | 5 ++++- src/partials/language/de.html | 1 + 7 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 003129891..2b7be7623 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +mkdocs-material-2.6.0 (2017-xx-xx) + + * Added permalink to main headline + * Added English as a fallback for missing translations + * Improved accessibility with skip-to-content link + mkdocs-material-2.5.0 (2017-01-13) * Added support for right-to-left languages diff --git a/docs/extensions/metadata.md b/docs/extensions/metadata.md index 1493fc0e5..179b80eb9 100644 --- a/docs/extensions/metadata.md +++ b/docs/extensions/metadata.md @@ -1,4 +1,4 @@ -hero: Yes, this is set via Metadata +hero: Metadata enables hero teaser texts path: tree/master/docs/extensions source: metadata.md @@ -46,7 +46,7 @@ Material exposes a simple text-only page-local hero via Metadata, as you can see on the current page when you scroll to the top. It's as simple as: ``` markdown -hero: Yes, this is set via Metadata +hero: Metadata enables hero teaser texts ``` ### Overriding the title diff --git a/docs/index.md b/docs/index.md index e615ae62b..331b66d10 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ # Material for MkDocs -## Beautiful project documentation +## Create beautiful project documentation Material is a theme for [MkDocs][1], an excellent static site generator geared towards project documentation. It is built using Google's [Material Design][2] diff --git a/material/partials/language.html b/material/partials/language.html index 278339b74..e29c46b1d 100644 --- a/material/partials/language.html +++ b/material/partials/language.html @@ -1,4 +1,5 @@ {% import "partials/language/" + config.theme.language + ".html" as lang %} +{% import "partials/language/en.html" as oops %} {% macro t(key) %}{{ { "search.language": ( config.extra.search | default({}) @@ -6,4 +7,4 @@ "search.tokenizer": ( config.extra.search | default({}) ).tokenizer | default("", true), -}[key] or lang.t(key) }}{% endmacro %} +}[key] or lang.t(key) or oops.t(key) }}{% endmacro %} diff --git a/material/partials/language/de.html b/material/partials/language/de.html index e5bbe53df..afa1ca18c 100644 --- a/material/partials/language/de.html +++ b/material/partials/language/de.html @@ -13,6 +13,7 @@ "search.result.one": "1 Suchergebnis", "search.result.other": "# Suchergebnisse", "search.tokenizer": "[\s\-]+", + "skip.link.title": "Zum Inhalt", "source.link.title": "Quellcode", "toc.title": "Inhaltsverzeichnis" }[key] }}{% endmacro %} diff --git a/src/partials/language.html b/src/partials/language.html index ca37268c8..9837461fb 100644 --- a/src/partials/language.html +++ b/src/partials/language.html @@ -23,6 +23,9 @@ {% import "partials/language/" + config.theme.language + ".html" as lang %} + +{% import "partials/language/en.html" as oops %} + {% macro t(key) %}{{ { "search.language": ( @@ -31,4 +34,4 @@ "search.tokenizer": ( config.extra.search | default({}) ).tokenizer | default("", true), -}[key] or lang.t(key) }}{% endmacro %} +}[key] or lang.t(key) or oops.t(key) }}{% endmacro %} diff --git a/src/partials/language/de.html b/src/partials/language/de.html index 73284298e..6c35493fe 100644 --- a/src/partials/language/de.html +++ b/src/partials/language/de.html @@ -36,6 +36,7 @@ "search.result.one": "1 Suchergebnis", "search.result.other": "# Suchergebnisse", "search.tokenizer": "[\s\-]+", + "skip.link.title": "Zum Inhalt", "source.link.title": "Quellcode", "toc.title": "Inhaltsverzeichnis" }[key] }}{% endmacro %}