Convert templates to use translate instead of localize
Not sure what the difference is but most things tend to use translate. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
{% extends "board/base.html" %}
|
{% extends "board/base.html" %}
|
||||||
{% load l10n %}
|
{% load i18n %}
|
||||||
{# Title #}
|
{# Title #}
|
||||||
{% block title %}{% localize on %}Ban success{% endlocalize %}{% endblock %}
|
{% block title %}{% translate "Ban success" %}{% endblock %}
|
||||||
{# Body #}
|
{# Body #}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row" id="message">
|
<div class="row" id="message">
|
||||||
{% localize on %}A ban has been created. This window will close in 1 second.{% endlocalize %}
|
{% translate "A ban has been created. This window will close in 1 second." %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "board/base.html" %}
|
{% extends "board/base.html" %}
|
||||||
{% load post_body %}
|
{% load post_body %}
|
||||||
{% load l10n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% with title=board.url %}
|
{% with title=board.url %}
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<div class="column"> </div>
|
<div class="column"> </div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h2>{% localize on %}Create a new thread{% endlocalize %}</h2>
|
<h2>{% translate "Create a new thread" %}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<form method="post" action="{% url 'board:board_detail' url=board.url %}" enctype="multipart/form-data">
|
<form method="post" action="{% url 'board:board_detail' url=board.url %}" enctype="multipart/form-data">
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<td>
|
<td>
|
||||||
{% localize on %}Max image size{% endlocalize %}:
|
{% translate "Max image size" %}:
|
||||||
{{ max_upload_size|measure_bytes }}
|
{{ max_upload_size|measure_bytes }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
<div class="row pagination">
|
<div class="row pagination">
|
||||||
{% if current_page > 1 %}
|
{% if current_page > 1 %}
|
||||||
{% with prev_page=current_page|add:"-1" %}
|
{% with prev_page=current_page|add:"-1" %}
|
||||||
<a href="{% url 'board:board_detail' board.url prev_page %}">{% localize on %}Prev{% endlocalize %}</a>
|
<a href="{% url 'board:board_detail' board.url prev_page %}">{% translate "Prev" %}</a>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
[
|
[
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
]
|
]
|
||||||
{% if current_page < last_page %}
|
{% if current_page < last_page %}
|
||||||
{% with next_page=current_page|add:"1" %}
|
{% with next_page=current_page|add:"1" %}
|
||||||
<a href="{% url 'board:board_detail' board.url next_page %}">{% localize on %}Next{% endlocalize %}</a>
|
<a href="{% url 'board:board_detail' board.url next_page %}">{% translate "Next" %}</a>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "board/base.html" %}
|
{% extends "board/base.html" %}
|
||||||
{% load post_body %}
|
{% load post_body %}
|
||||||
{% load l10n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% with title=board.url %}
|
{% with title=board.url %}
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<td>
|
<td>
|
||||||
{% localize on %}Max image size{% endlocalize %}:
|
{% translate "Max image size" %}:
|
||||||
{{ max_upload_size|measure_bytes }}
|
{{ max_upload_size|measure_bytes }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<div class="column"> </div>
|
<div class="column"> </div>
|
||||||
</div>
|
</div>
|
||||||
{# return links #}
|
{# return links #}
|
||||||
[ <a href="{% url 'board:board_detail' board.url %}">{% localize on %}Return{% endlocalize %}</a> ]
|
[ <a href="{% url 'board:board_detail' board.url %}">{% translate "Return" %}</a> ]
|
||||||
<hr />
|
<hr />
|
||||||
{# posts #}
|
{# posts #}
|
||||||
<div class="row post">
|
<div class="row post">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{% load post_body %}
|
{% load post_body %}
|
||||||
{% load l10n %}
|
{% load i18n %}
|
||||||
<div
|
<div
|
||||||
id="p{{post.id}}"
|
id="p{{post.id}}"
|
||||||
data-report-url="{% url 'board:report_form' board.url post.id %}"
|
data-report-url="{% url 'board:report_form' board.url post.id %}"
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
{% if post.thumbnail %}
|
{% if post.thumbnail %}
|
||||||
{# Image info #}
|
{# Image info #}
|
||||||
<div class="post_image_info">
|
<div class="post_image_info">
|
||||||
{% localize on %}File{% endlocalize %}:
|
{% translate "File" %}
|
||||||
<a href="{{post.image.url}}" target="_blank">{{post.original_image_name}}</a>
|
<a href="{{post.image.url}}" target="_blank">{{post.original_image_name}}</a>
|
||||||
({{post.image.size|measure_bytes}}, {{post.image_width}}x{{post.image_height}})
|
({{post.image.size|measure_bytes}}, {{post.image_width}}x{{post.image_height}})
|
||||||
</div>
|
</div>
|
||||||
@@ -30,12 +30,14 @@
|
|||||||
{% if post.subject %}
|
{% if post.subject %}
|
||||||
<span class="post_subject">{{post.subject}}</span>
|
<span class="post_subject">{{post.subject}}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% localize on %}by{% endlocalize %}
|
{% blocktranslate %}
|
||||||
|
by
|
||||||
<span class="post_name">{{post.name|default:"Anonymous"}}</span>
|
<span class="post_name">{{post.name|default:"Anonymous"}}</span>
|
||||||
{% localize on %}at{% endlocalize %}
|
at
|
||||||
{{post.created}}
|
{{post.created}}
|
||||||
|
{% endblocktranslate %}
|
||||||
{% if reply_link %}
|
{% if reply_link %}
|
||||||
[<a href="{{post.get_absolute_url}}">{% localize on %}Reply{% endlocalize %}</a>]
|
[<a href="{{post.get_absolute_url}}">{% translate "Reply" %}</a>]
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="#" class="post_menu_button" data-id="post_menu_button">▶</a>
|
<a href="#" class="post_menu_button" data-id="post_menu_button">▶</a>
|
||||||
|
|
||||||
@@ -44,7 +46,7 @@
|
|||||||
{% if replies_elided > 0 %}
|
{% if replies_elided > 0 %}
|
||||||
<br/>
|
<br/>
|
||||||
<span class="replies_elided">
|
<span class="replies_elided">
|
||||||
({% localize on %}{{replies_elided}} replies elided, click reply to view{% endlocalize %})
|
({% blocktranslate %}{{replies_elided}} replies elided, click reply to view{% endblocktranslate %})
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "board/base.html" %}
|
{% extends "board/base.html" %}
|
||||||
{% load l10n %}
|
{% load i18n %}
|
||||||
{# Title #}
|
{# Title #}
|
||||||
{% block title %}{% localize on %}Reporting post {{post.id}}{% endlocalize %}{% endblock %}
|
{% block title %}{% blocktranslate %}Reporting post {{post.id}}{% endblocktranslate %}{% endblock %}
|
||||||
{# Body #}
|
{# Body #}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{% extends "board/base.html" %}
|
{% extends "board/base.html" %}
|
||||||
{% load l10n %}
|
{% load i18n %}
|
||||||
{# Title #}
|
{# Title #}
|
||||||
{% block title %}{% localize on %}Report success{% endlocalize %}{% endblock %}
|
{% block title %}{% translate "Report success" %}{% endblock %}
|
||||||
{# Body #}
|
{# Body #}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row" id="message">
|
<div class="row" id="message">
|
||||||
{% localize on %}Post reported. This window will close in 1 second.{% endlocalize %}
|
{% translate "Post reported. This window will close in 1 second." %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Reference in New Issue
Block a user