From 9cb4af1bbb20c32bff261fb0f274e8c7b9802edf Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 18 Feb 2021 16:15:45 -0300 Subject: [PATCH] Localization for months (#245) --- _data/language.yml | 2 ++ _includes/post_info.html | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/_data/language.yml b/_data/language.yml index 1740aab779..37a3c1f525 100644 --- a/_data/language.yml +++ b/_data/language.yml @@ -14,3 +14,5 @@ str_javascript_required_disqus: "Please enable JavaScript to view comments." str_no_result_found: "No result found" str_cookie_approve: "Approve" str_cookie_disclaimer: "We would like to use third party cookies and scripts to improve the functionality of this website." +str_months: [January, February, March, April, May, June, July, August, September, October, November, December] + diff --git a/_includes/post_info.html b/_includes/post_info.html index 0cd02af43f..f5cacdda82 100644 --- a/_includes/post_info.html +++ b/_includes/post_info.html @@ -7,7 +7,9 @@ Author's avatar {% endif %}

- {% if author.name %}{{ author.name }} - {% endif %}{{ date | date: "%B %-d, %Y" }} + {% if author.name %}{{ author.name }} - {% endif %} + {% assign x = date | date: "%m" | minus: 1 %} + {{ site.data.language.str_months[x] | default: date | date: "%B" }} {{ date | date: "%d, %Y" }}

{%- if author.url -%}{%- endif -%}