Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ukrainian language support #2980

Merged
merged 2 commits into from
Sep 19, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/user-guide/choosing-your-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ supports the following options:
* `fa`: Persian (Farsi)
* `it`: Italian
* `tr_TR`: Turkish (Turkey)
* `uk`: Ukrainian

See the guide on [localizing your theme] for more information.

Expand Down Expand Up @@ -190,6 +191,7 @@ theme supports the following options:
* `fa`: Persian (Farsi)
* `it`: Italian
* `tr_TR`: Turkish (Turkey)
* `uk`: Ukrainian

See the guide on [localizing your theme] for more information.

Expand Down
2 changes: 2 additions & 0 deletions mkdocs/contrib/search/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ class LangOption(config_options.OptionallyRequired):
"""Validate Language(s) provided in config are known languages."""

def get_lunr_supported_lang(self, lang):
fallback = {'uk': 'ru'}
for lang_part in lang.split("_"):
lang_part = lang_part.lower()
lang_part = fallback.get(lang_part, lang_part)
if os.path.isfile(os.path.join(base_path, 'lunr-language', f'lunr.{lang_part}.js')):
return lang_part

Expand Down
101 changes: 101 additions & 0 deletions mkdocs/themes/mkdocs/locales/uk/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Ukrainian translations for MkDocs.
# Copyright (C) 2022 MkDocs
# This file is distributed under the same license as the MkDocs project.
#
msgid ""
msgstr ""
"Project-Id-Version: MkDocs 1.3.1\n"
"Report-Msgid-Bugs-To: \"https://github.com/mkdocs/mkdocs/issues\"\n"
"POT-Creation-Date: 2022-08-15 17:05+0200\n"
"PO-Revision-Date: 2022-09-17 15:51+0200\n"
"Last-Translator: Oleh Prypin <@oprypin>\n"
"Language: uk\n"
"Language-Team: uk <LL@li.org>\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.3\n"

#: mkdocs/themes/mkdocs/404.html:8
msgid "Page not found"
msgstr "Сторінку не знайдено"

#: mkdocs/themes/mkdocs/base.html:116
#: mkdocs/themes/mkdocs/keyboard-modal.html:31
#: mkdocs/themes/mkdocs/search-modal.html:5
msgid "Search"
msgstr "Пошук"

#: mkdocs/themes/mkdocs/base.html:126
msgid "Previous"
msgstr "Назад"

#: mkdocs/themes/mkdocs/base.html:131
msgid "Next"
msgstr "Вперед"

#: mkdocs/themes/mkdocs/base.html:142 mkdocs/themes/mkdocs/base.html:144
#: mkdocs/themes/mkdocs/base.html:146 mkdocs/themes/mkdocs/base.html:148
#, python-format
msgid "Edit on %(repo_name)s"
msgstr "Редагувати в %(repo_name)s"

#: mkdocs/themes/mkdocs/base.html:150
msgid "Edit"
msgstr "Редагувати"

#: mkdocs/themes/mkdocs/base.html:190
#, python-format
msgid "Documentation built with %(mkdocs_link)s."
msgstr "Документація збудована з %(mkdocs_link)s."

#: mkdocs/themes/mkdocs/keyboard-modal.html:5
msgid "Keyboard Shortcuts"
msgstr "Комбінації клавіш"

#: mkdocs/themes/mkdocs/keyboard-modal.html:6
#: mkdocs/themes/mkdocs/search-modal.html:6
msgid "Close"
msgstr "Закрити"

#: mkdocs/themes/mkdocs/keyboard-modal.html:12
msgid "Keys"
msgstr "Клавіші"

#: mkdocs/themes/mkdocs/keyboard-modal.html:13
msgid "Action"
msgstr "Дія"

#: mkdocs/themes/mkdocs/keyboard-modal.html:19
msgid "Open this help"
msgstr "Відкрити цю довідку"

#: mkdocs/themes/mkdocs/keyboard-modal.html:23
msgid "Next page"
msgstr "Наступна сторінка"

#: mkdocs/themes/mkdocs/keyboard-modal.html:27
msgid "Previous page"
msgstr "Попередня сторінка"

#: mkdocs/themes/mkdocs/search-modal.html:9
msgid "From here you can search these documents. Enter your search terms below."
msgstr "Звідси ви можете шукати документи. Введіть пошуковий запит знизу."

