Skip to content

Commit

Permalink
Merge branch 'master' into i18n-support
Browse files Browse the repository at this point in the history
  • Loading branch information
eko committed Oct 14, 2017
2 parents bac51f5 + 5f5f149 commit 1d2aa7a
Show file tree
Hide file tree
Showing 11 changed files with 444 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -7,7 +7,7 @@ gem 'rouge', '1.11.1'
gem 'jekyll-feed', '0.9.2'
gem 'scss_lint', require: false
gem 'elevenlabs-amp-jekyll', '1.1'
gem 'jekyll-multiple-languages-plugin', '1.5.1'
gem 'jekyll-multiple-languages-plugin', :git => "git://github.com/eko/jekyll-multiple-languages-plugin.git"

group :test do
gem 'rake'
Expand Down
8 changes: 7 additions & 1 deletion _i18n/en.yml
Expand Up @@ -7,4 +7,10 @@ global:
prev: Previous
continue_reading: Read article
newsletter_subscribe: Subscribe to our newsletter!
search_input: Search
search_input: Search
authors:
by: by
and: and
from_same_author: "From the same author:"
reading:
time: "Reading time:"
8 changes: 7 additions & 1 deletion _i18n/fr.yml
Expand Up @@ -7,4 +7,10 @@ global:
prev: Précédent
continue_reading: Lire l'article
newsletter_subscribe: Abonnez-vous à notre newsletter !
search_input: Rechercher
search_input: Rechercher
authors:
by: par
and: et
from_same_author: "Du même auteur :"
reading:
time: "Lecture :"
6 changes: 3 additions & 3 deletions _includes/author_link.html
@@ -1,5 +1,5 @@
<!-- _includes/author_link.html -->
- par
- {% translate authors.by %}

{% for author in include.authors %}
{% assign isFirstAuthor = forloop.first %}
Expand All @@ -9,11 +9,11 @@
{% if existingAuthor.login == author %}
{% if isFirstAuthor %}
{% elsif isLastAuthor %}
et
{% translate authors.and %}
{% else %}
,
{% endif %}
<a class="author-link" href="{{ '/authors/:author' | prepend: site.baseurl_root | replace: '//', '/' | replace: ':author', author }}">{{ existingAuthor.title }}</a>
<a class="author-link" href="{{ '/authors/:author' | prepend: site.baseurl | replace: '//', '/' | replace: ':author', author }}">{{ existingAuthor.title }}</a>
{% endif %}
{% endfor %}
{% endfor %}
4 changes: 2 additions & 2 deletions _includes/header.html
Expand Up @@ -18,8 +18,8 @@ <h1 class="site-title visually-hidden">
{% assign link = language %}
{% endif %}
<li>
<a class="page-link no-link-style" href="/{{ link }}">
<img src="/img/flags/{{ language }}.png" alt="{{ language }}" title="{{ language }}" />
<a class="page-link no-link-style" href="{{ site.baseurl_root }}/{{ link }}">
<img src="{{ site.baseurl_root }}/img/flags/{{ language }}.png" alt="{{ language }}" title="{{ language }}" />
</a>
</li>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions _includes/reading_time.html
@@ -1,8 +1,8 @@
<span class="reading-time" title="Estimated read time">
{% assign words = include.content | number_of_words %}
{% if words < 360 %}
lecture: 1 min
{% translate reading.time %} 1 min
{% else %}
lecture: {{ words | divided_by:180 }} mins
{% translate reading.time %} {{ words | divided_by:180 }} mins
{% endif %}
</span>
2 changes: 1 addition & 1 deletion _layouts/author.html
Expand Up @@ -22,7 +22,7 @@ <h1 class="page-heading-title">{{ page.title }}</h1>

<section class="slice">
<div class="read-also container">
<h3 class="read-also-title">Du même auteur :</h3>
<h3 class="read-also-title">{% translate authors.from_same_author %}</h3>
<ul class="posts read-also-list">
{% for post in site.posts %}
{% if post.authors contains page.login %}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="no-js">
<html class="no-js" lang="{{ site.lang }}">
<script type="text/javascript">
window.site = {
lang: '{{ site.lang }}',
Expand Down

0 comments on commit 1d2aa7a

Please sign in to comment.