Make the UI translatable

This commit is contained in:
Bat
2018-06-17 16:26:15 +01:00
parent cafb0e2277
commit 3207aa0e22
22 changed files with 326 additions and 89 deletions
+11 -11
View File
@@ -16,7 +16,7 @@
{% endif %}
<p>
<b>Written by <a href="/@/{{ author.fqn }}/">{{ name }}</a></b>
<b>{{ "Written by {{ link_start }}{{ name }}{{ link_end }}" | _(link_start="<a href=\"/@/{{ author.fqn }}/\">", name=name, link_end="</a>")}}</b>
&mdash;
<span>{{ date | date(format="%B %e, %Y") }}</span>
</p>
@@ -26,33 +26,33 @@
</article>
<div class="article-meta">
<p>This article is under the {{ post.license }} license.</p>
<p>{{ "This article is under the {{ license }} license." | _(license=post.license) }}</p>
<div class="inline">
<p>
{{ n_likes }} like{{ n_likes | pluralize }}
{{ "{{ count }} likes" | _n(singular="One like", count=n_likes) }}
</p>
<a class="button" href="like">
{% if has_liked %}
I don't like this anymore
{{ "I don't like this anymore" | _ }}
{% else %}
Add yours
{{ "Add yours" | _ }}
{% endif %}
</a>
<p>
{{ n_reshares }} reshare{{ n_reshares | pluralize }}
{{ "{{ count }} reshares" | _n(singular="One reshare", count=n_reshares) }}
</p>
<a class="button" href="reshare">
{% if has_reshared %}
I don't want to reshare this anymore
{{ "I don't want to reshare this anymore" | _ }}
{% else %}
Reshare
{{ "Reshare" | _ }}
{% endif %}
</a>
</div>
<h2>Comments</h2>
<h2>{{ "Comments" | _ }}</h2>
<div class="list">
{% for comment in comments %}
{% if comment.author.display_name %}
@@ -63,10 +63,10 @@
<div class="card" id="comment-{{ comment.id }}">
<a href="/@/{{ comment.author.fqn }}/"><b>{{ comment_author_name }}</b></a>
<div>{{ comment.content | safe }}</div>
<a href="comment?responding_to={{ comment.id }}">Respond</a>
<a href="comment?responding_to={{ comment.id }}">{{ "Respond" | _ }}</a>
</div>
{% endfor %}
</div>
<a class="button inline-block" href="comment?">Comment</a>
<a class="button inline-block" href="comment?">{{ "Comment" | _ }}</a>
</div>
{% endblock content %}
+6 -6
View File
@@ -1,21 +1,21 @@
{% extends "base" %}
{% block title %}
New post
{{ "New post" | _ }}
{% endblock title %}
{% block content %}
<h1>Create a post</h1>
<h1>{{ "Create a post" | _ }}</h1>
<form method="post">
<label for="title">Title</label>
<label for="title">{{ "Title" | _ }}</label>
<input name="title">
<label for="content">Content</label>
<label for="content">{{ "Content" | _ }}</label>
<textarea name="content"></textarea>
<label for="license">License</label>
<label for="license">{{ "License" | _ }}</label>
<input name="license">
<input type="submit" value="Publish"/>
<input type="submit" value="{{ "Publish" | _ }}"/>
</form>
{% endblock content %}