-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(i18n): set the global default locales to "en" (#979)
Avoid missing labels caused by languages outside of locales.
- Loading branch information
Showing
23 changed files
with
423 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% comment %} | ||
Detect appearance language and return it through variable "lang" | ||
{% endcomment %} | ||
{% if site.data.locales[site.lang] %} | ||
{% assign lang = site.lang %} | ||
{% else %} | ||
{% assign lang = 'en' %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,37 @@ | ||
<!-- | ||
Navigation buttons at the bottom of the post. | ||
--> | ||
<!-- Navigation buttons at the bottom of the post. --> | ||
|
||
<div class="post-navigation d-flex justify-content-between"> | ||
{% if page.previous.url %} | ||
<a href="{{ site.baseurl }}{{ page.previous.url }}" class="btn btn-outline-primary" | ||
prompt="{{ site.data.locales[site.lang].post.button.previous }}"> | ||
<p>{{ page.previous.title }}</p> | ||
</a> | ||
<a | ||
href="{{ site.baseurl }}{{ page.previous.url }}" | ||
class="btn btn-outline-primary" | ||
prompt="{{ site.data.locales[include.lang].post.button.previous }}" | ||
> | ||
<p>{{ page.previous.title }}</p> | ||
</a> | ||
{% else %} | ||
<div class="btn btn-outline-primary disabled" | ||
prompt="{{ site.data.locales[site.lang].post.button.previous }}"> | ||
<p>-</p> | ||
</div> | ||
<div | ||
class="btn btn-outline-primary disabled" | ||
prompt="{{ site.data.locales[include.lang].post.button.previous }}" | ||
> | ||
<p>-</p> | ||
</div> | ||
{% endif %} | ||
|
||
{% if page.next.url %} | ||
<a href="{{ site.baseurl }}{{page.next.url}}" class="btn btn-outline-primary" | ||
prompt="{{ site.data.locales[site.lang].post.button.next }}"> | ||
<p>{{ page.next.title }}</p> | ||
</a> | ||
<a | ||
href="{{ site.baseurl }}{{page.next.url}}" | ||
class="btn btn-outline-primary" | ||
prompt="{{ site.data.locales[include.lang].post.button.next }}" | ||
> | ||
<p>{{ page.next.title }}</p> | ||
</a> | ||
{% else %} | ||
<div class="btn btn-outline-primary disabled" | ||
prompt="{{ site.data.locales[site.lang].post.button.next }}"> | ||
<p>-</p> | ||
</div> | ||
<div | ||
class="btn btn-outline-primary disabled" | ||
prompt="{{ site.data.locales[include.lang].post.button.next }}" | ||
> | ||
<p>-</p> | ||
</div> | ||
{% endif %} | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
<!-- | ||
Post sharing snippet | ||
--> | ||
<!-- Post sharing snippet --> | ||
|
||
<div class="share-wrapper"> | ||
<span class="share-label text-muted mr-1">{{ site.data.locales[site.lang].post.share }}</span> | ||
<span class="share-label text-muted mr-1">{{ site.data.locales[include.lang].post.share }}</span> | ||
<span class="share-icons"> | ||
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %} | ||
{% assign title = title | uri_escape %} | ||
{% assign url = page.url | absolute_url | url_encode %} | ||
|
||
{% for share in site.data.share.platforms %} | ||
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %} | ||
<a href="{{ link }}" data-toggle="tooltip" data-placement="top" | ||
title="{{ share.type }}" target="_blank" rel="noopener" aria-label="{{ share.type }}"> | ||
<i class="fa-fw {{ share.icon }}"></i> | ||
</a> | ||
<a | ||
href="{{ link }}" | ||
data-toggle="tooltip" | ||
data-placement="top" | ||
title="{{ share.type }}" | ||
target="_blank" | ||
rel="noopener" | ||
aria-label="{{ share.type }}" | ||
> | ||
<i class="fa-fw {{ share.icon }}"></i> | ||
</a> | ||
{% endfor %} | ||
|
||
<i id="copy-link" class="fa-fw fas fa-link small" | ||
data-toggle="tooltip" data-placement="top" | ||
title="{{ site.data.locales[site.lang].post.button.share_link.title }}" | ||
data-title-succeed="{{ site.data.locales[site.lang].post.button.share_link.succeed }}"> | ||
<i | ||
id="copy-link" | ||
class="fa-fw fas fa-link small" | ||
data-toggle="tooltip" | ||
data-placement="top" | ||
title="{{ site.data.locales[include.lang].post.button.share_link.title }}" | ||
data-title-succeed="{{ site.data.locales[include.lang].post.button.share_link.succeed }}" | ||
> | ||
</i> | ||
|
||
</span> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.