yulijia / freshman21

Welcome to use Jekyll theme Freshman21.
http://yulijia.net/freshman21/
MIT License
133 stars 90 forks source link

Theme feedback and suggestions #21

Open RAlexeev opened 7 years ago

RAlexeev commented 7 years ago

Hello!

Many thanks for the neat and useful theme for Jekyll. For me it turned out to be one of the best! I’m not a web programmer, but still would like to express some of my preferences with respect to the theme.

I would like to suggest an improvement to the theme localisation, adding the opportunity to change "Read more" For example, in the file /index.html change the line <p style="text-align: right"><a href="{{ post.url | prepend: site.baseurl }}">Read more</a></p> to <p style="text-align: right"><a href="{{ post.url | prepend: site.baseurl }}">{{ site.locales[site.default_locale].ReadMore }}</a></p>

And to the file /_config.yml add a variable to each language:

en:
  ReadMore: "Read more"
ru:
  ReadMore: "Читать далее" (one of "Далее", "Читать дальше", "Читать далее", "Подробнее")

Additionally, in my view, russian localisation is not translated quite correctly Google_search: "Поиск на Google" I would change to Google_search: "Поиск по сайту" Recent_Posts: "Свежие посты" I would change to Recent_Posts: "Свежие записи" Taggedwith: "с тегами" I would change to Taggedwith: "с метками" Tags: "Теги" I would change to Tags: "Метки" Here we have examples of translation of a few terms into russian: https://codex.wordpress.org/Вниманию_переводчиков

"Теги" and "Посты" - this is anglicism (words taken from english), which have the following equivalents "Метки" and "Записи".

On the main page, a multiple option should be present: Previous: "Предыдущие записи", instead of Previous: "Предыдущий пост" Next: "Следующие записи", and not Next: "Следующий пост"

In the case of freestanding posts, it should be just: Previous: "Предыдущая запись" Next: "Следующая запись"

Here, perhaps, it would be convenient to introduce separate parameters for Previous and Next, for example:

      PreviousPost: "Предыдущие записи"
      NextPost: "Следующие записи"
      PreviousPage: "Предыдущая запись"
      NextPage: "Следующая запись"

Alternatively you can use a "universal" (more general) translation: Previous: "Назад" Next: "Вперёд" But in my view this isn’t very elegant.

I think it would be a good idea to localise the publication date as well. For example like here: In the file index.html I changed

      <time itemprop="datePublished" datetime="{{ post.date | date: '%Y-%m-%d' }}">
      {{ site.locales[site.default_locale].PostDate }}{{ post.date | date: "%b %-d, %Y" }}
      </time>

to

<time itemprop="datePublished" datetime="{{ post.date | date: '%Y-%m-%d' }}">
          {{ site.locales[site.default_locale].PostDate }}
          {% if site.locales[site.default_locale].months %}
            {% case site.default_locale %}
            {% when 'ru' %}
              {{ post.date | date: "%-d" }}
              {% assign month = post.date | date: '%-m' %}
              {% case month %}
                {% when '1' %} {{ site.locales[site.default_locale].months.January }}
                {% when '2' %} {{ site.locales[site.default_locale].months.February }}
                {% when '3' %} {{ site.locales[site.default_locale].months.March }}
                {% when '4' %} {{ site.locales[site.default_locale].months.April }}
                {% when '5' %} {{ site.locales[site.default_locale].months.May }}
                {% when '6' %} {{ site.locales[site.default_locale].months.June }}
                {% when '7' %} {{ site.locales[site.default_locale].months.July }}
                {% when '8' %} {{ site.locales[site.default_locale].months.August }}
                {% when '9' %} {{ site.locales[site.default_locale].months.September }}
                {% when '10' %} {{ site.locales[site.default_locale].months.October }}
                {% when '11' %} {{ site.locales[site.default_locale].months.November }}
                {% when '12' %} {{ site.locales[site.default_locale].months.December }}
              {% endcase %}
              {{ post.date | date: "%Y" }}
            {% else %}
              {{ post.date | date: "%b %-d, %Y" }}
            {% endcase %}
          {% else %}
            {{ post.date | date: "%b %-d, %Y" }}
          {% endif %}
        </time>

and in the file _layouts/post.html I changed

    <time itemprop="datePublished" datetime="{{ page.date | date: '%Y-%m-%d' }}">
    {{ site.locales[site.default_locale].PostDate }}{{ page.date | date: "%b %-d, %Y" }}
    </time>

to

<time itemprop="datePublished" datetime="{{ page.date | date: '%Y-%m-%d' }}">
        {{ site.locales[site.default_locale].PostDate }}
        {% if site.locales[site.default_locale].months %}
          {% case site.default_locale %}
          {% when 'ru' %}
            {{ page.date | date: "%-d" }}
            {% assign month = page.date | date: '%-m' %}
            {% case month %}
              {% when '1' %} {{ site.locales[site.default_locale].months.January }}
              {% when '2' %} {{ site.locales[site.default_locale].months.February }}
              {% when '3' %} {{ site.locales[site.default_locale].months.March }}
              {% when '4' %} {{ site.locales[site.default_locale].months.April }}
              {% when '5' %} {{ site.locales[site.default_locale].months.May }}
              {% when '6' %} {{ site.locales[site.default_locale].months.June }}
              {% when '7' %} {{ site.locales[site.default_locale].months.July }}
              {% when '8' %} {{ site.locales[site.default_locale].months.August }}
              {% when '9' %} {{ site.locales[site.default_locale].months.September }}
              {% when '10' %} {{ site.locales[site.default_locale].months.October }}
              {% when '11' %} {{ site.locales[site.default_locale].months.November }}
              {% when '12' %} {{ site.locales[site.default_locale].months.December }}
            {% endcase %}
            {{ page.date | date: "%Y" }}
          {% else %}
            {{ page.date | date: "%b %-d, %Y" }}
          {% endcase %}
        {% else %}
          {{ page.date | date: "%b %-d, %Y" }}
        {% endif %}
      </time>

also I added to _config.yml:

      months:
        January: "января"
        February: "февраля"
        March: "марта"
        April: "апреля"
        May: "мая"
        June: "июня"
        July: "июля"
        August: "августа"
        September: "сентября"
        October: "октября"
        November: "ноября"
        December: "декабря"

Also it would be good to localise the heading “Table of Contents” which is written in the file "_sass/_layout.scss":

#markdown-toc:before{
  content:"Table of Contents";

In russian it would be:

#markdown-toc:before{
  content:"Содержание";
yulijia commented 7 years ago

Hello @RAlexeev , Thank you for your feedback, this theme still has many bugs, I will fix it as soon as possible.