From f6e08ef4a3ea26c0be3c78941ee49d8b708bce55 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sat, 15 Jun 2019 14:26:34 +0200 Subject: [PATCH] Added Slovenian translations --- CHANGELOG | 4 +++ README.md | 2 +- docs/getting-started.md | 7 +++-- docs/index.md | 2 +- material/base.html | 2 +- material/partials/language/si.html | 4 +++ material/partials/language/zh.html | 2 +- src/partials/language/si.html | 42 ++++++++++++++++++++++++++++++ 8 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 material/partials/language/si.html create mode 100644 src/partials/language/si.html diff --git a/CHANGELOG b/CHANGELOG index 367a954ee..d2b712316 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +mkdocs-material-4.x.x (2019-06-15) + + * Added Slovenian translations + mkdocs-material-4.3.1 (2019-05-23) * Fixed spelling error in Danish translations diff --git a/README.md b/README.md index ec148ff80..5e54ceeb5 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ theme: ## What to expect * Responsive design and fluid layout for all kinds of screens and devices, - designed to serve your project documentation in a user-friendly way in 36 + designed to serve your project documentation in a user-friendly way in 37 languages with optimal readability. * Easily customizable primary and accent color, fonts, favicon and logo; diff --git a/docs/getting-started.md b/docs/getting-started.md index 901d0bedb..52a74bed2 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -359,16 +359,15 @@ translations for all template variables and labels in the following languages: sk / Slovak + si / Slovenian es / Spanish sv / Swedish - tr / Turkish + tr / Turkish uk / Ukrainian vi / Vietnamese - - zh / Chinese (Simplified) - + zh / Chinese (Simplified) diff --git a/docs/index.md b/docs/index.md index 3759fc78e..669108bb4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -29,7 +29,7 @@ theme: ## What to expect * Responsive design and fluid layout for all kinds of screens and devices, - designed to serve your project documentation in a user-friendly way in 36 + designed to serve your project documentation in a user-friendly way in 37 languages with optimal readability. * Easily customizable primary and accent color, fonts, favicon and logo; diff --git a/material/base.html b/material/base.html index f6427ed42..4c46d2eac 100644 --- a/material/base.html +++ b/material/base.html @@ -4,4 +4,4 @@ {%- import "partials/language.html" as lang with context -%} {%- set feature = config.theme.feature -%} {%- set palette = config.theme.palette -%} {%- set font = config.theme.font -%}{%- block site_meta -%}{%- if page and page.meta and page.meta.description -%}{%- elif config.site_description -%}{%- endif -%} {%- if page and page.meta and page.meta.redirect -%}{%- elif page.canonical_url -%}{%- endif -%} {%- if page and page.meta and page.meta.author -%}{%- elif config.site_author -%}{%- endif -%} {%- for key in [ "clipboard.copy", "clipboard.copied", "search.language", "search.pipeline.stopwords", "search.pipeline.trimmer", "search.result.none", "search.result.one", "search.result.other", "search.tokenizer" ] -%}{%- endfor -%}{%- endblock -%} {%- block htmltitle -%} {%- if page and page.meta and page.meta.title -%}{{ page.meta.title }}{%- elif page and page.title and not page.is_homepage -%}{{ page.title }} - {{ config.site_name }}{%- else -%}{{ config.site_name }}{%- endif -%} {%- endblock -%} {%- block styles -%}{%- if palette.primary or palette.accent -%}{%- endif -%} {%- if palette.primary -%} {%- import "partials/palette.html" as map -%} {%- set primary = map.primary( palette.primary | replace(" ", "-") | lower ) -%}{%- endif -%} {%- endblock -%} {%- block libs -%}{%- endblock -%} {%- block fonts -%} {%- if font != false -%}{%- endif -%} {%- endblock -%}{%- if config.extra.manifest -%}{%- endif -%} {%- for path in config["extra_css"] -%}{%- endfor -%} {%- block analytics -%} {%- if config.google_analytics -%} {%- include "partials/integrations/analytics.html" -%} {%- endif -%} {%- endblock -%} {%- block extrahead -%}{%- endblock -%}{%- if palette.primary or palette.accent -%} {%- set primary = palette.primary | replace(" ", "-") | lower -%} {%- set accent = palette.accent | replace(" ", "-") | lower -%}{%- else -%}{%- endif -%} {%- set platform = config.extra.repo_icon or config.repo_url -%} {%- if "github" in platform -%} {%- include "assets/images/icons/github.f0b8504a.svg" -%} {%- elif "gitlab" in platform -%} {%- include "assets/images/icons/gitlab.6dd19c00.svg" -%} {%- elif "bitbucket" in platform -%} {%- include "assets/images/icons/bitbucket.1b09e088.svg" -%} {%- endif -%} {%- if page.toc | first is defined -%} {{ lang.t('skip.link.title') }} {%- endif -%} {%- block header -%} {%- include "partials/header.html" -%} {%- endblock -%}
{%- block hero -%} {%- if page and page.meta and page.meta.hero -%} {%- include "partials/hero.html" with context -%} {%- endif -%} {%- endblock -%} {%- if feature.tabs -%} {%- include "partials/tabs.html" -%} {%- endif -%}
{%- block site_nav -%} {%- if nav -%}
{%- include "partials/nav.html" -%}
{%- endif -%} {%- if page.toc -%}
{%- include "partials/toc.html" -%}
{%- endif -%} {%- endblock -%}
{%- block content -%} {%- if page.edit_url -%} {%- endif -%} {%- if not "\x3ch1" in page.content -%}

