From cc0b2665418d618c6bff62b2ff6ea69065a05811 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Fri, 29 Jul 2016 12:16:53 -0400 Subject: [PATCH] Add `en` default text to `site.locale` strings - Close #407 --- _includes/author-profile.html | 4 ++-- _includes/breadcrumbs.html | 6 +++--- _includes/category-list.html | 2 +- _includes/comments.html | 2 +- _includes/feature_row | 2 +- _includes/footer.html | 4 ++-- _includes/page__hero.html | 4 ++-- _includes/paginator.html | 10 +++++----- _includes/post_pagination.html | 8 ++++---- _includes/read-time.html | 8 ++++---- _includes/seo.html | 4 ++-- _includes/social-share.html | 10 +++++----- _includes/tag-list.html | 2 +- _layouts/single.html | 8 ++++---- index.html | 2 +- 15 files changed, 38 insertions(+), 38 deletions(-) diff --git a/_includes/author-profile.html b/_includes/author-profile.html index d07979f3..5fd8eecb 100644 --- a/_includes/author-profile.html +++ b/_includes/author-profile.html @@ -26,10 +26,10 @@
  • {{ author.location }}
  • {% endif %} {% if author.uri %} -
  • {{ site.data.ui-text[site.locale].website_label }}
  • +
  • {{ site.data.ui-text[site.locale].website_label | default: "Website" }}
  • {% endif %} {% if author.email %} -
  • {{ site.data.ui-text[site.locale].email_label }}
  • +
  • {{ site.data.ui-text[site.locale].email_label | default: "Email" }}
  • {% endif %} {% if author.keybase %}
  • Keybase
  • diff --git a/_includes/breadcrumbs.html b/_includes/breadcrumbs.html index ded8bd6e..2b9f7a9e 100644 --- a/_includes/breadcrumbs.html +++ b/_includes/breadcrumbs.html @@ -21,10 +21,10 @@ {% for crumb in crumbs offset: 1 %} {% if forloop.first %}
  • - {{ site.data.ui-text[site.locale].breadcrumb_home_label }} + {{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}
  • - {{ site.data.ui-text[site.locale].breadcrumb_separator }} + {{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }} {% endif %} {% if forloop.last %}
  • {{ page.title }}
  • @@ -34,7 +34,7 @@ {{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }} - {{ site.data.ui-text[site.locale].breadcrumb_separator }} + {{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }} {% endif %} {% endfor %} diff --git a/_includes/category-list.html b/_includes/category-list.html index 77b13547..a2a623e5 100644 --- a/_includes/category-list.html +++ b/_includes/category-list.html @@ -18,7 +18,7 @@ {% assign category_hashes = (page_categories | split: ',' | sort:0) %}

    - {{ site.data.ui-text[site.locale].categories_label }} + {{ site.data.ui-text[site.locale].categories_label | default: "Categories:" }} {% for hash in category_hashes %} {% assign keyValue = hash | split: '#' %} diff --git a/_includes/comments.html b/_includes/comments.html index 03a8c64c..a01af60f 100644 --- a/_includes/comments.html +++ b/_includes/comments.html @@ -1,7 +1,7 @@ {% include base_path %}

    -

    {{ site.data.ui-text[site.locale].comments_label }}

    +

    {{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}

    {% case site.comments.provider %} {% when "disqus" %}
    diff --git a/_includes/feature_row b/_includes/feature_row index 10592b7e..b84f36b2 100644 --- a/_includes/feature_row +++ b/_includes/feature_row @@ -42,7 +42,7 @@ {% endif %} {% if f.url %} -

    {{ f.btn_label | default: site.data.ui-text[site.locale].more_label }}

    +

    {{ f.btn_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}

    {% endif %}
    diff --git a/_includes/footer.html b/_includes/footer.html index a0ffe60e..53b99eb0 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -17,8 +17,8 @@ {% if site.author.bitbucket %}
  • Bitbucket
  • {% endif %} -
  • {{ site.data.ui-text[site.locale].feed_label }}
  • +
  • {{ site.data.ui-text[site.locale].feed_label | default: "Feed" }}
  • - \ No newline at end of file + \ No newline at end of file diff --git a/_includes/page__hero.html b/_includes/page__hero.html index 6cc1ee7e..cd0fa9fd 100644 --- a/_includes/page__hero.html +++ b/_includes/page__hero.html @@ -31,7 +31,7 @@

    {% if paginator %} - {{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page }} {{ paginator.page }}{% endunless %} + {{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %} {% else %} {{ page.title | default: site.title | markdownify | remove: "

    " | remove: "

    " }} {% endif %} @@ -43,7 +43,7 @@

    {% include read-time.html %}

    {% endif %} {% if page.header.cta_url %} -

    {{ page.header.cta_label | default: site.data.ui-text[site.locale].more_label }}

    +

    {{ page.header.cta_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}

    {% endif %}

    {% else %} diff --git a/_includes/paginator.html b/_includes/paginator.html index 92450bbd..2924f9a8 100644 --- a/_includes/paginator.html +++ b/_includes/paginator.html @@ -6,12 +6,12 @@ {% comment %} Link for previous page {% endcomment %} {% if paginator.previous_page %} {% if paginator.previous_page == 1 %} -
  • {{ site.data.ui-text[site.locale].pagination_previous }}
  • +
  • {{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}
  • {% else %} -
  • {{ site.data.ui-text[site.locale].pagination_previous }}
  • +
  • {{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}
  • {% endif %} {% else %} -
  • +
  • {% endif %} {% comment %} First page {% endcomment %} @@ -61,9 +61,9 @@ {% comment %} Link next page {% endcomment %} {% if paginator.next_page %} -
  • {{ site.data.ui-text[site.locale].pagination_next }}
  • +
  • {{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}
  • {% else %} -
  • +
  • {% endif %} diff --git a/_includes/post_pagination.html b/_includes/post_pagination.html index 0a3acac5..cb2005ea 100644 --- a/_includes/post_pagination.html +++ b/_includes/post_pagination.html @@ -3,14 +3,14 @@ {% if page.previous or page.next %} {% endif %} \ No newline at end of file diff --git a/_includes/read-time.html b/_includes/read-time.html index 605dc0bc..a45043c1 100644 --- a/_includes/read-time.html +++ b/_includes/read-time.html @@ -6,12 +6,12 @@ {% if site.words_per_minute %} {% if words < 180 %} - {{ site.data.ui-text[site.locale].less_than }} 1 {{ site.data.ui-text[site.locale].minute_read }} + {{ site.data.ui-text[site.locale].less_than | default: "less than" }} 1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }} {% elsif words < 360 %} - 1 {{ site.data.ui-text[site.locale].minute_read }} + 1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }} {% else %} - {{ words | divided_by:site.words_per_minute }} {{ site.data.ui-text[site.locale].minute_read }} + {{ words | divided_by:site.words_per_minute }} {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }} {% endif %} {% else %} - {{ site.data.ui-text[site.locale].undefined_wpm }} + {{ site.data.ui-text[site.locale].undefined_wpm | "Undefined parameter words_per_minute at _config.yml" }} {% endif %} \ No newline at end of file diff --git a/_includes/seo.html b/_includes/seo.html index 8189a8ad..a43115b9 100644 --- a/_includes/seo.html +++ b/_includes/seo.html @@ -18,7 +18,7 @@ {% assign canonical_url = page.url | replace: "index.html", "" | prepend: site.url %} {% endif %} -{{ seo_title | default: site.title }}{% if paginator %}{% unless paginator.page == 1 %} {{ site.title_separator }} {{ site.data.ui-text[site.locale].page }} {{ paginator.page }}{% endunless %}{% endif %} +{{ seo_title | default: site.title }}{% if paginator %}{% unless paginator.page == 1 %} {{ site.title_separator }} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}{% endif %} {% assign seo_description = page.description | default: page.excerpt | default: site.description %} {% if seo_description %} @@ -39,7 +39,7 @@ {% assign seo_author_twitter = seo_author_twitter | replace: "@", "" %} {% endif %} - + diff --git a/_includes/social-share.html b/_includes/social-share.html index b2842865..718e6f97 100644 --- a/_includes/social-share.html +++ b/_includes/social-share.html @@ -2,14 +2,14 @@
    {% if site.data.ui-text[site.locale].share_on_label %} - + {% endif %} - + - + - Google+ + Google+ - LinkedIn + LinkedIn
    \ No newline at end of file diff --git a/_includes/tag-list.html b/_includes/tag-list.html index 6e801f25..80fcff3e 100644 --- a/_includes/tag-list.html +++ b/_includes/tag-list.html @@ -16,7 +16,7 @@ {% assign tag_hashes = (page_tags | split: ',' | sort:0) %}

    - {{ site.data.ui-text[site.locale].tags_label }} + {{ site.data.ui-text[site.locale].tags_label | default: "Tags:" }} {% for hash in tag_hashes %} {% assign keyValue = hash | split: '#' %} diff --git a/_layouts/single.html b/_layouts/single.html index 8c5fd0f8..3629aa62 100644 --- a/_layouts/single.html +++ b/_layouts/single.html @@ -35,7 +35,7 @@ layout: default

    {{ content }} - {% if page.link %}
    {{ site.data.ui-text[site.locale].ext_link_label }}
    {% endif %} + {% if page.link %}
    {{ site.data.ui-text[site.locale].ext_link_label | default: "Direct Link" }}
    {% endif %}
    @@ -64,7 +64,7 @@ layout: default {% if page.id and page.related and site.related_posts.size > 0 %}