Skip to content

Enable i18n for "Home" link in site navigation #2312

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

Merged
merged 1 commit into from
Dec 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions _data/locales/bg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: най-добрият приятел на програмиста

sitelinks:
- text: Home
url: /bg
home: true
- text: За сваляне
url: /bg/downloads
- text: Документация
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: Der beste Freund eines Programmierers

sitelinks:
- text: Home
url: /de
home: true
- text: Downloads
url: /de/downloads
- text: Dokumentation
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: A Programmer's Best Friend

sitelinks:
- text: Home
url: /en
home: true
- text: Downloads
url: /en/downloads
- text: Documentation
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: El mejor amigo de un desarrollador

sitelinks:
- text: Home
url: /es
home: true
- text: Descargas
url: /es/downloads
- text: Documentación
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: A Programmer's Best Friend

sitelinks:
- text: Home
url: /fr
home: true
- text: Téléchargements
url: /fr/downloads
- text: Documentation
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: Sahabat Terbaik Programmer

sitelinks:
- text: Home
url: /id
home: true
- text: Unduh
url: /id/downloads
- text: Dokumentasi
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: Il migliore amico dei programmatori

sitelinks:
- text: Home
url: /it
home: true
- text: Scarica
url: /it/downloads
- text: Documentazione
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: A Programmer's Best Friend

sitelinks:
- text: Home
url: /ja
home: true
- text: ダウンロード
url: /ja/downloads
- text: ドキュメント
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/ko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: 루비
slogan: 프로그래머의 단짝 친구

sitelinks:
- text: Home
url: /ko
home: true
- text: 다운로드
url: /ko/downloads
- text: 문서
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/pl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: Najlepszy Przyjaciel Programisty

sitelinks:
- text: Home
url: /pl
home: true
- text: Pobierz
url: /pl/downloads
- text: Dokumentacja
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: O melhor amigo do programador

sitelinks:
- text: Home
url: /pt
home: true
- text: Downloads
url: /pt/downloads
- text: Documentação
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: лучший друг программиста

sitelinks:
- text: Home
url: /ru
home: true
- text: Скачать
url: /ru/downloads
- text: Документация
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/tr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: BİR PROGRAMCININ EN İYİ ARKADAŞI

sitelinks:
- text: Home
url: /tr
home: true
- text: İndirin
url: /tr/downloads
- text: Belgeler
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/vi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: Người bạn tri kỉ của lập trình viên

sitelinks:
- text: Home
url: /vi
home: true
- text: Downloads
url: /vi/downloads
- text: Tài liệu
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/zh_cn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: 程序员最好的朋友

sitelinks:
- text: Home
url: /zh_cn
home: true
- text: 下载
url: /zh_cn/downloads
- text: 文档
Expand Down
3 changes: 3 additions & 0 deletions _data/locales/zh_tw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ruby: Ruby
slogan: 程式設計師的摯友

sitelinks:
- text: Home
url: /zh_tw
home: true
- text: 下載安裝
url: /zh_tw/downloads
- text: 文件
Expand Down
2 changes: 1 addition & 1 deletion _includes/sitelinks.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
{% assign sitelinks = site.data.locales['en'].sitelinks %}
{% endif %}
{% for link in sitelinks %}
<a href="{{ link.url }}/">{{ link.text }}</a>
<a href="{{ link.url }}/"{% if link.home %} class="home"{% endif %}>{{ link.text }}</a>
{% endfor %}
1 change: 0 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ <h2>{{ site.data.locales[page.lang].slogan }}</h2>
</a>

<div class="site-links">
<a href="/{{ page.lang }}/" class="home">Home</a>
{% include sitelinks.html %}
<a href="#" class="menu selected">Menu</a>
</div>
Expand Down
5 changes: 3 additions & 2 deletions stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,9 @@ div.post h3 a:hover { text-decoration: underline; }
font-size: 15px;
}

#header div.site-links a.menu,
#header div.site-links a.home { display: none; }
#header div.site-links a.home,
#footer div.site-links a.home,
#header div.site-links a.menu { display: none; }

#header div.site-links a.selected {
color: white;
Expand Down