#: mkdocs/themes/mkdocs/search-modal.html:12
msgid "Search..."
msgstr "Пошук..."

#: mkdocs/themes/mkdocs/search-modal.html:12
msgid "Type search term here"
msgstr "Введіть пошуковий запит"

#: mkdocs/themes/mkdocs/search-modal.html:15
msgid "No results found"
msgstr "Нічого не знайдено"

#: mkdocs/themes/mkdocs/toc.html:3
msgid "Table of Contents"
msgstr "Зміст"
110 changes: 110 additions & 0 deletions mkdocs/themes/readthedocs/locales/uk/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Ukrainian translations for MkDocs.
# Copyright (C) 2022 MkDocs
# This file is distributed under the same license as the MkDocs project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
#
msgid ""
msgstr ""
"Project-Id-Version: MkDocs 1.3.1\n"
"Report-Msgid-Bugs-To: \"https://github.com/mkdocs/mkdocs/issues\"\n"
"POT-Creation-Date: 2022-08-15 17:05+0200\n"
"PO-Revision-Date: 2022-09-17 15:51+0200\n"
"Last-Translator: Oleh Prypin <@oprypin>\n"
"Language: uk\n"
"Language-Team: uk <LL@li.org>\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.3\n"

#: mkdocs/themes/readthedocs/404.html:7
msgid "Page not found"
msgstr "Сторінку не знайдено"

#: mkdocs/themes/readthedocs/base.html:97
msgid "Logo"
msgstr "Логотип"

#: mkdocs/themes/readthedocs/base.html:111
msgid "Navigation menu"
msgstr "Меню навігації"

#: mkdocs/themes/readthedocs/base.html:140
msgid "Mobile navigation menu"
msgstr "Мобільна версія меню"

#: mkdocs/themes/readthedocs/breadcrumbs.html:3
msgid "Docs"
msgstr "Документація"

#: mkdocs/themes/readthedocs/breadcrumbs.html:18
#: mkdocs/themes/readthedocs/breadcrumbs.html:20
#: mkdocs/themes/readthedocs/breadcrumbs.html:22
#: mkdocs/themes/readthedocs/breadcrumbs.html:24
#, python-format
msgid "Edit on %(repo_name)s"
msgstr "Редагувати в %(repo_name)s"

#: mkdocs/themes/readthedocs/breadcrumbs.html:26
msgid "Edit"
msgstr "Редагувати"

#: mkdocs/themes/readthedocs/breadcrumbs.html:34
msgid "Breadcrumb Navigation"
msgstr "Навігаційна стежка"

#: mkdocs/themes/readthedocs/breadcrumbs.html:36
#: mkdocs/themes/readthedocs/footer.html:7
#: mkdocs/themes/readthedocs/versions.html:17
msgid "Previous"
msgstr "Назад"

#: mkdocs/themes/readthedocs/breadcrumbs.html:39
#: mkdocs/themes/readthedocs/footer.html:10
#: mkdocs/themes/readthedocs/versions.html:20
msgid "Next"
msgstr "Вперед"

#: mkdocs/themes/readthedocs/footer.html:5
msgid "Footer Navigation"
msgstr "Нижнє меню навігації"

#: mkdocs/themes/readthedocs/footer.html:25
#, python-format
msgid ""
"Built with %(mkdocs_link)s using a %(sphinx_link)s provided by "
"%(rtd_link)s."
msgstr ""
"Зібрано у %(mkdocs_link)s з використанням %(sphinx_link)s від "
"%(rtd_link)s."

#: mkdocs/themes/readthedocs/search.html:5
msgid "Search Results"
msgstr "Результати пошуку"

#: mkdocs/themes/readthedocs/search.html:9
msgid "Search the Docs"
msgstr "Пошук у документах"

#: mkdocs/themes/readthedocs/search.html:9
#: mkdocs/themes/readthedocs/searchbox.html:3
msgid "Type search term here"
msgstr "Введіть пошуковий запит"

#: mkdocs/themes/readthedocs/search.html:12
msgid "No results found"
msgstr "Нічого не знайдено"

#: mkdocs/themes/readthedocs/search.html:13
msgid "Searching..."
msgstr "Пошук..."

#: mkdocs/themes/readthedocs/searchbox.html:3
msgid "Search docs"
msgstr "Пошук у документації"

#: mkdocs/themes/readthedocs/versions.html:1
msgid "Versions"
msgstr "Версії"