Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make info boxes for posts translatable #484

Merged
merged 8 commits into from
Mar 4, 2020
Merged
6 changes: 3 additions & 3 deletions components/post/default.htm
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
{% endif %}

<p class="info">
Posted
{% if post.categories.count %} in
{{ 'rainlab.blog::lang.post.posted'|trans }}
{% if post.categories.count %} {{ 'rainlab.blog::lang.post.posted_in'|trans}}
{% for category in post.categories %}
<a href="{{ category.url }}">{{ category.name }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
{% endif %}
on {{ post.published_at|date('M d, Y') }}
{{ 'rainlab.blog::lang.post.posted_on_mid'|trans }} {{ post.published_at|date('rainlab.blog::lang.post.posted_on_date_format'|trans) }}
bennothommo marked this conversation as resolved.
Show resolved Hide resolved
</p>
9 changes: 5 additions & 4 deletions components/posts/default.htm
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3>

<p class="info">
Posted
{% if post.categories.count %} in {% endif %}
{{ 'rainlab.blog::lang.post.posted'|trans }}
{% if post.categories.count %} {{ 'rainlab.blog::lang.post.posted_in'|trans}}
{% for category in post.categories %}
<a href="{{ category.url }}">{{ category.name }}</a>{% if not loop.last %}, {% endif %}
<a href="{{ category.url }}">{{ category.name }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
on {{ post.published_at|date('M d, Y') }}
{% endif %}
{{ 'rainlab.blog::lang.post.posted_on_mid'|trans }} {{ post.published_at|date('rainlab.blog::lang.post.posted_on_date_format'|trans) }}
</p>

<p class="excerpt">{{ post.summary|raw }}</p>
Expand Down
6 changes: 5 additions & 1 deletion lang/de/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@
'featured_images' => 'Zugehörige Bilder',
'delete_confirm' => 'Möchtest du diesen Artikel wirklich löschen?',
'close_confirm' => 'Der Artikel ist noch nicht gespeichert.',
'return_to_posts' => 'Zurück zur Artikel-Übersicht'
'return_to_posts' => 'Zurück zur Artikel-Übersicht',
'posted' => 'Veröffentlicht',
'posted_on_mid' => 'am',
'posted_in' => 'in',
'posted_on_date_format' => 'd. F Y'
],
'categories' => [
'list_title' => 'Blog Kategorien verwalten',
Expand Down
6 changes: 5 additions & 1 deletion lang/en/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@
'delete_confirm' => 'Delete this post?',
'delete_success' => 'Successfully deleted those posts.',
'close_confirm' => 'The post is not saved.',
'return_to_posts' => 'Return to posts list'
'return_to_posts' => 'Return to posts list',
'posted' => 'Posted',
'posted_in' => 'in',
'posted_on_mid' => 'on',
'posted_on_date_format' => 'M d, Y'
],
'categories' => [
'list_title' => 'Manage the blog categories',
Expand Down