diff options
author | Dmytro Slupytskyi <dslupytskyi@gmail.com> | 2017-08-31 09:46:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-31 09:46:16 +0300 |
commit | 63507fbc4b65b9054ffcb11679e03b08ae72506d (patch) | |
tree | 7d74789d475aeaa3c214ac61bdcea9fdf80808d2 | |
parent | b0c1a50ce6c8e972e55482197d4963755e21dd77 (diff) | |
parent | 24974957fb759131a6239b4a2cc4bfe1eb63d887 (diff) |
Merge pull request #14 from azmelanar/language-menu
Proper translation of navigation
-rw-r--r-- | exampleSite/content/about.ru.md | 9 | ||||
-rw-r--r-- | exampleSite/content/contact.ru.md | 15 | ||||
-rw-r--r-- | i18n/en.toml | 11 | ||||
-rw-r--r-- | i18n/ru.toml | 11 | ||||
-rw-r--r-- | layouts/partials/navigation.html | 8 |
5 files changed, 50 insertions, 4 deletions
diff --git a/exampleSite/content/about.ru.md b/exampleSite/content/about.ru.md new file mode 100644 index 0000000..b325654 --- /dev/null +++ b/exampleSite/content/about.ru.md @@ -0,0 +1,9 @@ ++++ +date = "2014-11-08T16:42:18+04:00" +draft = false +title = "О нас" +slug = "about" + ++++ + +Пару слов о проекте. diff --git a/exampleSite/content/contact.ru.md b/exampleSite/content/contact.ru.md new file mode 100644 index 0000000..b717b53 --- /dev/null +++ b/exampleSite/content/contact.ru.md @@ -0,0 +1,15 @@ ++++ +date = "2014-11-09T13:49:44+04:00" +draft = true +title = "Контакты" +slug = "contact" + ++++ + +<div class="py2"> + <form action="//formspree.io/your@email.address" method="POST" class="form-stacked form-light"> + <input type="text" name="email" class="input mobile-block" placeholder="Почтовый адрес"> + <textarea type="text" name="content" class="input mobile-block" rows="5" placeholder="Чтобы вы хотели сказать?"></textarea> + <input type="submit" class="button button-blue button-big mobile-block" value="Отправить"> + </form> +</div> diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..92dab17 --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,11 @@ +[about] +other = "About" + +[contact] +other = "Contact" + +[tags] +other = "Tags" + +[search] +other = "Search" diff --git a/i18n/ru.toml b/i18n/ru.toml new file mode 100644 index 0000000..7106711 --- /dev/null +++ b/i18n/ru.toml @@ -0,0 +1,11 @@ +[about] +other = "О нас" + +[contact] +other = "Контакты" + +[tags] +other = "Теги" + +[search] +other = "Поиск" diff --git a/layouts/partials/navigation.html b/layouts/partials/navigation.html index d15568e..8ba1dc0 100644 --- a/layouts/partials/navigation.html +++ b/layouts/partials/navigation.html @@ -1,6 +1,6 @@ -<a href="/about/">About</a> -<a href="/tags">Tags</a> -<a href="/contact/">Contact</a> +<a href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}/about/">{{ i18n "about" }}</a> +<a href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}/tags/">{{ i18n "tags" }}</a> +<a href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}/contact/">{{ i18n "contact" }}</a> {{- if .Site.IsMultiLingual -}} {{- range $lang := .Site.Languages -}} {{- if ne $.Site.Language $lang -}} @@ -11,6 +11,6 @@ {{ if isset .Site.Params "search_engine" }} <form class="navbar-search" action="{{ .Site.BaseURL }}/search/index.html" onsubmit="return validateForm(this.elements['q'].value);"> - <input type="text" class="search-query" placeholder="Search" name="q" id="tipue_search_input"> + <input type="text" class="search-query" placeholder="{{ i18n "search" }}" name="q" id="tipue_search_input"> {{ end }} </form> |