summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--django_authopenid/urls.py6
-rw-r--r--forum/views.py25
-rw-r--r--locale/es/LC_MESSAGES/django.po196
-rw-r--r--templates/404.html6
-rw-r--r--templates/500.html4
-rw-r--r--templates/answer_edit_tips.html2
-rw-r--r--templates/badge.html2
-rw-r--r--templates/book.html4
-rw-r--r--templates/faq.html4
-rw-r--r--templates/footer.html6
-rw-r--r--templates/header.html6
-rw-r--r--templates/index.html16
-rw-r--r--templates/question.html18
-rw-r--r--templates/question_edit_tips.html2
-rw-r--r--templates/revisions_answer.html2
-rw-r--r--templates/revisions_question.html2
-rw-r--r--templates/tags.html4
-rw-r--r--templates/user_info.html2
-rw-r--r--templates/user_reputation.html2
-rw-r--r--templates/user_stats.html4
-rw-r--r--templates/user_tabs.html14
-rw-r--r--templates/user_votes.html4
-rw-r--r--templates/users_questions.html6
-rw-r--r--urls.py85
24 files changed, 278 insertions, 144 deletions
diff --git a/django_authopenid/urls.py b/django_authopenid/urls.py
index 6843e5c0..9c0887d8 100644
--- a/django_authopenid/urls.py
+++ b/django_authopenid/urls.py
@@ -21,10 +21,10 @@ urlpatterns = patterns('django_authopenid.views',
# name='user_confirmchangepw'),
# manage account settings
- #url(r'^$', 'account_settings', name='user_account_settings'),
+ #url(r'^$', _('account_settings'), name='user_account_settings'),
#url(r'^%s$' % _('password/'), 'changepw', name='user_changepw'),
- url(r'^%s$' % 'email/', 'changeemail', name='user_changeemail',kwargs = {'action':'change'}),
- url(r'^%s%s$' % ('email/','validate/'), 'changeemail', name='user_changeemail',kwargs = {'action':'validate'}),
+ url(r'^%s$' % _('email/'), 'changeemail', name='user_changeemail',kwargs = {'action':'change'}),
+ url(r'^%s%s$' % (_('email/'),_('validate/')), 'changeemail', name='user_changeemail',kwargs = {'action':'validate'}),
#url(r'^%s$' % _('openid/'), 'changeopenid', name='user_changeopenid'),
url(r'^%s$' % _('delete/'), 'delete', name='user_delete'),
)
diff --git a/forum/views.py b/forum/views.py
index 6ef7bd6d..a118cc57 100644
--- a/forum/views.py
+++ b/forum/views.py
@@ -301,7 +301,7 @@ def ask(request):
ip_addr = request.META['REMOTE_ADDR'],
)
question.save()
- return HttpResponseRedirect('%s%s%s' % ( _('/account/'),_('signin/'),('newquestion/')))
+ return HttpResponseRedirect('/%s%s%s' % ( _('account/'),_('signin/'),_('newquestion/')))
else:
form = AskForm()
@@ -692,7 +692,8 @@ def answer(request, id):
ip_addr = request.META['REMOTE_ADDR'],
)
anon.save()
- return HttpResponseRedirect('/account/signin/newanswer')
+ return HttpResponseRedirect('/%s%s%s' % ( _('account/'),
+ _('signin/'),_('newquestion/')))
return HttpResponseRedirect(question.get_absolute_url())
@@ -733,7 +734,7 @@ def tags(request):
'has_next': tags.has_next(),
'previous': tags.previous_page_number(),
'next': tags.next_page_number(),
- 'base_url' : '/tags/?sort=%s&' % sortby
+ 'base_url' : '/%s?sort=%s&' % (_('tags/'), sortby)
}
}, context_instance=RequestContext(request))
@@ -986,11 +987,11 @@ def users(request):
# default
else:
objects_list = Paginator(User.objects.all().order_by('-reputation'), USERS_PAGE_SIZE)
- base_url = '/users/?sort=%s&' % sortby
+ base_url = '/%s?sort=%s&' % (_('users/'), sortby)
else:
sortby = "reputation"
objects_list = Paginator(User.objects.extra(where=['username like %s'], params=['%' + suser + '%']).order_by('-reputation'), USERS_PAGE_SIZE)
- base_url = '/users/?name=%s&sort=%s&' % (suser, sortby)
+ base_url = '/%s?name=%s&sort=%s&' % (_('users/'), suser, sortby)
try:
users = objects_list.page(page)
@@ -1166,8 +1167,8 @@ def user_recent(request, user_id, user_view):
self.type_id = type
self.title = title
self.summary = summary
- self.title_link = u'/questions/%s/%s#%s' %(question_id, title, answer_id)\
- if int(answer_id) > 0 else u'/questions/%s/%s' %(question_id, title)
+ self.title_link = u'/%s%s/%s#%s' %(_('questions/'),question_id, title, answer_id)\
+ if int(answer_id) > 0 else u'/%s%s/%s' %(_('questions/'), question_id, title)
class AwardEvent:
def __init__(self, time, type, id):
self.time = time
@@ -1406,9 +1407,9 @@ def user_responses(request, user_id, user_view):
def __init__(self, type, title, question_id, answer_id, time, username, user_id, content):
self.type = type
self.title = title
- self.titlelink = u'/questions/%s/%s#%s' % (question_id, title, answer_id)
+ self.titlelink = u'/%s%s/%s#%s' % (_('questions/'), question_id, title, answer_id)
self.time = time
- self.userlink = u'/users/%s/%s/' % (user_id, username)
+ self.userlink = u'/%s%s/%s/' % (_('users/'), user_id, username)
self.username = username
self.content = u'%s ...' % strip_tags(content)[:300]
@@ -1741,7 +1742,7 @@ def __generate_comments_json(obj, type, user):
"add_date" : comment.added_at.strftime('%Y-%m-%d'),
"text" : comment.comment,
"user_display_name" : comment_user.username,
- "user_url" : "/users/%s/%s" % (comment_user.id, comment_user.username),
+ "user_url" : "/%s%s/%s" % (_('users/'), comment_user.id, comment_user.username),
"delete_url" : delete_url
})
@@ -2003,9 +2004,9 @@ def search(request):
if keywords is None:
return HttpResponseRedirect('/')
if search_type == 'tag':
- return HttpResponseRedirect('/tags/?q=%s&page=%s' % (keywords.strip(), page))
+ return HttpResponseRedirect('/%s?q=%s&page=%s' % (_('tags/'), keywords.strip(), page))
elif search_type == "user":
- return HttpResponseRedirect('/users/?q=%s&page=%s' % (keywords.strip(), page))
+ return HttpResponseRedirect('/%s?q=%s&page=%s' % (_('users/'), keywords.strip(), page))
elif search_type == "question":
template_file = "questions.html"
diff --git a/locale/es/LC_MESSAGES/django.po b/locale/es/LC_MESSAGES/django.po
index bcbf65bf..b2580d42 100644
--- a/locale/es/LC_MESSAGES/django.po
+++ b/locale/es/LC_MESSAGES/django.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-08-09 01:12-0300\n"
+"POT-Creation-Date: 2009-08-09 22:45-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: Bruno Sarlo <bsarlo@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -10,16 +10,149 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: settings.py:12
+#: settings.py:12 urls.py:25 forum/views.py:304 forum/views.py:695
msgid "account/"
msgstr "cuenta/"
-#: settings.py:12 django_authopenid/urls.py:9 django_authopenid/urls.py:10
-#: django_authopenid/urls.py:11 django_authopenid/urls.py:13
-#: forum/views.py:304
+#: settings.py:12 urls.py:26 django_authopenid/urls.py:9
+#: django_authopenid/urls.py:10 django_authopenid/urls.py:11
+#: django_authopenid/urls.py:13 forum/views.py:304 forum/views.py:696
msgid "signin/"
msgstr "ingresar/"
+#: urls.py:22
+msgid "upfiles/"
+msgstr "archivossubidos/"
+
+#: urls.py:27 urls.py:28 urls.py:29 django_authopenid/urls.py:26
+#: django_authopenid/urls.py:27
+msgid "email/"
+msgstr "email/"
+
+#: urls.py:27
+msgid "change/"
+msgstr "cambiar/"
+
+#: urls.py:28
+msgid "sendkey/"
+msgstr "enviarclave/"
+
+#: urls.py:29
+msgid "verify/"
+msgstr "verificar/"
+
+#: urls.py:30
+msgid "about/"
+msgstr "acercadenosotros/"
+
+#: urls.py:31
+msgid "faq/"
+msgstr "preguntasfrecuentes/"
+
+#: urls.py:32
+msgid "privacy/"
+msgstr "códigodeprivacidad/"
+
+#: urls.py:33
+msgid "logout/"
+msgstr "cerrarsesion/"
+
+#: urls.py:34 urls.py:35 urls.py:36 urls.py:48
+msgid "answers/"
+msgstr "respuestas/"
+
+#: urls.py:34 urls.py:46
+msgid "comments/"
+msgstr "comentarios/"
+
+#: urls.py:35 urls.py:40 urls.py:54
+msgid "edit/"
+msgstr "editar/"
+
+#: urls.py:36 urls.py:45
+msgid "revisions/"
+msgstr "revisiones/"
+
+#: urls.py:37 urls.py:38 urls.py:39 urls.py:40 urls.py:41 urls.py:42
+#: urls.py:43 urls.py:44 urls.py:45 urls.py:46 urls.py:47 forum/feed.py:19
+#: forum/views.py:1170 forum/views.py:1171 forum/views.py:1410
+msgid "questions/"
+msgstr "preguntas/"
+
+#: urls.py:38 urls.py:64
+msgid "ask/"
+msgstr "preguntar/"
+
+#: urls.py:39
+msgid "unanswered/"
+msgstr "sinrespuesta/"
+
+#: urls.py:41
+msgid "close/"
+msgstr "cerrar/"
+
+#: urls.py:42
+msgid "reopen/"
+msgstr "reabrir/"
+
+#: urls.py:43
+msgid "answer/"
+msgstr "respuesta/"
+
+#: urls.py:44
+msgid "vote/"
+msgstr "votar/"
+
+#: urls.py:47 urls.py:48 django_authopenid/urls.py:29
+msgid "delete/"
+msgstr "borrar/"
+
+#: urls.py:50
+#, fuzzy
+msgid "question/"
+msgstr "preguntas/"
+
+#: urls.py:51 urls.py:52 forum/views.py:737 forum/views.py:2007
+msgid "tags/"
+msgstr "etiquetas/"
+
+#: urls.py:53 urls.py:54 urls.py:55 forum/views.py:990 forum/views.py:994
+#: forum/views.py:1412 forum/views.py:2009
+msgid "users/"
+msgstr "usuarios/"
+
+#: urls.py:56 urls.py:57
+msgid "badges/"
+msgstr "distinciones/"
+
+#: urls.py:58
+msgid "messages/"
+msgstr "mensajes/"
+
+#: urls.py:58
+msgid "markread/"
+msgstr "marcarleido/"
+
+#: urls.py:60
+msgid "nimda/"
+msgstr "administrador/"
+
+#: urls.py:61
+msgid "feeds/"
+msgstr ""
+
+#: urls.py:62
+msgid "upload/"
+msgstr "subir/"
+
+#: urls.py:63 urls.py:64 urls.py:65
+msgid "books/"
+msgstr "libros/"
+
+#: urls.py:66
+msgid "search/"
+msgstr "buscar/"
+
#: django_authopenid/forms.py:67 django_authopenid/views.py:102
msgid "i-names are not supported"
msgstr "i-names no son soportados"
@@ -111,10 +244,9 @@ msgstr "la nueva contraseña no coincide"
msgid "Incorrect username."
msgstr "Nombre de usuario incorrecto"
-#: django_authopenid/urls.py:10
-#, fuzzy
+#: django_authopenid/urls.py:10 forum/views.py:304 forum/views.py:696
msgid "newquestion/"
-msgstr "preguntas/"
+msgstr "nuevapregunta/"
#: django_authopenid/urls.py:11
msgid "newanswer/"
@@ -140,14 +272,15 @@ msgstr "registrarse/"
msgid "sendpw/"
msgstr "enviarcontrasena/"
-#: django_authopenid/urls.py:29
-msgid "delete/"
-msgstr "borrar/"
+#: django_authopenid/urls.py:27
+#, fuzzy
+msgid "validate/"
+msgstr "Cambiar dirección email"
#: django_authopenid/views.py:108
#, python-format
msgid "OpenID %(openid_url)s is invalid"
-msgstr ""
+msgstr "El OpenID %(openid_url)s no es valido"
#: django_authopenid/views.py:417 django_authopenid/views.py:544
msgid "Welcome"
@@ -256,7 +389,7 @@ msgstr "pregunta"
#: forum/const.py:57 templates/book.html:110
msgid "answer"
-msgstr "resputa"
+msgstr "respuesta"
#: forum/const.py:58
msgid "commented question"
@@ -342,10 +475,6 @@ msgstr " - "
msgid "latest questions"
msgstr "últimas preguntas"
-#: forum/feed.py:19
-msgid "questions/"
-msgstr "preguntas/"
-
#: forum/forms.py:14 templates/answer_edit_tips.html:34
#: templates/answer_edit_tips.html.py:38 templates/question_edit_tips.html:31
#: templates/question_edit_tips.html:36
@@ -580,31 +709,27 @@ msgstr "preferencias del usuario"
msgid "profile - user preferences"
msgstr "perfil - preferencia de "
-#: forum/views.py:304
-msgid "/account/"
-msgstr "/cuenta/"
-
-#: forum/views.py:943
+#: forum/views.py:944
#, python-format
msgid "subscription saved, %(email)s needs validation"
msgstr "subscripción guardada, %(email)s necesita validación"
-#: forum/views.py:1853
+#: forum/views.py:1854
msgid "uploading images is limited to users with >60 reputation points"
msgstr "para subir imagenes debes tener más de 60 puntos de reputación"
-#: forum/views.py:1855
+#: forum/views.py:1856
msgid "allowed file types are 'jpg', 'jpeg', 'gif', 'bmp', 'png', 'tiff'"
msgstr ""
"los tipos de archivos permitidos son 'jpg', 'jpeg', 'gif', 'bmp', 'png', "
"'tiff'"
-#: forum/views.py:1857
+#: forum/views.py:1858
#, python-format
msgid "maximum upload file size is %sK"
msgstr "tamaño máximo permitido es archivo %sK"
-#: forum/views.py:1859
+#: forum/views.py:1860
#, python-format
msgid ""
"Error uploading file. Please contact the site administrator. Thank you. %s"
@@ -1317,7 +1442,6 @@ msgstr "respuestas"
#: templates/questions.html.py:156 templates/tags.html:47
#: templates/unanswered.html:75 templates/unanswered.html.py:109
#: templates/users_questions.html:52
-#, fuzzy
msgid "see questions tagged"
msgstr "ver preguntas etiquetadas"
@@ -1682,7 +1806,7 @@ msgstr "¿Porqué usar y modificar etiquetas?"
#: templates/question_retag.html:89
msgid "tags help us keep Questions organized"
-msgstr ""
+msgstr "las etiquetas nos permiten mantener las Preguntas organizadas"
#: templates/question_retag.html:95
msgid "tag editors receive special awards from the community"
@@ -2199,11 +2323,11 @@ msgstr "Ups, parece que hay errores:"
#: templates/authopenid/complete.html:47
msgid "Screen name label"
-msgstr ""
+msgstr "Nombre de Usuario"
#: templates/authopenid/complete.html:48
msgid "Email address label"
-msgstr "su email (correo electrónico)"
+msgstr "Su email (correo electrónico)"
#: templates/authopenid/complete.html:49
msgid "create account"
@@ -2238,6 +2362,8 @@ msgid ""
"Note: After deleting your account, anyone will be able to register this "
"username."
msgstr ""
+"Nota: Luego de borrar tu cuenta, cualquiera va a poder registrarse con este "
+"nombre de usuario."
#: templates/authopenid/delete.html:17
msgid "Check confirm box, if you want delete your account."
@@ -2353,11 +2479,11 @@ msgstr ""
#: templates/authopenid/signin.html:40
msgid "Click to sign in through any of these services."
-msgstr ""
+msgstr "Clickea para entrar por cualquiera de estos servicios."
#: templates/authopenid/signin.html:103
msgid "Enter your <span id=\"enter_your_what\">Provider user name</span>"
-msgstr ""
+msgstr "Ingresa tu <span id=\"enter_your_what\">nombre de usuario</span>"
#: templates/authopenid/signin.html:110
msgid ""
@@ -2459,3 +2585,9 @@ msgstr "Registrate con tu OpenID"
#: templates/authopenid/signup.html:51
msgid "Login with your OpenID"
msgstr "Ingresar con tu OpenID"
+
+#~ msgid "/account/"
+#~ msgstr "/cuenta/"
+
+#~ msgid "content/"
+#~ msgstr "contenido/"
diff --git a/templates/404.html b/templates/404.html
index cd23a36b..6b3fc368 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -27,7 +27,7 @@
<ul>
<li>{% trans "this question or answer has been deleted;" %}</li>
<li>{% trans "url has error - please check it;" %}</li>
- <li>{% trans "the page you tried to visit is protected or you don't have sufficient points, see" %} <a href="/faq"> faq</a>;</li>
+ <li>{% trans "the page you tried to visit is protected or you don't have sufficient points, see" %} <a href="{% url faq %}"> faq</a>;</li>
<li>{% trans "if you believe this error 404 should not have occured, please" %}
<a href="{{feedback_site_url}}" target="_blank">{% trans "report this problem" %}</a></li>
</u>
@@ -39,8 +39,8 @@
<script type="text/javascript" src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
<ul>
<li><a href="#" id="linkPrevious">{% trans "back to previous page" %} » </li>
- <li><a href="/questions">{% trans "see all questions" %} » </a></li>
- <li><a href="/tags/">{% trans "see all tags" %} » </a></li>
+ <li><a href="{% url questions %}">{% trans "see all questions" %} » </a></li>
+ <li><a href="{% url tags %}">{% trans "see all tags" %} » </a></li>
</u>
</div>
diff --git a/templates/500.html b/templates/500.html
index 52dcafae..1990edbc 100644
--- a/templates/500.html
+++ b/templates/500.html
@@ -25,8 +25,8 @@
{% trans "please report the error to the site administrators if you wish" %}
<ul>
<li><a href="#" id="linkPrevious">{% trans "back to previous page" %}</li>
- <li><a href="/questions">{% trans "see latest questions" %}</a></li>
- <li><a href="/tags/">{% trans "see tags" %}</a></li>
+ <li><a href="{% url questions %}">{% trans "see latest questions" %}</a></li>
+ <li><a href="{% url tags %}">{% trans "see tags" %}</a></li>
</u>
</div>
diff --git a/templates/answer_edit_tips.html b/templates/answer_edit_tips.html
index 31f71e34..98a5ab16 100644
--- a/templates/answer_edit_tips.html
+++ b/templates/answer_edit_tips.html
@@ -16,7 +16,7 @@
{% trans "be clear and concise" %}
</li>
</ul>
- <a href="/faq/" target="_blank" title="{% trans "see frequently asked questions" %}" style="float:right;position:relative">faq »</a>
+ <a href="{% url faq %}" target="_blank" title="{% trans "see frequently asked questions" %}" style="float:right;position:relative">faq »</a>
<br>
</div>
</div>
diff --git a/templates/badge.html b/templates/badge.html
index 029ba0d9..73cba4ba 100644
--- a/templates/badge.html
+++ b/templates/badge.html
@@ -28,7 +28,7 @@
</div>
<div id="award-list" style="clear:both;margin-left:20px;line-height:25px;">
{% for award in awards %}
- <p style="width:185px;float:left"><a href="/users/{{ award.id }}/{{ award.name }}">{{ award.name }}</a> {% get_score_badge_by_details award.rep award.gold award.silver award.bronze %}</p>
+ <p style="width:185px;float:left"><a href="{% url users %}{{ award.id }}/{{ award.name }}">{{ award.name }}</a> {% get_score_badge_by_details award.rep award.gold award.silver award.bronze %}</p>
{% endfor %}
</div>
diff --git a/templates/book.html b/templates/book.html
index dddd13e6..37bf0101 100644
--- a/templates/book.html
+++ b/templates/book.html
@@ -98,7 +98,7 @@
<div class="favorites-empty"> </div>
{% endif %}
<div id="question-summary-{{question.id}}" class="question-summary narrow">
- <a style="text-decoration: none;" href="/questions/{{question.id}}/{{question.get_question_title}}">
+ <a style="text-decoration: none;" href="{% url questions %}{{question.id}}/{{question.get_question_title}}">
<div class="stats">
<div class="votes">
<div class="vote-count-post">{{question.score|intcomma}}</div>
@@ -118,7 +118,7 @@
</a>
<div class="bookQuestionItem">
<h3>
- <a title="{{question.summary}}" href="/questions/{{question.id}}/{{question.title}}">{{question.title}}</a>
+ <a title="{{question.summary}}" href="{% url questions %}{{question.id}}/{{question.title}}">{{question.title}}</a>
</h3>
<div class="tags">
{% for tag in question.tagname_list %}
diff --git a/templates/faq.html b/templates/faq.html
index 78c433ae..8df711ca 100644
--- a/templates/faq.html
+++ b/templates/faq.html
@@ -115,7 +115,7 @@
<div>
<h3 class="subtitle">{% trans "To register, do I need to create new password?" %}</h3>
<p>{% trans "No, you don't have to. You can login through any service that supports OpenID, e.g. Google, Yahoo, AOL, etc." %}
- <strong><a href="/account/signin">{% trans "Login now!" %}</a> »</strong>
+ <strong><a href="{% url user_signin %}">{% trans "Login now!" %}</a> »</strong>
</p>
</div>
@@ -129,7 +129,7 @@
<h3 class="subtitle">{% trans "Still have questions?" %}</h3>
<p>{% trans "Please ask your question, help make our community better!" %}
<!--
- <a href="/tags/faq" class="big">{% trans "site title" %} {% trans "questions" %}</a>{% trans "." %}
+ <a href="{% url tags %}faq" class="big">{% trans "site title" %} {% trans "questions" %}</a>{% trans "." %}
-->
</p>
</div>
diff --git a/templates/footer.html b/templates/footer.html
index 637ca0d8..bac698cb 100644
--- a/templates/footer.html
+++ b/templates/footer.html
@@ -4,11 +4,11 @@
<!-- 页面底部开始: -->
<div id="ground">
<div class="footerLinks" >
- <a href="/about">{% trans "about" %}</a><span class="link-separator"> |</span>
- <a href="/faq">{% trans "faq" %}</a><span class="link-separator"> |</span>
+ <a href="{% url about %}">{% trans "about" %}</a><span class="link-separator"> |</span>
+ <a href="{% url faq %}">{% trans "faq" %}</a><span class="link-separator"> |</span>
<a href="{{ blog_url }}">{% trans "blog" %}</a><span class="link-separator"> |</span>
<a href="{{ webmaster_email }}">{% trans "contact us" %}</a><span class="link-separator"> |</span>
- <a href="/privacy">{% trans "privacy policy" %}</a><span class="link-separator"> |</span>
+ <a href="{% url privacy %}">{% trans "privacy policy" %}</a><span class="link-separator"> |</span>
<a href="{{ feedback_url }}" target="_blank">{% trans "give feedback" %}</a>
</div>
<p style="margin-top:10px;">
diff --git a/templates/header.html b/templates/header.html
index 5751bed0..6f8657b3 100644
--- a/templates/header.html
+++ b/templates/header.html
@@ -6,7 +6,7 @@
<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="{% url users %}{{ request.user.id }}/{{ request.user.username }}/">{{ request.user.username }}</a> {% get_score_badge request.user %}
<a href="{% url logout %}">{% trans "logout" %}</a>
{% else %}
<a href="{% url user_signin %}">{% trans "login" %}</a>
@@ -39,7 +39,7 @@
{% comment %}<!-- i think this needs to be removed -e.f. -->
{% if request.user.is_authenticated %}
- <a id="nav_profile" href="/users/{{ request.user.id }}/{{ request.user.username }}/">{% trans "my profile" %}</a>
+ <a id="nav_profile" href="{% url user %}{{ request.user.id }}/{{ request.user.username }}/">{% trans "my profile" %}</a>
{% endif %}
{% endcomment %}
</div>
@@ -52,7 +52,7 @@
<table width="100%" height="60" border="0" cellpadding="0" cellspacing="0" class="content">
<tr>
<td align="center" valign="middle">
- <form action="/search/" method="GET">
+ <form action="{% url search %}" method="GET">
<div>
<input type="text" class="searchInput" value="{{ keywords }}" name="q" id="keywords" >
<input type="submit" name="Submit" value="{% trans "search" %}" class="searchBtn" >
diff --git a/templates/index.html b/templates/index.html
index a1ab06a4..239b0ff4 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -24,7 +24,7 @@
<a id="latest" href="?sort=latest" title="{% trans "last updated questions" %}" >{% trans "newest" %}</a>
<a id="hottest" href="?sort=hottest" title="{% trans "hottest questions" %}" >{% trans "hottest" %}</a>
<a id="mostvoted" href="?sort=mostvoted" title="{% trans "most voted questions" %}" >{% trans "most voted" %}</a>
- <a id="all" href="/questions/" title="{% trans "all questions" %}" >{% trans "all questions" %}</a>
+ <a id="all" href="{% url questions %}" title="{% trans "all questions" %}" >{% trans "all questions" %}</a>
</div>
</div>
<!-- 问题列表 -->
@@ -80,8 +80,8 @@
<h3>{% trans "welcome to website" %}</h3>
<div class="body">
{{ settings.APP_INTRO|safe }}
- <div class="more"><a href="/about">{% trans "about" %} »</a></div>
- <div class="more"><a href="/faq">{% trans "faq" %} »</a></div>
+ <div class="more"><a href="{% url about %}">{% trans "about" %} »</a></div>
+ <div class="more"><a href="{% url faq %}">{% trans "faq" %} »</a></div>
</div>
</div>
{% endif %}
@@ -94,7 +94,7 @@
title="{% blocktrans with tag.name as tagname %}see questions tagged '{{tagname}}'{% endblocktrans %}" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a>
{% endfor %}
</p>
- <div class="more"><a href="/tags">{% trans "popular tags" %} »</a> </div>
+ <div class="more"><a href="{% url tags %}">{% trans "popular tags" %} »</a> </div>
</div>
</div>
<div class="boxB">
@@ -103,13 +103,13 @@
<ul class="badge-list">
{% for award in awards %}
<li>
- <a href="/badges/{{award.badge_id}}/{{award.badge_name}}" title="{{ award.badge_description }}" class="medal">
+ <a href="{% url 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> {% trans "given to" %}
- <a href="/users/{{award.user_id}}/{{award.user_name}}">{{ award.user_name }}</a>
+ <a href="{% url users %}{{award.user_id}}/{{award.user_name}}">{{ award.user_name }}</a>
</li>
{% endfor %}
</ul>
- <div class="more"><a href="/badges/">{% trans "all awards" %} »</a> </div>
+ <div class="more"><a href="{% url badges %}">{% trans "all awards" %} »</a> </div>
</div>
</div>
<div id="feeds">
@@ -118,7 +118,7 @@
{% endblock %}
{% block tail %}
<div style="padding:5px 0 5px 5px;">
-<span class="evenMore">{% trans "Still looking for more? See" %} <a href="/questions/">{% trans "complete list of questions" %}</a> {% trans "or" %} <a href="/tags/">{% trans "popular tags" %}</a>{% trans "." %} {% trans "Please help us answer" %} <a href="/questions/unanswered">{% trans "list of unanswered questions" %}</a>{% trans "." %}</span>
+<span class="evenMore">{% trans "Still looking for more? See" %} <a href="{% url questions %}">{% trans "complete list of questions" %}</a> {% trans "or" %} <a href="/tags/">{% trans "popular tags" %}</a>{% trans "." %} {% trans "Please help us answer" %} <a href="{% url questions %}unanswered">{% trans "list of unanswered questions" %}</a>{% trans "." %}</span>
</div>
{% endblock %}
<!-- index.html -->
diff --git a/templates/question.html b/templates/question.html
index eaff9da3..a0fc194d 100644
--- a/templates/question.html
+++ b/templates/question.html
@@ -27,7 +27,7 @@
{% if not question.closed and request.user.is_authenticated %}initEditor();{% endif %}
lanai.highlightSyntax();
- $('#btLogin').bind('click', function(){window.location.href='/account/signin/'; } )
+ $('#btLogin').bind('click', function(){window.location.href='{% url user_signin %}'; } )
});
function initEditor(){
@@ -112,7 +112,7 @@
<div id="question-tags" class="tags" >
{% for tag in question.tagname_list %}
<a href="{% url forum.views.tag tag|urlencode %}" class="post-tag"
- title="{% trans "see questions tagged" %}'{{ tag }}'{% trans "using tags" %}" rel="tag">{{ tag }}</a>
+ title="{% trans "see questions tagged" %} '{{ tag }}' {% trans "using tags" %}" rel="tag">{{ tag }}</a>
{% endfor %}
</div>
<div id="question-controls" style="clear:both;">
@@ -164,7 +164,7 @@
{% gravatar question.last_edited_by 32 %}
</td>
<td style="width:160px; vertical-align:top">
- <a href="/users/{{ question.last_edited_by.id }}/{{ question.last_edited_by.username }}">{{ question.last_edited_by.username }}</a>
+ <a href="{% url users %}{{ question.last_edited_by.id }}/{{ question.last_edited_by.username }}">{{ question.last_edited_by.username }}</a>
</td>
</tr>
{% else %}
@@ -179,7 +179,7 @@
{% gravatar question.last_edited_by 32 %}
</td>
<td style="width:160px; vertical-align:top">
- <div><a href="/users/{{ question.last_edited_by.id }}/{{ question.last_edited_by.username }}">{{ question.last_edited_by.username }}</a></div>
+ <div><a href="{% url users %}{{ question.last_edited_by.id }}/{{ question.last_edited_by.username }}">{{ question.last_edited_by.username }}</a></div>
<div>
{% get_score_badge question.last_edited_by %}
@@ -213,7 +213,7 @@
{% gravatar question.author 32 %}
</td>
<td align="left" style="width:160px;vertical-align:top">
- <div><a href="/users/{{ question.author.id }}/{{ question.author }}">{{ question.author }}</a></div>
+ <div><a href="{% url users %}{{ question.author.id }}/{{ question.author }}">{{ question.author }}</a></div>
<div>
{% get_score_badge question.author %}
</div>
@@ -346,7 +346,7 @@
{% gravatar answer.last_edited_by 32 %}
</td>
<td style="width:160px; vertical-align:top">
- <div><a href="/users/{{ answer.last_edited_by.id }}/{{ answer.last_edited_by.username }}">{{ answer.last_edited_by.username }}</a></div>
+ <div><a href="{% url users %}{{ answer.last_edited_by.id }}/{{ answer.last_edited_by.username }}">{{ answer.last_edited_by.username }}</a></div>
</td>
</tr>
@@ -362,7 +362,7 @@
{% gravatar answer.last_edited_by 32 %}
</td>
<td style="width:160px; vertical-align:top">
- <div><a href="/users/{{ answer.last_edited_by.id }}/{{ answer.last_edited_by.username }}">{{ answer.last_edited_by.username }}</a></div>
+ <div><a href="{% url users %}{{ answer.last_edited_by.id }}/{{ answer.last_edited_by.username }}">{{ answer.last_edited_by.username }}</a></div>
<div>
{% get_score_badge answer.last_edited_by %}
</div>
@@ -392,7 +392,7 @@
{% gravatar answer.author 32 %}
</td>
<td style="width:160px; vertical-align:top">
- <div><a href="/users/{{ answer.author.id }}/{{ answer.author.username }}">{{ answer.author }}</a></div>
+ <div><a href="{% url users %}{{ answer.author.id }}/{{ answer.author.username }}">{{ answer.author }}</a></div>
<div>
{% get_score_badge answer.author %}
</div>
@@ -503,7 +503,7 @@
<div class="questions-related">
{% for question in similar_questions %}
<p>
- <a href="/questions/{{question.id}}/{{ question.get_question_title }}">{{ question.get_question_title }}</a>
+ <a href="{% url questions %}{{question.id}}/{{ question.get_question_title }}">{{ question.get_question_title }}</a>
</p>
{% endfor %}
</div>
diff --git a/templates/question_edit_tips.html b/templates/question_edit_tips.html
index 4ac666a6..f57440c2 100644
--- a/templates/question_edit_tips.html
+++ b/templates/question_edit_tips.html
@@ -13,7 +13,7 @@
{% trans "be clear and concise" %}
</li>
</ul>
- <a href="/faq/" target="_blank" title="{% trans "see frequently asked questions" %}" style="float:right;position:relative">faq »</a>
+ <a href="{% url faq %}" target="_blank" title="{% trans "see frequently asked questions" %}" style="float:right;position:relative">faq »</a>
<br>
</div>
</div>
diff --git a/templates/revisions_answer.html b/templates/revisions_answer.html
index 9c2e53eb..23606dc9 100644
--- a/templates/revisions_answer.html
+++ b/templates/revisions_answer.html
@@ -73,7 +73,7 @@
</td>
<td style="width:120px; vertical-align:top">
<div style="height:18px">
- <a href="/users/{{ revision.author.id }}/{{ revision.author.username }}">{{ revision.author.username }}</a></div>
+ <a href="{% url users %}{{ revision.author.id }}/{{ revision.author.username }}">{{ revision.author.username }}</a></div>
<div>
{% get_score_badge revision.author %}
</div>
diff --git a/templates/revisions_question.html b/templates/revisions_question.html
index 7ada3e74..b76ced24 100644
--- a/templates/revisions_question.html
+++ b/templates/revisions_question.html
@@ -73,7 +73,7 @@
</td>
<td style="width:120px; vertical-align:top">
<div style="height:18px">
- <a href="/users/{{ revision.author.id }}/{{ revision.author.username }}">{{ revision.author.username }}</a></div>
+ <a href="{% url users %}{{ revision.author.id }}/{{ revision.author.username }}">{{ revision.author.username }}</a></div>
<div>
{% get_score_badge revision.author %}
</div>
diff --git a/templates/tags.html b/templates/tags.html
index 6f9b3aed..fa2b4201 100644
--- a/templates/tags.html
+++ b/templates/tags.html
@@ -28,8 +28,8 @@
<div class="tabBar">
<div class="headQuestions">{% trans "Tag list" %}</div>
<div class="tabsA">
- <a id="sort_name" href="/tags/?sort=name" class="off" title="{% trans "sorted alphabetically" %}">{% trans "by name" %}</a>
- <a id="sort_used" href="/tags/?sort=used" class="off" title="{% trans "sorted by frequency of tag use" %}">{% trans "by popularity" %}</a>
+ <a id="sort_name" href="{% url tags %}?sort=name" class="off" title="{% trans "sorted alphabetically" %}">{% trans "by name" %}</a>
+ <a id="sort_used" href="{% url tags %}?sort=used" class="off" title="{% trans "sorted by frequency of tag use" %}">{% trans "by popularity" %}</a>
</div>
</div>
<div id="searchtags">
diff --git a/templates/user_info.html b/templates/user_info.html
index 8d35015c..d6804d71 100644
--- a/templates/user_info.html
+++ b/templates/user_info.html
@@ -31,7 +31,7 @@
<th width="130" align="left"><strong>{% trans "Registered user" %}</strong></th>
<th width="230" align="right">
{% if request.user|can_view_user_edit:view_user %}
- <span class="user-edit-link"><a href="/users/{{ view_user.id }}/edit/">{% trans "update profile" %}</a></span>
+ <span class="user-edit-link"><a href="{% url users %}{{ view_user.id }}/edit/">{% trans "update profile" %}</a></span>
{% endif %}
</th>
</tr>
diff --git a/templates/user_reputation.html b/templates/user_reputation.html
index bb7200de..270bb37d 100644
--- a/templates/user_reputation.html
+++ b/templates/user_reputation.html
@@ -33,7 +33,7 @@
<div style="float:left;width:20px;color:red">{{ rep.negative }}</div>
</div>
- <a href="/questions/{{ rep.question_id }}/{{ rep.title }}">{{ rep.title }}</a> <span class="small">({{ rep.reputed_at }})</span>
+ <a href="{% url questions %}{{ rep.question_id }}/{{ rep.title }}">{{ rep.title }}</a> <span class="small">({{ rep.reputed_at }})</span>
</p>
{% endfor %}
</div>
diff --git a/templates/user_stats.html b/templates/user_stats.html
index 432a5b34..41253494 100644
--- a/templates/user_stats.html
+++ b/templates/user_stats.html
@@ -32,14 +32,14 @@
<div class="user-stats-table">
{% for answered_question in answered_questions %}
<div class="answer-summary">
- <a title="{{answered_question.summary}}" href="/questions/{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}">
+ <a title="{{answered_question.summary}}" href="{% url questions %}{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}">
<div class="answer-votes {% if answered_question.accepted %}answered-accepted{% endif %}"
title="{% blocktrans with answered_question.vote_count as vote_count %}the answer has been voted for {{ vote_count }} times{% endblocktrans %}&#13;{% if answered_question.accepted %}{% trans "this answer has been selected as correct" %}{%endif%}">
{{ answered_question.vote_count }}
</div>
</a>
<div class="answer-link">
- <a href="/questions/{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}">{{answered_question.title}}</a> {% if answered_question.comment_count %}<span
+ <a href="{% url questions %}{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}">{{answered_question.title}}</a> {% if answered_question.comment_count %}<span
title="{% blocktrans %}the answer has been commented {{ answered_question.comment_count }} times{% endblocktrans %}">({{answered_question.comment_count}})</span>{% endif %}
</div>
</div>
diff --git a/templates/user_tabs.html b/templates/user_tabs.html
index bcc12b8f..96cc5aca 100644
--- a/templates/user_tabs.html
+++ b/templates/user_tabs.html
@@ -4,28 +4,28 @@
<div class="tabBar">
<div class="tabsA">
<a id="stats" {% ifequal tab_name "stats" %}class="on"{% endifequal %}
- title="{% trans "User profile" %}" href="/users/{{view_user.id}}/{{view_user.username}}?sort=stats">{% trans "overview" %}</a>
+ title="{% trans "User profile" %}" href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=stats">{% trans "overview" %}</a>
<a id="recent" {% ifequal tab_name "recent" %}class="on"{% endifequal %}
- title="{% trans "recent activity" %}" href="/users/{{view_user.id}}/{{view_user.username}}?sort=recent">{% trans "recent activity" %}</a>
+ title="{% trans "recent activity" %}" href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=recent">{% trans "recent activity" %}</a>
{% if request.user|is_user_self:view_user %}
<a id="responses" {% ifequal tab_name "responses" %}class="on"{% endifequal %}
title="{% trans "comments and answers to others questions" %}"
- href="/users/{{view_user.id}}/{{view_user.username}}?sort=responses">{% trans "responses" %}</a>
+ href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=responses">{% trans "responses" %}</a>
{% endif %}
<a id="reputation" {% ifequal tab_name "reputation" %}class="on"{% endifequal %}
title="{% trans "graph of user reputation" %}"
- href="/users/{{view_user.id}}/{{view_user.username}}?sort=reputation">{% trans "reputation history" %}</a>
+ href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=reputation">{% trans "reputation history" %}</a>
{% if request.user|can_view_user_votes:view_user %}
<a id="votes" {% ifequal tab_name "votes" %}class="on"{% endifequal %}
- title="{% trans "user vote record" %}" href="/users/{{view_user.id}}/{{view_user.username}}?sort=votes">{% trans "casted votes" %}</a>
+ title="{% trans "user vote record" %}" href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=votes">{% trans "casted votes" %}</a>
{% endif %}
<a id="favorites" {% ifequal tab_name "favorites" %}class="on"{% endifequal %}
title="{% trans "questions that user selected as his/her favorite"
- href="/users/{{view_user.id}}/{{view_user.username}}?sort=favorites">{% trans "favorites" %}</a>
+ href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=favorites">{% trans "favorites" %}</a>
{% if request.user|can_view_user_preferences:view_user %}
<a id="preferences" {% ifequal tab_name "preferences" %}class="on"{% endifequal %}
title="{% trans "user preference settings" %}"
- href="/users/{{view_user.id}}/{{view_user.username}}?sort=preferences">{% trans "settings" %}</a>
+ href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=preferences">{% trans "settings" %}</a>
{% endif %}
</div>
</div>
diff --git a/templates/user_votes.html b/templates/user_votes.html
index 80fa27ee..45134ac9 100644
--- a/templates/user_votes.html
+++ b/templates/user_votes.html
@@ -18,9 +18,9 @@
</div>
<div style="float:left;overflow:hidden;width:750px">
{% ifequal vote.answer_id 0 %}
- <span class="question-title-link"><a href="/questions/{{ vote.question_id }}/{{ vote.title }}">{{ vote.title }}</a></span>
+ <span class="question-title-link"><a href="{% url questions %}{{ vote.question_id }}/{{ vote.title }}">{{ vote.title }}</a></span>
{% else %}
- <span class="answer-title-link" ><a href="/questions/{{ vote.question_id }}/{{ vote.title }}#{{ vote.answer_id }}">{{ vote.title }}</a></span>
+ <span class="answer-title-link" ><a href="{% url questions %}{{ vote.question_id }}/{{ vote.title }}#{{ vote.answer_id }}">{{ vote.title }}</a></span>
{% endifequal %}
<div style="height:5px"></div>
</div>
diff --git a/templates/users_questions.html b/templates/users_questions.html
index dfb87c8f..dd818ddb 100644
--- a/templates/users_questions.html
+++ b/templates/users_questions.html
@@ -23,7 +23,7 @@
<div class="favorites-empty"> </div>
{% endif %}
<div id="question-summary-{{question.id}}" class="question-summary narrow">
- <a style="text-decoration: none;" href="/questions/{{question.id}}/{{question.get_question_title}}">
+ <a style="text-decoration: none;" href="{% url questions %}{{question.id}}/{{question.get_question_title}}">
<div class="stats">
<div class="votes">
<div class="vote-count-post">{{question.vote_count|intcomma}}</div>
@@ -43,7 +43,7 @@
</a>
<div class="summary">
<h3>
- <a title="{{question.summary}}" href="/questions/{{question.id}}/{{question.title}}">{{question.title}}</a>
+ <a title="{{question.summary}}" href="{% url questions %}{{question.id}}/{{question.title}}">{{question.title}}</a>
</h3>
<div class="tags">
{% convert2tagname_list question %}
@@ -55,7 +55,7 @@
<div class="started">
<span class="relativetime" title="{{question.last_activity_at}}">{% diff_date question.last_activity_at %}</span>
{% if question.la_username %}
- <a href="/users/{{question.la_user_id}}/{{question.la_username}}">{{question.la_username}}</a> {% get_score_badge_by_details question.la_user_reputation question.la_user_gold question.la_user_silver question.la_user_bronze%}
+ <a href="{% url users %}{{question.la_user_id}}/{{question.la_username}}">{{question.la_username}}</a> {% get_score_badge_by_details question.la_user_reputation question.la_user_gold question.la_user_silver question.la_user_bronze%}
{% endif %}
</div>
</div>
diff --git a/urls.py b/urls.py
index 4bc90bb9..cce4969e 100644
--- a/urls.py
+++ b/urls.py
@@ -4,6 +4,7 @@ from django.contrib import admin
from forum.views import index
from forum import views as app
from forum.feed import RssLastestQuestionsFeed
+from django.utils.translation import ugettext as _
admin.autodiscover()
feeds = {
@@ -18,50 +19,50 @@ urlpatterns = patterns('',
(r'^content/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': os.path.join(APP_PATH, 'templates/content').replace('\\','/')}
),
- (r'^upfiles/(?P<path>.*)$', 'django.views.static.serve',
+ (r'^%s(?P<path>.*)$' % _('upfiles/'), 'django.views.static.serve',
{'document_root': os.path.join(APP_PATH, 'templates/upfiles').replace('\\','/')}
),
- (r'^account/', include('django_authopenid.urls')),
- (r'^signin/$', 'django_authopenid.views.signin'),
- url(r'^email/change/$', 'django_authopenid.views.changeemail', name='user_changeemail'),
- url(r'^email/sendkey/$', 'django_authopenid.views.send_email_key'),
- url(r'^email/verify/(?P<id>\d+)/(?P<key>[\dabcdef]{32})/$', 'django_authopenid.views.verifyemail', name='user_verifyemail'),
- url(r'^about/$', app.about, name='about'),
- url(r'^faq/$', app.faq, name='faq'),
- url(r'^privacy/$', app.privacy, name='privacy'),
- url(r'^logout/$', app.logout, name='logout'),
- url(r'^answers/(?P<id>\d+)/comments/$', app.answer_comments, name='answer_comments'),
- url(r'^answers/(?P<id>\d+)/edit/$', app.edit_answer, name='edit_answer'),
- url(r'^answers/(?P<id>\d+)/revisions/$', app.answer_revisions, name='answer_revisions'),
- url(r'^questions/$', app.questions, name='questions'),
- url(r'^questions/ask/$', app.ask, name='ask'),
- url(r'^questions/unanswered/$', app.unanswered, name='unanswered'),
- url(r'^questions/(?P<id>\d+)/edit/$', app.edit_question, name='edit_question'),
- url(r'^questions/(?P<id>\d+)/close/$', app.close, name='close'),
- url(r'^questions/(?P<id>\d+)/reopen/$', app.reopen, name='reopen'),
- url(r'^questions/(?P<id>\d+)/answer/$', app.answer, name='answer'),
- url(r'^questions/(?P<id>\d+)/vote/$', app.vote, name='vote'),
- url(r'^questions/(?P<id>\d+)/revisions/$', app.question_revisions, name='question_revisions'),
- url(r'^questions/(?P<id>\d+)/comments/$', app.question_comments, name='question_comments'),
- url(r'^questions/(?P<question_id>\d+)/comments/(?P<comment_id>\d+)/delete/$', app.delete_question_comment, name='delete_question_comment'),
- url(r'^answers/(?P<answer_id>\d+)/comments/(?P<comment_id>\d+)/delete/$', app.delete_answer_comment, name='delete_answer_comment'),
+ (r'^%s' % _('account/'), include('django_authopenid.urls')),
+ (r'^%s/$' % _('signin/'), 'django_authopenid.views.signin'),
+ url(r'^%s%s$' % (_('email/'), _('change/')), 'django_authopenid.views.changeemail', name='user_changeemail'),
+ url(r'^%s%s$' % (_('email/'), _('sendkey/')), 'django_authopenid.views.send_email_key'),
+ url(r'^%s%s(?P<id>\d+)/(?P<key>[\dabcdef]{32})/$' % (_('email/'), _('verify/')), 'django_authopenid.views.verifyemail', name='user_verifyemail'),
+ url(r'^%s$' % _('about/'), app.about, name='about'),
+ url(r'^%s$' % _('faq/'), app.faq, name='faq'),
+ url(r'^%s$' % _('privacy/'), app.privacy, name='privacy'),
+ url(r'^%s$' % _('logout/'), app.logout, name='logout'),
+ url(r'^%s(?P<id>\d+)/%s$' % (_('answers/'), _('comments/')), app.answer_comments, name='answer_comments'),
+ url(r'^%s(?P<id>\d+)/%s$' % (_('answers/'), _('edit/')), app.edit_answer, name='edit_answer'),
+ url(r'^%s(?P<id>\d+)/%s$' % (_('answers/'), _('revisions/')), app.answer_revisions, name='answer_revisions'),
+ url(r'^%s$' % _('questions/'), app.questions, name='questions'),
+ url(r'^%s%s$' % (_('questions/'), _('ask/')), app.ask, name='ask'),
+ url(r'^%s%s$' % (_('questions/'), _('unanswered/')), app.unanswered, name='unanswered'),
+ url(r'^%s(?P<id>\d+)/%s$' % (_('questions/'), _('edit/')), app.edit_question, name='edit_question'),
+ url(r'^%s(?P<id>\d+)/%s$' % (_('questions/'), _('close/')), app.close, name='close'),
+ url(r'^%s(?P<id>\d+)/%s$' % (_('questions/'), _('reopen/')), app.reopen, name='reopen'),
+ url(r'^%s(?P<id>\d+)/%s$' % (_('questions/'), _('answer/')), app.answer, name='answer'),
+ url(r'^%s(?P<id>\d+)/%s$' % (_('questions/'), _('vote/')), app.vote, name='vote'),
+ url(r'^%s(?P<id>\d+)/%s$' % (_('questions/'), _('revisions/')), app.question_revisions, name='question_revisions'),
+ url(r'^%s(?P<id>\d+)/%s$' % (_('questions/'), _('comments/')), app.question_comments, name='question_comments'),
+ url(r'^%s(?P<question_id>\d+)/%s(?P<comment_id>\d+)/%s$' % (_('questions/'), _('questions/'),_('delete/')), app.delete_question_comment, name='delete_question_comment'),
+ url(r'^%s(?P<answer_id>\d+)/%s(?P<comment_id>\d+)/%s$' % (_('answers/'), _('answers/'),_('delete/')), app.delete_answer_comment, name='delete_answer_comment'),
#place general question item in the end of other operations
- url(r'^questions/(?P<id>\d+)//*', app.question, name='question'),
- url(r'^tags/$', app.tags, name='tags'),
- url(r'^tags/(?P<tag>[^/]+)/$', app.tag),
- url(r'^users/$',app.users, name='users'),
- url(r'^users/(?P<id>\d+)/edit/$', app.edit_user, name='edit_user'),
- url(r'^users/(?P<id>\d+)//*', app.user, name='user'),
- url(r'^badges/$',app.badges, name='badges'),
- url(r'^badges/(?P<id>\d+)//*', app.badge, name='badge'),
- url(r'^messages/markread/$',app.read_message, name='read_message'),
- # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
- (r'^nimda/(.*)', admin.site.root),
- (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
- (r'^upload/$', app.upload),
- url(r'^books/$', app.books, name='books'),
- url(r'^books/ask/(?P<short_name>[^/]+)/$', app.ask_book, name='ask_book'),
- url(r'^books/(?P<short_name>[^/]+)/$', app.book, name='book'),
- url(r'^search/$', app.search, name='search'),
+ url(r'^%s(?P<id>\d+)//*' % _('question/'), app.question, name='question'),
+ url(r'^%s$' % _('tags/'), app.tags, name='tags'),
+ url(r'^%s(?P<tag>[^/]+)/$' % _('tags/'), app.tag),
+ url(r'^%s$' % _('users/'),app.users, name='users'),
+ url(r'^%s(?P<id>\d+)/%s$' % (_('users/'), _('edit/')), app.edit_user, name='edit_user'),
+ url(r'^%s(?P<id>\d+)//*' % _('users/'), app.user, name='user'),
+ url(r'^%s$' % _('badges/'),app.badges, name='badges'),
+ url(r'^%s(?P<id>\d+)//*' % _('badges/'), app.badge, name='badge'),
+ url(r'^%s%s$' % (_('messages/'), _('markread/')),app.read_message, name='read_message'),
+ # (r'^admin/doc/' % _('admin/doc'), include('django.contrib.admindocs.urls')),
+ (r'^%s(.*)' % _('nimda/'), admin.site.root),
+ url(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
+ (r'^%s$' % _('upload/'), app.upload),
+ url(r'^%s$' % _('books/'), app.books, name='books'),
+ url(r'^%s%s(?P<short_name>[^/]+)/$' % (_('books/'), _('ask/')), app.ask_book, name='ask_book'),
+ url(r'^%s(?P<short_name>[^/]+)/$' % _('books/'), app.book, name='book'),
+ url(r'^%s$' % _('search/'), app.search, name='search'),
(r'^i18n/', include('django.conf.urls.i18n')),
)