diff options
author | Bruno Sarlo <bruno@bruno-laptop.(none)> | 2009-08-09 23:52:33 -0300 |
---|---|---|
committer | Bruno Sarlo <bruno@bruno-laptop.(none)> | 2009-08-09 23:52:33 -0300 |
commit | d307d51d70b392c309941de4db60a828039e03cb (patch) | |
tree | 979ccea6ec95c87c06c824d35fb2371b7ffc1ee3 /urls.py | |
parent | dc88d182d20aa9f64aff5d56d1eaaf41176477fc (diff) | |
download | askbot-d307d51d70b392c309941de4db60a828039e03cb.tar.gz askbot-d307d51d70b392c309941de4db60a828039e03cb.tar.bz2 askbot-d307d51d70b392c309941de4db60a828039e03cb.zip |
Included i18n for links site-wide. Hope there is no bit left.
Diffstat (limited to 'urls.py')
-rw-r--r-- | urls.py | 85 |
1 files changed, 43 insertions, 42 deletions
@@ -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')), ) |