{{ page.title | default(config.site_name, true)}}

{%- endif -%} {{ page.content }} {%- block source -%} {%- if page and page.meta and page.meta.source -%}

{{ lang.t("meta.source") }}

{%- set repo = config.repo_url -%} {%- if repo | last == "/" -%} {%- set repo = repo[:-1] -%} {%- endif -%} {%- set path = page.meta.path | default([""]) -%} {%- set file = page.meta.source -%} {{ file }} {%- endif -%} {%- endblock -%} {%- endblock -%} {%- block disqus -%} {%- include "partials/integrations/disqus.html" -%} {%- endblock -%}
{%- block footer -%} {%- include "partials/footer.html" -%} {%- endblock -%}
{%- block scripts -%}{%- if lang.t("search.language") != "en" -%} {%- set languages = lang.t("search.language").split(",") -%} {%- if languages | length and languages[0] != "" -%} {%- set path = "assets/javascripts/lunr/" -%}{%- for language in languages | map("trim") -%} {%- if language != "en" -%} {%- if language == "ja" -%}{%- endif -%} {%- if language in ("da", "de", "es", "fi", "fr", "hu", "it", "ja", "nl", "no", "pt", "ro", "ru", "sv", "th", "tr") -%}{%- endif -%} {%- endif -%} {%- endfor -%} {%- if languages | length > 1 -%}{%- endif -%} {%- endif -%} {%- endif -%}{%- for path in config["extra_javascript"] -%}{%- endfor -%} {%- endblock -%} \ No newline at end of file + }}&display=fallback">{%- endif -%} {%- endblock -%}{%- if config.extra.manifest -%}{%- endif -%} {%- for path in config["extra_css"] -%}{%- endfor -%} {%- block analytics -%} {%- if config.google_analytics -%} {%- include "partials/integrations/analytics.html" -%} {%- endif -%} {%- endblock -%} {%- block extrahead -%}{%- endblock -%}{%- if palette.primary or palette.accent -%} {%- set primary = palette.primary | replace(" ", "-") | lower -%} {%- set accent = palette.accent | replace(" ", "-") | lower -%}{%- else -%}{%- endif -%} {%- set platform = config.extra.repo_icon or config.repo_url -%} {%- if "github" in platform -%} {%- include "assets/images/icons/github.f0b8504a.svg" -%} {%- elif "gitlab" in platform -%} {%- include "assets/images/icons/gitlab.6dd19c00.svg" -%} {%- elif "bitbucket" in platform -%} {%- include "assets/images/icons/bitbucket.1b09e088.svg" -%} {%- endif -%} {%- if page.toc | first is defined -%} {{ lang.t('skip.link.title') }} {%- endif -%} {%- block header -%} {%- include "partials/header.html" -%} {%- endblock -%}
{%- block hero -%} {%- if page and page.meta and page.meta.hero -%} {%- include "partials/hero.html" with context -%} {%- endif -%} {%- endblock -%} {%- if feature.tabs -%} {%- include "partials/tabs.html" -%} {%- endif -%}
{%- block site_nav -%} {%- if nav -%}
{%- include "partials/nav.html" -%}
{%- endif -%} {%- if page.toc -%}
{%- include "partials/toc.html" -%}
{%- endif -%} {%- endblock -%}
{%- block content -%} {%- if page.edit_url -%} {%- endif -%} {%- if not "\x3ch1" in page.content -%}

{{ page.title | default(config.site_name, true)}}

{%- endif -%} {{ page.content }} {%- block source -%} {%- if page and page.meta and page.meta.source -%}

{{ lang.t("meta.source") }}

