summaryrefslogtreecommitdiffstats
path: root/templates/book.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/book.html')
-rw-r--r--templates/book.html52
1 files changed, 27 insertions, 25 deletions
diff --git a/templates/book.html b/templates/book.html
index e5d4396b..a58a09f2 100644
--- a/templates/book.html
+++ b/templates/book.html
@@ -1,8 +1,10 @@
+<!-- template book.html -->
{% extends "base_content.html" %}
+{% load i18n %}
{% load extra_tags %}
{% load extra_filters %}
{% load humanize %}
-{% block title %}{% spaceless %}{{ book.title }}-读书频道{% endspaceless %}{% endblock %}
+{% block title %}{% spaceless %}{{ book.title }}-{% trans "reading channel" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -21,27 +23,27 @@
<div class="bookSummary">
<table>
<tr>
- <td>【作者】</td>
+ <td>{% trans "[author]" %}</td>
<td><b><a href="{% url user book.user.id %}" rel="nofollow" >{{ book.author }}</a></b></td>
</tr>
<tr>
- <td>【出版社】</td>
+ <td>{% trans "[publisher]" %}</td>
<td>{{ book.publication }}</td>
</tr>
<tr>
- <td>【出版日期】</td>
+ <td>{% trans "[publication date]" %}</td>
<td>{{ book.published_at|date:"Y-m" }}</td>
</tr>
<tr>
- <td>【价格】</td>
- <td>{{ book.price }} 元</td>
+ <td>{% trans "[price]" %}</td>
+ <td>{{ book.price }} {% trans "currency unit" %}</td>
</tr>
<tr>
- <td>【页数】</td>
- <td>{{ book.pages }} 页</td>
+ <td>{% trans "[pages]" %}</td>
+ <td>{{ book.pages }} {% trans "pages abbreviation" %}</td>
</tr>
<tr>
- <td>【标签】</td>
+ <td>{% trans "[tags]" %}</td>
<td>{{ book.tagnames }}</td>
</tr>
<tr>
@@ -51,17 +53,17 @@
{% if author_info.blog_url %}
<tr>
<td></td>
- <td><a href="{{ author_info.blog_url }}" rel="nofollow" >作者博客 »</a></td>
+ <td><a href="{{ author_info.blog_url }}" rel="nofollow" >{% trans "author blog" %} »</a></td>
</tr>
{% endif %}
<tr>
<td> </td>
- <td><a href="#" rel="nofollow">书籍目录 »</a></td>
+ <td><a href="#" rel="nofollow">{% trans "book directory" %} »</a></td>
</tr>
<tr>
<td> </td>
- <td><a href="#" rel="nofollow">网上购买 »</a></td>
+ <td><a href="#" rel="nofollow">{% trans "buy online" %} »</a></td>
</tr>
</table>
</div>
@@ -74,21 +76,21 @@
<div class="tabBar">
<div class="tabsB">
- <a id="qa" class="on" title="图书相关的技术答疑" href="#">答读者问</a>
+ <a id="qa" class="on" title="{% trans "book technical Q&A %}" href="#">{% trans "reader questions" %}</a>
</div>
</div>
- <div class="bookAsk"><a href="{% url ask_book book.short_name %}">向作者提问</div>
+ <div class="bookAsk"><a href="{% url ask_book book.short_name %}">{% trans "ask the author" %}</div>
<div class="user-stats-table">
{% for question in questions.object_list %}
{% if question.favourite_count %}
{% if question.favorited_myself %}
<div class="favorites-count">
- <img title="这个问题被 {{question.favourite_count}} 位用户收藏" src="/content/images/vote-favorite-on.png">
+ <img title="{% trans "this question was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}" src="/content/images/vote-favorite-on.png">
<div><b>{{question.favourite_count|intcomma}}</b></div>
</div>
{% else %}
<div class="favorites-count-off">
- <img title="这个问题被 {{question.favourite_count}} 位用户收藏" src="/content/images/vote-favorite-off.png">
+ <img title="{% trans "this question was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}" src="/content/images/vote-favorite-off.png">
<div><b>{{question.favourite_count|intcomma}}</b></div>
</div>
{% endif %}
@@ -100,17 +102,17 @@
<div class="stats">
<div class="votes">
<div class="vote-count-post">{{question.score|intcomma}}</div>
- 票
+ {% trans "votes" %}
</div>
- <div title="{% if question.answer_accepted %}有答案已被接受为正确答案{% endif %}" class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
+ <div title="{% if question.answer_accepted %}{% trans "the answer has been accepted to be correct" %}{% endif %}" class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
<div class="answer-count-post">{{question.answer_count|intcomma}}</div>
- 回答
-
+ {% trans "answer" %}
+
</div>
<div class="views">
<div class="views-count-post">{{question.view_count|cnprog_intword|safe}}</div>
- 浏览
+ {% trans "views" %}
</div>
</div>
</a>
@@ -120,7 +122,7 @@
</h3>
<div class="tags">
{% for tag in question.tagname_list %}
- <a href="{% url forum.views.tag tag|urlencode %}" title="查看有关'{{ tag }}'的问题" rel="tag">{{ tag }}</a>
+ <a href="{% url forum.views.tag tag|urlencode %}" title="{% "see questions tagged with" %}'{{ tag }}'{% trans "using tags" %}" rel="tag">{{ tag }}</a>
{% endfor %}
</div>
<div class="started">
@@ -136,15 +138,15 @@
</div>
{% endblock %}
{% block tail %}
-
<div class="pager">
{% cnprog_paginator context %}
</div>
<div class="bookFeed">
<div id="feeds">
- <a href="/feeds/rss" title="RSS订阅该图书最新问题">订阅最新问题</a>
+ <a href="/feeds/rss" title="{% trans "subscribe to book RSS feed" %}">{% trans "subscribe to the questions feed" %}</a>
</div>
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
+<!-- end template book.html -->