summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html9
-rw-r--r--templates/base_content.html13
-rw-r--r--templates/footer.html16
-rw-r--r--templates/header.html37
-rw-r--r--templates/index.html53
-rw-r--r--templates/logout.html9
6 files changed, 68 insertions, 69 deletions
diff --git a/templates/base.html b/templates/base.html
index 3ed3b3f4..90b40612 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,8 +1,9 @@
{% load extra_filters %}
+{% load i18n %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>{% block title %}{% endblock %} - CNProg.com 程序员问答社区</title>
+ <title>{% block title %}{% endblock %} - {{ APP_TITLE }}</title>
{% spaceless %}
{% block meta %}{% endblock %}
{% endspaceless %}
@@ -49,9 +50,9 @@
<body>
<div class="notify" style="display:none">
<span>{% if request.user.get_messages %}
- 恭喜您,社区给您颁发了奖牌:{% for message in request.user.get_messages %}
- <font class="darkred">{{ message }}</font>, {% endfor %}查看
- <a href="{{ request.user.get_profile_url }}">个人资料</a>{% endif %}</span>
+ {% trans "Congratulations! You have new badges: " %}{% for message in request.user.get_messages %}
+ <font class="darkred">{{ message }}</font>, {% endfor %}{% trans "go to see" %}
+ <a href="{{ request.user.get_profile_url }}">{% trans "Profile" %}</a>{% endif %}</span>
<a class="close-notify" onclick="notify.close(true)">&times;</a>
</div>
{% include "header.html" %}
diff --git a/templates/base_content.html b/templates/base_content.html
index 7fec09ed..6dec6cae 100644
--- a/templates/base_content.html
+++ b/templates/base_content.html
@@ -1,7 +1,8 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+{% load i18n %}
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
- <title>{% block title %}{% endblock %} - CNProg.com 程序员问答社区</title>
+ <title>{% block title %}{% endblock %} - {{ APP_TITLE }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="verify-v1" content="55uGNnQVJW8p1bbXeF/Xbh9I7nZBM/wLhRz6N/I1kkA=" />
<link rel="shortcut icon" href="/content/images/favicon.ico" >
@@ -48,10 +49,10 @@
<body>
<div class="notify" style="display:none">
<span>{% if request.user.get_messages %}
- 恭喜您,社区给您颁发了奖牌:{% for message in request.user.get_messages %}
- <font class="darkred">{{ message }}</font>, {% endfor %}查看
- <a href="{{ request.user.get_profile_url }}">个人资料</a>{% endif %}</span>
- <a class="close-notify" onclick="notify.close(true)">&times;</a>
+ {% trans "Congratulations! You have new badges: " %}{% for message in request.user.get_messages %}
+ <font class="darkred">{{ message }}</font>, {% endfor %}{% trans "go to see" %}
+ <a href="{{ request.user.get_profile_url }}">{% trans "Profile" %}</a>{% endif %}</span>
+ <a class="close-notify" onclick="notify.close(true)">&times;</a>
</div>
{% include "header.html" %}
<div id="wrapper">
diff --git a/templates/footer.html b/templates/footer.html
index 2e3d6293..46649b9f 100644
--- a/templates/footer.html
+++ b/templates/footer.html
@@ -1,23 +1,21 @@
{% load extra_tags %}
-<!-- 页面底部开始: -->
+{% load i18n %}
<div id="ground">
<div class="footerLinks" >
- <a href="/about">关于本站</a><span class="link-separator"> |</span>
- <a href="/faq">常见问题</a><span class="link-separator"> |</span>
+ <a href="/about">{% trans "About us" %}</a><span class="link-separator"> |</span>
+ <a href="/faq">{% trans "faq" %}</a><span class="link-separator"> |</span>
<a href="http://blog.cnprog.com">Blog</a><span class="link-separator"> |</span>
- <a href="mailto:team@cnprog.com">联系我们</a><span class="link-separator"> |</span>
- <a href="/privacy">隐私政策</a><span class="link-separator"> |</span>
- <a href="http://cnprog.uservoice.com" target="_blank">问题反馈</a>
+ <a href="mailto:team@cnprog.com">{% trans "Contact" %}</a><span class="link-separator"> |</span>
+ <a href="/privacy">{% trans "Privacy" %}</a><span class="link-separator"> |</span>
+ <a href="http://cnprog.uservoice.com" target="_blank">{% trans "Feedback" %}</a>
</div>
<p style="margin-top:10px;">
<a href="http://code.google.com/p/cnprog/" target="_blank">
<img src="/content/images/djangomade124x25_grey.gif" border="0" alt="Made with Django." title="Made with Django." >
</a>
- <div style="font-size:90%;color:#333">当前版本: R-0120-20090406</div>
</p>
<p style="margin-top:-30px; margin-right:15px;" class="fright"><img src="/content/images/cc-wiki.png" title="Creative Commons: Attribution - Share Alike" alt="cc-wiki" width="50" height="68" /></p>
</div>
- <!-- 页面底部结束: -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
@@ -27,4 +25,4 @@
var pageTracker = _gat._getTracker("UA-248512-5");
pageTracker._trackPageview();
} catch(err) {}
- </script> \ No newline at end of file
+ </script>
diff --git a/templates/header.html b/templates/header.html
index b362a5e6..1da107b6 100644
--- a/templates/header.html
+++ b/templates/header.html
@@ -1,13 +1,14 @@
{% load extra_tags %}
+{% load i18n %}
<div id="top">
<div id="header">
{% if request.user.is_authenticated %}
- <a href="/users/{{ request.user.id }}/{{ request.user.username }}/">{{ request.user.username }}</a> {% get_score_badge request.user %} <a href="/logout/">退出登录</a>
+ <a href="/users/{{ request.user.id }}/{{ request.user.username }}/">{{ request.user.username }}</a> {% get_score_badge request.user %} <a href="/logout/">{% trans "Logout" %}</a>
{% else %}
- <a href="/account/signin">登录</a>
+ <a href="/account/signin">{% trans "Login" %}</a>
{% endif %}
- <a href="/about">关于本站</a>
- <a href="/faq">常见问题</a>
+ <a href="/about">{% trans "About us" %}</a>
+ <a href="/faq">{% trans "faq" %}</a>
</div>
</div>
<div id="roof">
@@ -17,24 +18,24 @@
<td width="23%">
<div id="logo">
<a href="/">
- <img src="/content/images/logo.png" title="回到首页" />
+ <img src="/content/images/logo.png" title="{% trans 'link to homepage'%}" />
</a>
</div>
</td>
<td width="77%" valign="bottom">
<div class="nav">
- <a id="nav_questions" href="/questions/" >问题</a>
- <a id="nav_tags" href="/tags/">标签</a>
- <a id="nav_users" href="/users/">用户</a>
- <a id="nav_books" href="/books/">读书</a>
- <a id="nav_badges" href="/badges/">奖牌榜</a>
- <a id="nav_unanswered" href="/questions/unanswered/">没有回答的问题</a>
+ <a id="nav_questions" href="/questions/" >{% trans "Questions" %}</a>
+ <a id="nav_tags" href="/tags/">{% trans "Tags" %}</a>
+ <a id="nav_users" href="/users/">{% trans "Users" %}</a>
+ <a id="nav_books" href="/books/">{% trans "Books" %}</a>
+ <a id="nav_badges" href="/badges/">{% trans "Badges" %}</a>
+ <a id="nav_unanswered" href="/questions/unanswered/">{% trans "Unanswered" %}</a>
{% if request.user.is_authenticated %}
- <a id="nav_profile" href="/users/{{ request.user.id }}/{{ request.user.username }}/">我的资料</a>
+ <a id="nav_profile" href="/users/{{ request.user.id }}/{{ request.user.username }}/">{% trans "Profile" %}</a>
{% endif %}
<div class="focus">
- <a id="nav_ask" href="/questions/ask/" class="special">我要提问</a>
+ <a id="nav_ask" href="/questions/ask/" class="special">{% trans "Ask a question" %}</a>
</div>
</div>
@@ -49,16 +50,16 @@
<form action="/search/" method="GET">
<div>
<input type="text" class="searchInput" value="{{ keywords }}" name="q" id="keywords" >
- <input type="submit" name="Submit" value="搜索" class="searchBtn" >
+ <input type="submit" name="Submit" value="{% trans 'Search' %}" class="searchBtn" >
</div>
<div class="options">
- <input id="type-question" type="radio" class="" value="question" name="t" checked >问题
- <input id="type-tag" type="radio" class="" value="tag" name="t" >标签
- <input id="type-user" type="radio" class="" value="user" name="t" >用户
+ <input id="type-question" type="radio" class="" value="question" name="t" checked >{% trans "Questions" %}
+ <input id="type-tag" type="radio" class="" value="tag" name="t" >{% trans "Tags" %}
+ <input id="type-user" type="radio" class="" value="user" name="t" >{% trans "Users" %}
</div>
</form>
</td>
</tr>
</table>
</div>
- </div> \ No newline at end of file
+ </div>
diff --git a/templates/index.html b/templates/index.html
index bc159ca9..ba3e2229 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -2,9 +2,10 @@
{% load extra_tags %}
{% load humanize %}
{% load extra_filters %}
-{% block title %}{% spaceless %}首页{% endspaceless %}{% endblock %}
-{% block meta %}<meta name="keywords" content="技术问答社区,中国程序员,编程技术社区,程序员社区,程序员论坛,程序员wiki,程序员博客" />
- <meta name="description" content="中国程序员的编程技术问答社区。我们做专业的、可协作编辑的技术问答社区。" />{% endblock %}
+{% load i18n %}
+{% block title %}{% spaceless %}{% trans "Home" %}{% endspaceless %}{% endblock %}
+{% block meta %}<meta name="keywords" content="{{ APP_KEYWORDS }}" />
+ <meta name="description" content="{{ APP_DESCRIPTION }}" />{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -17,15 +18,14 @@
{% endblock %}
{% block content %}
<div class="tabBar">
- <div class="headQuestions">问题列表</div>
+ <div class="headQuestions">{% trans "Questions" %}</div>
<div class="tabsA">
- <a id="latest" href="?sort=latest" title="最新更新的问题" >最新问题</a>
- <a id="hottest" href="?sort=hottest" title="被回复最多的问题" >热门问题</a>
- <a id="mostvoted" href="?sort=mostvoted" title="投票次数最多的问题" >最有价值的问题</a>
- <a id="all" href="/questions/" title="所有问题" >全部问题</a>
+ <a id="latest" href="?sort=latest" title="{% trans 'Newest updated questions' %}" >{% trans "Newest" %}</a>
+ <a id="hottest" href="?sort=hottest" title="{% trans 'Questions with most answers' %}" >{% trans "Hottest" %}</a>
+ <a id="mostvoted" href="?sort=mostvoted" title="{% trans 'Questions with most votes' %}" >{% trans "Best" %}</a>
+ <a id="all" href="/questions/" title="{% trans 'All questions' %}" >{% trans "All" %}</a>
</div>
</div>
-<!-- 问题列表 -->
<div id="listA">
{% for question in questions %}
<div class="qstA">
@@ -42,9 +42,9 @@
<td><span class="num">{{ question.view_count|cnprog_intword|safe }}</span> </td>
</tr>
<tr>
- <td><span class="unit">回答</span></td>
- <td><span class="unit">票数</span></td>
- <td><span class="unit">浏览</span></td>
+ <td><span class="unit">{% trans "Answers" %}</span></td>
+ <td><span class="unit">{% trans "Votes" %}</span></td>
+ <td><span class="unit">{% trans "Visits" %}</span></td>
</tr>
</table>
</div>
@@ -52,7 +52,7 @@
{{ question.summary }}...
</div>
{% if question.wiki %}
- <span class="from wiki">社区Wiki</span>
+ <span class="from wiki">{% trans "Community wiki" %}</span>
<span class="date" title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</span>
{% else %}
<div class="from">
@@ -64,7 +64,7 @@
{% endif %}
<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="{% trans 'Browse questions with tag of ' %}'{{ tag }}'" rel="tag">{{ tag }}</a>
{% endfor %}
</div>
</div>
@@ -75,47 +75,46 @@
{% block sidebar %}
{% if not request.user.is_authenticated %}
<div class="boxA">
- <h3>CNProg欢迎您!</h3>
+ <h3>{% trans "Welcome" %}</h3>
<div class="body">
- <p>CNProg是一个<strong>面向程序员</strong>的可协作编辑的<strong>开放源代码问答社区</strong>。</p>
- <p> 您可以在这里提问各类<strong>程序技术问题</strong> - 问题不分语言和平台。 同时也希望您对力所能及的问题,给予您的宝贵答案。</p>
- <div class="more"><a href="/about">关于本站 »</a></div>
+ {{ APP_INTRO|safe }}
+ <div class="more"><a href="/about">{% trans "About us" %} »</a></div>
<div class="more"><a href="/faq">FAQ »</a></div>
</div>
</div>
{% endif %}
<div class="boxB">
- <h3>最新标签</h3>
+ <h3>{% trans "Recent tags" %}</h3>
<div class="body">
<p class="tagsbox">
{% for tag in tags %}
- <a rel="tag" title="查看有关'{{ tag.name }}'的问题" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a>
+ <a rel="tag" title="{% trans 'Browse questions with tag of ' %}'{{ tag.name }}'" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a>
{% endfor %}
</p>
- <div class="more"><a href="/tags">受欢迎的标签 »</a> </div>
+ <div class="more"><a href="/tags">{% trans "Popular tags" %} »</a> </div>
</div>
</div>
<div class="boxB">
- <h3>最新奖牌</h3>
+ <h3>{% trans "Recent badges" %}</h3>
<div class="body">
<ul class="badge-list">
{% for award in awards %}
<li>
<a href="/badges/{{award.badge_id}}/{{award.badge_name}}" title="{{ award.badge_description }}" class="medal">
- <span class="badge{{ award.badge_type }}">&#9679;</span>&nbsp;{{ award.badge_name }}</a> 授予
+ <span class="badge{{ award.badge_type }}">&#9679;</span>&nbsp;{{ award.badge_name }}</a>
<a href="/users/{{award.user_id}}/{{award.user_name}}">{{ award.user_name }}</a>
</li>
{% endfor %}
</ul>
- <div class="more"><a href="/badges/">所有奖牌 »</a> </div>
+ <div class="more"><a href="/badges/">{% trans "All badges" %} »</a> </div>
</div>
</div>
<div id="feeds">
-<a href="/feeds/rss" title="RSS订阅最新30个问题">订阅最新问题</a>
+<a href="/feeds/rss" title="{% trans 'RSS feed of recent 30 questions' %}">{% trans "Subscribe" %}</a>
</div>
{% endblock %}
{% block tail %}
<div style="padding:5px 0 5px 5px;">
-<span class="evenMore">在寻找更多问题吗?请查阅 <a href="/questions/">全部问题列表</a>,或者 <a href="/tags/">受欢迎的标签</a>。请帮助我们回答 <a href="/questions/unanswered">没有回答的问题</a>。</span>
+<span class="evenMore">{% trans "Are you looking for more questions? Try to browse" %} <a href="/questions/">{% trans "All questions" %}</a>{% trans " or "%} <a href="/tags/">{% trans "Popular tags" %}</a>{% trans ". Please help us answer "%}<a href="/questions/unanswered">{% trans "Unanswered questions" %}</a></span>
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
diff --git a/templates/logout.html b/templates/logout.html
index b414d8d8..48a2deaf 100644
--- a/templates/logout.html
+++ b/templates/logout.html
@@ -1,7 +1,8 @@
{% extends "base_content.html" %}
{% load extra_tags %}
{% load humanize %}
-{% block title %}{% spaceless %}退出登录{% endspaceless %}{% endblock %}
+{% load i18n %}
+{% block title %}{% spaceless %}{% trans "Logout" %}{% endspaceless %}{% endblock %}
{% block forejs %}
<script type="text/javascript">
$().ready(function(){
@@ -12,12 +13,10 @@
{% endblock %}
{% block content %}
<div class="headNormal">
- 退出登录
+ {% trans "Logout" %}
</div>
<div id="main-body" style="width:100%">
- <p> 您是系统的<strong class="darkred">注册</strong>用户,可以随时使用OpenID帐号登录系统或者注销登录。 </p>
-
- <input id="btLogout" type="button" class="submit" value="点击退出登录" style="width:150px">
+ <input id="btLogout" type="button" class="submit" value="OK" style="width:150px">
<br><br>
</div>
{% endblock %}