{%- set repo = config.repo_url -%} {%- if repo | last == "/" -%} {%- set repo = repo[:-1] -%} {%- endif -%} {%- set path = page.meta.path | default([""]) -%} {%- set file = page.meta.source -%} {{ file }} {%- endif -%} {%- endblock -%} {%- endblock -%} {%- block disqus -%} {%- include "partials/integrations/disqus.html" -%} {%- endblock -%}
{%- block footer -%} {%- include "partials/footer.html" -%} {%- endblock -%}
{%- block scripts -%}{%- if lang.t("search.language") != "en" -%} {%- set languages = lang.t("search.language").split(",") -%} {%- if languages | length and languages[0] != "" -%} {%- set path = "assets/javascripts/lunr/" -%}{%- for language in languages | map("trim") -%} {%- if language != "en" -%} {%- if language == "ja" -%}{%- endif -%} {%- if language in ("da", "de", "es", "fi", "fr", "hu", "it", "ja", "nl", "no", "pt", "ro", "ru", "sv", "th", "tr") -%}{%- endif -%} {%- endif -%} {%- endfor -%} {%- if languages | length > 1 -%}{%- endif -%} {%- endif -%} {%- endif -%}{%- for path in config["extra_javascript"] -%}{%- endfor -%} {%- endblock -%} \ No newline at end of file diff --git a/material/partials/language/si.html b/material/partials/language/si.html new file mode 100644 index 000000000..21f177568 --- /dev/null +++ b/material/partials/language/si.html @@ -0,0 +1,4 @@ +{#- + This file was automatically generated - do not edit +-#} +{% macro t(key) %}{{ { "language": "si", "clipboard.copy": "Kopiraj v odložišče", "clipboard.copied": "Kopirano v odložišče", "edit.link.title": "Uredi stran", "footer.previous": "Prejšnja stran", "footer.next": "Naslednja stran", "meta.comments": "Komentarji", "meta.source": "Izvorna koda", "search.language": "sk", "search.placeholder": "Išči", "search.result.placeholder": "Vpiši iskalni niz", "search.result.none": "Ni zadetkov", "search.result.one": "1 zadetek", "search.result.other": "# zadetkov", "skip.link.title": "Skoči na vsebino", "source.link.title": "Pojdi na repozitorij", "toc.title": "Kazalo" }[key] }}{% endmacro %} \ No newline at end of file diff --git a/material/partials/language/zh.html b/material/partials/language/zh.html index a9bd7b6bc..6a447f854 100644 --- a/material/partials/language/zh.html +++ b/material/partials/language/zh.html @@ -1,4 +1,4 @@ {#- This file was automatically generated - do not edit -#} -{% macro t(key) %}{{ { "language": "zh", "clipboard.copy": "复制", "clipboard.copied": "已复制", "edit.link.title": "编辑此页", "footer.previous": "后退", "footer.next": "前进", "meta.comments": "评论", "meta.source": "来源", "search.language": "ja", "search.placeholder": "搜索", "search.result.placeholder": "键入以开始搜索", "search.result.none": "没有找到符合条件的结果", "search.result.one": "找到 1 个符合条件的结果", "search.result.other": "# 个符合条件的结果", "search.tokenizer": "[\,\。]+", "skip.link.title": "跳转至", "source.link.title": "前往 Github 仓库", "toc.title": "目录" }[key] }}{% endmacro %} \ No newline at end of file +{% macro t(key) %}{{ { "language": "zh", "clipboard.copy": "复制", "clipboard.copied": "已复制", "edit.link.title": "编辑此页", "footer.previous": "上一页", "footer.next": "下一页", "meta.comments": "评论", "meta.source": "来源", "search.language": "ja", "search.placeholder": "搜索", "search.result.placeholder": "键入以开始搜索", "search.result.none": "没有找到符合条件的结果", "search.result.one": "找到 1 个符合条件的结果", "search.result.other": "# 个符合条件的结果", "search.tokenizer": "[\,\。]+", "skip.link.title": "跳转至", "source.link.title": "前往 Github 仓库", "toc.title": "目录" }[key] }}{% endmacro %} \ No newline at end of file diff --git a/src/partials/language/si.html b/src/partials/language/si.html new file mode 100644 index 000000000..746e4fa85 --- /dev/null +++ b/src/partials/language/si.html @@ -0,0 +1,42 @@ + + + +{% macro t(key) %}{{ { + "language": "si", + "clipboard.copy": "Kopiraj v odložišče", + "clipboard.copied": "Kopirano v odložišče", + "edit.link.title": "Uredi stran", + "footer.previous": "Prejšnja stran", + "footer.next": "Naslednja stran", + "meta.comments": "Komentarji", + "meta.source": "Izvorna koda", + "search.language": "sk", + "search.placeholder": "Išči", + "search.result.placeholder": "Vpiši iskalni niz", + "search.result.none": "Ni zadetkov", + "search.result.one": "1 zadetek", + "search.result.other": "# zadetkov", + "skip.link.title": "Skoči na vsebino", + "source.link.title": "Pojdi na repozitorij", + "toc.title": "Kazalo" +}[key] }}{% endmacro %}