Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

i18n dates #278

Merged
merged 3 commits into from
Nov 19, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,5 +275,8 @@
"shop_link": "Einkauf beginnen",
"print": "Drucken"
}
},
"date_formats":{
"month_day_year": "%B %d, %Y"
}
}
3 changes: 3 additions & 0 deletions locales/en.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,5 +275,8 @@
"shop_link": "Start shopping",
"print": "Print"
}
},
"date_formats":{
"month_day_year": "%B %d, %Y"
}
}
3 changes: 3 additions & 0 deletions locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,5 +277,8 @@
"shop_link": "Empezar a comprar",
"print": "Imprimir"
}
},
"date_formats":{
"month_day_year": "%d de %B, %Y"
}
}
3 changes: 3 additions & 0 deletions locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,5 +275,8 @@
"shop_link": "Boutique",
"print": "Imprimer"
}
},
"date_formats":{
"month_day_year": "%d %B, %Y"
}
}
3 changes: 3 additions & 0 deletions locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,5 +276,8 @@
"shop_link": "Comece a comprar",
"print": "Imprimir"
}
},
"date_formats":{
"month_day_year": "%d de %B de %Y"
}
}
3 changes: 3 additions & 0 deletions locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,5 +275,8 @@
"shop_link": "Começar a fazer compras",
"print": "Imprimir"
}
},
"date_formats":{
"month_day_year": "%d de %B de %Y"
}
}
3 changes: 1 addition & 2 deletions snippets/blog-sidebar.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<li>
<a href="{{ article.url }}">{{ article.title }}</a>
<br>
<time datetime="{{ article.published_at | date: '%Y-%m-%d' }}">
{{ article.published_at | date: '%Y-%m-%d' }}
<time datetime="{{ article.published_at | date: '%Y-%m-%d' }}">{{ article.published_at | date: format: 'month_day_year' }}</time>
</time>
</li>
{% endfor %}
Expand Down
3 changes: 1 addition & 2 deletions snippets/comment.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
</div>

<span>
{% assign comment_date = comment.created_at | date: '%Y-%m-%d' %}
{% capture author %}<strong>{{ comment.author }}</strong>{% endcapture %}
{% capture date %}<strong><time datetime="{{ comment_date }}">{{ comment_date }}</time></strong>{% endcapture %}
{% capture date %}<strong><time datetime="{{ comment.created_at | date: '%Y-%m-%d' }}">{{ comment.created_at | date: format: 'month_day_year' }}</time></strong>{% endcapture %}
{{ 'blogs.article.comment_meta_html' | t: author: author, date: date }}
</span>
</div>
5 changes: 3 additions & 2 deletions templates/article.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
<header class="section-header">
<div class="section-header--left">
<h1>{{ article.title }}</h1>
{% assign published_at = article.published_at | date: '%Y-%m-%d' %}
<p>{{ 'blogs.article.author_on_date_html' | t: author: article.author, date: published_at }}</p>
{% capture author %}<strong>{{ article.author }}</strong>{% endcapture %}
{% capture date %}<time datetime="{{ article.published_at | date: '%Y-%m-%d' }}">{{ article.published_at | date: format: 'month_day_year' }}</time>{% endcapture %}
<p>{{ 'blogs.article.author_on_date_html' | t: author: author, date: date }}</p>
</div>
</header>

Expand Down
4 changes: 1 addition & 3 deletions templates/blog.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@
{% endcomment %}

{% for article in blog.articles %}

<h3><a href="{{ article.url }}">{{ article.title }}</a></h3>
{% assign published_at = article.published_at | date: '%Y-%m-%d' %}
{% capture author %}<strong>{{ article.author }}</strong>{% endcapture %}
{% capture date %}<time datetime="{{ published_at }}">{{ published_at }}</time>{% endcapture %}
{% capture date %}<time datetime="{{ article.published_at | date: '%Y-%m-%d' }}">{{ article.published_at | date: format: 'month_day_year' }}</time>{% endcapture %}
<p>{{ 'blogs.article.author_on_date_html' | t: author: author, date: date }}</p>

{% comment %}
Expand Down
2 changes: 1 addition & 1 deletion templates/customers/account.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{% for order in customer.orders %}
<tr>
<td>{{ order.name | link_to: order.customer_url }}</td>
<td>{{ order.created_at | date: "%b %d, %Y" }}</td>
<td>{{ order.created_at | date: format: 'month_day_year' }}</td>
<td>{{ order.financial_status_label }}</td>
<td>{{ order.fulfillment_status_label }}</td>
<td>{{ order.total_price | money }}</td>
Expand Down
2 changes: 1 addition & 1 deletion templates/customers/order.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{{ line_item.title | link_to: line_item.product.url }}
{% if line_item.fulfillment %}
<div class="note">
{% assign created_at = line_item.fulfillment.created_at | date: "%b %d" %}
{% assign created_at = line_item.fulfillment.created_at | date: format: 'month_day_year' %}
{{ 'customer.order.fulfilled_at' | t: date: created_at }}
{% if line_item.fulfillment.tracking_number %}
<a href="{{ line_item.fulfillment.tracking_url }}">{{ line_item.fulfillment.tracking_company }} #{{ line_item.fulfillment.tracking_number}}</a>
Expand Down
4 changes: 1 addition & 3 deletions templates/index.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@

<div class="grid__item large--one-third">

<time datetime="{{ article.published_at | date: '%Y-%m-%d' }}">
{{ article.published_at | date: '%Y-%m-%d' }}
</time>
<time datetime="{{ article.published_at | date: '%Y-%m-%d' }}">{{ article.published_at | date: format: 'month_day_year' }}</time>
<h3><a href="{{ article.url }}">{{ article.title }}</a></h3>

{% comment %}
Expand Down