Added Russian translations

This commit is contained in:
squidfunk 2017-11-01 14:01:23 +01:00 committed by Martin Donath
parent f4dddaeeee
commit e8200730b3
7 changed files with 86 additions and 7 deletions

View File

@ -1,5 +1,6 @@
mkdocs-material-2.x.x (2017-xx-xx)
* Added Russian translations
* Fixed #553: meta title and description only renders first character
* Fixed favicon regression caused by deprecation upstream

View File

@ -163,6 +163,8 @@ See the guide on [customization][11] for more information.
#### Primary colors
> Default: `indigo`
Click on a tile to change the primary color of the theme:
<button data-md-color-primary="red">Red</button>
@ -196,6 +198,8 @@ Click on a tile to change the primary color of the theme:
#### Accent colors
> Default: `indigo`
Click on a tile to change the accent color of the theme:
<button data-md-color-accent="red">Red</button>
@ -226,6 +230,8 @@ Click on a tile to change the accent color of the theme:
### Font family
> Default: `Roboto` and `Roboto Mono`
By default the [Roboto font family][12] is included with the theme, specifically
the regular sans-serif type for text and the `monospaced` type for code. Both
fonts are loaded from [Google Fonts][13] and can be changed to other fonts,
@ -253,6 +259,8 @@ theme:
### Logo
> Default icon: `school`
Your logo should have rectangular shape with a minimum resolution of 128x128,
leave some room towards the edges and be composed of high contrast areas on a
transparent ground, as it will be placed on the colored header bar and drawer.
@ -278,11 +286,13 @@ theme:
#### Localization
> Default: `en`
Material for MkDocs supports internationalization (i18n) and provides
translations for all template variables and labels in English `en`, French `fr`,
German `de`, Spanish `es`, Italian `it`, Danish `da`, Polish `pl`, Norwegian
`no`, Swedish `sv`, Korean `kr`, Chinese (Simplified) `zh` and Chinese
(Traditional) `zh-Hant`. Specify the language with:
`no`, Swedish `sv`, Korean `kr`, Russian `ru`, Chinese (Simplified) `zh` and
Chinese (Traditional) `zh-Hant`. Specify the language with:
``` yaml
theme:
@ -305,6 +315,8 @@ Pull Request.
#### Site search
> Default: `en`
Site search is implemented using [lunr.js][17], which includes stemmers for the
English language by default, while stemmers for other languages are included
with [lunr-languages][18], both of which are integrated with this theme. Support
@ -345,6 +357,8 @@ extra:
### Favicon
> Default: `assets/images/favicon.png`
The default favicon can be changed by setting the `favicon` variable to an
`.ico` or image file:
@ -357,6 +371,8 @@ theme:
#### Tabs
> Default: `false`
Material supports another layer on top of the main navigation for larger
screens in the form of tabs. This is especially useful for larger documentation
projects with only few top-level sections. Tabs can be enabled by setting the
@ -472,9 +488,9 @@ automatically included.
## Migration
### From 1.x to 2.0
### From 1.x to 2.x
* Material for MkDocs 2.0 requires MkDocs 0.17.1, as this version introduced
* Material for MkDocs 2.x requires MkDocs 0.17.1, as this version introduced
changes to the way themes can define options. The following variables inside
your project's `mkdocs.yml` need to be renamed:
@ -483,6 +499,9 @@ automatically included.
* `extra.font` becomes `theme.font`
* `extra.logo` becomes `theme.logo`
* Favicon support has been dropped by MkDocs, it must now be defines in
`theme.favicon` (previously `site_favicon`).
* Localization is now separate in theme language and search language. While
there can only be a single language on theme-level, the search supports
multiple languages which can be separated by commas.

View File

@ -41,7 +41,7 @@ favicon: assets/images/favicon.png
# The logo of the documentation shown in the header and navigation can either
# be a Material Icon ligature or an image URL
logo:
icon: school
icon: "\uE80C"
# Material includes the search in the header as a partial, not as a separate
# template, so it's correct that search.html is missing
include_search_page: false

View File

@ -0,0 +1,18 @@
{% macro t(key) %}{{ {
"language": "ru",
"clipboard.copy": "Копировать в буфер",
"clipboard.copied": "Скопировано в буфер",
"edit.link.title": "Редактировать страницу",
"footer.previous": "Назад",
"footer.next": "Вперед",
"meta.comments": "Комментарии",
"meta.source": "Исходный код",
"search.placeholder": "Поиск",
"search.result.placeholder": "Начните печатать для поиска",
"search.result.none": "Совпадений не найдено",
"search.result.one": "Найдено 1 совпадение",
"search.result.other": "Найдено # совпадений",
"search.tokenizer": "[\s\-]+",
"source.link.title": "Перейти к репозиторию",
"toc.title": "Содержание"
}[key] }}{% endmacro %}

View File

@ -53,7 +53,7 @@ theme:
code: Roboto Mono
favicon: assets/images/favicon.png
logo:
icon: school
icon: "\uE80C"
# Options
extra:

View File

@ -55,7 +55,7 @@ favicon: assets/images/favicon.png
# The logo of the documentation shown in the header and navigation can either
# be a Material Icon ligature or an image URL
logo:
icon: school
icon: "\uE80C"
# Material includes the search in the header as a partial, not as a separate
# template, so it's correct that search.html is missing

View File

@ -0,0 +1,41 @@
<!--
Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->
<!-- Translation: Russian -->
{% macro t(key) %}{{ {
"language": "ru",
"clipboard.copy": "Копировать в буфер",
"clipboard.copied": "Скопировано в буфер",
"edit.link.title": "Редактировать страницу",
"footer.previous": "Назад",
"footer.next": "Вперед",
"meta.comments": "Комментарии",
"meta.source": "Исходный код",
"search.placeholder": "Поиск",
"search.result.placeholder": "Начните печатать для поиска",
"search.result.none": "Совпадений не найдено",
"search.result.one": "Найдено 1 совпадение",
"search.result.other": "Найдено # совпадений",
"search.tokenizer": "[\s\-]+",
"source.link.title": "Перейти к репозиторию",
"toc.title": "Содержание"
}[key] }}{% endmacro %}