NEW [WIP] Add localization support with jekyll-simple-i18n #1509

Open
jonah wants to merge 76 commits from i18n-simple into master
28 changed files with 682 additions and 242 deletions
Showing only changes of commit ad335fe640 - Show all commits

View File

@ -5,7 +5,7 @@
{% else %} {% else %}
<div class="card-header text-white bg-{{include.color}}"> <div class="card-header text-white bg-{{include.color}}">
{% endif %} {% endif %}
<h3 class="h5">{{include.title}}</h3> <h3 class="h5">{{include.title | translate_text}}</h3>
</div> </div>
<div class="card-body"> <div class="card-body">
{% if include.labels %} {% if include.labels %}
@ -17,10 +17,10 @@
{% assign text = label_data[1] %} {% assign text = label_data[1] %}
{% assign tooltip = label_data[2] | default: "" %} {% assign tooltip = label_data[2] | default: "" %}
{% assign help_icon = '<i class="far fa-question-circle"></i>' %} {% assign help_icon = '<i class="far fa-question-circle"></i>' %}
<span class="badge badge-{{color}}" {% if tooltip %} data-toggle="tooltip" title="{{ tooltip }}">{{text}} {{ help_icon <span class="badge badge-{{color}}" {% if tooltip %} data-toggle="tooltip" title="{{ tooltip | translate_text}}">{{text | translate_text}} {{ help_icon
}} }}
{% else %} {% else %}
>{{text}} >{{text | translate_text}}
{% endif %} {% endif %}
</span> </span>
{% endfor %} {% endfor %}
@ -41,7 +41,7 @@
{% if include.url %} {% if include.url %}
<a class="btn btn-{{include.color}} mb-1" href="{{include.url}}"> <a class="btn btn-{{include.color}} mb-1" href="{{include.url}}">
{% if include.website %} {% if include.website %}
{{include.website}} {{include.website | translate_text }}
{% else %} {% else %}
{{ include.url | remove: "https://" | remove: "http://" | remove: "www." | remove: "/" | remove: "github.com" }} {{ include.url | remove: "https://" | remove: "http://" | remove: "www." | remove: "/" | remove: "github.com" }}
{% endif %} {% endif %}
@ -49,7 +49,7 @@
{% elsif include.page %} {% elsif include.page %}
<a class="btn btn-{{include.color}} mb-1" href="{{include.page | translate_page}}"> <a class="btn btn-{{include.color}} mb-1" href="{{include.page | translate_page}}">
{% if include.moretext %} {% if include.moretext %}
{{include.moretext}} {{include.moretext | translate_text}}
{% else %} {% else %}
{% t Learn More %} {% t Learn More %}
{% endif %} {% endif %}

View File

@ -36,9 +36,6 @@
Review

I wonder if there is a way to incorporate this into the card.html code instead of using captures on every page. Will have to investigate that.

I wonder if there is a way to incorporate this into the `card.html` code instead of using captures on every page. Will have to investigate that.
Review

I wonder if there is a way to incorporate this into the card.html code instead of using captures on every page. Will have to investigate that.

I wonder if there is a way to incorporate this into the `card.html` code instead of using captures on every page. Will have to investigate that.
djoate commented 2019-11-23 22:27:06 +00:00 (Migrated from github.com)
Review
@JonahAragon This is done in https://github.com/privacytoolsIO/privacytools.io/pull/1510
djoate commented 2019-11-23 22:27:06 +00:00 (Migrated from github.com)
Review
@JonahAragon This is done in https://github.com/privacytoolsIO/privacytools.io/pull/1510
description="Find out how your operating system is compromising your privacy, and what simple alternatives exist." description="Find out how your operating system is compromising your privacy, and what simple alternatives exist."
%} %}
{% capture services_title %}{% t %}{% endcapture %}
Review

I wonder if there is a way to incorporate this into the card.html code instead of using captures on every page. Will have to investigate that.

I wonder if there is a way to incorporate this into the `card.html` code instead of using captures on every page. Will have to investigate that.
djoate commented 2019-11-23 22:27:06 +00:00 (Migrated from github.com)
Review
@JonahAragon This is done in https://github.com/privacytoolsIO/privacytools.io/pull/1510
{% capture services_page %}/{% if page.language %}{{ page.language }}/{% endif %}services/{% endcapture %}
Review

I wonder if there is a way to incorporate this into the card.html code instead of using captures on every page. Will have to investigate that.

I wonder if there is a way to incorporate this into the `card.html` code instead of using captures on every page. Will have to investigate that.
djoate commented 2019-11-23 22:27:06 +00:00 (Migrated from github.com)
Review
@JonahAragon This is done in https://github.com/privacytoolsIO/privacytools.io/pull/1510
{% capture services_description %}{% t The PrivacyTools team is proud to launch a variety of privacy-centric online services, including a Mastodon instance, search engine, and more!%}{% endcapture %}
Review

I wonder if there is a way to incorporate this into the card.html code instead of using captures on every page. Will have to investigate that.

I wonder if there is a way to incorporate this into the `card.html` code instead of using captures on every page. Will have to investigate that.
djoate commented 2019-11-23 22:27:06 +00:00 (Migrated from github.com)
Review
@JonahAragon This is done in https://github.com/privacytoolsIO/privacytools.io/pull/1510
{% include card.html color="secondary" {% include card.html color="secondary"
title="PrivacyTools Services" title="PrivacyTools Services"

Review

I wonder if there is a way to incorporate this into the card.html code instead of using captures on every page. Will have to investigate that.

I wonder if there is a way to incorporate this into the `card.html` code instead of using captures on every page. Will have to investigate that.
Review

I wonder if there is a way to incorporate this into the card.html code instead of using captures on every page. Will have to investigate that.

I wonder if there is a way to incorporate this into the `card.html` code instead of using captures on every page. Will have to investigate that.
djoate commented 2019-11-23 22:27:06 +00:00 (Migrated from github.com)
Review
@JonahAragon This is done in https://github.com/privacytoolsIO/privacytools.io/pull/1510
djoate commented 2019-11-23 22:27:06 +00:00 (Migrated from github.com)
Review
@JonahAragon This is done in https://github.com/privacytoolsIO/privacytools.io/pull/1510