diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2009-08-05 22:49:44 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2009-08-05 22:49:44 -0400 |
commit | 026541b6a70cd183d49ffec205232cfb0b205b25 (patch) | |
tree | 53397ba83b39bbfc9d567840b68c251e6cdd8d2f | |
parent | 146b90ec874a4f3eee0a31902a90e4c2d89bc729 (diff) | |
download | askbot-026541b6a70cd183d49ffec205232cfb0b205b25.tar.gz askbot-026541b6a70cd183d49ffec205232cfb0b205b25.tar.bz2 askbot-026541b6a70cd183d49ffec205232cfb0b205b25.zip |
added anonymous posting, per-question subscription and fixes by Pothers and some more, see development.log
74 files changed, 3131 insertions, 1955 deletions
@@ -1,9 +1,40 @@ from django.conf import settings def application_settings(context): - return { + my_settings = { 'APP_TITLE' : settings.APP_TITLE, 'APP_URL' : settings.APP_URL, 'APP_KEYWORDS' : settings.APP_KEYWORDS, 'APP_DESCRIPTION' : settings.APP_DESCRIPTION, - 'APP_INTRO' : settings.APP_INTRO + 'APP_INTRO' : settings.APP_INTRO, + 'EMAIL_VALIDATION': settings.EMAIL_VALIDATION, + 'LANGUAGE_CODE': settings.LANGUAGE_CODE, + 'GOOGLE_SITEMAP_CODE':settings.GOOGLE_SITEMAP_CODE, + 'GOOGLE_ANALYTICS_KEY':settings.GOOGLE_ANALYTICS_KEY, } + return {'settings':my_settings} + +def auth_processor(request): + """ + Returns context variables required by apps that use Django's authentication + system. + + If there is no 'user' attribute in the request, uses AnonymousUser (from + django.contrib.auth). + """ + if hasattr(request, 'user'): + user = request.user + if user.is_authenticated(): + messages = user.message_set.all() + else: + messages = None + else: + from django.contrib.auth.models import AnonymousUser + user = AnonymousUser() + messages = None + + from django.core.context_processors import PermWrapper + return { + 'user': user, + 'messages': messages, + 'perms': PermWrapper(user), + } diff --git a/development.log b/development.log index 6b96f8f5..5310f70b 100644 --- a/development.log +++ b/development.log @@ -1,4 +1,37 @@ -# development +==Aug 5, 2009 Evgeny== +===Interface changes=== +Merged in my code that: +* allows anonymous posting of Q&A and then login +* per-question email notifications via 'send_email_alerts' command +* allows space character in username +* improves openid login +* makes notification messages sticky - have to click "x" to dismiss +* unanswered questions are now those with no accepted answer +* added following setting parameters: + +settings.MIN_USERNAME_LENGTH = 1 +settings.EMAIL_UNIQUE = True|False +settings.EMAIL_VALIDATION = 'on'|'off' #thought of maybe adding other options so type is string +settings.GOOGLE_SITEMAP_CODE = <string> +settings.GOOGLE_ANALYTICS_KEY = <string> + +===Fixes=== +* fixed incorrect answer count issue in question.html +* translated Twittwer stuff in user_preferences.html +* translated question_retag.html, except one phrase +* added Adolfo's python2.4 fix +* fixed template debugging comments so that they don't break page layout +* reorganized header template so that it takes less vertical space + +===Code changes=== +* wrapped template context settings into a single settings dictionary +* on login anonymous session is recorded so that anonymously posted questions (if any) could be found later +* added models: AnonymousQuestion, AnonymousAnswer, EmailFeed (for notifications) +* User model has two new fields email_key - 32 byte hex hash and email_isvalid - boolean + file sql_scripts/update_2009_07_05_EF.sql will make upgrade to the live database +* added auth_processor to context.py which loads notification messages without deleting them + NOTE: default django auth processor must be removed! +* added ajax actions questionSubscribeUpdates/questionUnsubscribeUpdates ==Aug 4 2009, Evgeny== ===Changes=== diff --git a/django_authopenid/forms.py b/django_authopenid/forms.py index 09fa76b1..690a781f 100644 --- a/django_authopenid/forms.py +++ b/django_authopenid/forms.py @@ -158,7 +158,7 @@ class OpenidRegisterForm(forms.Form): raise forms.ValidationError(_('invalid user name')) if self.cleaned_data['username'] in RESERVED_NAMES: raise forms.ValidationError(_('sorry, this name can not be used, please try another')) - if len(self.cleaned_data['username']) < 3: + if len(self.cleaned_data['username']) < settings.MIN_USERNAME_LENGTH: raise forms.ValidationError(_('username too short')) try: user = User.objects.get( @@ -171,19 +171,22 @@ class OpenidRegisterForm(forms.Form): raise forms.ValidationError(_('this name is already in use - please try anoter')) def clean_email(self): - """For security reason one unique email in database""" + """Optionally, for security reason one unique email in database""" if 'email' in self.cleaned_data: - try: - user = User.objects.get(email = self.cleaned_data['email']) - except User.DoesNotExist: + if settings.EMAIL_UNIQUE == True: + try: + user = User.objects.get(email = self.cleaned_data['email']) + except User.DoesNotExist: + return self.cleaned_data['email'] + except User.MultipleObjectsReturned: + raise forms.ValidationError(u'There is already more than one \ + account registered with that e-mail address. Please try \ + another.') + raise forms.ValidationError(_("This email is already \ + registered in our database. Please choose another.")) + else: return self.cleaned_data['email'] - except User.MultipleObjectsReturned: - raise forms.ValidationError(u'There is already more than one \ - account registered with that e-mail address. Please try \ - another.') - raise forms.ValidationError(_("This email is already \ - registered in our database. Please choose another.")) - + #what if not??? class OpenidVerifyForm(forms.Form): """ openid verify form (associate an openid with an account) """ @@ -204,8 +207,7 @@ class OpenidVerifyForm(forms.Form): """ validate username """ if 'username' in self.cleaned_data: if not username_re.search(self.cleaned_data['username']): - raise forms.ValidationError(_("Usernames can only contain \ - letters, numbers and underscores")) + raise forms.ValidationError(_('invalid user name')) try: user = User.objects.get( username__exact = self.cleaned_data['username'] @@ -241,7 +243,7 @@ class OpenidVerifyForm(forms.Form): attrs_dict = { 'class': 'required' } -username_re = re.compile(r'^\w+$') +username_re = re.compile(r'^[\w ]+$') class RegistrationForm(forms.Form): """ legacy registration form """ @@ -286,17 +288,20 @@ class RegistrationForm(forms.Form): """ validate if email exist in database :return: raise error if it exist """ if 'email' in self.cleaned_data: - try: - user = User.objects.get(email = self.cleaned_data['email']) - except User.DoesNotExist: + if settings.EMAIL_UNIQUE == True: + try: + user = User.objects.get(email = self.cleaned_data['email']) + except User.DoesNotExist: + return self.cleaned_data['email'] + except User.MultipleObjectsReturned: + raise forms.ValidationError(u'There is already more than one \ + account registered with that e-mail address. Please try \ + another.') + raise forms.ValidationError(u'This email is already registered \ + in our database. Please choose another.') + else: return self.cleaned_data['email'] - except User.MultipleObjectsReturned: - raise forms.ValidationError(u'There is already more than one \ - account registered with that e-mail address. Please try \ - another.') - raise forms.ValidationError(u'This email is already registered \ - in our database. Please choose another.') - return self.cleaned_data['email'] + #what if not? def clean_password2(self): """ @@ -361,18 +366,21 @@ class ChangeemailForm(forms.Form): def clean_email(self): """ check if email don't exist """ if 'email' in self.cleaned_data: - if self.user.email != self.cleaned_data['email']: - try: - user = User.objects.get(email = self.cleaned_data['email']) - except User.DoesNotExist: - return self.cleaned_data['email'] - except User.MultipleObjectsReturned: - raise forms.ValidationError(u'There is already more than one \ - account registered with that e-mail address. Please try \ - another.') - raise forms.ValidationError(u'This email is already registered \ - in our database. Please choose another.') - return self.cleaned_data['email'] + if settings.EMAIL_UNIQUE == True: + if self.user.email != self.cleaned_data['email']: + try: + user = User.objects.get(email = self.cleaned_data['email']) + except User.DoesNotExist: + return self.cleaned_data['email'] + except User.MultipleObjectsReturned: + raise forms.ValidationError(u'There is already more than one \ + account registered with that e-mail address. Please try \ + another.') + raise forms.ValidationError(u'This email is already registered \ + in our database. Please choose another.') + else: + return self.cleaned_data['email'] + #what if not? def clean_password(self): diff --git a/django_authopenid/middleware.py b/django_authopenid/middleware.py index c0572c6e..2900d54c 100644 --- a/django_authopenid/middleware.py +++ b/django_authopenid/middleware.py @@ -21,4 +21,4 @@ class OpenIDMiddleware(object): mimeparse.best_match(['text/html', 'application/xrds+xml'], request.META['HTTP_ACCEPT']) == 'application/xrds+xml': return HttpResponseRedirect(reverse('yadis_xrdf')) - return response
\ No newline at end of file + return response diff --git a/django_authopenid/urls.py b/django_authopenid/urls.py index 1ab65941..6843e5c0 100644 --- a/django_authopenid/urls.py +++ b/django_authopenid/urls.py @@ -7,6 +7,8 @@ urlpatterns = patterns('django_authopenid.views', url(r'^yadis.xrdf$', 'xrdf', name='yadis_xrdf'), # manage account registration url(r'^%s$' % _('signin/'), 'signin', name='user_signin'), + url(r'^%s%s$' % (_('signin/'),_('newquestion/')), 'signin', kwargs = {'newquestion':True}), + url(r'^%s%s$' % (_('signin/'),_('newanswer/')), 'signin', kwargs = {'newanswer':True}), url(r'^%s$' % _('signout/'), 'signout', name='user_signout'), url(r'^%s%s$' % (_('signin/'), _('complete/')), 'complete_signin', name='user_complete_signin'), @@ -21,7 +23,8 @@ urlpatterns = patterns('django_authopenid.views', # manage 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'), + 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/django_authopenid/views.py b/django_authopenid/views.py index a9072c12..1cb8928b 100644 --- a/django_authopenid/views.py +++ b/django_authopenid/views.py @@ -30,12 +30,12 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from django.http import HttpResponseRedirect, get_host +from django.http import HttpResponseRedirect, get_host, Http404 from django.shortcuts import render_to_response as render from django.template import RequestContext, loader, Context from django.conf import settings from django.contrib.auth.models import User -from django.contrib.auth import login, logout +from django.contrib.auth import logout #for login I've added wrapper below - called login from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.utils.encoding import smart_unicode @@ -44,6 +44,7 @@ from django.utils.translation import ugettext as _ from django.contrib.sites.models import Site from django.utils.http import urlquote_plus from django.core.mail import send_mail +from django.views.defaults import server_error from openid.consumer.consumer import Consumer, \ SUCCESS, CANCEL, FAILURE, SETUP_NEEDED @@ -65,6 +66,16 @@ from django_authopenid.forms import OpenidSigninForm, OpenidAuthForm, OpenidRegi OpenidVerifyForm, RegistrationForm, ChangepwForm, ChangeemailForm, \ ChangeopenidForm, DeleteForm, EmailPasswordForm +def login(request,user): + from django.contrib.auth import login as _login + from forum.models import user_logged_in #custom signal + #1) get old session key + session_key = request.session.session_key + #2) login and get new session key + _login(request,user) + #3) send signal with old session key as argument + user_logged_in.send(user=user,session_key=session_key,sender=None) + def get_url_host(request): if request.is_secure(): protocol = 'https' @@ -76,8 +87,6 @@ def get_url_host(request): def get_full_url(request): return get_url_host(request) + request.get_full_path() - - def ask_openid(request, openid_url, redirect_to, on_failure=None, sreg_request=None): """ basic function to ask openid and return response """ @@ -96,7 +105,7 @@ def ask_openid(request, openid_url, redirect_to, on_failure=None, try: auth_request = consumer.begin(openid_url) except DiscoveryFailure: - msg = _(u"非法OpenID地址: %s" % openid_url) + msg = _(u"OpenID %(openid_url)s is invalid" % {'openid_url':openid_url}) return on_failure(request, msg) if sreg_request: @@ -113,7 +122,6 @@ def complete(request, on_success=None, on_failure=None, return_to=None): # make sure params are encoded in utf8 params = dict((k,smart_unicode(v)) for k, v in request.GET.items()) openid_response = consumer.complete(params, return_to) - if openid_response.status == SUCCESS: return on_success(request, openid_response.identity_url, @@ -150,7 +158,7 @@ def not_authenticated(func): return decorated @not_authenticated -def signin(request): +def signin(request,newquestion=False,newanswer=False): """ signin page. It manage the legacy authentification (user/password) and authentification with openid. @@ -168,7 +176,7 @@ def signin(request): if request.POST: - if 'bsignin' in request.POST.keys(): + if 'bsignin' in request.POST.keys() or 'openid_username' in request.POST.keys(): form_signin = OpenidSigninForm(request.POST) if form_signin.is_valid(): @@ -179,7 +187,6 @@ def signin(request): reverse('user_complete_signin'), urllib.urlencode({'next':next}) ) - return ask_openid(request, form_signin.cleaned_data['openid_url'], redirect_to, @@ -195,8 +202,24 @@ def signin(request): next = clean_next(form_auth.cleaned_data.get('next')) return HttpResponseRedirect(next) + question = None + if newquestion == True: + from forum.models import AnonymousQuestion as AQ + session_key = request.session.session_key + qlist = AQ.objects.filter(session_key=session_key).order_by('-added_at') + if len(qlist) > 0: + question = qlist[0] + answer = None + if newanswer == True: + from forum.models import AnonymousAnswer as AA + session_key = request.session.session_key + alist = AA.objects.filter(session_key=session_key).order_by('-added_at') + if len(alist) > 0: + answer = alist[0] return render('authopenid/signin.html', { + 'question':question, + 'answer':answer, 'form1': form_auth, 'form2': form_signin, 'msg': request.GET.get('msg',''), @@ -220,7 +243,7 @@ def signin_success(request, identity_url, openid_response): if openid isn't registered user is redirected to register page. """ - openid_ = from_openid_response(openid_response) + openid_ = from_openid_response(openid_response) #create janrain OpenID object request.session['openid'] = openid_ try: rel = UserAssociation.objects.get(openid_url__exact = str(openid_)) @@ -278,7 +301,8 @@ def register(request): 'next': next, 'username': nickname, }) - + + user_ = None if request.POST: just_completed = False if 'bnewaccount' in request.POST.keys(): @@ -309,14 +333,41 @@ def register(request): user_id=user_.id) uassoc.save() login(request, user_) + + #check if we need to post a question that was added anonymously + #this needs to be a function call becase this is also done + #if user just logged in and did not need to create the new account - # redirect, can redirect only if forms are valid. - if is_redirect: - return HttpResponseRedirect(next) + if user_ != None and settings.EMAIL_VALIDATION == 'on': + send_new_email_key(user_,nomessage=True) + output = validation_email_sent(request) + set_email_validation_message(user_) #message set after generating view + return output + elif user_.is_authenticated(): + return HttpResponseRedirect('/') + else: + raise server_error('') + openid_str = str(openid_) + bits = openid_str.split('/') + base_url = bits[2] #assume this is base url + url_bits = base_url.split('.') + provider_name = url_bits[-2].lower() + + providers = {'yahoo':'<font color="purple">Yahoo!</font>', + 'flickr':'<font color="#0063dc">flick</font><font color="#ff0084">r</font>™', + 'google':'Google™', + 'aol':'<font color="#31658e">AOL</font>', + } + if provider_name not in providers: + provider_logo = provider_name + else: + provider_logo = providers[provider_name] + return render('authopenid/complete.html', { 'form1': form1, 'form2': form2, + 'provider':providers[provider_name], 'nickname': nickname, 'email': email }, context_instance=RequestContext(request)) @@ -464,47 +515,158 @@ def changepw(request): return render('authopenid/changepw.html', {'form': form }, context_instance=RequestContext(request)) +def find_email_validation_messages(user): + msg_text = _('your email needs to be validated') + return user.message_set.filter(message__exact=msg_text) + +def set_email_validation_message(user): + messages = find_email_validation_messages(user) + msg_text = _('your email needs to be validated') + if len(messages) == 0: + user.message_set.create(message=msg_text) + +def clear_email_validation_message(user): + messages = find_email_validation_messages(user) + messages.delete() + +def set_new_email(user, new_email, nomessage=False): + if new_email != user.email: + user.email = new_email + user.email_isvalid = False + user.save() + if settings.EMAIL_VALIDATION == 'on': + send_new_email_key(user,nomessage=nomessage) + +def _send_email_key(user): + """private function. sends email containing validation key + to user's email address + """ + subject = _("Welcome") + message_template = loader.get_template('authopenid/email_validation.txt') + import settings + message_context = Context({ + 'validation_link': '%s/email/verify/%d/%s/' % (settings.APP_URL ,user.id,user.email_key) + }) + message = message_template.render(message_context) + send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, [user.email]) + +def send_new_email_key(user,nomessage=False): + import random + random.seed() + user.email_key = '%032x' % random.getrandbits(128) + user.save() + _send_email_key(user) + if nomessage==False: + set_email_validation_message(user) + +@login_required +def send_email_key(request): + """ + url = /email/sendkey/ + + view that is shown right after sending email key + email sending is called internally + + raises 404 if email validation is off + if current email is valid shows 'key_not_sent' view of + authopenid/changeemail.html template + """ + + if settings.EMAIL_VALIDATION != 'off': + if request.user.email_isvalid: + return render('authopenid/changeemail.html', + { 'email': request.user.email, + 'action_type': 'key_not_sent', + 'change_link': reverse('user_changeemail')}, + context_instance=RequestContext(request) + ) + else: + _send_email_key(request.user) + return validation_email_sent(request) + else: + raise Http404 + + +#internal server view used as return value by other views +def validation_email_sent(request): + return render('authopenid/changeemail.html', + { 'email': request.user.email, 'action_type': 'validate', }, + context_instance=RequestContext(request)) + + +def verifyemail(request,id=None,key=None): + """ + view that is shown when user clicks email validation link + url = /email/verify/{{user.id}}/{{user.email_key}}/ + """ + if settings.EMAIL_VALIDATION != 'off': + user = User.objects.get(id=id) + if user: + if user.email_key == key: + user.email_isvalid = True + clear_email_validation_message(user) + user.save() + return render('authopenid/changeemail.html', { + 'action_type': 'validation_complete', + }, context_instance=RequestContext(request)) + raise Http404 + @login_required def changeemail(request): """ changeemail view. It require password or openid to allow change. - url: /changeemail/ + url: /email/* template : authopenid/changeemail.html """ msg = request.GET.get('msg', '') extension_args = {} user_ = request.user - + redirect_to = get_url_host(request) + reverse('user_changeemail') + action = 'change' if request.POST: form = ChangeemailForm(request.POST, user=user_) if form.is_valid(): if not form.test_openid: - user_.email = form.cleaned_data['email'] - user_.save() - msg = _("Email changed.") - redirect = "%s?msg=%s" % (reverse('user_account_settings'), - urlquote_plus(msg)) - return HttpResponseRedirect(redirect) + new_email = form.cleaned_data['email'] + if new_email != user_.email: + if settings.EMAIL_VALIDATION == 'on': + action = 'validate' + else: + action = 'done_novalidate' + set_new_email(user_, new_email,nomessage=True) + else: + action = 'keep' else: + #what does this branch do? + return server_error('') request.session['new_email'] = form.cleaned_data['email'] return ask_openid(request, form.cleaned_data['password'], redirect_to, on_failure=emailopenid_failure) + elif not request.POST and 'openid.mode' in request.GET: return complete(request, emailopenid_success, emailopenid_failure, redirect_to) else: form = ChangeemailForm(initial={'email': user_.email}, user=user_) + - return render('authopenid/changeemail.html', { + output = render('authopenid/changeemail.html', { 'form': form, + 'email': user_.email, + 'action_type': action, 'msg': msg }, context_instance=RequestContext(request)) + if action == 'validate': + set_email_validation_message(user_) + + return output + def emailopenid_success(request, identity_url, openid_response): openid_ = from_openid_response(openid_response) diff --git a/forum/admin.py b/forum/admin.py index 438a99e7..482da048 100644 --- a/forum/admin.py +++ b/forum/admin.py @@ -4,6 +4,9 @@ from django.contrib import admin from models import * +class AnonymousQuestionAdmin(admin.ModelAdmin): + """AnonymousQuestion admin class""" + class QuestionAdmin(admin.ModelAdmin): """Question admin class""" @@ -68,4 +71,4 @@ admin.site.register(Repute, ReputeAdmin) admin.site.register(Activity, ActivityAdmin) admin.site.register(Book, BookAdmin) admin.site.register(BookAuthorInfo, BookAuthorInfoAdmin) -admin.site.register(BookAuthorRss, BookAuthorRssAdmin)
\ No newline at end of file +admin.site.register(BookAuthorRss, BookAuthorRssAdmin) diff --git a/forum/feed.py b/forum/feed.py index 6374ba71..373f8a87 100644 --- a/forum/feed.py +++ b/forum/feed.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python #encoding:utf-8 #------------------------------------------------------------------------------- # Name: Syndication feed class for subsribtion @@ -13,16 +13,16 @@ from django.contrib.syndication.feeds import Feed, FeedDoesNotExist from django.utils.translation import ugettext as _ from models import Question +import settings class RssLastestQuestionsFeed(Feed): - title = _('site title') + _(' - ') + _('site slogan') + _(' - ')+ _('latest questions') - #EDIT!!! - link = 'http://where.com/questions/' - description = _('meta site content') + title = settings.APP_TITLE + _(' - ')+ _('latest questions') + link = settings.APP_URL + '/' + _('questions/') + description = settings.APP_DESCRIPTION #ttl = 10 - copyright = _('copyright message') + copyright = settings.APP_COPYRIGHT def item_link(self, item): - return '/questions/%s/' % item.id + return self.link + '%s/' % item.id def item_author_name(self, item): return item.author.username diff --git a/forum/forms.py b/forum/forms.py index 9d866720..59d0d620 100644 --- a/forum/forms.py +++ b/forum/forms.py @@ -43,7 +43,8 @@ class TagNamesField(forms.CharField): self.widget = forms.TextInput(attrs={'size' : 50, 'autocomplete' : 'off'}) self.max_length = 255 self.label = _('tags') - self.help_text = _('please use space to separate tags (this enables autocomplete feature)') + #self.help_text = _('please use space to separate tags (this enables autocomplete feature)') + self.help_text = _('Tags are short keywords, with no spaces within. Up to five tags can be used.') self.initial = '' def clean(self, value): @@ -74,6 +75,10 @@ class WikiField(forms.BooleanField): self.label = _('community wiki') self.help_text = _('if you choose community wiki option, the question and answer do not generate points and name of author will not be shown') +class EmailNotifyField(forms.BooleanField): + def __init__(self, *args, **kwargs): + super(EmailNotifyField, self).__init__(*args, **kwargs) + self.required = False class SummaryField(forms.CharField): def __init__(self, *args, **kwargs): @@ -94,18 +99,28 @@ class AskForm(forms.Form): user = forms.CharField(required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 35})) email = forms.CharField(required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 35})) - - class AnswerForm(forms.Form): text = EditorField() wiki = WikiField() openid = forms.CharField(required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 40, 'class':'openid-input'})) user = forms.CharField(required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 35})) email = forms.CharField(required=False, max_length=255, widget=forms.TextInput(attrs={'size' : 35})) - def __init__(self, question, *args, **kwargs): + email_notify = EmailNotifyField() + def __init__(self, question, user, *args, **kwargs): super(AnswerForm, self).__init__(*args, **kwargs) + self.fields['email_notify'].widget.attrs['id'] = 'question-subscribe-updates'; if question.wiki: self.fields['wiki'].initial = True + if user.is_authenticated(): + try: + feed = EmailFeed.objects.get(feed_id=question.id, subscriber_id=user.id) + if feed.subscriber == user and feed.content == question: + self.fields['email_notify'].initial = True + return + except EmailFeed.DoesNotExist: + pass + self.fields['email_notify'].initial = False + class CloseForm(forms.Form): reason = forms.ChoiceField(choices=CLOSE_REASONS) @@ -181,13 +196,14 @@ class EditUserForm(forms.Form): def clean_email(self): """For security reason one unique email in database""" if self.user.email != self.cleaned_data['email']: - if 'email' in self.cleaned_data: - try: - user = User.objects.get(email = self.cleaned_data['email']) - except User.DoesNotExist: - return self.cleaned_data['email'] - except User.MultipleObjectsReturned: + #todo dry it, there is a similar thing in openidauth + if settings.EMAIL_UNIQUE == True: + if 'email' in self.cleaned_data: + try: + user = User.objects.get(email = self.cleaned_data['email']) + except User.DoesNotExist: + return self.cleaned_data['email'] + except User.MultipleObjectsReturned: + raise forms.ValidationError(_('this email has already been registered, please use another one')) raise forms.ValidationError(_('this email has already been registered, please use another one')) - raise forms.ValidationError(_('this email has already been registered, please use another one')) - else: - return self.cleaned_data['email'] + return self.cleaned_data['email'] diff --git a/forum/management/commands/once_award_badges.py b/forum/management/commands/once_award_badges.py index 447e8971..03982c79 100644 --- a/forum/management/commands/once_award_badges.py +++ b/forum/management/commands/once_award_badges.py @@ -12,6 +12,7 @@ # Licence: GPL V2 #------------------------------------------------------------------------------- +from datetime import datetime, date from django.db import connection from django.shortcuts import get_object_or_404 from django.contrib.contenttypes.models import ContentType diff --git a/forum/models.py b/forum/models.py index b966ccb0..a6cb1697 100644 --- a/forum/models.py +++ b/forum/models.py @@ -12,16 +12,40 @@ from django.template.defaultfilters import slugify from django.db.models.signals import post_delete, post_save, pre_save from django.utils.translation import ugettext as _ import django.dispatch +import settings from forum.managers import * from const import * +class EmailFeed(models.Model): + #subscription key for unsubscribe by visiting emailed link + key = models.CharField(max_length=32) + #generic relation with feed content (i.e. question or tags) + feed_content_type = models.ForeignKey(ContentType,related_name='content_emailfeed') + feed_id = models.PositiveIntegerField() + content = generic.GenericForeignKey('feed_content_type','feed_id') + #generic relation with owner - either nameless email or User + subscriber_content_type = models.ForeignKey(ContentType,related_name='subscriber_emailfeed') + subscriber_id = models.PositiveIntegerField() + subscriber = generic.GenericForeignKey('subscriber_content_type','subscriber_id') + added_at = models.DateTimeField(default=datetime.datetime.now) + reported_at = models.DateTimeField(default=datetime.datetime.now) + + #getter functions rely on implementations of similar functions in content + #of subscriber objects + def get_update_summary(self): + return self.content.get_update_summary(last_reported_at = self.reported_at,recipient_email = self.get_email()) + + def get_email(self): + return self.subscriber.email + class Tag(models.Model): name = models.CharField(max_length=255, unique=True) created_by = models.ForeignKey(User, related_name='created_tags') deleted = models.BooleanField(default=False) deleted_at = models.DateTimeField(null=True, blank=True) deleted_by = models.ForeignKey(User, null=True, blank=True, related_name='deleted_tags') + email_feeds = generic.GenericRelation(EmailFeed) # Denormalised data used_count = models.PositiveIntegerField(default=0) @@ -131,6 +155,7 @@ class Question(models.Model): comments = generic.GenericRelation(Comment) votes = generic.GenericRelation(Vote) flagged_items = generic.GenericRelation(FlaggedItem) + email_feeds = generic.GenericRelation(EmailFeed) objects = QuestionManager() @@ -173,7 +198,10 @@ class Question(models.Model): attr = CONST['deleted'] else: attr = None - return u'%s %s' % (self.title, attr) if attr is not None else self.title + if attr is not None: + return u'%s %s' % (self.title, attr) + else: + return self.title def get_revision_url(self): return reverse('question_revisions', args=[self.id]) @@ -181,6 +209,57 @@ class Question(models.Model): def get_latest_revision(self): return self.revisions.all()[0] + def get_update_summary(self,last_reported_at=None,recipient_email=''): + edited = False + if self.last_edited_at and self.last_edited_at > last_reported_at: + if self.last_edited_by.email != recipient_email: + edited = True + comments = [] + for comment in self.comments.all(): + if comment.added_at > last_reported_at and comment.user.email != recipient_email: + comments.append(comment) + new_answers = [] + answer_comments = [] + modified_answers = [] + for answer in self.answers.all(): + if (answer.added_at > last_reported_at): + new_answers.append(answer) + if (answer.last_edited_at + and answer.last_edited_at > last_reported_at + and answer.last_edited_by.email != recipient_email): + modified_answers.append(answer) + for comment in answer.comments.all(): + if comment.added_at > last_reported_at and comment.user.email != recipient_email: + answer_comments.append(comment) + if edited or comments or new_answers or modified_answers or answer_comments: + import sets + out = [] + if edited: + out.append(_('%(author)s modified the question') % {'author':self.last_edited_by.username}) + if new_answers: + names = sets.Set(map(lambda x: x.author.username,new_answers)) + people = ', '.join(names) + out.append(_('%(people)s posted %(new_answer_count)s new answers') \ + % {'new_answer_count':len(new_answers),'people':people}) + if comments: + names = sets.Set(map(lambda x: x.user.username,comments)) + people = ', '.join(names) + out.append(_('%(people)s commented the question') % {'people':people}) + if answer_comments: + names = sets.Set(map(lambda x: x.user.username,answer_comments)) + people = ', '.join(names) + if len(answer_comments) > 1: + out.append(_('%(people)s commented answers') % {'people':people}) + else: + out.append(_('%(people)s commented the answer') % {'people':people}) + url = settings.APP_URL + self.get_absolute_url() + retval = '<a href="%s">%s</a>:<br>\n' % (url,self.title) + out = map(lambda x: '<li>' + x + '</li>',out) + retval += '<ul>' + '\n'.join(out) + '</ul><br>\n' + return retval + else: + return None + def __unicode__(self): return self.title @@ -219,6 +298,44 @@ class QuestionRevision(models.Model): def __unicode__(self): return u'revision %s of %s' % (self.revision, self.title) +class AnonymousAnswer(models.Model): + question = models.ForeignKey(Question, related_name='anonymous_answers') + session_key = models.CharField(max_length=40) #session id for anonymous questions + wiki = models.BooleanField(default=False) + added_at = models.DateTimeField(default=datetime.datetime.now) + ip_addr = models.IPAddressField(max_length=21) #allow high port numbers + author = models.ForeignKey(User,null=True) + text = models.TextField() + summary = models.CharField(max_length=180) + + def publish(self,user): + from forum.views import create_new_answer + added_at = datetime.datetime.now() + print user.id + create_new_answer(question=self.question,wiki=self.wiki, + added_at=added_at,text=self.text, + author=user) + self.delete() + +class AnonymousQuestion(models.Model): + title = models.CharField(max_length=300) + session_key = models.CharField(max_length=40) #session id for anonymous questions + text = models.TextField() + summary = models.CharField(max_length=180) + tagnames = models.CharField(max_length=125) + wiki = models.BooleanField(default=False) + added_at = models.DateTimeField(default=datetime.datetime.now) + ip_addr = models.IPAddressField(max_length=21) #allow high port numbers + author = models.ForeignKey(User,null=True) + + def publish(self,user): + from forum.views import create_new_question + added_at = datetime.datetime.now() + create_new_question(title=self.title, author=user, added_at=added_at, + wiki=self.wiki, tagnames=self.tagnames, + summary=self.summary, text=self.text) + self.delete() + class Answer(models.Model): question = models.ForeignKey(Question, related_name='answers') author = models.ForeignKey(User, related_name='answers') @@ -447,6 +564,13 @@ class BookAuthorRss(models.Model): class Meta: db_table = u'book_author_rss' +class AnonymousEmail(models.Model): + #validation key, if used + key = models.CharField(max_length=32) + email = models.EmailField(null=False,unique=True) + isvalid = models.BooleanField(default=False) + feeds = generic.GenericRelation(EmailFeed) + # User extend properties QUESTIONS_PER_PAGE_CHOICES = ( (10, u'10'), @@ -454,8 +578,11 @@ QUESTIONS_PER_PAGE_CHOICES = ( (50, u'50'), ) +User.add_to_class('email_isvalid', models.BooleanField(default=False)) +User.add_to_class('email_key', models.CharField(max_length=16, null=True)) User.add_to_class('reputation', models.PositiveIntegerField(default=1)) User.add_to_class('gravatar', models.CharField(max_length=32)) +User.add_to_class('email_feeds', generic.GenericRelation(EmailFeed)) User.add_to_class('favorite_questions', models.ManyToManyField(Question, through=FavoriteQuestion, related_name='favorited_by')) @@ -480,11 +607,14 @@ edit_question_or_answer = django.dispatch.Signal(providing_args=["instance", "mo delete_post_or_answer = django.dispatch.Signal(providing_args=["instance", "deleted_by"]) mark_offensive = django.dispatch.Signal(providing_args=["instance", "mark_by"]) user_updated = django.dispatch.Signal(providing_args=["instance", "updated_by"]) +user_logged_in = django.dispatch.Signal(providing_args=["session"]) + + def get_messages(self): - messages = [] - for m in self.message_set.all(): - messages.append(m.message) - return messages + messages = [] + for m in self.message_set.all(): + messages.append(m.message) + return messages def delete_messages(self): self.message_set.all().delete() @@ -632,6 +762,24 @@ def record_user_full_updated(instance, **kwargs): activity = Activity(user=instance, active_at=datetime.datetime.now(), content_object=instance, activity_type=TYPE_ACTIVITY_USER_FULL_UPDATED) activity.save() +def post_stored_anonymous_content(sender,user,session_key,signal,*args,**kwargs): + aq_list = AnonymousQuestion.objects.filter(session_key = session_key) + aa_list = AnonymousAnswer.objects.filter(session_key = session_key) + import settings + if settings.EMAIL_VALIDATION == 'on':#add user to the record + for aq in aq_list: + aq.author = user + aq.save() + for aa in aa_list: + aa.author = user + aa.save() + #maybe add pending posts message? + else: #just publish the questions + for aq in aq_list: + aq.publish(user) + for aa in aa_list: + aa.publish(user) + #signal for User modle save changes pre_save.connect(calculate_gravatar_hash, sender=User) post_save.connect(record_ask_event, sender=Question) @@ -652,3 +800,4 @@ mark_offensive.connect(record_mark_offensive, sender=Answer) tags_updated.connect(record_update_tags, sender=Question) post_save.connect(record_favorite_question, sender=FavoriteQuestion) user_updated.connect(record_user_full_updated, sender=User) +user_logged_in.connect(post_stored_anonymous_content) diff --git a/forum/templatetags/extra_tags.py b/forum/templatetags/extra_tags.py index 6c826771..ac4e6ca3 100644 --- a/forum/templatetags/extra_tags.py +++ b/forum/templatetags/extra_tags.py @@ -1,4 +1,4 @@ -import time +import time import datetime import math import re @@ -237,4 +237,4 @@ def get_latest_changed_timestamp(): timestr = strftime("%H:%M %b-%d-%Y %Z", localtime(latest)) except: timestr = '' - return timestr
\ No newline at end of file + return timestr diff --git a/forum/user.py b/forum/user.py index ed4494d6..41811db9 100644 --- a/forum/user.py +++ b/forum/user.py @@ -1,4 +1,3 @@ -# coding=utf-8 from django.utils.translation import ugettext as _ class UserView: def __init__(self, id, tab_title, tab_description, page_title, view_name, template_file, data_size=0): diff --git a/forum/views.py b/forum/views.py index 2c61d41e..98ecda11 100644 --- a/forum/views.py +++ b/forum/views.py @@ -168,46 +168,140 @@ def questions(request, tagname=None, unanswered=False): 'pagesize' : pagesize }}, context_instance=RequestContext(request)) +def create_new_answer( question=None, author=None,\ + added_at=None, wiki=False,\ + text='', email_notify=False): + + html = sanitize_html(markdowner.convert(text)) + + #create answer + answer = Answer( + question = question, + author = author, + added_at = added_at, + wiki = wiki, + html = html + ) + if answer.wiki: + answer.last_edited_by = answer.author + answer.last_edited_at = added_at + answer.wikified_at = added_at + + answer.save() + + #update question data + question.last_activity_at = added_at + question.last_activity_by = author + question.save() + Question.objects.update_answer_count(question) + + #update revision + AnswerRevision.objects.create( + answer = answer, + revision = 1, + author = author, + revised_at = added_at, + summary = CONST['default_version'], + text = text + ) + + #set notification/delete + if email_notify: + try: + EmailFeed.objects.get(feed_id = question.id, subscriber_id = author.id, feed_content_type=question_type) + except EmailFeed.DoesNotExist: + feed = EmailFeed(content = question, subscriber = author) + feed.save() + else: + #not sure if this is necessary. ajax should take care of this... + try: + feed = Email.objects.get(feed_id = question.id, subscriber_id = author.id, feed_content_type=question_type) + feed.delete() + except: + pass + +def create_new_question(title=None,author=None,added_at=None, + wiki=False,tagnames=None,summary=None, + text=None): + """this is not a view + and maybe should become one of the methods on Question object? + """ + html = sanitize_html(markdowner.convert(text)) + question = Question( + title = title, + author = author, + added_at = added_at, + last_activity_at = added_at, + last_activity_by = author, + wiki = wiki, + tagnames = tagnames, + html = html, + summary = summary + ) + if question.wiki: + question.last_edited_by = question.author + question.last_edited_at = added_at + question.wikified_at = added_at + + question.save() + + # create the first revision + QuestionRevision.objects.create( + question = question, + revision = 1, + title = question.title, + author = author, + revised_at = added_at, + tagnames = question.tagnames, + summary = CONST['default_version'], + text = text + ) + return question + #TODO: allow anynomus user to ask question by providing email and username. -@login_required +#@login_required def ask(request): if request.method == "POST": form = AskForm(request.POST) if form.is_valid(): - added_at = datetime.datetime.now() - html = sanitize_html(markdowner.convert(form.cleaned_data['text'])) - question = Question( - title = strip_tags(form.cleaned_data['title']), - author = request.user, - added_at = added_at, - last_activity_at = added_at, - last_activity_by = request.user, - wiki = form.cleaned_data['wiki'], - tagnames = form.cleaned_data['tags'].strip(), - html = html, - summary = strip_tags(html)[:120] - ) - if question.wiki: - question.last_edited_by = question.author - question.last_edited_at = added_at - question.wikified_at = added_at - - question.save() - # create the first revision - QuestionRevision.objects.create( - question = question, - revision = 1, - title = question.title, - author = request.user, - revised_at = added_at, - tagnames = question.tagnames, - summary = CONST['default_version'], - text = form.cleaned_data['text'] - ) + added_at = datetime.datetime.now() + title = strip_tags(form.cleaned_data['title']) + wiki = form.cleaned_data['wiki'] + tagnames = form.cleaned_data['tags'].strip() + text = form.cleaned_data['text'] + html = sanitize_html(markdowner.convert(text)) + summary = strip_tags(html)[:120] - return HttpResponseRedirect(question.get_absolute_url()) + if request.user.is_authenticated(): + author = request.user + + question = create_new_question( + title = title, + author = author, + added_at = added_at, + wiki = wiki, + tagnames = tagnames, + summary = summary, + text = text + ) + return HttpResponseRedirect(question.get_absolute_url()) + else: + request.session.flush() + session_key = request.session.session_key + question = AnonymousQuestion( + session_key = session_key, + title = title, + tagnames = tagnames, + wiki = wiki, + text = text, + summary = summary, + added_at = added_at, + ip_addr = request.META['REMOTE_ADDR'], + ) + question.save() + return HttpResponseRedirect('%s%s%s' % ( _('/account/'),_('signin/'),('newquestion/'))) else: form = AskForm() @@ -233,7 +327,7 @@ def question(request, id): question = get_object_or_404(Question, id=id) if question.deleted and not can_view_deleted_post(request.user, question): raise Http404 - answer_form = AnswerForm(question) + answer_form = AnswerForm(question,request.user) answers = Answer.objects.get_answers_from_question(question, request.user) answers = answers.select_related(depth=1) @@ -254,7 +348,16 @@ def question(request, id): if answers is not None: answers = answers.order_by("-accepted", orderby) - objects_list = Paginator(answers, ANSWERS_PAGE_SIZE) + + filtered_answers = [] + for answer in answers: + if answer.deleted == True: + if answer.author_id == request.user.id: + filtered_answers.append(answer) + else: + filtered_answers.append(answer) + + objects_list = Paginator(filtered_answers, ANSWERS_PAGE_SIZE) page_objects = objects_list.page(page) # update view count Question.objects.update_view_count(question) @@ -558,42 +661,38 @@ def answer_revisions(request, id): 'revisions': revisions, }, context_instance=RequestContext(request)) -#TODO: allow anynomus -@login_required def answer(request, id): question = get_object_or_404(Question, id=id) if request.method == "POST": - form = AnswerForm(question, request.POST) + form = AnswerForm(question, request.user, request.POST) if form.is_valid(): + wiki = form.cleaned_data['wiki'] + text = form.cleaned_data['text'] update_time = datetime.datetime.now() - answer = Answer( - question = question, - author = request.user, - added_at = update_time, - wiki = form.cleaned_data['wiki'], - html = sanitize_html(markdowner.convert(form.cleaned_data['text'])), - ) - if answer.wiki: - answer.last_edited_by = answer.author - answer.last_edited_at = update_time - answer.wikified_at = update_time - answer.save() - Question.objects.update_answer_count(question) - - question = get_object_or_404(Question, id=id) - question.last_activity_at = update_time - question.last_activity_by = request.user - question.save() - - AnswerRevision.objects.create( - answer = answer, - revision = 1, - author = request.user, - revised_at = update_time, - summary = CONST['default_version'], - text = form.cleaned_data['text'] - ) + if request.user.is_authenticated(): + create_new_answer( + question=question, + author=request.user, + added_at=update_time, + wiki=wiki, + text=text, + email_notify=form.cleaned_data['email_notify'] + ) + else: + request.session.flush() + html = sanitize_html(markdowner.convert(text)) + summary = strip_tags(html)[:120] + anon = AnonymousAnswer( + question = question, + wiki = wiki, + text = text, + summary = summary, + session_key = request.session.session_key, + ip_addr = request.META['REMOTE_ADDR'], + ) + anon.save() + return HttpResponseRedirect('/account/signin/newanswer') return HttpResponseRedirect(question.get_absolute_url()) @@ -655,6 +754,7 @@ def vote(request, id): offensiveAnswer:8, removeQuestion: 9, removeAnswer:10 + questionSubscribeUpdates:11 accept answer code: response_data['allowed'] = -1, Accept his own answer 0, no allowed - Anonymous 1, Allowed - by default @@ -831,6 +931,31 @@ def vote(request, id): else: onDeleted(post, request.user) delete_post_or_answer.send(sender=post.__class__, instance=post, delete_by=request.user) + elif vote_type == '11':#subscribe q updates + user = request.user + if user.is_authenticated(): + try: + EmailFeed.objects.get(feed_id=question.id,subscriber_id=user.id,feed_content_type=question_type) + except EmailFeed.DoesNotExist: + feed = EmailFeed(subscriber=user,content=question) + feed.save() + if settings.EMAIL_VALIDATION == 'on' and user.email_isvalid == False: + response_data['message'] = _('subscription saved, %(email)s needs validation') % {'email':user.email} + #response_data['status'] = 1 + #responst_data['allowed'] = 1 + else: + pass + #response_data['status'] = 0 + #response_data['allowed'] = 0 + elif vote_type == '12':#unsubscribe q updates + user = request.user + if user.is_authenticated(): + try: + feed = EmailFeed.objects.get(feed_id=question.id,subscriber_id=user.id) + feed.delete() + except EmailFeed.DoesNotExist: + pass + else: response_data['success'] = 0 response_data['message'] = u'Request mode is not supported. Please try again.' @@ -905,7 +1030,11 @@ def edit_user(request, id): if request.method == "POST": form = EditUserForm(user, request.POST) if form.is_valid(): - user.email = sanitize_html(form.cleaned_data['email']) + new_email = sanitize_html(form.cleaned_data['email']) + + from django_authopenid.views import set_new_email + set_new_email(user, new_email) + user.real_name = sanitize_html(form.cleaned_data['realname']) user.website = sanitize_html(form.cleaned_data['website']) user.location = sanitize_html(form.cleaned_data['city']) @@ -1498,7 +1627,6 @@ def user_reputation(request, user_id, user_view): reputation.query.group_by = ['question_id'] - rep_list = [] for rep in Repute.objects.filter(user=user).order_by('reputed_at'): dic = '[%s,%s]' % (calendar.timegm(rep.reputed_at.timetuple()) * 1000, rep.reputation) @@ -1683,7 +1811,6 @@ def read_message(request): if request.method == "POST": if request.POST['formdata'] == 'required': request.session['message_silent'] = 1 - if request.user.is_authenticated(): request.user.delete_messages() return HttpResponse('') diff --git a/locale/en/LC_MESSAGES/django.mo b/locale/en/LC_MESSAGES/django.mo Binary files differdeleted file mode 100644 index a4dd5554..00000000 --- a/locale/en/LC_MESSAGES/django.mo +++ /dev/null diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index c4c1e674..cc42454c 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-22 20:40-0400\n" +"POT-Creation-Date: 2009-08-05 22:26-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -16,19 +16,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: settings.py:32 +#: settings.py:12 msgid "account/" msgstr "" -#: settings.py:32 django_authopenid/urls.py:9 django_authopenid/urls.py:11 +#: 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 templates/authopenid/confirm_email.txt:10 msgid "signin/" msgstr "" -#: django_authopenid/forms.py:67 django_authopenid/views.py:93 +#: django_authopenid/forms.py:67 django_authopenid/views.py:102 msgid "i-names are not supported" msgstr "" -#: django_authopenid/forms.py:102 django_authopenid/forms.py:207 +#: django_authopenid/forms.py:102 msgid "" "Usernames can only contain letters, numbers and " "underscores" @@ -40,19 +42,19 @@ msgid "" "choose another." msgstr "" -#: django_authopenid/forms.py:126 django_authopenid/forms.py:231 +#: django_authopenid/forms.py:126 django_authopenid/forms.py:233 msgid "" "Please enter a valid username and password. Note that " "both fields are case-sensitive." msgstr "" -#: django_authopenid/forms.py:130 django_authopenid/forms.py:235 +#: django_authopenid/forms.py:130 django_authopenid/forms.py:237 msgid "This account is inactive." msgstr "" -#: django_authopenid/forms.py:158 +#: django_authopenid/forms.py:158 django_authopenid/forms.py:210 msgid "invalid user name" -msgstr "" +msgstr "User names can contain letters, underscore and empty space." #: django_authopenid/forms.py:160 msgid "sorry, this name can not be used, please try another" @@ -66,137 +68,147 @@ msgstr "" msgid "this name is already in use - please try anoter" msgstr "" -#: django_authopenid/forms.py:184 +#: django_authopenid/forms.py:185 msgid "" -"This email is already registered in our database. Please " -"choose another." +"This email is already registered in our database. " +"Please choose another." msgstr "" -#: django_authopenid/forms.py:214 +#: django_authopenid/forms.py:216 msgid "" "This username don't exist. Please choose another." msgstr "" -#: django_authopenid/forms.py:253 +#: django_authopenid/forms.py:255 msgid "choose a username" msgstr "" -#: django_authopenid/forms.py:255 templates/authopenid/signup.html:36 +#: django_authopenid/forms.py:257 templates/authopenid/signup.html:38 msgid "your email address" msgstr "" -#: django_authopenid/forms.py:257 templates/authopenid/signup.html:37 +#: django_authopenid/forms.py:259 templates/authopenid/signup.html:39 msgid "choose password" msgstr "" -#: django_authopenid/forms.py:259 templates/authopenid/signup.html:38 +#: django_authopenid/forms.py:261 templates/authopenid/signup.html:40 msgid "retype password" msgstr "" -#: django_authopenid/forms.py:330 +#: django_authopenid/forms.py:335 msgid "" "Old password is incorrect. Please enter the correct " "password." msgstr "" -#: django_authopenid/forms.py:342 +#: django_authopenid/forms.py:347 msgid "new passwords do not match" msgstr "" -#: django_authopenid/forms.py:434 +#: django_authopenid/forms.py:442 msgid "Incorrect username." msgstr "" #: django_authopenid/urls.py:10 -msgid "signout/" +msgid "newquestion/" msgstr "" #: django_authopenid/urls.py:11 -msgid "complete/" +msgid "newanswer/" +msgstr "" + +#: django_authopenid/urls.py:12 +msgid "signout/" msgstr "" #: django_authopenid/urls.py:13 +msgid "complete/" +msgstr "" + +#: django_authopenid/urls.py:15 msgid "register/" msgstr "" -#: django_authopenid/urls.py:14 +#: django_authopenid/urls.py:16 msgid "signup/" msgstr "" -#: django_authopenid/urls.py:16 +#: django_authopenid/urls.py:18 msgid "sendpw/" msgstr "" -#: django_authopenid/urls.py:26 +#: django_authopenid/urls.py:29 msgid "delete/" msgstr "" -#: django_authopenid/views.py:99 +#: django_authopenid/views.py:108 #, python-format -msgid "非法OpenID地址: %s" +msgid "OpenID %(openid_url)s is invalid" msgstr "" -#: django_authopenid/views.py:366 +#: django_authopenid/views.py:417 django_authopenid/views.py:544 msgid "Welcome" -msgstr "" +msgstr "Verification Email from NMR Wiki Q&A" -#: django_authopenid/views.py:456 +#: django_authopenid/views.py:507 msgid "Password changed." msgstr "" -#: django_authopenid/views.py:488 -msgid "Email changed." +#: django_authopenid/views.py:519 django_authopenid/views.py:524 +msgid "your email needs to be validated" msgstr "" +"Your email needs to be validated. Please see details <a " +"id='validate_email_alert' href=\"/faq#validate\">here</a>." -#: django_authopenid/views.py:519 django_authopenid/views.py:671 +#: django_authopenid/views.py:681 django_authopenid/views.py:833 #, python-format msgid "No OpenID %s found associated in our database" msgstr "" -#: django_authopenid/views.py:523 django_authopenid/views.py:678 +#: django_authopenid/views.py:685 django_authopenid/views.py:840 #, python-format msgid "The OpenID %s isn't associated to current user logged in" msgstr "" -#: django_authopenid/views.py:531 +#: django_authopenid/views.py:693 msgid "Email Changed." msgstr "" -#: django_authopenid/views.py:606 +#: django_authopenid/views.py:768 msgid "This OpenID is already associated with another account." msgstr "" -#: django_authopenid/views.py:611 +#: django_authopenid/views.py:773 #, python-format msgid "OpenID %s is now associated with your account." msgstr "" -#: django_authopenid/views.py:681 +#: django_authopenid/views.py:843 msgid "Account deleted." msgstr "" -#: django_authopenid/views.py:721 +#: django_authopenid/views.py:883 msgid "Request for new password" msgstr "" -#: django_authopenid/views.py:734 +#: django_authopenid/views.py:896 msgid "A new password has been sent to your email address." msgstr "" -#: django_authopenid/views.py:764 +#: django_authopenid/views.py:926 #, python-format msgid "" "Could not change password. Confirmation key '%s' is not " "registered." msgstr "" -#: django_authopenid/views.py:773 +#: django_authopenid/views.py:935 msgid "" "Can not change password. User don't exist anymore in our " "database." msgstr "" -#: django_authopenid/views.py:782 +#: django_authopenid/views.py:944 #, python-format msgid "Password changed for %s. You may now sign in." msgstr "" @@ -237,7 +249,7 @@ msgstr "" msgid "question" msgstr "" -#: forum/const.py:57 templates/book.html:110 templates/backup/book.html:110 +#: forum/const.py:57 templates/book.html:110 msgid "answer" msgstr "" @@ -259,7 +271,7 @@ msgstr "" #: forum/const.py:62 msgid "received award" -msgstr "" +msgstr "received badge" #: forum/const.py:63 msgid "marked best answer" @@ -317,43 +329,21 @@ msgstr "" msgid "retagged" msgstr "" -#: forum/feed.py:17 templates/base.html:7 templates/base_content.html:6 -#: templates/faq.html:25 templates/faq.html.py:108 -#: templates/backup/base.html:7 templates/backup/base_content.html:6 -#: templates/backup/faq.html:25 templates/backup/faq.html.py:108 -#: templates/tough/faq.html:23 templates/tough/faq.html.py:106 -#: templates/tough/question_retag.html:89 -msgid "site title" -msgstr "" - -#: forum/feed.py:17 +#: forum/feed.py:18 msgid " - " msgstr "" -#: forum/feed.py:17 templates/base.html:7 templates/base_content.html:6 -#: templates/backup/base.html:7 templates/backup/base_content.html:6 -msgid "site slogan" -msgstr "" - -#: forum/feed.py:17 +#: forum/feed.py:18 msgid "latest questions" msgstr "" -#: forum/feed.py:19 templates/index.html:8 templates/backup/index.html:8 -msgid "meta site content" -msgstr "" - -#: forum/feed.py:21 -msgid "copyright message" +#: forum/feed.py:19 +msgid "questions/" msgstr "" #: forum/forms.py:14 templates/answer_edit_tips.html:34 -#: templates/answer_edit_tips.html.py:39 templates/question_edit_tips.html:31 +#: templates/answer_edit_tips.html.py:38 templates/question_edit_tips.html:31 #: templates/question_edit_tips.html:36 -#: templates/backup/answer_edit_tips.html:33 -#: templates/backup/answer_edit_tips.html:38 -#: templates/backup/question_edit_tips.html:29 -#: templates/backup/question_edit_tips.html:34 msgid "title" msgstr "" @@ -374,108 +364,125 @@ msgid "question content must be > 10 characters" msgstr "" #: forum/forms.py:45 templates/header.html:30 templates/header.html.py:61 -#: templates/backup/header.html:30 templates/backup/header.html.py:59 msgid "tags" msgstr "" -#: forum/forms.py:46 -msgid "please use space to separate tags (this enables autocomplete feature)" +#: forum/forms.py:47 +msgid "" +"Tags are short keywords, with no spaces within. Up to five tags can be used." msgstr "" -#: forum/forms.py:53 +#: forum/forms.py:54 templates/question_retag.html:38 msgid "tags are required" msgstr "" -#: forum/forms.py:57 +#: forum/forms.py:58 msgid "please use 5 tags or less" msgstr "" -#: forum/forms.py:60 +#: forum/forms.py:61 msgid "tags must be shorter than 20 characters" msgstr "" -#: forum/forms.py:64 +#: forum/forms.py:65 msgid "" "please use following characters in tags: letters 'a-z', numbers, and " "characters '.-_#'" msgstr "" -#: forum/forms.py:74 templates/index.html:56 templates/question.html:196 -#: templates/question.html.py:377 templates/questions.html:58 +#: forum/forms.py:75 templates/index.html:57 templates/question.html:199 +#: templates/question.html.py:380 templates/questions.html:58 #: templates/questions.html.py:70 templates/unanswered.html:48 -#: templates/unanswered.html.py:60 templates/backup/index.html:56 -#: templates/backup/question.html:195 templates/backup/question.html.py:367 -#: templates/backup/questions.html:57 templates/backup/questions.html.py:69 -#: templates/backup/unanswered.html:47 templates/backup/unanswered.html:59 -#: templates/tough/unanswered.html:46 templates/tough/unanswered.html.py:58 +#: templates/unanswered.html.py:60 msgid "community wiki" msgstr "" -#: forum/forms.py:75 +#: forum/forms.py:76 msgid "" "if you choose community wiki option, the question and answer do not generate " "points and name of author will not be shown" msgstr "" -#: forum/forms.py:84 +#: forum/forms.py:89 msgid "update summary:" msgstr "" -#: forum/forms.py:85 +#: forum/forms.py:90 msgid "" "enter a brief summary of your revision (e.g. fixed spelling, grammar, " "improved style, this field is optional)" msgstr "" -#: forum/forms.py:160 +#: forum/forms.py:175 msgid "this email does not have to be linked to gravatar" msgstr "" -#: forum/forms.py:161 +#: forum/forms.py:176 msgid "Real name" msgstr "" -#: forum/forms.py:162 +#: forum/forms.py:177 msgid "Website" msgstr "" -#: forum/forms.py:163 +#: forum/forms.py:178 msgid "Location" msgstr "" -#: forum/forms.py:164 +#: forum/forms.py:179 msgid "Date of birth" msgstr "" -#: forum/forms.py:164 +#: forum/forms.py:179 msgid "will not be shown, used to calculate age, format: YYYY-MM-DD" msgstr "" -#: forum/forms.py:165 templates/authopenid/settings.html:20 +#: forum/forms.py:180 templates/authopenid/settings.html:21 msgid "Profile" msgstr "" -#: forum/forms.py:190 forum/forms.py:191 +#: forum/forms.py:207 forum/forms.py:208 msgid "this email has already been registered, please use another one" msgstr "" -#: forum/models.py:316 templates/badges.html:52 -#: templates/backup/badges.html:52 +#: forum/models.py:238 +#, python-format +msgid "%(author)s modified the question" +msgstr "" + +#: forum/models.py:242 +#, python-format +msgid "%(people)s posted %(new_answer_count)s new answers" +msgstr "" + +#: forum/models.py:247 +#, python-format +msgid "%(people)s commented the question" +msgstr "" + +#: forum/models.py:252 +#, python-format +msgid "%(people)s commented answers" +msgstr "" + +#: forum/models.py:254 +#, python-format +msgid "%(people)s commented the answer" +msgstr "" + +#: forum/models.py:433 templates/badges.html:52 msgid "gold" msgstr "" -#: forum/models.py:317 templates/badges.html:62 -#: templates/backup/badges.html:62 +#: forum/models.py:434 templates/badges.html:60 msgid "silver" msgstr "" -#: forum/models.py:318 templates/badges.html:70 -#: templates/backup/badges.html:70 +#: forum/models.py:435 templates/badges.html:67 msgid "bronze" msgstr "" #: forum/user.py:16 templates/user_tabs.html:7 -#: templates/backup/user_tabs.html:6 msgid "overview" msgstr "" @@ -488,7 +495,6 @@ msgid "user profile overview" msgstr "" #: forum/user.py:24 templates/user_tabs.html:9 -#: templates/backup/user_tabs.html:8 msgid "recent activity" msgstr "" @@ -501,12 +507,10 @@ msgid "profile - recent activity" msgstr "" #: forum/user.py:33 templates/user_tabs.html:13 -#: templates/backup/user_tabs.html:12 msgid "responses" msgstr "" #: forum/user.py:34 templates/user_tabs.html:12 -#: templates/backup/user_tabs.html:11 msgid "comments and answers to others questions" msgstr "" @@ -515,7 +519,6 @@ msgid "profile - responses" msgstr "" #: forum/user.py:42 templates/user_info.html:23 templates/users.html:26 -#: templates/backup/user_info.html:22 templates/backup/users.html:25 msgid "reputation" msgstr "" @@ -540,12 +543,10 @@ msgid "profile - favorite questions" msgstr "" #: forum/user.py:59 templates/user_tabs.html:20 -#: templates/backup/user_tabs.html:19 msgid "casted votes" msgstr "votes" #: forum/user.py:60 templates/user_tabs.html:20 -#: templates/backup/user_tabs.html:19 msgid "user vote record" msgstr "" @@ -557,8 +558,7 @@ msgstr "" msgid "preferences" msgstr "" -#: forum/user.py:69 templates/user_tabs.html:28 -#: templates/backup/user_tabs.html:27 +#: forum/user.py:69 templates/user_tabs.html:27 msgid "user preference settings" msgstr "" @@ -566,27 +566,42 @@ msgstr "" msgid "profile - user preferences" msgstr "" -#: forum/views.py:1730 +#: forum/views.py:304 +msgid "/account/" +msgstr "" + +#: forum/views.py:943 +#, python-format +msgid "subscription saved, %(email)s needs validation" +msgstr "" +"Your subscription is saved, but email address %(email)s needs to be " +"validated, please see <a href='/faq#validate'>more details here</a>" + +#: forum/views.py:1853 msgid "uploading images is limited to users with >60 reputation points" msgstr "" -#: forum/views.py:1732 +#: forum/views.py:1855 msgid "allowed file types are 'jpg', 'jpeg', 'gif', 'bmp', 'png', 'tiff'" msgstr "" -#: forum/views.py:1734 +#: forum/views.py:1857 #, python-format msgid "maximum upload file size is %sK" msgstr "" -#: forum/views.py:1736 +#: forum/views.py:1859 #, python-format msgid "" "Error uploading file. Please contact the site administrator. Thank you. %s" msgstr "" +#: forum/management/commands/send_email_alerts.py:35 +msgid "updates from website" +msgstr "" + #: forum/templatetags/extra_tags.py:139 forum/templatetags/extra_tags.py:168 -#: templates/header.html:33 templates/backup/header.html:33 +#: templates/header.html:33 msgid "badges" msgstr "" @@ -598,140 +613,121 @@ msgstr "" msgid " ago" msgstr "" -#: templates/404.html:24 templates/backup/404.html:24 +#: templates/404.html:24 msgid "Sorry, could not find the page you requested." msgstr "" -#: templates/404.html:26 templates/backup/404.html:26 +#: templates/404.html:26 msgid "This might have happened for the following reasons:" msgstr "" -#: templates/404.html:28 templates/backup/404.html:28 +#: templates/404.html:28 msgid "this question or answer has been deleted;" msgstr "" -#: templates/404.html:29 templates/backup/404.html:29 +#: templates/404.html:29 msgid "url has error - please check it;" msgstr "" -#: templates/404.html:30 templates/backup/404.html:30 +#: templates/404.html:30 msgid "" "the page you tried to visit is protected or you don't have sufficient " "points, see" msgstr "" -#: templates/404.html:31 templates/backup/404.html:31 +#: templates/404.html:31 msgid "if you believe this error 404 should not have occured, please" msgstr "" -#: templates/404.html:32 templates/backup/404.html:32 +#: templates/404.html:32 msgid "report this problem" msgstr "" -#: templates/404.html:41 templates/500.html:27 templates/backup/404.html:41 -#: templates/backup/500.html:27 +#: templates/404.html:41 templates/500.html:27 msgid "back to previous page" msgstr "" -#: templates/404.html:42 templates/backup/404.html:42 +#: templates/404.html:42 msgid "see all questions" msgstr "" -#: templates/404.html:43 templates/backup/404.html:43 +#: templates/404.html:43 msgid "see all tags" msgstr "" -#: templates/500.html:24 templates/backup/500.html:24 +#: templates/500.html:22 +msgid "sorry, system error" +msgstr "" + +#: templates/500.html:24 msgid "system error log is recorded, error will be fixed as soon as possible" msgstr "" -#: templates/500.html:25 templates/backup/500.html:25 +#: templates/500.html:25 msgid "please report the error to the site administrators if you wish" msgstr "" -#: templates/500.html:28 templates/backup/500.html:28 +#: templates/500.html:28 msgid "see latest questions" msgstr "" -#: templates/500.html:29 templates/backup/500.html:29 +#: templates/500.html:29 msgid "see tags" msgstr "" #: templates/about.html:6 templates/about.html.py:11 -#: templates/backup/about.html:6 templates/backup/about.html.py:11 msgid "About" msgstr "" #: templates/answer_edit.html:4 templates/answer_edit.html.py:47 -#: templates/backup/answer_edit.html:3 templates/backup/answer_edit.html:46 msgid "Edit answer" msgstr "" #: templates/answer_edit.html:24 templates/answer_edit.html.py:27 -#: templates/ask.html:25 templates/ask.html.py:28 templates/question.html:37 -#: templates/question.html.py:40 templates/question_edit.html:27 -#: templates/backup/answer_edit.html:23 templates/backup/answer_edit.html:26 -#: templates/backup/ask.html:24 templates/backup/ask.html.py:27 -#: templates/backup/question.html:36 templates/backup/question.html.py:39 -#: templates/backup/question_edit.html:25 +#: templates/ask.html:25 templates/ask.html.py:28 templates/question.html:40 +#: templates/question.html.py:43 templates/question_edit.html:27 msgid "hide preview" msgstr "" #: templates/answer_edit.html:27 templates/ask.html:28 -#: templates/question.html:40 templates/question_edit.html:27 -#: templates/backup/answer_edit.html:26 templates/backup/ask.html:27 -#: templates/backup/question.html:39 templates/backup/question_edit.html:25 +#: templates/question.html:43 templates/question_edit.html:27 msgid "show preview" msgstr "" #: templates/answer_edit.html:47 templates/question_edit.html:65 -#: templates/revisions_answer.html:36 templates/revisions_question.html:36 -#: templates/backup/answer_edit.html:46 templates/backup/question_edit.html:63 -#: templates/backup/revisions_answer.html:35 -#: templates/backup/revisions_question.html:34 -#: templates/tough/question_retag.html:51 +#: templates/question_retag.html:52 templates/revisions_answer.html:36 +#: templates/revisions_question.html:36 msgid "back" msgstr "" #: templates/answer_edit.html:52 templates/question_edit.html:70 #: templates/revisions_answer.html:47 templates/revisions_question.html:47 -#: templates/backup/answer_edit.html:51 templates/backup/question_edit.html:68 -#: templates/backup/revisions_answer.html:46 -#: templates/backup/revisions_question.html:45 msgid "revision" msgstr "" #: templates/answer_edit.html:55 templates/question_edit.html:74 -#: templates/backup/answer_edit.html:54 templates/backup/question_edit.html:72 msgid "select revision" msgstr "" -#: templates/answer_edit.html:62 templates/ask.html:81 -#: templates/question.html:447 templates/question_edit.html:91 -#: templates/backup/answer_edit.html:61 templates/backup/ask.html:80 -#: templates/backup/question.html:437 templates/backup/question_edit.html:89 +#: templates/answer_edit.html:62 templates/ask.html:94 +#: templates/question.html:452 templates/question_edit.html:91 msgid "Toggle the real time Markdown editor preview" msgstr "" -#: templates/answer_edit.html:62 templates/ask.html:81 -#: templates/question.html:447 templates/question_edit.html:91 -#: templates/backup/answer_edit.html:61 templates/backup/ask.html:80 -#: templates/backup/question.html:437 templates/backup/question_edit.html:89 +#: templates/answer_edit.html:62 templates/ask.html:94 +#: templates/question.html:452 templates/question_edit.html:91 msgid "toggle preview" msgstr "" #: templates/answer_edit.html:73 templates/question_edit.html:119 -#: templates/backup/answer_edit.html:72 -#: templates/backup/question_edit.html:117 +#: templates/question_retag.html:75 msgid "Save edit" msgstr "" #: templates/answer_edit.html:74 templates/close.html:29 -#: templates/question_edit.html:120 templates/reopen.html:30 -#: templates/user_edit.html:83 templates/backup/answer_edit.html:73 -#: templates/backup/close.html:29 templates/backup/question_edit.html:118 -#: templates/backup/reopen.html:28 templates/backup/user_edit.html:81 -#: templates/tough/question_retag.html:75 +#: templates/question_edit.html:120 templates/question_retag.html:76 +#: templates/reopen.html:30 templates/user_edit.html:83 +#: templates/authopenid/changeemail.html:34 msgid "Cancel" msgstr "" @@ -739,726 +735,613 @@ msgstr "" msgid "answer tips" msgstr "Tips" -#: templates/answer_edit_tips.html:7 templates/backup/answer_edit_tips.html:6 +#: templates/answer_edit_tips.html:7 msgid "please make your answer relevant to this community" msgstr "" -#: templates/answer_edit_tips.html:10 templates/backup/answer_edit_tips.html:9 +#: templates/answer_edit_tips.html:10 msgid "try to give an answer, rather than engage into a discussion" msgstr "" #: templates/answer_edit_tips.html:13 -#: templates/backup/answer_edit_tips.html:12 msgid "please try to provide details" msgstr "" #: templates/answer_edit_tips.html:16 templates/question_edit_tips.html:13 -#: templates/backup/answer_edit_tips.html:15 -#: templates/backup/question_edit_tips.html:11 msgid "be clear and concise" msgstr "" #: templates/answer_edit_tips.html:19 templates/question_edit_tips.html:16 -#: templates/backup/answer_edit_tips.html:18 -#: templates/backup/question_edit_tips.html:14 msgid "see frequently asked questions" msgstr "" #: templates/answer_edit_tips.html:25 templates/question_edit_tips.html:22 -#: templates/backup/answer_edit_tips.html:24 -#: templates/backup/question_edit_tips.html:20 msgid "Markdown tips" msgstr "Markdown basics" #: templates/answer_edit_tips.html:28 templates/question_edit_tips.html:25 -#: templates/backup/answer_edit_tips.html:27 -#: templates/backup/question_edit_tips.html:23 msgid "*italic* or __italic__" msgstr "" #: templates/answer_edit_tips.html:31 templates/question_edit_tips.html:28 -#: templates/backup/answer_edit_tips.html:30 -#: templates/backup/question_edit_tips.html:26 msgid "**bold** or __bold__" msgstr "" #: templates/answer_edit_tips.html:34 templates/question_edit_tips.html:31 -#: templates/backup/answer_edit_tips.html:33 -#: templates/backup/question_edit_tips.html:29 msgid "link" msgstr "" -#: templates/answer_edit_tips.html:34 templates/answer_edit_tips.html.py:39 +#: 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 -#: templates/backup/answer_edit_tips.html:33 -#: templates/backup/answer_edit_tips.html:38 -#: templates/backup/question_edit_tips.html:29 -#: templates/backup/question_edit_tips.html:34 msgid "text" msgstr "" -#: templates/answer_edit_tips.html:39 templates/question_edit_tips.html:36 -#: templates/backup/answer_edit_tips.html:38 -#: templates/backup/question_edit_tips.html:34 +#: templates/answer_edit_tips.html:38 templates/question_edit_tips.html:36 msgid "image" msgstr "" -#: templates/answer_edit_tips.html:43 templates/question_edit_tips.html:40 -#: templates/backup/answer_edit_tips.html:42 -#: templates/backup/question_edit_tips.html:38 +#: templates/answer_edit_tips.html:42 templates/question_edit_tips.html:40 msgid "numbered list:" msgstr "" -#: templates/answer_edit_tips.html:48 templates/question_edit_tips.html:45 -#: templates/backup/answer_edit_tips.html:47 -#: templates/backup/question_edit_tips.html:43 +#: templates/answer_edit_tips.html:47 templates/question_edit_tips.html:45 msgid "basic HTML tags are also supported" msgstr "" -#: templates/answer_edit_tips.html:51 templates/question_edit_tips.html:48 -#: templates/backup/answer_edit_tips.html:50 -#: templates/backup/question_edit_tips.html:46 +#: templates/answer_edit_tips.html:50 templates/question_edit_tips.html:48 msgid "learn more about Markdown" msgstr "" -#: templates/ask.html:4 templates/ask.html.py:60 templates/backup/ask.html:3 -#: templates/backup/ask.html.py:59 +#: templates/ask.html:4 templates/ask.html.py:60 msgid "Ask a question" msgstr "" -#: templates/ask.html:106 templates/backup/ask.html:105 -msgid "Use" -msgstr "" - -#: templates/ask.html:106 templates/backup/ask.html:105 -msgid "learn more about OpenID" +#: templates/ask.html:67 +msgid "login to post question info" msgstr "" +"<span class=\"strong big\">You are welcome to start submitting your question " +"anonymously</span> - you are currently not logged in. When you post your " +"question, you will be redirected to the login/signup page. Your question " +"will be saved meanwhile and will be posted when you log in. Login/signup " +"process is very simple. Login takes about 30 seconds, initial signup takes a " +"minute or less." -#: templates/ask.html:106 templates/authopenid/signin.html:34 -#: templates/authopenid/signin.html:60 templates/backup/ask.html:105 -msgid "Login" -msgstr "" - -#: templates/ask.html:109 templates/backup/ask.html:108 -msgid "Get your own " +#: templates/ask.html:73 +#, python-format +msgid "must have valid %(email)s to post" msgstr "" +"<span class='strong big'>Looks like your email address, %(email)s has not " +"yet been validated.</span> To post messages you must verify your email, " +"please see <a href='/faq#validate'>more details here</a>.<br>You can submit " +"your question now and validate email after that. Your question will saved as " +"pending meanwhile. " -#: templates/ask.html:117 templates/authopenid/sendpw.html:27 -#: templates/backup/ask.html:116 -msgid "User name" +#: templates/ask.html:108 +msgid "(required)" msgstr "" -#: templates/ask.html:120 templates/backup/ask.html:119 -msgid "Email: (won't be shown to anyone)" -msgstr "" +#: templates/ask.html:115 +msgid "Login/signup to post your question" +msgstr "Login/Signup to Post" -#: templates/ask.html:127 templates/backup/ask.html:126 +#: templates/ask.html:117 msgid "Ask your question" -msgstr "" +msgstr "Ask Your Question" #: templates/badge.html:6 templates/badge.html.py:17 -#: templates/backup/badge.html:5 templates/backup/badge.html.py:16 msgid "Badge" msgstr "" -#: templates/badge.html:26 templates/backup/badge.html:25 +#: templates/badge.html:26 msgid "The users have been awarded with badges:" msgstr "" -#: templates/badges.html:6 templates/backup/badges.html:6 +#: templates/badges.html:6 msgid "Badges summary" msgstr "" #: templates/badges.html:17 templates/user_stats.html:113 -#: templates/backup/badges.html:17 templates/backup/user_stats.html:112 msgid "Badges" msgstr "" -#: templates/badges.html:21 templates/backup/badges.html:21 +#: templates/badges.html:21 msgid "Community gives you awards for your questions, answers and votes." msgstr "" +"If your questions and answers are highly voted, your contribution to this " +"Q&A community will be recognized with the variety of badges." -#: templates/badges.html:22 templates/backup/badges.html:22 +#: templates/badges.html:22 msgid "" "Below is the list of available badges and number of times each type of badge " "has been awarded." msgstr "" +"Currently badges differ only by their level: <strong>gold</strong>, " +"<strong>silver</strong> and <strong>bronze</strong> (their meanings are " +"described on the right). In the future there will be many types of badges at " +"each level. <strong>Please give us your <a href=\"/faq#feedback\">feedback</" +"a></strong> - what kinds of badges would you like to see and suggest the " +"activity for which those badges might be awarded." -#: templates/badges.html:49 templates/backup/badges.html:49 +#: templates/badges.html:49 msgid "Community badges" -msgstr "" +msgstr "Badge levels" -#: templates/badges.html:55 templates/backup/badges.html:55 -msgid "Gold badge is very rare." +#: templates/badges.html:55 +msgid "gold badge description" msgstr "" +"Gold badge is the highest award in this community. To obtain it have to show " +"profound knowledge and ability in addition to your active participation." -#: templates/badges.html:56 templates/backup/badges.html:56 -msgid "" -"To obtain it you have to show profound knowledge and ability in addition to " -"actively participating in the community." +#: templates/badges.html:63 +msgid "silver badge description" msgstr "" +"Obtaining silver badge requires significant patience. If you have received " +"one, that means you have greatly contributed to this community." -#: templates/badges.html:57 templates/backup/badges.html:57 -msgid "Gold badge is the highest award in this community." -msgstr "" - -#: templates/badges.html:65 templates/backup/badges.html:65 -msgid "Obtaining silver badge requires significant patience." -msgstr "" - -#: templates/badges.html:66 templates/backup/badges.html:66 -msgid "If you got one, you've very significantly contributed to this community" -msgstr "" - -#: templates/badges.html:69 templates/backup/badges.html:69 +#: templates/badges.html:66 msgid "bronze badge: often given as a special honor" msgstr "" -#: templates/badges.html:73 templates/backup/badges.html:73 -msgid "" -"If you are active in this community, you will will get this medal - still it " -"is a special honor." +#: templates/badges.html:70 +msgid "bronze badge description" msgstr "" +"If you are an active participant in this community, you will be recognized " +"with this badge." -#: templates/base.html:59 templates/base_content.html:60 -#: templates/backup/base.html:59 templates/backup/base_content.html:57 -msgid "congratulations, community gave you a badge" -msgstr "" - -#: templates/base.html:61 templates/base_content.html:62 -#: templates/backup/base.html:61 templates/backup/base_content.html:59 -msgid "profile" -msgstr "" - -#: templates/base_content.html:61 templates/backup/base_content.html:58 -msgid "see" -msgstr "" - -#: templates/book.html:7 templates/backup/book.html:7 +#: templates/book.html:7 msgid "reading channel" msgstr "" -#: templates/book.html:26 templates/backup/book.html:26 +#: templates/book.html:26 msgid "[author]" msgstr "" -#: templates/book.html:30 templates/backup/book.html:30 +#: templates/book.html:30 msgid "[publisher]" msgstr "" -#: templates/book.html:34 templates/backup/book.html:34 +#: templates/book.html:34 msgid "[publication date]" msgstr "" -#: templates/book.html:38 templates/backup/book.html:38 +#: templates/book.html:38 msgid "[price]" msgstr "" -#: templates/book.html:39 templates/backup/book.html:39 +#: templates/book.html:39 msgid "currency unit" msgstr "" -#: templates/book.html:42 templates/backup/book.html:42 +#: templates/book.html:42 msgid "[pages]" msgstr "" -#: templates/book.html:43 templates/backup/book.html:43 +#: templates/book.html:43 msgid "pages abbreviation" msgstr "" -#: templates/book.html:46 templates/backup/book.html:46 +#: templates/book.html:46 msgid "[tags]" msgstr "" -#: templates/book.html:56 templates/backup/book.html:56 +#: templates/book.html:56 msgid "author blog" msgstr "" -#: templates/book.html:62 templates/backup/book.html:62 +#: templates/book.html:62 msgid "book directory" msgstr "" -#: templates/book.html:66 templates/backup/book.html:66 +#: templates/book.html:66 msgid "buy online" msgstr "" -#: templates/book.html:79 templates/backup/book.html:79 +#: templates/book.html:79 msgid "reader questions" msgstr "" -#: templates/book.html:82 templates/backup/book.html:82 +#: templates/book.html:82 msgid "ask the author" msgstr "" #: templates/book.html:88 templates/book.html.py:93 -#: templates/users_questions.html:17 templates/backup/book.html:88 -#: templates/backup/book.html.py:93 templates/backup/users_questions.html:16 +#: templates/users_questions.html:17 msgid "this question was selected as favorite" msgstr "" #: templates/book.html:88 templates/book.html.py:93 #: templates/users_questions.html:11 templates/users_questions.html.py:17 -#: templates/backup/book.html:88 templates/backup/book.html.py:93 -#: templates/backup/users_questions.html:10 -#: templates/backup/users_questions.html:16 msgid "number of times" msgstr "" -#: templates/book.html:105 templates/index.html:47 templates/questions.html:46 +#: templates/book.html:105 templates/index.html:48 templates/questions.html:46 #: templates/unanswered.html:37 templates/users_questions.html:30 -#: templates/backup/book.html:105 templates/backup/index.html:47 -#: templates/backup/questions.html:45 templates/backup/unanswered.html:36 -#: templates/backup/users_questions.html:29 templates/tough/unanswered.html:35 msgid "votes" msgstr "" -#: templates/book.html:108 templates/backup/book.html:108 +#: templates/book.html:108 msgid "the answer has been accepted to be correct" msgstr "" -#: templates/book.html:115 templates/index.html:48 templates/questions.html:47 +#: templates/book.html:115 templates/index.html:49 templates/questions.html:47 #: templates/unanswered.html:38 templates/users_questions.html:40 -#: templates/backup/book.html:115 templates/backup/index.html:48 -#: templates/backup/questions.html:46 templates/backup/unanswered.html:37 -#: templates/backup/users_questions.html:39 templates/tough/unanswered.html:36 msgid "views" msgstr "" -#: templates/book.html:125 templates/index.html:68 templates/question.html:112 -#: templates/question.html.py:479 templates/questions.html:84 -#: templates/questions.html.py:149 templates/tags.html:47 +#: templates/book.html:125 templates/index.html:69 templates/question.html:115 +#: templates/question.html.py:486 templates/questions.html:84 +#: templates/questions.html.py:156 templates/tags.html:47 #: templates/unanswered.html:75 templates/unanswered.html.py:109 -#: templates/users_questions.html:52 templates/backup/book.html:125 -#: templates/backup/index.html:68 templates/backup/index.html.py:93 -#: templates/backup/question.html:111 templates/backup/question.html.py:469 -#: templates/backup/questions.html:83 templates/backup/questions.html:148 -#: templates/backup/tags.html:46 templates/backup/unanswered.html:74 -#: templates/backup/unanswered.html:108 -#: templates/backup/users_questions.html:51 templates/tough/unanswered.html:72 -#: templates/tough/unanswered.html:105 +#: templates/users_questions.html:52 msgid "using tags" msgstr "" -#: templates/book.html:147 templates/backup/book.html:147 +#: templates/book.html:147 msgid "subscribe to book RSS feed" msgstr "" #: templates/book.html:147 templates/index.html:116 -#: templates/backup/book.html:147 templates/backup/index.html:115 msgid "subscribe to the questions feed" msgstr "" #: templates/close.html:6 templates/close.html.py:16 -#: templates/backup/close.html:6 templates/backup/close.html.py:16 msgid "Close question" msgstr "" -#: templates/close.html:19 templates/backup/close.html:19 +#: templates/close.html:19 msgid "Close the question" msgstr "" -#: templates/close.html:25 templates/backup/close.html:25 +#: templates/close.html:25 msgid "Reasons" msgstr "" -#: templates/close.html:28 templates/backup/close.html:28 +#: templates/close.html:28 msgid "OK to close" msgstr "" -#: templates/faq.html:11 templates/backup/faq.html:11 -#: templates/tough/faq.html:9 +#: templates/faq.html:11 msgid "Frequently Asked Questions " msgstr "" -#: templates/faq.html:15 templates/backup/faq.html:15 -#: templates/tough/faq.html:13 +#: templates/faq.html:16 msgid "What kinds of questions can I ask here?" msgstr "" -#: templates/faq.html:16 templates/backup/faq.html:16 -#: templates/tough/faq.html:14 +#: templates/faq.html:17 msgid "" "Most importanly - questions should be <strong>relevant</strong> to this " "community." msgstr "" +"Please ask questions about all aspects of <strong>Magnetic Resonance</" +"strong> - <strong>NMR</strong>, <strong>EPR</strong>, <strong>MRI</strong>. " +"Questions about both theory and practice in these fields are welcome, " +"including questions about the physical foundations, scientific applications, " +"instrumentation, interpretation of data, software, preparation and handling " +"of samples etc. " -#: templates/faq.html:17 templates/backup/faq.html:17 -#: templates/tough/faq.html:15 +#: templates/faq.html:18 msgid "" "Before asking the question - please make sure to use search to see whether " "your question has alredy been answered." msgstr "" +"Before you ask - please make sure to search for a similar question. You can " +"search questions by their title or tags." -#: templates/faq.html:20 templates/backup/faq.html:20 -#: templates/tough/faq.html:18 +#: templates/faq.html:21 msgid "What questions should I avoid asking?" -msgstr "" +msgstr "What kinds of questions should be avoided?" -#: templates/faq.html:21 templates/backup/faq.html:21 -#: templates/tough/faq.html:19 +#: templates/faq.html:22 msgid "" "Please avoid asking questions that are not relevant to this community, too " "subjective and argumentative." msgstr "" +"Please avoid asking questions that are not relevant to the subjects of NMR, " +"EPR or MRI, also please avoid asking questions that are too argumentative or " +"subjective." -#: templates/faq.html:24 templates/backup/faq.html:24 -#: templates/tough/faq.html:22 +#: templates/faq.html:27 msgid "What should I avoid in my answers?" msgstr "" -#: templates/faq.html:25 templates/backup/faq.html:25 -#: templates/tough/faq.html:23 +#: templates/faq.html:28 templates/faq.html.py:132 +msgid "site title" +msgstr "NMR Wiki Q&A" + +#: templates/faq.html:28 msgid "" "is a Q&A site, not a discussion group. Therefore - please avoid having " "discussions in your answers, comment facility allows some space for brief " "discussions." msgstr "" +"is a <strong>question and answer</strong> site - <strong>it is not a " +"discussion group</strong>. Please avoid holding debates in your answers as " +"they tend to dilute the essense of questions and answers. For the brief " +"discussions please use commenting facility." -#: templates/faq.html:28 templates/backup/faq.html:28 -#: templates/tough/faq.html:26 +#: templates/faq.html:32 msgid "Who moderates this community?" msgstr "" -#: templates/faq.html:29 templates/backup/faq.html:29 -#: templates/tough/faq.html:27 +#: templates/faq.html:33 msgid "The short answer is: <strong>you</strong>." msgstr "" -#: templates/faq.html:30 templates/backup/faq.html:30 -#: templates/tough/faq.html:28 +#: templates/faq.html:34 msgid "This website is moderated by the users." msgstr "" -#: templates/faq.html:31 templates/backup/faq.html:31 -#: templates/tough/faq.html:29 +#: templates/faq.html:35 msgid "" "The reputation system allows users earn the authorization to perform a " "variety of moderation tasks." msgstr "" -#: templates/faq.html:34 templates/backup/faq.html:34 -#: templates/tough/faq.html:32 +#: templates/faq.html:40 msgid "How does reputation system work?" msgstr "" -#: templates/faq.html:35 templates/backup/faq.html:35 -#: templates/tough/faq.html:33 -msgid "" -"Anyone can ask questions and give answers, points are not necessary for that." +#: templates/faq.html:41 +msgid "Rep system summary" msgstr "" +"When a question or answer is upvoted, the user who posted them will gain " +"some points, which are called \"reputation points\". These points serve as a " +"rough measure of the community trust to him/her. Various moderation tasks " +"are gradually assigned to the users based on those points." -#: templates/faq.html:36 templates/backup/faq.html:36 -#: templates/tough/faq.html:34 -msgid "" -"As we've said before, users help running this site. Point system helps " -"select users who can administer this community." -msgstr "" - -#: templates/faq.html:37 templates/backup/faq.html:37 -#: templates/tough/faq.html:35 -msgid "" -"Reputation points roughly measure how community trusts you. These points are " -"given to you directly by other members of the community." -msgstr "" - -#: templates/faq.html:40 templates/backup/faq.html:40 -#: templates/tough/faq.html:38 -msgid "" -"For example, if you ask an interesting question or give a helpful answer, " -"your input will be upvoted and you will gain more trust in the community." -msgstr "" - -#: templates/faq.html:41 templates/backup/faq.html:41 -#: templates/tough/faq.html:39 -msgid "" -"If on the other hand someone gives a misleading answer, the answer will be " -"voted down and he/she loses some points." -msgstr "" - -#: templates/faq.html:42 templates/backup/faq.html:42 -#: templates/tough/faq.html:40 -msgid "" -"Each vote in favor will generate <strong>10</strong> points, each vote " -"against will subtract <strong>2</strong> points." -msgstr "" - -#: templates/faq.html:43 templates/backup/faq.html:43 -#: templates/tough/faq.html:41 -msgid "" -"Through the votes of other people you can accumulate a maximum of " -"<strong>200</strong> points." -msgstr "" - -#: templates/faq.html:44 templates/backup/faq.html:44 -msgid "After accumulating certain number of points, you can do more:" -msgstr "" - -#: templates/faq.html:52 templates/user_votes.html:14 -#: templates/backup/faq.html:52 templates/backup/user_votes.html:13 -#: templates/tough/faq.html:50 +#: templates/faq.html:59 templates/user_votes.html:14 msgid "upvote" msgstr "" -#: templates/faq.html:56 templates/backup/faq.html:56 -#: templates/tough/faq.html:54 +#: templates/faq.html:63 msgid "use tags" msgstr "" -#: templates/faq.html:60 templates/backup/faq.html:60 -#: templates/tough/faq.html:58 +#: templates/faq.html:68 msgid "add comments" msgstr "" -#: templates/faq.html:64 templates/user_votes.html:16 -#: templates/backup/faq.html:64 templates/backup/user_votes.html:15 -#: templates/tough/faq.html:62 +#: templates/faq.html:72 templates/user_votes.html:16 msgid "downvote" msgstr "" -#: templates/faq.html:71 templates/backup/faq.html:71 -#: templates/tough/faq.html:69 +#: templates/faq.html:75 +msgid "open and close own questions" +msgstr "" + +#: templates/faq.html:79 msgid "retag questions" msgstr "" -#: templates/faq.html:75 templates/backup/faq.html:75 -#: templates/tough/faq.html:73 +#: templates/faq.html:83 msgid "edit community wiki questions" msgstr "" -#: templates/faq.html:79 templates/backup/faq.html:79 -#: templates/tough/faq.html:77 +#: templates/faq.html:87 msgid "edit any answer" msgstr "" -#: templates/faq.html:83 templates/backup/faq.html:83 -#: templates/tough/faq.html:81 +#: templates/faq.html:91 msgid "open any closed question" msgstr "" -#: templates/faq.html:87 templates/backup/faq.html:87 -#: templates/tough/faq.html:85 +#: templates/faq.html:95 msgid "delete any comment" msgstr "" -#: templates/faq.html:91 templates/backup/faq.html:91 -#: templates/tough/faq.html:89 +#: templates/faq.html:99 msgid "delete any questions and answers and perform other moderation tasks" msgstr "" -#: templates/faq.html:98 templates/backup/faq.html:98 +#: templates/faq.html:106 +msgid "how to validate email title" +msgstr "How to validate email and why?" + +#: templates/faq.html:108 +msgid "how to validate email info" +msgstr "" +"<form style='margin:0;padding:0;' action='/email/sendkey/'><p><span class=" +"\"bigger strong\">How?</span> If you have just set or changed your email " +"address - <strong>check your email and click the included link</strong>." +"<br>The link contains a key generated specifically for you. You can also " +"<button style='display:inline' type='submit'><strong>get a new key</strong></" +"button> and check your email again.</p></form><span class=\"bigger strong" +"\">Why?</span> Email validation is required to make sure that <strong>only " +"you can post messages</strong> on your behalf and to <strong>minimize spam</" +"strong> posts.<br>With email you can <strong>subscribe for updates</strong> " +"on the most interesting questions. Also, when you sign up for the first time " +"- create a unique <a href='/faq#gravatar'><strong>gravatar</strong></a> " +"personal image.</p>" + +#: templates/faq.html:112 +msgid "what is gravatar" +msgstr "What is gravatar?" + +#: templates/faq.html:113 +msgid "gravatar faq info" +msgstr "" +"<strong>Gravatar</strong> means <strong>g</strong>lobally <strong>r</" +"strong>ecognized <strong>avatar</strong> - your unique avatar image " +"associated with your email address. It's simply a picture that shows next to " +"your posts on the websites that support gravatar protocol. By default gravar " +"appears as a square filled with a snowflake-like figure. You can <strong>set " +"your image</strong> at <a href='http://gravatar.com'><strong>gravatar.com</" +"strong></a>" + +#: templates/faq.html:116 msgid "To register, do I need to create new password?" msgstr "" -#: templates/faq.html:99 templates/backup/faq.html:99 -#: templates/tough/faq.html:97 +#: templates/faq.html:117 msgid "" "No, you don't have to. You can login through any service that supports " "OpenID, e.g. Google, Yahoo, AOL, etc." msgstr "" -#: templates/faq.html:100 templates/backup/faq.html:100 -#: templates/tough/faq.html:98 +#: templates/faq.html:118 msgid "Login now!" msgstr "" -#: templates/faq.html:103 templates/backup/faq.html:103 -#: templates/tough/faq.html:101 +#: templates/faq.html:123 msgid "Why other people can edit my questions/answers?" msgstr "" -#: templates/faq.html:104 templates/backup/faq.html:104 -#: templates/tough/faq.html:102 +#: templates/faq.html:124 msgid "Goal of this site is..." msgstr "" +"<span class='orange'>NMR Wiki Q&A</span> aims for offering a place for " +"efficient exchange of ideas among users of <strong>Magnetic Resonance</" +"strong>and specialists working in this field." -#: templates/faq.html:104 templates/backup/faq.html:104 -#: templates/tough/faq.html:102 +#: templates/faq.html:124 msgid "" "So questions and answers can be edited like wiki pages by experienced users " "of this site and this improves the overall quality of the knowledge base " "content." msgstr "" -#: templates/faq.html:105 templates/backup/faq.html:105 -#: templates/tough/faq.html:103 +#: templates/faq.html:125 msgid "If this approach is not for you, we respect your choice." msgstr "" -#: templates/faq.html:107 templates/backup/faq.html:107 -#: templates/tough/faq.html:105 +#: templates/faq.html:129 msgid "Still have questions?" msgstr "" -#: templates/faq.html:108 templates/backup/faq.html:108 +#: templates/faq.html:130 msgid "Please ask your question, help make our community better!" msgstr "" +"Please <a href=\"/questions/ask\">ask</a> your question, help make our " +"community better!" -#: templates/faq.html:108 templates/header.html:29 templates/header.html.py:60 -#: templates/backup/faq.html:108 templates/backup/header.html:29 -#: templates/backup/header.html.py:58 templates/tough/faq.html:106 +#: templates/faq.html:132 templates/header.html:29 templates/header.html.py:60 msgid "questions" msgstr "" -#: templates/faq.html:108 templates/index.html:121 -#: templates/backup/faq.html:108 templates/backup/index.html:120 -#: templates/tough/faq.html:106 +#: templates/faq.html:132 templates/index.html:121 msgid "." msgstr "" -#: templates/footer.html:7 templates/header.html:12 templates/index.html:83 -#: templates/backup/footer.html:7 templates/backup/header.html:12 -#: templates/backup/index.html:83 +#: templates/footer.html:7 templates/header.html:14 templates/index.html:83 msgid "about" msgstr "" -#: templates/footer.html:8 templates/header.html:13 templates/index.html:84 -#: templates/backup/footer.html:8 templates/backup/header.html:13 -#: templates/backup/index.html:84 +#: templates/footer.html:8 templates/header.html:15 templates/index.html:84 msgid "faq" msgstr "" -#: templates/footer.html:9 templates/backup/footer.html:9 +#: templates/footer.html:9 msgid "blog" msgstr "" -#: templates/footer.html:10 templates/backup/footer.html:10 +#: templates/footer.html:10 msgid "contact us" msgstr "" -#: templates/footer.html:11 templates/backup/footer.html:11 +#: templates/footer.html:11 msgid "privacy policy" msgstr "" -#: templates/footer.html:12 templates/backup/footer.html:12 +#: templates/footer.html:12 msgid "give feedback" msgstr "" -#: templates/footer.html:18 templates/backup/footer.html:18 +#: templates/footer.html:18 msgid "current revision" msgstr "" -#: templates/header.html:8 templates/backup/header.html:8 +#: templates/header.html:10 msgid "logout" msgstr "" -#: templates/header.html:10 templates/authopenid/signup.html:39 -#: templates/backup/header.html:10 +#: templates/header.html:12 templates/authopenid/signup.html:41 msgid "login" msgstr "" -#: templates/header.html:23 templates/backup/header.html:23 +#: templates/header.html:23 msgid "back to home page" msgstr "" #: templates/header.html:31 templates/header.html.py:62 -#: templates/backup/header.html:31 templates/backup/header.html.py:60 msgid "users" msgstr "" -#: templates/header.html:32 templates/backup/header.html:32 +#: templates/header.html:32 msgid "books" msgstr "" -#: templates/header.html:34 templates/index.html:121 -#: templates/backup/header.html:34 templates/backup/index.html:120 +#: templates/header.html:34 msgid "unanswered questions" msgstr "unanswered" -#: templates/header.html:38 templates/backup/header.html:37 +#: templates/header.html:38 msgid "my profile" msgstr "" -#: templates/header.html:42 templates/backup/header.html:40 +#: templates/header.html:42 msgid "ask a question" msgstr "" -#: templates/header.html:57 templates/backup/header.html:55 +#: templates/header.html:57 msgid "search" msgstr "" -#: templates/index.html:6 templates/backup/index.html:6 +#: templates/index.html:7 msgid "Home" msgstr "" -#: templates/index.html:7 templates/backup/index.html:7 -msgid "meta site keywords, comma separated" -msgstr "" - -#: templates/index.html:21 templates/questions.html:7 -#: templates/backup/index.html:21 templates/backup/questions.html:6 +#: templates/index.html:22 templates/questions.html:7 msgid "Questions" msgstr "" -#: templates/index.html:23 templates/backup/index.html:23 +#: templates/index.html:24 msgid "last updated questions" msgstr "" -#: templates/index.html:23 templates/questions.html:25 -#: templates/unanswered.html:20 templates/backup/index.html:23 -#: templates/backup/questions.html:24 templates/backup/unanswered.html:19 -#: templates/tough/unanswered.html:18 +#: templates/index.html:24 templates/questions.html:25 +#: templates/unanswered.html:20 msgid "newest" msgstr "" -#: templates/index.html:24 templates/questions.html:27 -#: templates/backup/index.html:24 templates/backup/questions.html:26 +#: templates/index.html:25 templates/questions.html:27 msgid "hottest questions" msgstr "" -#: templates/index.html:24 templates/questions.html:27 -#: templates/backup/index.html:24 templates/backup/questions.html:26 +#: templates/index.html:25 templates/questions.html:27 msgid "hottest" msgstr "" -#: templates/index.html:25 templates/questions.html:28 -#: templates/backup/index.html:25 templates/backup/questions.html:27 +#: templates/index.html:26 templates/questions.html:28 msgid "most voted questions" msgstr "" -#: templates/index.html:25 templates/questions.html:28 -#: templates/backup/index.html:25 templates/backup/questions.html:27 +#: templates/index.html:26 templates/questions.html:28 msgid "most voted" msgstr "" -#: templates/index.html:26 templates/backup/index.html:26 +#: templates/index.html:27 msgid "all questions" msgstr "" -#: templates/index.html:46 templates/questions.html:45 +#: templates/index.html:47 templates/questions.html:45 #: templates/unanswered.html:36 templates/users_questions.html:35 -#: templates/backup/index.html:46 templates/backup/questions.html:44 -#: templates/backup/unanswered.html:35 -#: templates/backup/users_questions.html:34 templates/tough/unanswered.html:34 msgid "answers" msgstr "" -#: templates/index.html:68 templates/question.html:112 -#: templates/question.html.py:479 templates/questions.html:84 -#: templates/questions.html.py:149 templates/tags.html:47 +#: templates/index.html:69 templates/question.html:115 +#: templates/question.html.py:486 templates/questions.html:84 +#: templates/questions.html.py:156 templates/tags.html:47 #: templates/unanswered.html:75 templates/unanswered.html.py:109 -#: templates/users_questions.html:52 templates/backup/index.html:68 -#: templates/backup/index.html.py:93 templates/backup/question.html:111 -#: templates/backup/question.html.py:469 templates/backup/questions.html:83 -#: templates/backup/questions.html:148 templates/backup/tags.html:46 -#: templates/backup/unanswered.html:74 templates/backup/unanswered.html:108 -#: templates/backup/users_questions.html:51 templates/tough/unanswered.html:72 -#: templates/tough/unanswered.html:105 +#: templates/users_questions.html:52 msgid "see questions tagged" msgstr "" -#: templates/index.html:79 templates/backup/index.html:79 +#: templates/index.html:80 msgid "welcome to website" -msgstr "" - -#: templates/index.html:81 templates/backup/index.html:81 -msgid "what is this website" -msgstr "" +msgstr "Welcome to NMR Wiki Q&A" -#: templates/index.html:82 templates/backup/index.html:82 -msgid "what can one do on this website" -msgstr "" - -#: templates/index.html:89 templates/backup/index.html:89 +#: templates/index.html:89 msgid "Recent tags" msgstr "" @@ -1468,325 +1351,315 @@ msgid "see questions tagged '%(tagname)s'" msgstr "" #: templates/index.html:97 templates/index.html.py:121 -#: templates/backup/index.html:96 templates/backup/index.html.py:120 msgid "popular tags" -msgstr "" +msgstr "tags" -#: templates/index.html:101 templates/backup/index.html:100 +#: templates/index.html:101 msgid "Recent awards" -msgstr "" +msgstr "Recent badges" -#: templates/index.html:107 templates/backup/index.html:106 +#: templates/index.html:107 msgid "given to" msgstr "" -#: templates/index.html:112 templates/backup/index.html:111 +#: templates/index.html:112 msgid "all awards" -msgstr "" +msgstr "all badges" -#: templates/index.html:116 templates/backup/index.html:115 +#: templates/index.html:116 msgid "subscribe to last 30 questions by RSS" msgstr "" -#: templates/index.html:121 templates/backup/index.html:120 +#: templates/index.html:121 msgid "Still looking for more? See" msgstr "" -#: templates/index.html:121 templates/backup/index.html:120 -msgid "complete list of quesionts" -msgstr "" +#: templates/index.html:121 +msgid "complete list of questions" +msgstr "list of all questions" -#: templates/index.html:121 templates/backup/index.html:120 +#: templates/index.html:121 msgid "or" msgstr "" -#: templates/index.html:121 templates/backup/index.html:120 +#: templates/index.html:121 msgid "Please help us answer" msgstr "" +#: templates/index.html:121 +msgid "list of unanswered questions" +msgstr "unanswered questions" + #: templates/logout.html:6 templates/logout.html.py:17 -#: templates/backup/logout.html:6 templates/backup/logout.html.py:17 msgid "Logout" msgstr "" -#: templates/logout.html:20 templates/backup/logout.html:20 +#: templates/logout.html:20 msgid "" "As a registered user you can login with your OpenID, log out of the site or " "permanently remove your account." msgstr "" +"Clicking <strong>Logout</strong> will log you out from NMR Wiki Q&A.</" +"p><p>If you wish to sign off completely - please make sure to log out from " +"your OpenID provider." -#: templates/logout.html:21 templates/backup/logout.html:21 +#: templates/logout.html:21 msgid "Logout now" -msgstr "" +msgstr "Logout Now" -#: templates/pagesize.html:6 templates/backup/pagesize.html:6 +#: templates/pagesize.html:6 msgid "posts per page" msgstr "" #: templates/paginator.html:6 templates/paginator.html.py:7 -#: templates/backup/paginator.html:5 templates/backup/paginator.html.py:6 msgid "previous" msgstr "" -#: templates/paginator.html:20 templates/backup/paginator.html:19 +#: templates/paginator.html:19 msgid "current page" msgstr "" -#: templates/paginator.html:23 templates/paginator.html.py:30 -#: templates/backup/paginator.html:22 templates/backup/paginator.html.py:29 +#: templates/paginator.html:22 templates/paginator.html.py:29 msgid "page number " msgstr "" -#: templates/paginator.html:23 templates/paginator.html.py:30 -#: templates/backup/paginator.html:22 templates/backup/paginator.html.py:29 +#: templates/paginator.html:22 templates/paginator.html.py:29 msgid "number - make blank in english" msgstr "" -#: templates/paginator.html:34 templates/backup/paginator.html:33 +#: templates/paginator.html:33 msgid "next page" msgstr "" #: templates/privacy.html:6 templates/privacy.html.py:11 -#: templates/backup/privacy.html:5 templates/backup/privacy.html.py:10 msgid "Privacy policy" msgstr "" -#: templates/privacy.html:15 templates/backup/privacy.html:14 +#: templates/privacy.html:15 msgid "general message about privacy" msgstr "" -#: templates/privacy.html:18 templates/backup/privacy.html:17 +#: templates/privacy.html:18 msgid "Site Visitors" msgstr "" -#: templates/privacy.html:20 templates/backup/privacy.html:19 +#: templates/privacy.html:20 msgid "what technical information is collected about visitors" msgstr "" -#: templates/privacy.html:23 templates/backup/privacy.html:22 +#: templates/privacy.html:23 msgid "Personal Information" msgstr "" -#: templates/privacy.html:25 templates/backup/privacy.html:24 +#: templates/privacy.html:25 msgid "details on personal information policies" msgstr "" -#: templates/privacy.html:28 templates/backup/privacy.html:27 +#: templates/privacy.html:28 msgid "Other Services" msgstr "" -#: templates/privacy.html:30 templates/backup/privacy.html:29 +#: templates/privacy.html:30 msgid "details on sharing data with third parties" msgstr "" -#: templates/privacy.html:35 templates/backup/privacy.html:34 +#: templates/privacy.html:35 msgid "cookie policy details" msgstr "" -#: templates/privacy.html:37 templates/backup/privacy.html:36 +#: templates/privacy.html:37 msgid "Policy Changes" msgstr "" -#: templates/privacy.html:38 templates/backup/privacy.html:37 +#: templates/privacy.html:38 msgid "how privacy policies can be changed" msgstr "" -#: templates/question.html:66 templates/question.html.py:78 -#: templates/backup/question.html:65 templates/backup/question.html.py:77 +#: templates/question.html:69 templates/question.html.py:81 msgid "i like this post (click again to cancel)" msgstr "" -#: templates/question.html:68 templates/question.html.py:80 -#: templates/question.html:273 templates/backup/question.html:67 -#: templates/backup/question.html.py:79 templates/backup/question.html:272 +#: templates/question.html:71 templates/question.html.py:83 +#: templates/question.html:276 msgid "current number of votes" msgstr "" -#: templates/question.html:73 templates/question.html.py:84 -#: templates/backup/question.html:72 templates/backup/question.html.py:83 +#: templates/question.html:76 templates/question.html.py:87 msgid "i dont like this post (click again to cancel)" msgstr "" -#: templates/question.html:90 templates/backup/question.html:89 +#: templates/question.html:93 msgid "mark this question as favorite (click again to cancel)" msgstr "" -#: templates/question.html:96 templates/backup/question.html:95 +#: templates/question.html:99 msgid "remove favorite mark from this question (click again to restore mark)" msgstr "" -#: templates/question.html:121 templates/question.html.py:304 +#: templates/question.html:124 templates/question.html.py:307 #: templates/revisions_answer.html:53 templates/revisions_question.html:53 -#: templates/backup/question.html:120 templates/backup/question.html.py:303 -#: templates/backup/revisions_answer.html:52 -#: templates/backup/revisions_question.html:51 msgid "edit" msgstr "" -#: templates/question.html:125 templates/question.html.py:314 -#: templates/backup/question.html:124 templates/backup/question.html.py:307 +#: templates/question.html:128 templates/question.html.py:317 msgid "delete" msgstr "" -#: templates/question.html:130 templates/backup/question.html:129 +#: templates/question.html:133 msgid "reopen" msgstr "" -#: templates/question.html:135 templates/backup/question.html:134 +#: templates/question.html:138 msgid "close" msgstr "" -#: templates/question.html:141 templates/question.html.py:327 -#: templates/backup/question.html:140 templates/backup/question.html.py:317 +#: templates/question.html:144 templates/question.html.py:330 msgid "" "report as offensive (i.e containing spam, advertising, malicious text, etc.)" msgstr "" -#: templates/question.html:142 templates/question.html.py:328 -#: templates/backup/question.html:141 templates/backup/question.html.py:318 +#: templates/question.html:145 templates/question.html.py:331 msgid "flag offensive" msgstr "" -#: templates/question.html:154 templates/question.html.py:337 +#: templates/question.html:157 templates/question.html.py:340 #: templates/revisions_answer.html:65 templates/revisions_question.html:65 -#: templates/backup/question.html:153 templates/backup/question.html.py:327 -#: templates/backup/revisions_answer.html:64 -#: templates/backup/revisions_question.html:63 msgid "updated" msgstr "" -#: templates/question.html:203 templates/question.html.py:384 +#: templates/question.html:206 templates/question.html.py:387 #: templates/revisions_answer.html:63 templates/revisions_question.html:63 -#: templates/backup/question.html:202 templates/backup/question.html.py:374 -#: templates/backup/revisions_answer.html:62 -#: templates/backup/revisions_question.html:61 msgid "asked" msgstr "" -#: templates/question.html:233 templates/question.html.py:411 -#: templates/backup/question.html:232 templates/backup/question.html.py:401 +#: templates/question.html:236 templates/question.html.py:414 msgid "comments" msgstr "" -#: templates/question.html:234 templates/question.html.py:412 -#: templates/backup/question.html:233 templates/backup/question.html.py:402 +#: templates/question.html:237 templates/question.html.py:415 msgid "add comment" msgstr "" -#: templates/question.html:247 templates/backup/question.html:246 +#: templates/question.html:250 #, python-format msgid "" "The question has been closed for the following reason \"%(question." "get_close_reason_display)s\" by" msgstr "" -#: templates/question.html:249 templates/backup/question.html:248 +#: templates/question.html:252 #, python-format msgid "close date %(question.closed_at)s" msgstr "" -#: templates/question.html:256 templates/user_stats.html:28 -#: templates/backup/question.html:255 templates/backup/user_stats.html:27 +#: templates/question.html:259 templates/user_stats.html:28 msgid "Answers" msgstr " Answers" -#: templates/question.html:258 templates/backup/question.html:257 +#: templates/question.html:261 msgid "oldest answers will be shown first" msgstr "" -#: templates/question.html:258 templates/backup/question.html:257 +#: templates/question.html:261 msgid "oldest answers" msgstr "oldest" -#: templates/question.html:259 templates/backup/question.html:258 +#: templates/question.html:262 msgid "newest answers will be shown first" msgstr "" -#: templates/question.html:259 templates/backup/question.html:258 +#: templates/question.html:262 msgid "newest answers" msgstr "newest" -#: templates/question.html:260 templates/backup/question.html:259 +#: templates/question.html:263 msgid "most voted answers will be shown first" msgstr "" -#: templates/question.html:260 templates/backup/question.html:259 +#: templates/question.html:263 msgid "popular answers" msgstr "most voted" -#: templates/question.html:272 templates/backup/question.html:271 +#: templates/question.html:275 msgid "i like this answer (click again to cancel)" msgstr "" -#: templates/question.html:278 templates/backup/question.html:277 +#: templates/question.html:281 msgid "i dont like this answer (click again to cancel)" msgstr "" -#: templates/question.html:284 templates/backup/question.html:283 +#: templates/question.html:287 msgid "mark this answer as favorite (click again to undo)" msgstr "" -#: templates/question.html:289 templates/backup/question.html:288 +#: templates/question.html:292 msgid "the author of the question has selected this answer as correct" msgstr "" -#: templates/question.html:311 +#: templates/question.html:314 msgid "undelete" msgstr "" -#: templates/question.html:321 templates/backup/question.html:311 +#: templates/question.html:324 msgid "answer permanent link" msgstr "" -#: templates/question.html:322 templates/backup/question.html:312 +#: templates/question.html:325 msgid "permanent link" msgstr "" -#: templates/question.html:436 templates/backup/question.html:426 +#: templates/question.html:438 msgid "Your answer" msgstr "" -#: templates/question.html:460 templates/backup/question.html:450 +#: templates/question.html:441 +msgid "you can answer anonymously and then login" +msgstr "" +"<span class='strong big'>You are now not logged in</span> but you can answer " +"first and then login" + +#: templates/question.html:465 msgid "Answer the question" msgstr "" -#: templates/question.html:462 templates/backup/question.html:452 -msgid "Login to answer" +#: templates/question.html:467 +msgid "Notify me daily if there are any new answers." msgstr "" -#: templates/question.html:474 templates/backup/question.html:464 +#: templates/question.html:469 +msgid "once you sign in you will be able to subscribe for any updates here" +msgstr "Here logged in users can sign up for the question updates." + +#: templates/question.html:481 msgid "Question tags" msgstr "Tags" -#: templates/question.html:484 templates/backup/question.html:474 +#: templates/question.html:491 msgid "question asked" msgstr "Asked" -#: templates/question.html:484 templates/question.html.py:490 -#: templates/user_info.html:51 templates/backup/question.html:474 -#: templates/backup/question.html.py:480 templates/backup/user_info.html:50 +#: templates/question.html:491 templates/question.html.py:497 +#: templates/user_info.html:51 msgid "ago" msgstr "" -#: templates/question.html:487 templates/backup/question.html:477 +#: templates/question.html:494 msgid "question was seen" msgstr "Seen" -#: templates/question.html:487 templates/backup/question.html:477 +#: templates/question.html:494 msgid "times" msgstr "" -#: templates/question.html:490 templates/backup/question.html:480 +#: templates/question.html:497 msgid "last updated" msgstr "Last updated" -#: templates/question.html:495 templates/backup/question.html:485 +#: templates/question.html:502 msgid "Related questions" msgstr "" #: templates/question_edit.html:4 templates/question_edit.html.py:65 -#: templates/backup/question_edit.html:2 -#: templates/backup/question_edit.html:63 msgid "Edit question" msgstr "" @@ -1795,38 +1668,54 @@ msgid "question tips" msgstr "Tips" #: templates/question_edit_tips.html:7 -#: templates/backup/question_edit_tips.html:5 msgid "please ask a relevant question" msgstr "" #: templates/question_edit_tips.html:10 -#: templates/backup/question_edit_tips.html:8 msgid "please try provide enough details" msgstr "provide enough details" -#: templates/questions.html:23 templates/backup/questions.html:22 +#: templates/question_retag.html:3 templates/question_retag.html.py:52 +msgid "Change tags" +msgstr "" + +#: templates/question_retag.html:39 +msgid "up to 5 tags, less than 20 characters each" +msgstr "" + +#: templates/question_retag.html:86 +msgid "Why use and modify tags?" +msgstr "" + +#: templates/question_retag.html:89 +msgid "tags help us keep Questions organized" +msgstr "" + +#: templates/question_retag.html:95 +msgid "tag editors receive special awards from the community" +msgstr "" + +#: templates/questions.html:23 msgid "Found by tags" msgstr "Tagged questions" -#: templates/questions.html:23 templates/backup/questions.html:22 +#: templates/questions.html:23 msgid "Found by title" msgstr "" -#: templates/questions.html:23 templates/backup/questions.html:22 +#: templates/questions.html:23 msgid "All questions" msgstr "" #: templates/questions.html:25 templates/unanswered.html:20 -#: templates/backup/questions.html:24 templates/backup/unanswered.html:19 -#: templates/tough/unanswered.html:18 msgid "most recently asked questions" msgstr "" -#: templates/questions.html:26 templates/backup/questions.html:25 +#: templates/questions.html:26 msgid "most recently updated questions" msgstr "" -#: templates/questions.html:26 templates/backup/questions.html:25 +#: templates/questions.html:26 msgid "active" msgstr "" @@ -1846,19 +1735,19 @@ msgstr[0] "" "class=\"tag\">%(tagname)s</span></p>" msgstr[1] "" "\n" -"<div class=\"questions-count\">%(q_num)s</div><p>questions tagged</" -"p><p><span class=\"tag\">%(tagname)s</span></p>" +"<div class=\"questions-count\">%(q_num)s</div><p>questions tagged</p><div " +"class=\"tags\"><span class=\"tag\">%(tagname)s</span></div>" #: templates/questions.html:116 #, python-format msgid "" "\n" -"\t\t\thave total %(q_num)s questions containing %(searchtitle)s\n" -"\t\t\t" +"\t\t\t\thave total %(q_num)s questions containing %(searchtitle)s\n" +"\t\t\t\t" msgid_plural "" "\n" -"\t\t\thave total %(q_num)s questions containing %(searchtitle)s\n" -"\t\t\t" +"\t\t\t\thave total %(q_num)s questions containing %(searchtitle)s\n" +"\t\t\t\t" msgstr[0] "" "\n" "<div class=\"questions-count\">%(q_num)s</div><p>question with title " @@ -1870,114 +1759,121 @@ msgstr[1] "" "containing <strong><span class=\"darkred\">%(searchtitle)s</span></strong></" "p>" -#: templates/questions.html:124 +#: templates/questions.html:122 +#, python-format +msgid "" +"\n" +"\t\t\t\thave total %(q_num)s questions\n" +"\t\t\t\t" +msgid_plural "" +"\n" +"\t\t\t\thave total %(q_num)s questions\n" +"\t\t\t\t" +msgstr[0] "" +"\n" +"<div class=\"questions-count\">%(q_num)s</div><p>question</p>" +msgstr[1] "" +"\n" +"<div class=\"questions-count\">%(q_num)s</div><p>questions</p>" + +#: templates/questions.html:131 msgid "latest questions info" msgstr "<strong>Newest</strong> questions are shown first." -#: templates/questions.html:128 templates/backup/questions.html:127 +#: templates/questions.html:135 msgid "Questions are sorted by the <strong>time of last update</strong>." msgstr "" -#: templates/questions.html:129 templates/backup/questions.html:128 +#: templates/questions.html:136 msgid "Most recently answered ones are shown first." -msgstr "" +msgstr "<strong>Most recently answered</strong> questions are shown first." -#: templates/questions.html:133 templates/backup/questions.html:132 +#: templates/questions.html:140 msgid "Questions sorted by <strong>number of responses</strong>." -msgstr "" +msgstr "Questions sorted by the <strong>number of answers</strong>." -#: templates/questions.html:134 templates/backup/questions.html:133 +#: templates/questions.html:141 msgid "Most answered questions are shown first." -msgstr "" +msgstr " " -#: templates/questions.html:138 templates/backup/questions.html:137 +#: templates/questions.html:145 msgid "Questions are sorted by the <strong>number of votes</strong>." msgstr "" -#: templates/questions.html:139 templates/backup/questions.html:138 +#: templates/questions.html:146 msgid "Most voted questions are shown first." msgstr "" -#: templates/questions.html:146 templates/unanswered.html:105 -#: templates/backup/questions.html:145 templates/backup/unanswered.html:104 -#: templates/tough/unanswered.html:101 +#: templates/questions.html:153 templates/unanswered.html:105 msgid "Related tags" msgstr "Tags" #: templates/reopen.html:6 templates/reopen.html.py:16 -#: templates/backup/reopen.html:4 templates/backup/reopen.html.py:14 msgid "Reopen question" msgstr "" -#: templates/reopen.html:19 templates/backup/reopen.html:17 +#: templates/reopen.html:19 msgid "Open the previously closed question" msgstr "" -#: templates/reopen.html:22 templates/backup/reopen.html:20 +#: templates/reopen.html:22 msgid "The question was closed for the following reason " msgstr "" -#: templates/reopen.html:22 templates/backup/reopen.html:20 +#: templates/reopen.html:22 msgid "reason - leave blank in english" msgstr "" -#: templates/reopen.html:22 templates/backup/reopen.html:20 +#: templates/reopen.html:22 msgid "on " msgstr "" -#: templates/reopen.html:22 templates/backup/reopen.html:20 +#: templates/reopen.html:22 msgid "date closed" msgstr "" -#: templates/reopen.html:29 templates/backup/reopen.html:27 +#: templates/reopen.html:29 msgid "Reopen this question" msgstr "" #: templates/revisions_answer.html:7 templates/revisions_answer.html.py:36 #: templates/revisions_question.html:8 templates/revisions_question.html:36 -#: templates/backup/revisions_answer.html:6 -#: templates/backup/revisions_answer.html:35 -#: templates/backup/revisions_question.html:6 -#: templates/backup/revisions_question.html:34 msgid "Revision history" msgstr "" #: templates/tags.html:6 templates/tags.html.py:29 -#: templates/backup/tags.html:5 templates/backup/tags.html.py:28 msgid "Tag list" msgstr "" -#: templates/tags.html:31 templates/backup/tags.html:30 +#: templates/tags.html:31 msgid "sorted alphabetically" msgstr "" -#: templates/tags.html:31 templates/backup/tags.html:30 +#: templates/tags.html:31 msgid "by name" msgstr "" -#: templates/tags.html:32 templates/backup/tags.html:31 +#: templates/tags.html:32 msgid "sorted by frequency of tag use" msgstr "" -#: templates/tags.html:32 templates/backup/tags.html:31 +#: templates/tags.html:32 msgid "by popularity" msgstr "" -#: templates/tags.html:38 templates/backup/tags.html:37 +#: templates/tags.html:38 msgid "All tags matching query" msgstr "" -#: templates/tags.html:38 templates/backup/tags.html:37 +#: templates/tags.html:38 msgid "all tags - make this empty in english" msgstr "" -#: templates/tags.html:41 templates/backup/tags.html:40 +#: templates/tags.html:41 msgid "Nothing found" msgstr "" #: templates/unanswered.html:7 templates/unanswered.html.py:18 -#: templates/backup/unanswered.html:6 templates/backup/unanswered.html:17 -#: templates/tough/unanswered.html:5 templates/tough/unanswered.html.py:16 msgid "Unanswered questions" msgstr "" @@ -1988,41 +1884,39 @@ msgstr "" "<div class=\"questions-count\">%(num_q)s</div><strong>unanswered</strong> " "questions" -#: templates/unanswered.html:99 templates/backup/questions.html:107 -#: templates/backup/unanswered.html:97 +#: templates/unanswered.html:99 msgid "Have a total of" msgstr "" -#: templates/user_edit.html:6 templates/backup/user_edit.html:4 +#: templates/user_edit.html:6 msgid "Edit user profile" msgstr "" -#: templates/user_edit.html:19 templates/backup/user_edit.html:17 +#: templates/user_edit.html:19 msgid "edit profile" msgstr "" -#: templates/user_edit.html:31 templates/backup/user_edit.html:29 +#: templates/user_edit.html:31 msgid "image associated with your email address" msgstr "" -#: templates/user_edit.html:31 templates/backup/user_edit.html:29 +#: templates/user_edit.html:31 msgid "avatar" -msgstr "" +msgstr "<a href='/faq#gravatar'>gravatar</a>" #: templates/user_edit.html:36 templates/user_info.html:31 -#: templates/backup/user_edit.html:34 templates/backup/user_info.html:30 msgid "Registered user" msgstr "" -#: templates/user_edit.html:82 templates/backup/user_edit.html:80 +#: templates/user_edit.html:82 msgid "Update" msgstr "" -#: templates/user_info.html:34 templates/backup/user_info.html:33 +#: templates/user_info.html:34 msgid "update profile" msgstr "" -#: templates/user_info.html:40 templates/backup/user_info.html:39 +#: templates/user_info.html:40 msgid "real name" msgstr "" @@ -2030,35 +1924,59 @@ msgstr "" msgid "member for" msgstr "" -#: templates/user_info.html:50 templates/backup/user_info.html:49 +#: templates/user_info.html:50 msgid "last seen" msgstr "" -#: templates/user_info.html:56 templates/backup/user_info.html:55 +#: templates/user_info.html:56 msgid "user website" msgstr "" -#: templates/user_info.html:62 templates/backup/user_info.html:61 +#: templates/user_info.html:62 msgid "location" msgstr "" -#: templates/user_info.html:69 templates/backup/user_info.html:68 +#: templates/user_info.html:69 msgid "age" msgstr "" -#: templates/user_info.html:70 templates/backup/user_info.html:69 +#: templates/user_info.html:70 msgid "age unit" -msgstr "" +msgstr "years old" -#: templates/user_info.html:75 templates/backup/user_info.html:74 +#: templates/user_info.html:76 msgid "todays unused votes" msgstr "" -#: templates/user_info.html:76 templates/backup/user_info.html:75 +#: templates/user_info.html:77 msgid "votes left" msgstr "" -#: templates/user_stats.html:15 templates/backup/user_stats.html:14 +#: templates/user_preferences.html:10 +msgid "Connect with Twitter" +msgstr "" + +#: templates/user_preferences.html:12 +msgid "Twitter account name:" +msgstr "" + +#: templates/user_preferences.html:14 +msgid "Twitter password:" +msgstr "" + +#: templates/user_preferences.html:16 +msgid "Send my Questions to Twitter" +msgstr "" + +#: templates/user_preferences.html:17 +msgid "Send my Answers to Twitter" +msgstr "" + +#: templates/user_preferences.html:18 +msgid "Save" +msgstr "" + +#: templates/user_stats.html:15 msgid "User questions" msgstr "" @@ -2067,198 +1985,268 @@ msgstr "" msgid "the answer has been voted for %(vote_count)s times" msgstr "" -#: templates/user_stats.html:37 templates/backup/user_stats.html:36 +#: templates/user_stats.html:37 msgid "this answer has been selected as correct" msgstr "" -#: templates/user_stats.html:43 templates/backup/user_stats.html:42 +#: templates/user_stats.html:43 #, python-format msgid "the answer has been commented %(answered_question.comment_count)s times" msgstr "" -#: templates/user_stats.html:56 templates/backup/user_stats.html:55 +#: templates/user_stats.html:56 msgid "votes total" msgstr "Votes" -#: templates/user_stats.html:65 templates/backup/user_stats.html:64 +#: templates/user_stats.html:65 msgid "user has voted up this many times" msgstr "" -#: templates/user_stats.html:70 templates/backup/user_stats.html:69 +#: templates/user_stats.html:70 msgid "user voted down this many times" msgstr "" -#: templates/user_stats.html:84 templates/backup/user_stats.html:83 +#: templates/user_stats.html:84 msgid "Tags" msgstr "" -#: templates/user_stats.html:94 templates/backup/user_stats.html:93 +#: templates/user_stats.html:94 #, python-format msgid "see other questions tagged '%(tag)s' " msgstr "" -#: templates/user_tabs.html:7 templates/backup/user_tabs.html:6 +#: templates/user_tabs.html:7 msgid "User profile" msgstr "" -#: templates/user_tabs.html:16 templates/backup/user_tabs.html:15 +#: templates/user_tabs.html:16 msgid "graph of user reputation" msgstr "" -#: templates/user_tabs.html:17 templates/backup/user_tabs.html:16 +#: templates/user_tabs.html:17 msgid "reputation history" msgstr "" -#: templates/user_tabs.html:24 templates/backup/user_tabs.html:23 +#: templates/user_tabs.html:24 msgid "favorites" msgstr "" -#: templates/user_tabs.html:29 templates/backup/user_tabs.html:28 +#: templates/user_tabs.html:28 msgid "settings" msgstr "" #: templates/users.html:6 templates/users.html.py:24 -#: templates/backup/users.html:5 templates/backup/users.html.py:23 msgid "Users" msgstr "" -#: templates/users.html:27 templates/backup/users.html:26 +#: templates/users.html:27 msgid "recent" msgstr "" -#: templates/users.html:28 templates/backup/users.html:27 +#: templates/users.html:28 msgid "oldest" msgstr "" -#: templates/users.html:29 templates/backup/users.html:28 +#: templates/users.html:29 msgid "by username" msgstr "" -#: templates/users.html:35 templates/backup/users.html:34 +#: templates/users.html:35 #, python-format msgid "users matching query %(suser)s:" msgstr "" -#: templates/users.html:39 templates/backup/users.html:38 +#: templates/users.html:39 msgid "Nothing found." msgstr "" -#: templates/users_questions.html:11 templates/backup/users_questions.html:10 +#: templates/users_questions.html:11 msgid "this questions was selected as favorite" msgstr "" -#: templates/users_questions.html:33 templates/backup/users_questions.html:32 +#: templates/users_questions.html:33 msgid "this answer has been accepted to be correct" msgstr "" -#: templates/authopenid/changeemail.html:6 -msgid "Account: change email" -msgstr "" +#: templates/authopenid/changeemail.html:7 +#: templates/authopenid/changeemail.html:33 +msgid "Change email" +msgstr "Change Email" -#: templates/authopenid/changeemail.html:9 -msgid "" -"This is where you can change the email address associated with your account. " -"Please keep this email address up to date so we can send you a password-" -"reset email if you request one." +#: templates/authopenid/changeemail.html:10 +#, python-format +msgid "change %(email)s info" msgstr "" +"<span class=\"strong big\">Enter your new email into the box below</span> if " +"you'd like to use another email for <strong>update subscriptions</strong>." +"<br>Currently you are using <strong>%(email)s</strong>" -#: templates/authopenid/changeemail.html:11 -#: templates/authopenid/changeopenid.html:13 -#: templates/authopenid/changepw.html:18 templates/authopenid/delete.html:14 -#: templates/authopenid/delete.html:24 +#: templates/authopenid/changeemail.html:13 +#: templates/authopenid/changeopenid.html:14 +#: templates/authopenid/changepw.html:19 templates/authopenid/delete.html:15 +#: templates/authopenid/delete.html:25 msgid "Please correct errors below:" msgstr "" -#: templates/authopenid/changeemail.html:28 -msgid "Email" +#: templates/authopenid/changeemail.html:30 +msgid "Your new Email" msgstr "" +"<strong>Your new Email:</strong> (will <strong>not</strong> be shown to " +"anyone, must be valid)" -#: templates/authopenid/changeemail.html:29 -#: templates/authopenid/signin.html:59 +#: templates/authopenid/changeemail.html:31 +#: templates/authopenid/signin.html:138 msgid "Password" msgstr "" -#: templates/authopenid/changeemail.html:31 -msgid "Change email" +#: templates/authopenid/changeemail.html:42 +msgid "Validate email" +msgstr "" + +#: templates/authopenid/changeemail.html:45 +#, python-format +msgid "validate %(email)s info" +msgstr "" +"<span class=\"strong big\">An email with a validation link has been sent to %" +"(email)s.</span> Please <strong>follow the emailed link</strong> with your " +"web browser. Email validation is necessary to help insure the proper use of " +"email on <span class=\"orange\">NMR Wiki Q&A</span>. If you would like to " +"use <strong>another email</strong>, please <a href=\"/email/change/" +"\"><strong>change it again</strong></a>." + +#: templates/authopenid/changeemail.html:50 +msgid "Email not changed" +msgstr "" + +#: templates/authopenid/changeemail.html:53 +#, python-format +msgid "old %(email)s kept" +msgstr "" +"<span class=\"strong big\">Your email address %(email)s has not been changed." +"</span> If you decide to change it later - you can always do it by editing " +"it in your user profile or by using the <a href=\"/email/change/" +"\"><strong>previous form</strong></a> again." + +#: templates/authopenid/changeemail.html:58 +msgid "Email changed" msgstr "" -#: templates/authopenid/changeopenid.html:7 +#: templates/authopenid/changeemail.html:61 +#, python-format +msgid "your current %(email)s can be used for this" +msgstr "" +"<span class='big strong'>Your email address is now set to %(email)s.</span> " +"Updates on the questions that you like most will be sent to this address. " +"Email notifications are sent once a day or less frequently - only when there " +"are any news." + +#: templates/authopenid/changeemail.html:66 +msgid "Email verified" +msgstr "" + +#: templates/authopenid/changeemail.html:69 +msgid "thanks for verifying email" +msgstr "" +"<span class=\"big strong\">Thank you for verifying your email!</span> Now " +"you can <strong>ask</strong> and <strong>answer</strong> questions. Also if " +"you find a very interesting question you can <strong>subscribe for the " +"updates</strong> - then will be notified about changes <strong>once a day</" +"strong> or less frequently." + +#: templates/authopenid/changeemail.html:74 +msgid "email key not sent" +msgstr "Validation email not sent" + +#: templates/authopenid/changeemail.html:77 +#, python-format +msgid "email key not sent %(email)s change email here %(change_link)s" +msgstr "" +"<span class='big strong'>Your current email address %(email)s has been " +"validated before</span> so the new key was not sent. You can <a href='%" +"(change_link)s'>change</a> email used for update subscriptions if necessary." + +#: templates/authopenid/changeopenid.html:8 msgid "Account: change OpenID URL" msgstr "" -#: templates/authopenid/changeopenid.html:11 +#: templates/authopenid/changeopenid.html:12 msgid "" "This is where you can change your OpenID URL. Make sure you remember it!" msgstr "" -#: templates/authopenid/changeopenid.html:28 +#: templates/authopenid/changeopenid.html:29 msgid "OpenID URL:" msgstr "" -#: templates/authopenid/changeopenid.html:29 +#: templates/authopenid/changeopenid.html:30 msgid "Change OpenID" msgstr "" -#: templates/authopenid/changepw.html:13 +#: templates/authopenid/changepw.html:14 msgid "Account: change password" msgstr "" -#: templates/authopenid/changepw.html:16 +#: templates/authopenid/changepw.html:17 msgid "This is where you can change your password. Make sure you remember it!" msgstr "" -#: templates/authopenid/changepw.html:26 +#: templates/authopenid/changepw.html:27 msgid "Current password" msgstr "" -#: templates/authopenid/changepw.html:27 +#: templates/authopenid/changepw.html:28 msgid "New password" msgstr "" -#: templates/authopenid/changepw.html:28 +#: templates/authopenid/changepw.html:29 msgid "New password again" msgstr "" -#: templates/authopenid/changepw.html:29 templates/authopenid/settings.html:28 +#: templates/authopenid/changepw.html:30 templates/authopenid/settings.html:29 msgid "Change password" msgstr "" -#: templates/authopenid/complete.html:4 +#: templates/authopenid/complete.html:5 msgid "Connect your OpenID with this site" -msgstr "" +msgstr "New user signup" -#: templates/authopenid/complete.html:7 +#: templates/authopenid/complete.html:8 msgid "Connect your OpenID with your account on this site" -msgstr "" +msgstr "New user signup" -#: templates/authopenid/complete.html:10 -msgid "Your OpenID is accepted. Please complete this to finish registration." +#: templates/authopenid/complete.html:12 +#, python-format +msgid "register new %(provider)s account info" msgstr "" +"<p><span class=\"big strong\">You are here for the first time with your %" +"(provider)s login.</span> Please create your <strong>screen name</strong> " +"and save your <strong>email</strong> address. Saved email address will let " +"you <strong>subscribe for the updates</strong> on the most interesting " +"questions and will be used to create and retrieve your unique avatar image - " +"<a href='/faq#gravatar'><strong>gravatar</strong></a>." -#: templates/authopenid/complete.html:11 +#: templates/authopenid/complete.html:14 msgid "This account already exists, please use another." msgstr "" -#: templates/authopenid/complete.html:16 templates/authopenid/complete.html:29 -#: templates/authopenid/signin.html:42 +#: templates/authopenid/complete.html:19 templates/authopenid/complete.html:32 +#: templates/authopenid/signin.html:121 msgid "Sorry, looks like we have some errors:" msgstr "" -#: templates/authopenid/complete.html:45 -msgid "New account" -msgstr "" - -#: templates/authopenid/complete.html:46 -msgid "User name (<i>will be shown to others, cannot be modified</i>)" -msgstr "" - #: templates/authopenid/complete.html:47 -msgid "Email (<i>not shared with anyone</i>)" -msgstr "" +msgid "Screen name label" +msgstr "<strong>Screen Name</strong> (<i>will be shown to others</i>)" #: templates/authopenid/complete.html:48 -msgid "create account" +msgid "Email address label" msgstr "" +"<strong>Email Address</strong> (<i>will <strong>not</strong> be shared with " +"anyone, must be valid</i>)" + +#: templates/authopenid/complete.html:49 +msgid "create account" +msgstr "Signup" #: templates/authopenid/complete.html:56 msgid "Existing account" @@ -2276,265 +2264,328 @@ msgstr "" msgid "Register" msgstr "" -#: templates/authopenid/complete.html:62 templates/authopenid/signin.html:61 +#: templates/authopenid/complete.html:62 templates/authopenid/signin.html:140 msgid "Forgot your password?" msgstr "" -#: templates/authopenid/delete.html:8 +#: templates/authopenid/confirm_email.txt:2 +msgid "Thank you for registering at our Q&A forum!" +msgstr "" + +#: templates/authopenid/confirm_email.txt:4 +msgid "Your account details are:" +msgstr "" + +#: templates/authopenid/confirm_email.txt:6 +#: templates/authopenid/sendpw_email.txt:7 +msgid "Username:" +msgstr "" + +#: templates/authopenid/confirm_email.txt:7 +#: templates/authopenid/delete.html:20 +msgid "Password:" +msgstr "" + +#: templates/authopenid/confirm_email.txt:9 +msgid "Please sign in here:" +msgstr "" + +#: templates/authopenid/confirm_email.txt:12 +#: templates/authopenid/email_validation.txt:14 +#: templates/authopenid/sendpw_email.txt:13 +msgid "" +"Sincerely,\n" +"Forum Administrator" +msgstr "" + +#: templates/authopenid/delete.html:9 msgid "Account: delete account" msgstr "" -#: templates/authopenid/delete.html:12 +#: templates/authopenid/delete.html:13 msgid "" "Note: After deleting your account, anyone will be able to register this " "username." msgstr "" -#: templates/authopenid/delete.html:16 +#: templates/authopenid/delete.html:17 msgid "Check confirm box, if you want delete your account." msgstr "" -#: templates/authopenid/delete.html:19 -msgid "Password:" -msgstr "" - -#: templates/authopenid/delete.html:31 +#: templates/authopenid/delete.html:32 msgid "I am sure I want to delete my account." msgstr "" -#: templates/authopenid/delete.html:32 +#: templates/authopenid/delete.html:33 msgid "Password/OpenID URL" msgstr "" -#: templates/authopenid/delete.html:32 +#: templates/authopenid/delete.html:33 msgid "(required for your security)" msgstr "" -#: templates/authopenid/delete.html:34 +#: templates/authopenid/delete.html:35 msgid "Delete account permanently" msgstr "" -#: templates/authopenid/sendpw.html:3 templates/authopenid/sendpw.html.py:7 +#: templates/authopenid/email_validation.txt:2 +msgid "Greetings from the Q&A forum" +msgstr "" + +#: templates/authopenid/email_validation.txt:4 +msgid "To make use of the Forum, please follow the link below:" +msgstr "" + +#: templates/authopenid/email_validation.txt:8 +msgid "Following the link above will help us verify your email address." +msgstr "" + +#: templates/authopenid/email_validation.txt:10 +msgid "" +"If you beleive that this message was sent in mistake - \n" +"no further action is needed. Just ingore this email, we apologize\n" +"for any inconvenience" +msgstr "" + +#: templates/authopenid/sendpw.html:4 templates/authopenid/sendpw.html.py:8 msgid "Send new password" msgstr "" -#: templates/authopenid/sendpw.html:11 +#: templates/authopenid/sendpw.html:12 msgid "Lost your password? No problem - here you can reset it." msgstr "" -#: templates/authopenid/sendpw.html:12 +#: templates/authopenid/sendpw.html:13 msgid "" "Please enter your username below and new password will be sent to your " "registered e-mail" msgstr "" -#: templates/authopenid/sendpw.html:29 +#: templates/authopenid/sendpw.html:28 +msgid "User name" +msgstr "" + +#: templates/authopenid/sendpw.html:30 msgid "Reset password" msgstr "" -#: templates/authopenid/sendpw.html:29 +#: templates/authopenid/sendpw.html:30 msgid "return to login" msgstr "" -#: templates/authopenid/sendpw.html:32 +#: templates/authopenid/sendpw.html:33 msgid "" "Note: your new password will be activated only after you click the " "activation link in the email message" msgstr "" -#: templates/authopenid/settings.html:29 -msgid "Give your account a new password." +#: templates/authopenid/sendpw_email.txt:2 +#, python-format +msgid "" +"Someone has requested to reset your password on %(site_url)s.\n" +"If it were not you, it is safe to ignore this email." +msgstr "" + +#: templates/authopenid/sendpw_email.txt:5 +msgid "Your new account details are:" +msgstr "" + +#: templates/authopenid/sendpw_email.txt:8 +msgid "New password:" +msgstr "" + +#: templates/authopenid/sendpw_email.txt:10 +msgid "To confirm that you wanted to reset your password please visit:" msgstr "" #: templates/authopenid/settings.html:30 -msgid "Change email " +msgid "Give your account a new password." msgstr "" #: templates/authopenid/settings.html:31 +msgid "Change email " +msgstr "" + +#: templates/authopenid/settings.html:32 msgid "Add or update the email address associated with your account." msgstr "" -#: templates/authopenid/settings.html:34 +#: templates/authopenid/settings.html:35 msgid "Change openid associated to your account" msgstr "" -#: templates/authopenid/settings.html:37 +#: templates/authopenid/settings.html:38 msgid "Delete account" msgstr "" -#: templates/authopenid/settings.html:38 +#: templates/authopenid/settings.html:39 msgid "Erase your username and all your data from website" msgstr "" -#: templates/authopenid/signin.html:3 templates/authopenid/signin.html:16 +#: templates/authopenid/signin.html:4 templates/authopenid/signin.html:21 msgid "User login" +msgstr "User login" + +#: templates/authopenid/signin.html:28 +#, python-format +msgid "" +"\n" +" Your answer to %(title)s %(summary)s will be posted once you " +"log in\n" +" " msgstr "" +"\n" +"<span class=\"strong big\">Your answer to </span> <i>\"<strong>%(title)s</" +"strong> %(summary)s...\"</i> <span class=\"strong big\">is saved and will be " +"posted once you log in.</span>" -#: templates/authopenid/signin.html:21 -msgid "we support two login modes" +#: templates/authopenid/signin.html:35 +#, python-format +msgid "" +"Your question \n" +" %(title)s %(summary)s will be posted once you log in\n" +" " msgstr "" -"You can log in either through one of these services or traditionally - using " -"local username/password." +"<span class=\"strong big\">Your question</span> <i>\"<strong>%(title)s</" +"strong> %(summary)s...\"</i> <span class=\"strong big\">is saved and will be " +"posted once you log in.</span>" -#: templates/authopenid/signin.html:26 templates/authopenid/signup.html:49 -msgid "Login with your OpenID" +#: templates/authopenid/signin.html:40 +msgid "Click to sign in through any of these services." msgstr "" +"<p><span class=\"big strong\">We accept <a href=\"http://openid.net" +"\">OpenID</a> login.</span> <font color=\"gray\">Instead of creating a new " +"password - log in through any of the services below.<p><span class=\"big " +"strong\">1. Select the login service by clicking one of the icons</span></p>" -#: templates/authopenid/signin.html:28 -msgid "select openid provider" -msgstr "1) Please select your id service provider." +#: templates/authopenid/signin.html:103 +msgid "Enter your <span id=\"enter_your_what\">Provider user name</span>" +msgstr "" +"<span class=\"big strong\">2. Enter your <span id=\"enter_your_what" +"\">Provider user name</span></span><br>(or select another OpenID provider " +"above)" -#: templates/authopenid/signin.html:32 -msgid "verify openid link and login" +#: templates/authopenid/signin.html:110 +msgid "" +"Enter your <a class=\"openid_logo\" href=\"http://openid.net\">OpenID</a> " +"web address" msgstr "" -"2) Please verify the OpenID URL (type your login name over {username}, if present)" -" and then log in." +"<span class=\"big strong\">2. Enter your <a class=\"openid_logo\" href=" +"\"http://openid.net\">OpenID</a> web address</span><br>(or choose specific " +"provider by clicking on one of the icons above)" -#: templates/authopenid/signin.html:57 +#: templates/authopenid/signin.html:112 templates/authopenid/signin.html:139 +msgid "Login" +msgstr "" + +#: templates/authopenid/signin.html:116 +msgid "we support two login modes" +msgstr "" +"You can log in either through one of these services or traditionally - using " +"local username/password." + +#: templates/authopenid/signin.html:136 msgid "Use login name and password" msgstr "" -#: templates/authopenid/signin.html:58 +#: templates/authopenid/signin.html:137 msgid "Login name" msgstr "" -#: templates/authopenid/signin.html:62 -msgid "Create new acccount" +#: templates/authopenid/signin.html:141 +msgid "Create new account" msgstr "" -#: templates/authopenid/signin.html:71 +#: templates/authopenid/signin.html:150 msgid "Why use OpenID?" msgstr "" -#: templates/authopenid/signin.html:75 +#: templates/authopenid/signin.html:154 msgid "with openid it is easier" msgstr "With the OpenID you don't need to create new username and password." -#: templates/authopenid/signin.html:78 +#: templates/authopenid/signin.html:157 msgid "reuse openid" msgstr "You can safely re-use the same login for all OpenID-enabled websites." -#: templates/authopenid/signin.html:81 +#: templates/authopenid/signin.html:160 msgid "openid is widely adopted" msgstr "" "There are > 160,000,000 OpenID account in use. Over 10,000 sites are OpenID-" "enabled." -#: templates/authopenid/signin.html:84 +#: templates/authopenid/signin.html:163 msgid "openid is supported open standard" msgstr "OpenID is based on an open standard, supported by many organizations." -#: templates/authopenid/signin.html:88 +#: templates/authopenid/signin.html:167 msgid "Find out more" msgstr "" -#: templates/authopenid/signin.html:89 +#: templates/authopenid/signin.html:168 msgid "Get OpenID" msgstr "" -#: templates/authopenid/signup.html:2 templates/authopenid/signup.html.py:6 +#: templates/authopenid/signup.html:4 templates/authopenid/signup.html.py:8 msgid "Signup" msgstr "" -#: templates/authopenid/signup.html:10 +#: templates/authopenid/signup.html:12 msgid "" "We support two types of user registration: conventional username/password, " "and" msgstr "" -#: templates/authopenid/signup.html:10 +#: templates/authopenid/signup.html:12 msgid "the OpenID method" msgstr "" -#: templates/authopenid/signup.html:15 +#: templates/authopenid/signup.html:17 msgid "Sorry, looks like we have some errors" msgstr "" -#: templates/authopenid/signup.html:33 +#: templates/authopenid/signup.html:35 msgid "Conventional registration" msgstr "" -#: templates/authopenid/signup.html:34 +#: templates/authopenid/signup.html:36 msgid "choose a user name" msgstr "" -#: templates/authopenid/signup.html:40 +#: templates/authopenid/signup.html:42 msgid "back to login" msgstr "" -#: templates/authopenid/signup.html:46 +#: templates/authopenid/signup.html:48 msgid "Register with your OpenID" msgstr "" -# -#: templates/backup/answer_edit_tips.html:3 -#: templates/backup/question_edit_tips.html:2 -msgid "editing tips" -msgstr "Tips" - -#: templates/backup/questions.html:108 -msgid "number of questions" -msgstr "" - -#: templates/backup/questions.html:110 -msgid "tagged with" -msgstr "" - -#: templates/backup/questions.html:116 -msgid "whose title contains" -msgstr "" - -#: templates/backup/questions.html:121 -msgid "number of questions end of sentence." -msgstr "" - -#: templates/backup/questions.html:123 -msgid "Questions are sorted by <strong>entry date</strong>." -msgstr "" - -#: templates/backup/questions.html:123 -msgid "Newest questions shown first." -msgstr "" -"Questions are sorted by <strong>entry date</strong>.Newest questions shown " -"first." - -#: templates/backup/unanswered.html:98 templates/tough/unanswered.html:95 -msgid "number of <strong>unanswered</strong> questions" -msgstr "" - -#: templates/backup/user_info.html:44 -msgid "member since" -msgstr "" - -#: templates/backup/user_stats.html:36 -#, python-format -msgid "the answer has been voted for %(answered_question.vote_count)s times" +#: templates/authopenid/signup.html:51 +msgid "Login with your OpenID" msgstr "" -#: templates/tough/question_retag.html:2 -msgid "Revise tags" -msgstr "" +#~ msgid "what is this website" +#~ msgstr "" +#~ "This is a collaboratively edited question and answer site for the " +#~ "Magnetic Resonance specialists." -#: templates/tough/question_retag.html:37 -msgid "tags are requried" -msgstr "" - -#: templates/tough/question_retag.html:38 -msgid "up to 5 tags, less than 20 characters each" -msgstr "" +# +#~ msgid "editing tips" +#~ msgstr "Tips" -#: templates/tough/question_retag.html:51 -msgid "Change tags" -msgstr "" +#~ msgid "Newest questions shown first." +#~ msgstr "" +#~ "Questions are sorted by <strong>entry date</strong>.Newest questions " +#~ "shown first." -#: templates/tough/question_retag.html:74 -msgid "Change now" -msgstr "" +#~ msgid "" +#~ "please use space to separate tags (this enables autocomplete feature)" +#~ msgstr "please use space to separate tags (uses autocomplete utility)" -#: templates/tough/question_retag.html:85 -msgid "Why use and modify tags?" -msgstr "" +#~ msgid "select openid provider" +#~ msgstr "1) Please select your id service provider." -#: templates/tough/question_retag.html:96 -msgid "tag editors receive special awards from the community" -msgstr "" +#~ msgid "verify openid link and login" +#~ msgstr "" +#~ "2) Please verify the OpenID URL (type your login name over {username}, if " +#~ "present) and then log in." diff --git a/locale/es/LC_MESSAGES/django.mo b/locale/es/LC_MESSAGES/django.mo Binary files differdeleted file mode 100644 index 7e934ecf..00000000 --- a/locale/es/LC_MESSAGES/django.mo +++ /dev/null diff --git a/locale/es/LC_MESSAGES/django.po b/locale/es/LC_MESSAGES/django.po index 6801907c..a8ac642a 100644 --- a/locale/es/LC_MESSAGES/django.po +++ b/locale/es/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-23 01:11-0300\n" +"POT-Creation-Date: 2009-08-05 22:28-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -15,19 +15,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: settings.py:27 +#: settings.py:12 msgid "account/" msgstr "cuenta/" -#: settings.py:27 django_authopenid/urls.py:9 django_authopenid/urls.py:11 +#: 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 templates/authopenid/confirm_email.txt:10 msgid "signin/" msgstr "ingresar/" -#: django_authopenid/forms.py:67 django_authopenid/views.py:93 +#: django_authopenid/forms.py:67 django_authopenid/views.py:102 msgid "i-names are not supported" msgstr "i-names no son soportados" -#: django_authopenid/forms.py:102 django_authopenid/forms.py:207 +#: django_authopenid/forms.py:102 msgid "" "Usernames can only contain letters, numbers and " "underscores" @@ -42,7 +44,7 @@ msgstr "" "Este nombre de usuario no existe en nuestra base de datos. Por favor elija " "otro." -#: django_authopenid/forms.py:126 django_authopenid/forms.py:231 +#: django_authopenid/forms.py:126 django_authopenid/forms.py:233 msgid "" "Please enter a valid username and password. Note that " "both fields are case-sensitive." @@ -50,11 +52,11 @@ msgstr "" "Por favor ingrese un usuario y contraseña validos. Ambos campos son " "sensibles a mayúsculas y minúsculas." -#: django_authopenid/forms.py:130 django_authopenid/forms.py:235 +#: django_authopenid/forms.py:130 django_authopenid/forms.py:237 msgid "This account is inactive." msgstr "Esta cuenta esta inactiva." -#: django_authopenid/forms.py:158 +#: django_authopenid/forms.py:158 django_authopenid/forms.py:210 msgid "invalid user name" msgstr "nombre de usuario no valido" @@ -71,126 +73,136 @@ msgstr "nombre de usuario muy corto" msgid "this name is already in use - please try anoter" msgstr "este nombre ya está tomado - por favor intente con otro" -#: django_authopenid/forms.py:184 +#: django_authopenid/forms.py:185 msgid "" -"This email is already registered in our database. Please " -"choose another." +"This email is already registered in our database. " +"Please choose another." msgstr "" "Este email ya está registrado en nuestra base de datos. Por favor, intente " "con otro." -#: django_authopenid/forms.py:214 +#: django_authopenid/forms.py:216 msgid "" "This username don't exist. Please choose another." msgstr "Este nombre de usuario no existe, por favor ingrese otro." -#: django_authopenid/forms.py:253 +#: django_authopenid/forms.py:255 msgid "choose a username" msgstr "elija un nombre de usuario" -#: django_authopenid/forms.py:255 templates/authopenid/signup.html:36 +#: django_authopenid/forms.py:257 templates/authopenid/signup.html:38 msgid "your email address" msgstr "su email (correo electrónico)" -#: django_authopenid/forms.py:257 templates/authopenid/signup.html:37 +#: django_authopenid/forms.py:259 templates/authopenid/signup.html:39 msgid "choose password" msgstr "elija una contraseña" -#: django_authopenid/forms.py:259 templates/authopenid/signup.html:38 +#: django_authopenid/forms.py:261 templates/authopenid/signup.html:40 msgid "retype password" msgstr "re-ingrese la contraseña" -#: django_authopenid/forms.py:330 +#: django_authopenid/forms.py:335 msgid "" "Old password is incorrect. Please enter the correct " "password." msgstr "La antigua contraseña es incorrecta. Por favor ingrese la correcta" -#: django_authopenid/forms.py:342 +#: django_authopenid/forms.py:347 msgid "new passwords do not match" msgstr "la nueva contraseña no coincide" -#: django_authopenid/forms.py:434 +#: django_authopenid/forms.py:442 msgid "Incorrect username." msgstr "Nombre de usuario incorrecto" #: django_authopenid/urls.py:10 +#, fuzzy +msgid "newquestion/" +msgstr "pregunta" + +#: django_authopenid/urls.py:11 +#, fuzzy +msgid "newanswer/" +msgstr "resputa" + +#: django_authopenid/urls.py:12 msgid "signout/" msgstr "salir/" -#: django_authopenid/urls.py:11 +#: django_authopenid/urls.py:13 msgid "complete/" msgstr "completado/" -#: django_authopenid/urls.py:13 +#: django_authopenid/urls.py:15 msgid "register/" msgstr "registrarse/" -#: django_authopenid/urls.py:14 +#: django_authopenid/urls.py:16 msgid "signup/" msgstr "registrarse/" -#: django_authopenid/urls.py:16 +#: django_authopenid/urls.py:18 msgid "sendpw/" msgstr "enviarcontrasena/" -#: django_authopenid/urls.py:26 +#: django_authopenid/urls.py:29 msgid "delete/" msgstr "borrar/" -#: django_authopenid/views.py:99 +#: django_authopenid/views.py:108 #, python-format -msgid "非法OpenID地址: %s" +msgid "OpenID %(openid_url)s is invalid" msgstr "" -#: django_authopenid/views.py:366 +#: django_authopenid/views.py:417 django_authopenid/views.py:544 msgid "Welcome" msgstr "Bienvenido" -#: django_authopenid/views.py:456 +#: django_authopenid/views.py:507 msgid "Password changed." msgstr "Contraseña modificada" -#: django_authopenid/views.py:488 -msgid "Email changed." -msgstr "Email modificado." +#: django_authopenid/views.py:519 django_authopenid/views.py:524 +msgid "your email needs to be validated" +msgstr "" -#: django_authopenid/views.py:519 django_authopenid/views.py:671 +#: django_authopenid/views.py:681 django_authopenid/views.py:833 #, python-format msgid "No OpenID %s found associated in our database" msgstr "La OpenID %s no esta asociada en nuestra base de datos" -#: django_authopenid/views.py:523 django_authopenid/views.py:678 +#: django_authopenid/views.py:685 django_authopenid/views.py:840 #, python-format msgid "The OpenID %s isn't associated to current user logged in" msgstr "La OpenID %s no esta asociada al usuario actualmente autenticado" -#: django_authopenid/views.py:531 +#: django_authopenid/views.py:693 msgid "Email Changed." msgstr "Email modificado" -#: django_authopenid/views.py:606 +#: django_authopenid/views.py:768 msgid "This OpenID is already associated with another account." msgstr "Esta OpenID ya está asociada a otra cuenta." -#: django_authopenid/views.py:611 +#: django_authopenid/views.py:773 #, python-format msgid "OpenID %s is now associated with your account." msgstr "La OpenID %s está ahora asociada con tu cuenta." -#: django_authopenid/views.py:681 +#: django_authopenid/views.py:843 msgid "Account deleted." msgstr "Cuenta borrada." -#: django_authopenid/views.py:721 +#: django_authopenid/views.py:883 msgid "Request for new password" msgstr "Pedir nueva contraseña" -#: django_authopenid/views.py:734 +#: django_authopenid/views.py:896 msgid "A new password has been sent to your email address." msgstr "Una nueva contraseña ha sido enviada a tu cuenta de Email." -#: django_authopenid/views.py:764 +#: django_authopenid/views.py:926 #, python-format msgid "" "Could not change password. Confirmation key '%s' is not " @@ -199,7 +211,7 @@ msgstr "" "No se ha podido modificar la contraseña. La clave de confirmación '%s' no " "está registrada" -#: django_authopenid/views.py:773 +#: django_authopenid/views.py:935 msgid "" "Can not change password. User don't exist anymore in our " "database." @@ -207,7 +219,7 @@ msgstr "" "No se puede cambiar la contraseña. El usuario no existe más en nuestra base " "de datos." -#: django_authopenid/views.py:782 +#: django_authopenid/views.py:944 #, python-format msgid "Password changed for %s. You may now sign in." msgstr "Contraseña cambiada por %s. Ahora puedes ingresar." @@ -328,34 +340,21 @@ msgstr "versión inicial" msgid "retagged" msgstr "re-etiquetada" -#: forum/feed.py:17 templates/base.html:7 templates/base_content.html:6 -#: templates/faq.html:25 templates/faq.html.py:108 templates/tough/faq.html:23 -#: templates/tough/faq.html.py:106 templates/tough/question_retag.html:89 -msgid "site title" -msgstr "titulo del sitio" - -#: forum/feed.py:17 +#: forum/feed.py:18 msgid " - " msgstr " - " -#: forum/feed.py:17 templates/base.html:7 templates/base_content.html:6 -msgid "site slogan" -msgstr " slogan del sitio" - -#: forum/feed.py:17 +#: forum/feed.py:18 msgid "latest questions" msgstr "últimas preguntas" -#: forum/feed.py:20 templates/index.html:8 -msgid "meta site content" -msgstr "meta descripción" - -#: forum/feed.py:22 -msgid "copyright message" -msgstr "mensaje de copyright" +#: forum/feed.py:19 +#, fuzzy +msgid "questions/" +msgstr "preguntas" #: forum/forms.py:14 templates/answer_edit_tips.html:34 -#: templates/answer_edit_tips.html.py:39 templates/question_edit_tips.html:31 +#: templates/answer_edit_tips.html.py:38 templates/question_edit_tips.html:31 #: templates/question_edit_tips.html:36 msgid "title" msgstr "titulo" @@ -380,25 +379,24 @@ msgstr "el contenido de la pregunta debe ser al menos de 10 caracteres" msgid "tags" msgstr "etiquetas" -#: forum/forms.py:46 -msgid "please use space to separate tags (this enables autocomplete feature)" +#: forum/forms.py:47 +msgid "" +"Tags are short keywords, with no spaces within. Up to five tags can be used." msgstr "" -"por favor utilice espacio para separar las etiquetas (esto habilitael auto-" -"completado)" -#: forum/forms.py:53 +#: forum/forms.py:54 templates/question_retag.html:38 msgid "tags are required" msgstr "las etiquetas son requeridas" -#: forum/forms.py:57 +#: forum/forms.py:58 msgid "please use 5 tags or less" msgstr "por favor use 5 o menos etiquetas" -#: forum/forms.py:60 +#: forum/forms.py:61 msgid "tags must be shorter than 20 characters" msgstr "las etiquetas deben ser menores a 20 caracteres" -#: forum/forms.py:64 +#: forum/forms.py:65 msgid "" "please use following characters in tags: letters 'a-z', numbers, and " "characters '.-_#'" @@ -406,15 +404,14 @@ msgstr "" "por favor use solo los siguientes caracteres en los nombres de etiquetas: " "letras 'a-z', números y caracteres '.-_#'" -#: forum/forms.py:74 templates/index.html:56 templates/question.html:196 -#: templates/question.html.py:377 templates/questions.html:58 +#: forum/forms.py:75 templates/index.html:57 templates/question.html:199 +#: templates/question.html.py:380 templates/questions.html:58 #: templates/questions.html.py:70 templates/unanswered.html:48 -#: templates/unanswered.html.py:60 templates/tough/unanswered.html:46 -#: templates/tough/unanswered.html.py:58 +#: templates/unanswered.html.py:60 msgid "community wiki" msgstr "wiki de comunidad" -#: forum/forms.py:75 +#: forum/forms.py:76 msgid "" "if you choose community wiki option, the question and answer do not generate " "points and name of author will not be shown" @@ -422,11 +419,11 @@ msgstr "" "si marca la opción 'wiki de comunidad', la pregunta y respuestas no generan " "puntos y el nombre del autor no será mostrado" -#: forum/forms.py:84 +#: forum/forms.py:89 msgid "update summary:" msgstr "resumen de modificación" -#: forum/forms.py:85 +#: forum/forms.py:90 msgid "" "enter a brief summary of your revision (e.g. fixed spelling, grammar, " "improved style, this field is optional)" @@ -434,48 +431,72 @@ msgstr "" "ingresa un breve resumen de tu revisión (ej. error ortográfico, gramática, " "mejoras de estilo. Este campo es opcional." -#: forum/forms.py:160 +#: forum/forms.py:175 msgid "this email does not have to be linked to gravatar" msgstr "este email no tiene porque estar asociado a un Gravatar" -#: forum/forms.py:161 +#: forum/forms.py:176 msgid "Real name" msgstr "Nombre real" -#: forum/forms.py:162 +#: forum/forms.py:177 msgid "Website" msgstr "Sitio Web" -#: forum/forms.py:163 +#: forum/forms.py:178 msgid "Location" msgstr "Ubicación" -#: forum/forms.py:164 +#: forum/forms.py:179 msgid "Date of birth" msgstr "Fecha de nacimiento" -#: forum/forms.py:164 +#: forum/forms.py:179 msgid "will not be shown, used to calculate age, format: YYYY-MM-DD" msgstr "no será mostrado, usado para calcular la edad. Formato: YYY-MM-DD" -#: forum/forms.py:165 templates/base.html:64 -#: templates/authopenid/settings.html:20 +#: forum/forms.py:180 templates/authopenid/settings.html:21 msgid "Profile" msgstr "Perfil" -#: forum/forms.py:190 forum/forms.py:191 +#: forum/forms.py:207 forum/forms.py:208 msgid "this email has already been registered, please use another one" msgstr "este email ya ha sido registrado, por favor use otro" -#: forum/models.py:316 templates/badges.html:51 +#: forum/models.py:238 +#, fuzzy, python-format +msgid "%(author)s modified the question" +msgstr "Cerrar la pregunta" + +#: forum/models.py:242 +#, python-format +msgid "%(people)s posted %(new_answer_count)s new answers" +msgstr "" + +#: forum/models.py:247 +#, fuzzy, python-format +msgid "%(people)s commented the question" +msgstr "pregunta comentada" + +#: forum/models.py:252 +#, fuzzy, python-format +msgid "%(people)s commented answers" +msgstr "respuesta comentada" + +#: forum/models.py:254 +#, fuzzy, python-format +msgid "%(people)s commented the answer" +msgstr "respuesta comentada" + +#: forum/models.py:433 templates/badges.html:52 msgid "gold" msgstr "oro" -#: forum/models.py:317 templates/badges.html:59 +#: forum/models.py:434 templates/badges.html:60 msgid "silver" msgstr "plata" -#: forum/models.py:318 templates/badges.html:66 +#: forum/models.py:435 templates/badges.html:67 msgid "bronze" msgstr "bronze" @@ -555,7 +576,7 @@ msgstr "perfil - votos" msgid "preferences" msgstr "preferencias" -#: forum/user.py:69 templates/user_tabs.html:28 +#: forum/user.py:69 templates/user_tabs.html:27 msgid "user preference settings" msgstr "preferencias del usuario" @@ -563,28 +584,43 @@ msgstr "preferencias del usuario" msgid "profile - user preferences" msgstr "perfil - preferencia de " -#: forum/views.py:1730 +#: forum/views.py:304 +#, fuzzy +msgid "/account/" +msgstr "cuenta/" + +#: forum/views.py:943 +#, python-format +msgid "subscription saved, %(email)s needs validation" +msgstr "" + +#: forum/views.py:1853 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:1732 +#: forum/views.py:1855 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:1734 +#: forum/views.py:1857 #, python-format msgid "maximum upload file size is %sK" msgstr "tamaño máximo permitido es archivo %sK" -#: forum/views.py:1736 +#: forum/views.py:1859 #, python-format msgid "" "Error uploading file. Please contact the site administrator. Thank you. %s" msgstr "" "Error al subir el archivo. Por favor, contacte al administrador. Gracias. %s" +#: forum/management/commands/send_email_alerts.py:35 +#, fuzzy +msgid "updates from website" +msgstr "sitio web del usuario" + #: forum/templatetags/extra_tags.py:139 forum/templatetags/extra_tags.py:168 #: templates/header.html:33 msgid "badges" @@ -642,6 +678,10 @@ msgstr "ver todas las preguntas" msgid "see all tags" msgstr "ver todas las tags" +#: templates/500.html:22 +msgid "sorry, system error" +msgstr "" + #: templates/500.html:24 msgid "system error log is recorded, error will be fixed as soon as possible" msgstr "" @@ -668,19 +708,19 @@ msgid "Edit answer" msgstr "Editar respuesta" #: templates/answer_edit.html:24 templates/answer_edit.html.py:27 -#: templates/ask.html:25 templates/ask.html.py:28 templates/question.html:37 -#: templates/question.html.py:40 templates/question_edit.html:27 +#: templates/ask.html:25 templates/ask.html.py:28 templates/question.html:40 +#: templates/question.html.py:43 templates/question_edit.html:27 msgid "hide preview" msgstr "ocultar previsualización" #: templates/answer_edit.html:27 templates/ask.html:28 -#: templates/question.html:40 templates/question_edit.html:27 +#: templates/question.html:43 templates/question_edit.html:27 msgid "show preview" msgstr "ver previsualización" #: templates/answer_edit.html:47 templates/question_edit.html:65 -#: templates/revisions_answer.html:36 templates/revisions_question.html:36 -#: templates/tough/question_retag.html:51 +#: templates/question_retag.html:52 templates/revisions_answer.html:36 +#: templates/revisions_question.html:36 msgid "back" msgstr "volver" @@ -693,23 +733,25 @@ msgstr "revisión" msgid "select revision" msgstr "seleccionar revisión" -#: templates/answer_edit.html:62 templates/ask.html:81 -#: templates/question.html:447 templates/question_edit.html:91 +#: templates/answer_edit.html:62 templates/ask.html:94 +#: templates/question.html:452 templates/question_edit.html:91 msgid "Toggle the real time Markdown editor preview" msgstr "Activar la visualización en tiempo real de Markdown" -#: templates/answer_edit.html:62 templates/ask.html:81 -#: templates/question.html:447 templates/question_edit.html:91 +#: templates/answer_edit.html:62 templates/ask.html:94 +#: templates/question.html:452 templates/question_edit.html:91 msgid "toggle preview" msgstr "Activar previsualización" #: templates/answer_edit.html:73 templates/question_edit.html:119 +#: templates/question_retag.html:75 msgid "Save edit" msgstr "Guardar la edición" #: templates/answer_edit.html:74 templates/close.html:29 -#: templates/question_edit.html:120 templates/reopen.html:30 -#: templates/user_edit.html:83 templates/tough/question_retag.html:75 +#: templates/question_edit.html:120 templates/question_retag.html:76 +#: templates/reopen.html:30 templates/user_edit.html:83 +#: templates/authopenid/changeemail.html:34 msgid "Cancel" msgstr "Cancelar" @@ -753,24 +795,24 @@ msgstr "**negrita** o __negrita__" msgid "link" msgstr "enlace" -#: templates/answer_edit_tips.html:34 templates/answer_edit_tips.html.py:39 +#: 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 msgid "text" msgstr "texto" -#: templates/answer_edit_tips.html:39 templates/question_edit_tips.html:36 +#: templates/answer_edit_tips.html:38 templates/question_edit_tips.html:36 msgid "image" msgstr "imagen" -#: templates/answer_edit_tips.html:43 templates/question_edit_tips.html:40 +#: templates/answer_edit_tips.html:42 templates/question_edit_tips.html:40 msgid "numbered list:" msgstr "lista numerada" -#: templates/answer_edit_tips.html:48 templates/question_edit_tips.html:45 +#: templates/answer_edit_tips.html:47 templates/question_edit_tips.html:45 msgid "basic HTML tags are also supported" msgstr "etiquetas básicas de HTML permitidas" -#: templates/answer_edit_tips.html:51 templates/question_edit_tips.html:48 +#: templates/answer_edit_tips.html:50 templates/question_edit_tips.html:48 msgid "learn more about Markdown" msgstr "aprender mas sobre Markdown" @@ -778,32 +820,25 @@ msgstr "aprender mas sobre Markdown" msgid "Ask a question" msgstr "Hacer una pregunta" -#: templates/ask.html:106 -msgid "Use" -msgstr "Usar" - -#: templates/ask.html:106 -msgid "learn more about OpenID" -msgstr "aprender mas sobre OpenID" - -#: templates/ask.html:106 templates/authopenid/signin.html:35 -#: templates/authopenid/signin.html:61 -msgid "Login" -msgstr "Ingresar" +#: templates/ask.html:67 +#, fuzzy +msgid "login to post question info" +msgstr "<strong>Más recientes</strong> preguntas son mostradas primero." -#: templates/ask.html:109 -msgid "Get your own " -msgstr "Obtiene tu propio " +#: templates/ask.html:73 +#, python-format +msgid "must have valid %(email)s to post" +msgstr "" -#: templates/ask.html:117 templates/authopenid/sendpw.html:27 -msgid "User name" -msgstr "Nombre de usuario" +#: templates/ask.html:108 +msgid "(required)" +msgstr "" -#: templates/ask.html:120 -msgid "Email: (won't be shown to anyone)" -msgstr "Email: (no será mostrado a nadie)" +#: templates/ask.html:115 +msgid "Login/signup to post your question" +msgstr "" -#: templates/ask.html:127 +#: templates/ask.html:117 msgid "Ask your question" msgstr "Haz tu pregunta" @@ -824,72 +859,47 @@ msgid "Badges" msgstr "Distinciones" #: templates/badges.html:21 +msgid "Community gives you awards for your questions, answers and votes." +msgstr "La comunidad te da distinciones por tus preguntas, respuestas y votos." + +#: templates/badges.html:22 +#, fuzzy msgid "" -"Community gives you awards for your questions, answers and votes. Below is " -"the list of available badges and number of times each type of badge has been " -"awarded." +"Below is the list of available badges and number of times each type of badge " +"has been awarded." msgstr "" "La comunidad te condecora con distinciones por tus preguntas, respuestas y " "votos. Debajo esta la lista de las distinciones disponibles y la cantidad de " "veces que han sido asignadas." -#: templates/badges.html:48 +#: templates/badges.html:49 msgid "Community badges" msgstr "Distinciones de la comunidad" -#: templates/badges.html:54 -msgid "" -"Gold badge is very rare. To obtain it you have to show profound knowledge " -"and ability in addition to actively participating in the community. Gold " -"badge is the highest award in this community." +#: templates/badges.html:55 +msgid "gold badge description" msgstr "" "Las distinciones de Oro son excepcionales. Para obtenerla debes demostrar un " "profundo conocimiento y habilidad además de participar activamente en la " "comunidad. La distinción de Oro es la condecoración máxima en esta comunidad" -#: templates/badges.html:62 -msgid "" -"Obtaining silver badge requires significant patience. If you got one, you've " -"very significantly contributed to this community" +#: templates/badges.html:63 +msgid "silver badge description" msgstr "" "Obtener una distinción de Plata requiere de paciencia. Si has logrado una, " "quiere decir que haz significativamente aportado a esta comunidad." -#: templates/badges.html:65 +#: templates/badges.html:66 msgid "bronze badge: often given as a special honor" msgstr "" "distinción de bronce: con frecuencia entregada como reconocimiento especial." -#: templates/badges.html:69 -msgid "" -"If you are active in this community, you will get this medal - still it is a " -"special honor." +#: templates/badges.html:70 +msgid "bronze badge description" msgstr "" "Si eres un usuario activo de esta comunidad, recibirás esta distinción - de " "todas maneras es un honor especial." -#: templates/base.html:62 -#, fuzzy -msgid "Congratulations! You have new badges: " -msgstr "felicitaciones, la comunidad te ha otorgado una distinción" - -#: templates/base.html:63 -#, fuzzy -msgid "go to see" -msgstr "OK para cerrar" - -#: templates/base_content.html:61 -msgid "congratulations, community gave you a badge" -msgstr "felicitaciones, la comunidad te ha otorgado una distinción" - -#: templates/base_content.html:62 -msgid "see" -msgstr "ver" - -#: templates/base_content.html:63 -msgid "profile" -msgstr "perfil" - #: templates/book.html:7 msgid "reading channel" msgstr "canal de lectura" @@ -956,9 +966,8 @@ msgstr "esta pregunta ha sido seleccionada como favorita" msgid "number of times" msgstr "numero de veces" -#: templates/book.html:105 templates/index.html:47 templates/questions.html:46 +#: templates/book.html:105 templates/index.html:48 templates/questions.html:46 #: templates/unanswered.html:37 templates/users_questions.html:30 -#: templates/tough/unanswered.html:35 msgid "votes" msgstr "votos" @@ -966,18 +975,16 @@ msgstr "votos" msgid "the answer has been accepted to be correct" msgstr "la respuesta ha sido aceptada como correcta" -#: templates/book.html:115 templates/index.html:48 templates/questions.html:47 +#: templates/book.html:115 templates/index.html:49 templates/questions.html:47 #: templates/unanswered.html:38 templates/users_questions.html:40 -#: templates/tough/unanswered.html:36 msgid "views" msgstr "vistas" -#: templates/book.html:125 templates/index.html:68 templates/question.html:112 -#: templates/question.html.py:479 templates/questions.html:84 -#: templates/questions.html.py:149 templates/tags.html:47 +#: templates/book.html:125 templates/index.html:69 templates/question.html:115 +#: templates/question.html.py:486 templates/questions.html:84 +#: templates/questions.html.py:156 templates/tags.html:47 #: templates/unanswered.html:75 templates/unanswered.html.py:109 -#: templates/users_questions.html:52 templates/tough/unanswered.html:72 -#: templates/tough/unanswered.html:105 +#: templates/users_questions.html:52 msgid "using tags" msgstr "usando etiquetas" @@ -1005,15 +1012,15 @@ msgstr "Razón" msgid "OK to close" msgstr "OK para cerrar" -#: templates/faq.html:11 templates/tough/faq.html:9 +#: templates/faq.html:11 msgid "Frequently Asked Questions " msgstr "Preguntas Frecuentes" -#: templates/faq.html:15 templates/tough/faq.html:13 +#: templates/faq.html:16 msgid "What kinds of questions can I ask here?" msgstr "¿Qué clase de preguntas puedo hacer aquí?" -#: templates/faq.html:16 templates/tough/faq.html:14 +#: templates/faq.html:17 msgid "" "Most importanly - questions should be <strong>relevant</strong> to this " "community." @@ -1021,7 +1028,7 @@ msgstr "" "Por encima de todo - las preguntas deben ser <strong>relevantes</strong>a " "esta comunidad." -#: templates/faq.html:17 templates/tough/faq.html:15 +#: templates/faq.html:18 msgid "" "Before asking the question - please make sure to use search to see whether " "your question has alredy been answered." @@ -1029,11 +1036,11 @@ msgstr "" "Antes de hacer tu pregunta - por favor usa el buscador para asegurarte que " "la pregunta no este ya hecha." -#: templates/faq.html:20 templates/tough/faq.html:18 +#: templates/faq.html:21 msgid "What questions should I avoid asking?" msgstr "¿Qué preguntas debería evitar preguntar?" -#: templates/faq.html:21 templates/tough/faq.html:19 +#: templates/faq.html:22 msgid "" "Please avoid asking questions that are not relevant to this community, too " "subjective and argumentative." @@ -1041,11 +1048,15 @@ msgstr "" "Evita hacer preguntas que no son relevantes a la comunidad, demasiado " "subjetivas o argumentativas." -#: templates/faq.html:24 templates/tough/faq.html:22 +#: templates/faq.html:27 msgid "What should I avoid in my answers?" msgstr "¿Que debo evitar en mis respuestas?" -#: templates/faq.html:25 templates/tough/faq.html:23 +#: templates/faq.html:28 templates/faq.html.py:132 +msgid "site title" +msgstr "titulo del sitio" + +#: templates/faq.html:28 msgid "" "is a Q&A site, not a discussion group. Therefore - please avoid having " "discussions in your answers, comment facility allows some space for brief " @@ -1055,19 +1066,19 @@ msgstr "" "intenta evitar discusiones en tus respuestas. Los comentarios permiten " "realizar pequeñas discusiones." -#: templates/faq.html:28 templates/tough/faq.html:26 +#: templates/faq.html:32 msgid "Who moderates this community?" msgstr "¿Quién modera esta comunidad?" -#: templates/faq.html:29 templates/tough/faq.html:27 +#: templates/faq.html:33 msgid "The short answer is: <strong>you</strong>." msgstr "La respuesta corta es: <strong>tú</strong>" -#: templates/faq.html:30 templates/tough/faq.html:28 +#: templates/faq.html:34 msgid "This website is moderated by the users." msgstr "Este sitio es moderado por los usuarios." -#: templates/faq.html:31 templates/tough/faq.html:29 +#: templates/faq.html:35 msgid "" "The reputation system allows users earn the authorization to perform a " "variety of moderation tasks." @@ -1075,120 +1086,83 @@ msgstr "" "El sistema de reputación permite a los usuarios adquirir autorización para " "realizar diversas tareas de moderación." -#: templates/faq.html:34 templates/tough/faq.html:32 +#: templates/faq.html:40 msgid "How does reputation system work?" msgstr "¿Cómo funciona el sistema de reputación?" -#: templates/faq.html:35 templates/tough/faq.html:33 -msgid "" -"Anyone can ask questions and give answers, points are not necessary for that." -msgstr "" -"Cualquier usuario puede hacer preguntas y dar respuestas, no es necesario " -"tener reputación para ello." - -#: templates/faq.html:36 templates/tough/faq.html:34 -msgid "" -"As we've said before, users help running this site. Point system helps " -"select users who can administer this community." -msgstr "" -"Como dijimos antes, los usuarios ayudan a crear este sitio. El sistema de " -"reputación permite seleccionar usuarios que pueden moderar esta comunidad." - -#: templates/faq.html:37 templates/tough/faq.html:35 -msgid "" -"Reputation points roughly measure how community trusts you. These points are " -"given to you directly by other members of the community." -msgstr "" -"Los puntos de reputación miden a groso modo que tan respetado eres en la " -"comunidad. Los puntos son dados a ti directamente por otros miembros de la " -"comunidad" - -#: templates/faq.html:40 templates/tough/faq.html:38 -msgid "" -"For example, if you ask an interesting question or give a helpful answer, " -"your input will be upvoted and you will gain more trust in the community." -msgstr "" -"Por ejemplo, si haces una pregunta interesante, o das una respuesta valiosa, " -"tu entrada va a ser votada positivamente y tu ganarás confianza en la " -"comunidad." - -#: templates/faq.html:41 templates/tough/faq.html:39 -msgid "" -"If on the other hand someone gives a misleading answer, the answer will be " -"voted down and he/she loses some points." -msgstr "" -"Si por el contrario, alguien da una respuesta que no corresponde, la " -"respuesta será votada negativamente y el usuario perderá puntos." - -#: templates/faq.html:42 templates/tough/faq.html:40 -msgid "" -"Each vote in favor will generate <strong>10</strong> points, each vote " -"against will subtract <strong>2</strong> points." -msgstr "" -"Cada voto a favor generará <strong>10</strong> puntos, cada voto negativo " -"restará <strong>2</strong> puntos." - -#: templates/faq.html:43 templates/tough/faq.html:41 -msgid "" -"Through the votes of other people you can accumulate a maximum of " -"<strong>200</strong> points." -msgstr "" -"A través del voto de otras personas puedes acumular un máximo de " -"<strong>200</strong> puntos." - -#: templates/faq.html:44 -msgid "After accumulating certain number of points, you can do more:" -msgstr "Luego de haber acumulado cierta cantidad de puntos, puedes hacer más:" +#: templates/faq.html:41 +#, fuzzy +msgid "Rep system summary" +msgstr "resumen de modificación" -#: templates/faq.html:52 templates/user_votes.html:14 -#: templates/tough/faq.html:50 +#: templates/faq.html:59 templates/user_votes.html:14 msgid "upvote" msgstr "votar positivo" -#: templates/faq.html:56 templates/tough/faq.html:54 +#: templates/faq.html:63 msgid "use tags" msgstr "etiquetas usadas" -#: templates/faq.html:60 templates/tough/faq.html:58 +#: templates/faq.html:68 msgid "add comments" msgstr "agregar comentarios" -#: templates/faq.html:64 templates/user_votes.html:16 -#: templates/tough/faq.html:62 +#: templates/faq.html:72 templates/user_votes.html:16 msgid "downvote" msgstr "votar negativo" -#: templates/faq.html:71 templates/tough/faq.html:69 +#: templates/faq.html:75 +#, fuzzy +msgid "open and close own questions" +msgstr "abrir cualquier pregunta cerrada" + +#: templates/faq.html:79 msgid "retag questions" msgstr "re-etiquetar preguntas" -#: templates/faq.html:75 templates/tough/faq.html:73 +#: templates/faq.html:83 msgid "edit community wiki questions" msgstr "editar preguntas de la wiki comunitaria" -#: templates/faq.html:79 templates/tough/faq.html:77 +#: templates/faq.html:87 msgid "edit any answer" msgstr "editar cualquier pregunta" -#: templates/faq.html:83 templates/tough/faq.html:81 +#: templates/faq.html:91 msgid "open any closed question" msgstr "abrir cualquier pregunta cerrada" -#: templates/faq.html:87 templates/tough/faq.html:85 +#: templates/faq.html:95 msgid "delete any comment" msgstr "borrar cualquier comentario" -#: templates/faq.html:91 templates/tough/faq.html:89 +#: templates/faq.html:99 msgid "delete any questions and answers and perform other moderation tasks" msgstr "" "borrar cualquier pregunta o respuesta y realizar otras tareas de " "administración." -#: templates/faq.html:98 +#: templates/faq.html:106 +msgid "how to validate email title" +msgstr "" + +#: templates/faq.html:108 +msgid "how to validate email info" +msgstr "" + +#: templates/faq.html:112 +msgid "what is gravatar" +msgstr "" + +#: templates/faq.html:113 +msgid "gravatar faq info" +msgstr "" + +#: templates/faq.html:116 msgid "To register, do I need to create new password?" msgstr "¿Para registrarme, debo crearme una cuenta?" -#: templates/faq.html:99 templates/tough/faq.html:97 +#: templates/faq.html:117 msgid "" "No, you don't have to. You can login through any service that supports " "OpenID, e.g. Google, Yahoo, AOL, etc." @@ -1196,19 +1170,19 @@ msgstr "" "No tienes porqué. Puedes ingresar usando cualquiera de los servicios que " "soportan OpenID, ej. Google, Yahoo, AOL, MyOpenID, etc." -#: templates/faq.html:100 templates/tough/faq.html:98 +#: templates/faq.html:118 msgid "Login now!" msgstr "Ingresa ahora!" -#: templates/faq.html:103 templates/tough/faq.html:101 +#: templates/faq.html:123 msgid "Why other people can edit my questions/answers?" msgstr "¿Porqué otras personas pueden editar mis preguntas y respuestas?" -#: templates/faq.html:104 templates/tough/faq.html:102 +#: templates/faq.html:124 msgid "Goal of this site is..." msgstr "El objetivo de este sitio es..." -#: templates/faq.html:104 templates/tough/faq.html:102 +#: templates/faq.html:124 msgid "" "So questions and answers can be edited like wiki pages by experienced users " "of this site and this improves the overall quality of the knowledge base " @@ -1218,34 +1192,32 @@ msgstr "" "usuarios con experiencia, y esto mejora la calidad general del conocimiento " "guardado." -#: templates/faq.html:105 templates/tough/faq.html:103 +#: templates/faq.html:125 msgid "If this approach is not for you, we respect your choice." msgstr "" "Si esta forma de funcionamiento no es de tu agrado, respetamos tu elección." -#: templates/faq.html:107 templates/tough/faq.html:105 +#: templates/faq.html:129 msgid "Still have questions?" msgstr "¿Aún tienes preguntas?" -#: templates/faq.html:108 +#: templates/faq.html:130 msgid "Please ask your question, help make our community better!" msgstr "Por favor haz tu pregunta, ¡ayudanos a mejorar nuestra comunidad!" -#: templates/faq.html:108 templates/header.html:29 templates/header.html.py:60 -#: templates/tough/faq.html:106 +#: templates/faq.html:132 templates/header.html:29 templates/header.html.py:60 msgid "questions" msgstr "preguntas" -#: templates/faq.html:108 templates/index.html:121 -#: templates/tough/faq.html:106 +#: templates/faq.html:132 templates/index.html:121 msgid "." msgstr "" -#: templates/footer.html:7 templates/header.html:12 templates/index.html:83 +#: templates/footer.html:7 templates/header.html:14 templates/index.html:83 msgid "about" msgstr "acerca de" -#: templates/footer.html:8 templates/header.html:13 templates/index.html:84 +#: templates/footer.html:8 templates/header.html:15 templates/index.html:84 msgid "faq" msgstr "preguntas frecuentes" @@ -1269,11 +1241,11 @@ msgstr "envía comentarios" msgid "current revision" msgstr "revisión actual" -#: templates/header.html:8 +#: templates/header.html:10 msgid "logout" msgstr "salir" -#: templates/header.html:10 templates/authopenid/signup.html:39 +#: templates/header.html:12 templates/authopenid/signup.html:41 msgid "login" msgstr "entrar" @@ -1289,7 +1261,7 @@ msgstr "usuarios" msgid "books" msgstr "libros" -#: templates/header.html:34 templates/index.html:121 +#: templates/header.html:34 msgid "unanswered questions" msgstr "sin respuesta" @@ -1305,74 +1277,60 @@ msgstr "hacer una pregunta" msgid "search" msgstr "buscar" -#: templates/index.html:6 +#: templates/index.html:7 msgid "Home" msgstr "Inicio" -#: templates/index.html:7 -msgid "meta site keywords, comma separated" -msgstr "palabras claves" - -#: templates/index.html:21 templates/questions.html:7 +#: templates/index.html:22 templates/questions.html:7 msgid "Questions" msgstr "Preguntas" -#: templates/index.html:23 +#: templates/index.html:24 msgid "last updated questions" msgstr "ultimas preguntas actualizadas" -#: templates/index.html:23 templates/questions.html:25 -#: templates/unanswered.html:20 templates/tough/unanswered.html:18 +#: templates/index.html:24 templates/questions.html:25 +#: templates/unanswered.html:20 msgid "newest" msgstr "más nuevas" -#: templates/index.html:24 templates/questions.html:27 +#: templates/index.html:25 templates/questions.html:27 msgid "hottest questions" msgstr "preguntas más calientes" -#: templates/index.html:24 templates/questions.html:27 +#: templates/index.html:25 templates/questions.html:27 msgid "hottest" msgstr "más calientes" -#: templates/index.html:25 templates/questions.html:28 +#: templates/index.html:26 templates/questions.html:28 msgid "most voted questions" msgstr "preguntas más votadas" -#: templates/index.html:25 templates/questions.html:28 +#: templates/index.html:26 templates/questions.html:28 msgid "most voted" msgstr "más votadas" -#: templates/index.html:26 +#: templates/index.html:27 msgid "all questions" msgstr "todas las preguntas" -#: templates/index.html:46 templates/questions.html:45 +#: templates/index.html:47 templates/questions.html:45 #: templates/unanswered.html:36 templates/users_questions.html:35 -#: templates/tough/unanswered.html:34 msgid "answers" msgstr "respuestas" -#: templates/index.html:68 templates/question.html:112 -#: templates/question.html.py:479 templates/questions.html:84 -#: templates/questions.html.py:149 templates/tags.html:47 +#: templates/index.html:69 templates/question.html:115 +#: templates/question.html.py:486 templates/questions.html:84 +#: templates/questions.html.py:156 templates/tags.html:47 #: templates/unanswered.html:75 templates/unanswered.html.py:109 -#: templates/users_questions.html:52 templates/tough/unanswered.html:72 -#: templates/tough/unanswered.html:105 +#: templates/users_questions.html:52 msgid "see questions tagged" msgstr "ver preguntas etiquetadas" -#: templates/index.html:79 +#: templates/index.html:80 msgid "welcome to website" msgstr "bienvenido a sitio" -#: templates/index.html:81 -msgid "what is this website" -msgstr "que es este sitio" - -#: templates/index.html:82 -msgid "what can one do on this website" -msgstr "que puede uno hacer en este sitio" - #: templates/index.html:89 msgid "Recent tags" msgstr "Etiquetas recientes" @@ -1407,7 +1365,8 @@ msgid "Still looking for more? See" msgstr "¿Aún sigues buscando más? Ver" #: templates/index.html:121 -msgid "complete list of quesionts" +#, fuzzy +msgid "complete list of questions" msgstr "lista completa de preguntas" #: templates/index.html:121 @@ -1418,6 +1377,11 @@ msgstr "ó" msgid "Please help us answer" msgstr "Ayudanos a responder" +#: templates/index.html:121 +#, fuzzy +msgid "list of unanswered questions" +msgstr "sin respuesta" + #: templates/logout.html:6 templates/logout.html.py:17 msgid "Logout" msgstr "Salir" @@ -1442,19 +1406,19 @@ msgstr "entradas por página" msgid "previous" msgstr "previo" -#: templates/paginator.html:20 +#: templates/paginator.html:19 msgid "current page" msgstr "página actúal" -#: templates/paginator.html:23 templates/paginator.html.py:30 +#: templates/paginator.html:22 templates/paginator.html.py:29 msgid "page number " msgstr "número de página" -#: templates/paginator.html:23 templates/paginator.html.py:30 +#: templates/paginator.html:22 templates/paginator.html.py:29 msgid "number - make blank in english" msgstr " " -#: templates/paginator.html:34 +#: templates/paginator.html:33 msgid "next page" msgstr "próxima página" @@ -1502,75 +1466,75 @@ msgstr "Cambios de Códigos" msgid "how privacy policies can be changed" msgstr "como pueden ser cambiados los códigos de privacidad" -#: templates/question.html:66 templates/question.html.py:78 +#: templates/question.html:69 templates/question.html.py:81 msgid "i like this post (click again to cancel)" msgstr "Me gusta esta entrada (clickear devuelta para cancelar)" -#: templates/question.html:68 templates/question.html.py:80 -#: templates/question.html:273 +#: templates/question.html:71 templates/question.html.py:83 +#: templates/question.html:276 msgid "current number of votes" msgstr "número actual de votos" -#: templates/question.html:73 templates/question.html.py:84 +#: templates/question.html:76 templates/question.html.py:87 msgid "i dont like this post (click again to cancel)" msgstr "No me gusta esta entrada (clickear devuelta para cancelar)" -#: templates/question.html:90 +#: templates/question.html:93 msgid "mark this question as favorite (click again to cancel)" msgstr "marcar esta pregunta como favorita (clickear devuelta para cancelar)" -#: templates/question.html:96 +#: templates/question.html:99 msgid "remove favorite mark from this question (click again to restore mark)" msgstr "" "remover marca de favorito a esta pregunta (clickear devuelta para volver a " "marcar)" -#: templates/question.html:121 templates/question.html.py:304 +#: templates/question.html:124 templates/question.html.py:307 #: templates/revisions_answer.html:53 templates/revisions_question.html:53 msgid "edit" msgstr "editar" -#: templates/question.html:125 templates/question.html.py:314 +#: templates/question.html:128 templates/question.html.py:317 msgid "delete" msgstr "borrar" -#: templates/question.html:130 +#: templates/question.html:133 msgid "reopen" msgstr "re-abrir" -#: templates/question.html:135 +#: templates/question.html:138 msgid "close" msgstr "cerrar" -#: templates/question.html:141 templates/question.html.py:327 +#: templates/question.html:144 templates/question.html.py:330 msgid "" "report as offensive (i.e containing spam, advertising, malicious text, etc.)" msgstr "" "reportar como ofensivo (ej. contiene spam, publicidad, texto malicioso, etc.)" -#: templates/question.html:142 templates/question.html.py:328 +#: templates/question.html:145 templates/question.html.py:331 msgid "flag offensive" msgstr "marcar como ofensivo" -#: templates/question.html:154 templates/question.html.py:337 +#: templates/question.html:157 templates/question.html.py:340 #: templates/revisions_answer.html:65 templates/revisions_question.html:65 msgid "updated" msgstr "actualizado" -#: templates/question.html:203 templates/question.html.py:384 +#: templates/question.html:206 templates/question.html.py:387 #: templates/revisions_answer.html:63 templates/revisions_question.html:63 msgid "asked" msgstr "preguntado" -#: templates/question.html:233 templates/question.html.py:411 +#: templates/question.html:236 templates/question.html.py:414 msgid "comments" msgstr "comentarios" -#: templates/question.html:234 templates/question.html.py:412 +#: templates/question.html:237 templates/question.html.py:415 msgid "add comment" msgstr "agregar comentario" -#: templates/question.html:247 +#: templates/question.html:250 #, python-format msgid "" "The question has been closed for the following reason \"%(question." @@ -1579,105 +1543,113 @@ msgstr "" "La pregunta ha sido cerrada por el siguiente motivo \"%(question." "get_close_reason_display)s\" por" -#: templates/question.html:249 +#: templates/question.html:252 #, python-format msgid "close date %(question.closed_at)s" msgstr "fecha de cerrada %(question.closed_at)s" -#: templates/question.html:256 templates/user_stats.html:28 +#: templates/question.html:259 templates/user_stats.html:28 msgid "Answers" msgstr "Respuestas" -#: templates/question.html:258 +#: templates/question.html:261 msgid "oldest answers will be shown first" msgstr "la respuesta mas vieja será mostrada primero" -#: templates/question.html:258 +#: templates/question.html:261 msgid "oldest answers" msgstr "pregunta más vieja" -#: templates/question.html:259 +#: templates/question.html:262 msgid "newest answers will be shown first" msgstr "preguntas más nuevas serán mostradas primero" -#: templates/question.html:259 +#: templates/question.html:262 msgid "newest answers" msgstr "más nuevas" -#: templates/question.html:260 +#: templates/question.html:263 msgid "most voted answers will be shown first" msgstr "las preguntas más votadas serán mostradas primero" -#: templates/question.html:260 +#: templates/question.html:263 msgid "popular answers" msgstr "respuestas populares serán mostradas primero" -#: templates/question.html:272 +#: templates/question.html:275 msgid "i like this answer (click again to cancel)" msgstr "me gusta esta respuesta (clickear devuelta para cancelar)" -#: templates/question.html:278 +#: templates/question.html:281 msgid "i dont like this answer (click again to cancel)" msgstr "no me gusta esta respuesta (clickear devuelta para cancelar)" -#: templates/question.html:284 +#: templates/question.html:287 msgid "mark this answer as favorite (click again to undo)" msgstr "marcar esta respuesta como favorita (clickear devuelta para deshacer)" -#: templates/question.html:289 +#: templates/question.html:292 msgid "the author of the question has selected this answer as correct" msgstr "el autor de esta pregunta ha seleccionado esta respuesta como correcta" -#: templates/question.html:311 +#: templates/question.html:314 msgid "undelete" msgstr "deshacer eliminar" -#: templates/question.html:321 +#: templates/question.html:324 msgid "answer permanent link" msgstr "enlace permanente a respuesta" -#: templates/question.html:322 +#: templates/question.html:325 msgid "permanent link" msgstr "enlace permanente" -#: templates/question.html:436 +#: templates/question.html:438 msgid "Your answer" msgstr "Tu respuesta" -#: templates/question.html:460 +#: templates/question.html:441 +msgid "you can answer anonymously and then login" +msgstr "" + +#: templates/question.html:465 msgid "Answer the question" msgstr "Responde la pregunta" -#: templates/question.html:462 -msgid "Login to answer" -msgstr "Ingresa para responder" +#: templates/question.html:467 +msgid "Notify me daily if there are any new answers." +msgstr "" + +#: templates/question.html:469 +msgid "once you sign in you will be able to subscribe for any updates here" +msgstr "" -#: templates/question.html:474 +#: templates/question.html:481 msgid "Question tags" msgstr "Etiquetas de la pregunta" -#: templates/question.html:484 +#: templates/question.html:491 msgid "question asked" msgstr "pregunta preguntada" -#: templates/question.html:484 templates/question.html.py:490 +#: templates/question.html:491 templates/question.html.py:497 #: templates/user_info.html:51 msgid "ago" msgstr "atrás" -#: templates/question.html:487 +#: templates/question.html:494 msgid "question was seen" msgstr "la pregunta fue vista" -#: templates/question.html:487 +#: templates/question.html:494 msgid "times" msgstr "veces" -#: templates/question.html:490 +#: templates/question.html:497 msgid "last updated" msgstr "última vez actualizada" -#: templates/question.html:495 +#: templates/question.html:502 msgid "Related questions" msgstr "Preguntas relacionadas" @@ -1697,6 +1669,27 @@ msgstr "por favor hacer preguntas relevantes" msgid "please try provide enough details" msgstr "intente proveer suficientes detalles" +#: templates/question_retag.html:3 templates/question_retag.html.py:52 +msgid "Change tags" +msgstr "Cambiar etiquetas" + +#: templates/question_retag.html:39 +msgid "up to 5 tags, less than 20 characters each" +msgstr "hasta 5 etiquetas, menos de 20 caracteres cada una" + +#: templates/question_retag.html:86 +msgid "Why use and modify tags?" +msgstr "¿Porqué usar y modificar etiquetas?" + +#: templates/question_retag.html:89 +msgid "tags help us keep Questions organized" +msgstr "" + +#: templates/question_retag.html:95 +msgid "tag editors receive special awards from the community" +msgstr "" +"los editores de etiquetas reciben distinciones especiales de la comunidad" + #: templates/questions.html:23 msgid "Found by tags" msgstr "Encontradas por etiqueta" @@ -1710,7 +1703,6 @@ msgid "All questions" msgstr "Todas las preguntas" #: templates/questions.html:25 templates/unanswered.html:20 -#: templates/tough/unanswered.html:18 msgid "most recently asked questions" msgstr "preguntas hechas más recientemente" @@ -1726,7 +1718,7 @@ msgstr "actividad" #, fuzzy, python-format msgid "" "\n" -"\t\t\thave total %(q_num)s question tagged %(tagname)s\n" +"\t\t\thave total %(q_num)s questions tagged %(tagname)s\n" "\t\t\t" msgid_plural "" "\n" @@ -1736,15 +1728,15 @@ msgstr[0] "ver preguntas etiquetadas '%(tagname)s'" msgstr[1] "ver pregunta etiquetada '%(tagname)s'" #: templates/questions.html:116 -#, python-format +#, fuzzy, python-format msgid "" "\n" -"\t\t\thave total %(q_num)s question containing %(searchtitle)s\n" -"\t\t\t" +"\t\t\t\thave total %(q_num)s questions containing %(searchtitle)s\n" +"\t\t\t\t" msgid_plural "" "\n" -"\t\t\thave total %(q_num)s questions containing %(searchtitle)s\n" -"\t\t\t" +"\t\t\t\thave total %(q_num)s questions containing %(searchtitle)s\n" +"\t\t\t\t" msgstr[0] "" "\n" "\t\t\thay un total de %(q_num)s preguntas que contienen %(searchtitle)s\n" @@ -1754,37 +1746,49 @@ msgstr[1] "" "\t\t\thay un total de %(q_num)s pregunta que contiene %(searchtitle)s\n" "\t\t\t" -#: templates/questions.html:124 +#: templates/questions.html:122 +#, fuzzy, python-format +msgid "" +"\n" +"\t\t\t\thave total %(q_num)s questions\n" +"\t\t\t\t" +msgid_plural "" +"\n" +"\t\t\t\thave total %(q_num)s questions\n" +"\t\t\t\t" +msgstr[0] "ver preguntas etiquetadas '%(tagname)s'" +msgstr[1] "ver pregunta etiquetada '%(tagname)s'" + +#: templates/questions.html:131 msgid "latest questions info" msgstr "<strong>Más recientes</strong> preguntas son mostradas primero." -#: templates/questions.html:128 +#: templates/questions.html:135 msgid "Questions are sorted by the <strong>time of last update</strong>." msgstr "" "Las preguntas estan ordenadas por <strong>fecha de último update</strong>." -#: templates/questions.html:129 +#: templates/questions.html:136 msgid "Most recently answered ones are shown first." msgstr "Las más recientemente respondidas son mostradas primero." -#: templates/questions.html:133 +#: templates/questions.html:140 msgid "Questions sorted by <strong>number of responses</strong>." msgstr "Preguntas ordenadas por <strong>número de respuestas</strong>." -#: templates/questions.html:134 +#: templates/questions.html:141 msgid "Most answered questions are shown first." msgstr "Preguntas más respondidas aparecen primero." -#: templates/questions.html:138 +#: templates/questions.html:145 msgid "Questions are sorted by the <strong>number of votes</strong>." msgstr "Las preguntas son ordenadas por el <strong>número de votos</strong>." -#: templates/questions.html:139 +#: templates/questions.html:146 msgid "Most voted questions are shown first." msgstr "Las preguntas más votadas son mostradas primero." -#: templates/questions.html:146 templates/unanswered.html:105 -#: templates/tough/unanswered.html:101 +#: templates/questions.html:153 templates/unanswered.html:105 msgid "Related tags" msgstr "Etiquetas relacionadas" @@ -1854,7 +1858,6 @@ msgid "Nothing found" msgstr "Nada encontrado" #: templates/unanswered.html:7 templates/unanswered.html.py:18 -#: templates/tough/unanswered.html:5 templates/tough/unanswered.html.py:16 msgid "Unanswered questions" msgstr "Preguntas sin respuesta" @@ -1925,14 +1928,41 @@ msgstr "edad" msgid "age unit" msgstr "unidad de edad" -#: templates/user_info.html:75 +#: templates/user_info.html:76 msgid "todays unused votes" msgstr "votos de hoy no usados" -#: templates/user_info.html:76 +#: templates/user_info.html:77 msgid "votes left" msgstr "votos restantes" +#: templates/user_preferences.html:10 +msgid "Connect with Twitter" +msgstr "" + +#: templates/user_preferences.html:12 +#, fuzzy +msgid "Twitter account name:" +msgstr "Esta cuenta esta inactiva." + +#: templates/user_preferences.html:14 +#, fuzzy +msgid "Twitter password:" +msgstr "Nueva contraseña" + +#: templates/user_preferences.html:16 +msgid "Send my Questions to Twitter" +msgstr "" + +#: templates/user_preferences.html:17 +msgid "Send my Answers to Twitter" +msgstr "" + +#: templates/user_preferences.html:18 +#, fuzzy +msgid "Save" +msgstr "Guardar la edición" + #: templates/user_stats.html:15 msgid "User questions" msgstr "Preguntas del usuario" @@ -1989,7 +2019,7 @@ msgstr "historial de reputación" msgid "favorites" msgstr "favoritos" -#: templates/user_tabs.html:29 +#: templates/user_tabs.html:28 msgid "settings" msgstr "preferencias" @@ -2026,118 +2056,152 @@ msgstr "esta pregunta ha sido seleccionada como favorita" msgid "this answer has been accepted to be correct" msgstr "esta respuesta ha sido aceptada como correcta" -#: templates/authopenid/changeemail.html:6 -msgid "Account: change email" -msgstr "Cuenta: cambiar el email" +#: templates/authopenid/changeemail.html:7 +#: templates/authopenid/changeemail.html:33 +msgid "Change email" +msgstr "Cambiar dirección email" -#: templates/authopenid/changeemail.html:9 -msgid "" -"This is where you can change the email address associated with your account. " -"Please keep this email address up to date so we can send you a password-" -"reset email if you request one." -msgstr "" -"Aquí es donde puedes cambiar el email asociado a tu cuenta de usuario.Por " -"favor manten esta dirección de correo al día de forma que podamos mandarte " -"un cambio de contraseña si tu así lo requieres." - -#: templates/authopenid/changeemail.html:11 -#: templates/authopenid/changeopenid.html:13 -#: templates/authopenid/changepw.html:18 templates/authopenid/delete.html:14 -#: templates/authopenid/delete.html:24 +#: templates/authopenid/changeemail.html:10 +#, fuzzy, python-format +msgid "change %(email)s info" +msgstr "Cambiar email " + +#: templates/authopenid/changeemail.html:13 +#: templates/authopenid/changeopenid.html:14 +#: templates/authopenid/changepw.html:19 templates/authopenid/delete.html:15 +#: templates/authopenid/delete.html:25 msgid "Please correct errors below:" msgstr "Por favor corrija los errores debajo: " -#: templates/authopenid/changeemail.html:28 -msgid "Email" -msgstr "Email" +#: templates/authopenid/changeemail.html:30 +msgid "Your new Email" +msgstr "" -#: templates/authopenid/changeemail.html:29 -#: templates/authopenid/signin.html:60 +#: templates/authopenid/changeemail.html:31 +#: templates/authopenid/signin.html:138 msgid "Password" msgstr "Contraseña" -#: templates/authopenid/changeemail.html:31 -msgid "Change email" +#: templates/authopenid/changeemail.html:42 +#, fuzzy +msgid "Validate email" msgstr "Cambiar dirección email" -#: templates/authopenid/changeopenid.html:7 +#: templates/authopenid/changeemail.html:45 +#, python-format +msgid "validate %(email)s info" +msgstr "" + +#: templates/authopenid/changeemail.html:50 +#, fuzzy +msgid "Email not changed" +msgstr "Email modificado." + +#: templates/authopenid/changeemail.html:53 +#, python-format +msgid "old %(email)s kept" +msgstr "" + +#: templates/authopenid/changeemail.html:58 +#, fuzzy +msgid "Email changed" +msgstr "Email modificado." + +#: templates/authopenid/changeemail.html:61 +#, python-format +msgid "your current %(email)s can be used for this" +msgstr "" + +#: templates/authopenid/changeemail.html:66 +msgid "Email verified" +msgstr "" + +#: templates/authopenid/changeemail.html:69 +msgid "thanks for verifying email" +msgstr "" + +#: templates/authopenid/changeemail.html:74 +msgid "email key not sent" +msgstr "" + +#: templates/authopenid/changeemail.html:77 +#, python-format +msgid "email key not sent %(email)s change email here %(change_link)s" +msgstr "" + +#: templates/authopenid/changeopenid.html:8 msgid "Account: change OpenID URL" msgstr "Cuenta: cambiar la URL de OpenID" -#: templates/authopenid/changeopenid.html:11 +#: templates/authopenid/changeopenid.html:12 msgid "" "This is where you can change your OpenID URL. Make sure you remember it!" msgstr "Aquí es donde puedes cambiar tu OpenID URL. Asegurate de recordarla!" -#: templates/authopenid/changeopenid.html:28 +#: templates/authopenid/changeopenid.html:29 msgid "OpenID URL:" msgstr "URL de OpenID:" -#: templates/authopenid/changeopenid.html:29 +#: templates/authopenid/changeopenid.html:30 msgid "Change OpenID" msgstr "Cambiar OpenID" -#: templates/authopenid/changepw.html:13 +#: templates/authopenid/changepw.html:14 msgid "Account: change password" msgstr "Cuenta: cambiar contraseña" -#: templates/authopenid/changepw.html:16 +#: templates/authopenid/changepw.html:17 msgid "This is where you can change your password. Make sure you remember it!" msgstr "Aquí es donde puedes cambiar tu contraseña. Asegurate de recordarlo!" -#: templates/authopenid/changepw.html:26 +#: templates/authopenid/changepw.html:27 msgid "Current password" msgstr "Contraseña actual" -#: templates/authopenid/changepw.html:27 +#: templates/authopenid/changepw.html:28 msgid "New password" msgstr "Nueva contraseña" -#: templates/authopenid/changepw.html:28 +#: templates/authopenid/changepw.html:29 msgid "New password again" msgstr "Nueva contraseña nuevamente" -#: templates/authopenid/changepw.html:29 templates/authopenid/settings.html:28 +#: templates/authopenid/changepw.html:30 templates/authopenid/settings.html:29 msgid "Change password" msgstr "Cambiar contraseña" -#: templates/authopenid/complete.html:4 +#: templates/authopenid/complete.html:5 msgid "Connect your OpenID with this site" msgstr "Vincular tu OpenID con este sitio" -#: templates/authopenid/complete.html:7 +#: templates/authopenid/complete.html:8 msgid "Connect your OpenID with your account on this site" msgstr "Vincular tu OpenID con tu cuenta en este sitio" -#: templates/authopenid/complete.html:10 -msgid "Your OpenID is accepted. Please complete this to finish registration." +#: templates/authopenid/complete.html:12 +#, python-format +msgid "register new %(provider)s account info" msgstr "" -"Tu OpenID es aceptada. Por favor completa lo siguiente para finalizar el " -"registro." -#: templates/authopenid/complete.html:11 +#: templates/authopenid/complete.html:14 msgid "This account already exists, please use another." msgstr "Esta cuenta ya existe, por favor usar otra." -#: templates/authopenid/complete.html:16 templates/authopenid/complete.html:29 -#: templates/authopenid/signin.html:43 +#: templates/authopenid/complete.html:19 templates/authopenid/complete.html:32 +#: templates/authopenid/signin.html:121 msgid "Sorry, looks like we have some errors:" msgstr "Ups, parece que hay errores:" -#: templates/authopenid/complete.html:45 -msgid "New account" -msgstr "Nueva cuenta" - -#: templates/authopenid/complete.html:46 -msgid "User name (<i>will be shown to others, cannot be modified</i>)" -msgstr "" -"Nombre de usuario (<i>será mostrado a otros, no puede ser modificado</i>)" - #: templates/authopenid/complete.html:47 -msgid "Email (<i>not shared with anyone</i>)" -msgstr "Email (<i>no será compartido con nadie</i>)" +msgid "Screen name label" +msgstr "" #: templates/authopenid/complete.html:48 +#, fuzzy +msgid "Email address label" +msgstr "su email (correo electrónico)" + +#: templates/authopenid/complete.html:49 msgid "create account" msgstr "crear cuenta" @@ -2157,15 +2221,46 @@ msgstr "contraseña" msgid "Register" msgstr "Registrarse" -#: templates/authopenid/complete.html:62 templates/authopenid/signin.html:62 +#: templates/authopenid/complete.html:62 templates/authopenid/signin.html:140 msgid "Forgot your password?" msgstr "¿Olvidaste tu contraseña?" -#: templates/authopenid/delete.html:8 +#: templates/authopenid/confirm_email.txt:2 +msgid "Thank you for registering at our Q&A forum!" +msgstr "" + +#: templates/authopenid/confirm_email.txt:4 +msgid "Your account details are:" +msgstr "" + +#: templates/authopenid/confirm_email.txt:6 +#: templates/authopenid/sendpw_email.txt:7 +#, fuzzy +msgid "Username:" +msgstr "Nombre de usuario" + +#: templates/authopenid/confirm_email.txt:7 +#: templates/authopenid/delete.html:20 +msgid "Password:" +msgstr "Contraseña" + +#: templates/authopenid/confirm_email.txt:9 +msgid "Please sign in here:" +msgstr "" + +#: templates/authopenid/confirm_email.txt:12 +#: templates/authopenid/email_validation.txt:14 +#: templates/authopenid/sendpw_email.txt:13 +msgid "" +"Sincerely,\n" +"Forum Administrator" +msgstr "" + +#: templates/authopenid/delete.html:9 msgid "Account: delete account" msgstr "Cuenta: borrar cuenta" -#: templates/authopenid/delete.html:12 +#: templates/authopenid/delete.html:13 msgid "" "Note: After deleting your account, anyone will be able to register this " "username." @@ -2173,39 +2268,54 @@ msgstr "" "Nota: Luego de borrar tu cuenta, cualquiera podrá registrarse con este " "nombre de usuario." -#: templates/authopenid/delete.html:16 +#: templates/authopenid/delete.html:17 msgid "Check confirm box, if you want delete your account." msgstr "Marca caja de confirmación, si deseas borrar tu cuenta." -#: templates/authopenid/delete.html:19 -msgid "Password:" -msgstr "Contraseña" - -#: templates/authopenid/delete.html:31 +#: templates/authopenid/delete.html:32 msgid "I am sure I want to delete my account." msgstr "Estoy seguro que quiero borrar mi cuenta." -#: templates/authopenid/delete.html:32 +#: templates/authopenid/delete.html:33 msgid "Password/OpenID URL" msgstr "Contraseña/OpenID URL" -#: templates/authopenid/delete.html:32 +#: templates/authopenid/delete.html:33 msgid "(required for your security)" msgstr "(requerido por tu seguridad)" -#: templates/authopenid/delete.html:34 +#: templates/authopenid/delete.html:35 msgid "Delete account permanently" msgstr "Borrar la cuenta de forma permanente" -#: templates/authopenid/sendpw.html:3 templates/authopenid/sendpw.html.py:7 +#: templates/authopenid/email_validation.txt:2 +msgid "Greetings from the Q&A forum" +msgstr "" + +#: templates/authopenid/email_validation.txt:4 +msgid "To make use of the Forum, please follow the link below:" +msgstr "" + +#: templates/authopenid/email_validation.txt:8 +msgid "Following the link above will help us verify your email address." +msgstr "" + +#: templates/authopenid/email_validation.txt:10 +msgid "" +"If you beleive that this message was sent in mistake - \n" +"no further action is needed. Just ingore this email, we apologize\n" +"for any inconvenience" +msgstr "" + +#: templates/authopenid/sendpw.html:4 templates/authopenid/sendpw.html.py:8 msgid "Send new password" msgstr "Enviar nueva contraseña" -#: templates/authopenid/sendpw.html:11 +#: templates/authopenid/sendpw.html:12 msgid "Lost your password? No problem - here you can reset it." msgstr "¿Haz perdido tu contraseña? No hay problema - aquí puedes re-crearla." -#: templates/authopenid/sendpw.html:12 +#: templates/authopenid/sendpw.html:13 msgid "" "Please enter your username below and new password will be sent to your " "registered e-mail" @@ -2213,15 +2323,19 @@ msgstr "" "Por favor, ingresa tu nombre de usuario y una nueva contraseña será enviada " "a la dirección de email registrada." -#: templates/authopenid/sendpw.html:29 +#: templates/authopenid/sendpw.html:28 +msgid "User name" +msgstr "Nombre de usuario" + +#: templates/authopenid/sendpw.html:30 msgid "Reset password" msgstr "Re-crear contraseña" -#: templates/authopenid/sendpw.html:29 +#: templates/authopenid/sendpw.html:30 msgid "return to login" msgstr "volver a 'Ingresar'" -#: templates/authopenid/sendpw.html:32 +#: templates/authopenid/sendpw.html:33 msgid "" "Note: your new password will be activated only after you click the " "activation link in the email message" @@ -2229,104 +2343,146 @@ msgstr "" "Nota: tu nueva contraseña solo será activada luego de que hagas click en el " "link de activación en el email enviado." -#: templates/authopenid/settings.html:29 +#: templates/authopenid/sendpw_email.txt:2 +#, python-format +msgid "" +"Someone has requested to reset your password on %(site_url)s.\n" +"If it were not you, it is safe to ignore this email." +msgstr "" + +#: templates/authopenid/sendpw_email.txt:5 +msgid "Your new account details are:" +msgstr "" + +#: templates/authopenid/sendpw_email.txt:8 +#, fuzzy +msgid "New password:" +msgstr "Nueva contraseña" + +#: templates/authopenid/sendpw_email.txt:10 +msgid "To confirm that you wanted to reset your password please visit:" +msgstr "" + +#: templates/authopenid/settings.html:30 msgid "Give your account a new password." msgstr "Crea una nueva contraseña para tu cuenta." -#: templates/authopenid/settings.html:30 +#: templates/authopenid/settings.html:31 msgid "Change email " msgstr "Cambiar email " -#: templates/authopenid/settings.html:31 +#: templates/authopenid/settings.html:32 msgid "Add or update the email address associated with your account." msgstr "Agrega o actualiza el email asociado a tu cuenta." -#: templates/authopenid/settings.html:34 +#: templates/authopenid/settings.html:35 msgid "Change openid associated to your account" msgstr "Cambia el OpenID asociado a tu cuenta" -#: templates/authopenid/settings.html:37 +#: templates/authopenid/settings.html:38 msgid "Delete account" msgstr "Eliminar cuenta" -#: templates/authopenid/settings.html:38 +#: templates/authopenid/settings.html:39 msgid "Erase your username and all your data from website" msgstr "Eliminar tu nombre de usuario y toda tu información del sitio" -#: templates/authopenid/signin.html:3 templates/authopenid/signin.html:16 +#: templates/authopenid/signin.html:4 templates/authopenid/signin.html:21 msgid "User login" msgstr "Ingreso de usuario" -#: templates/authopenid/signin.html:21 -msgid "we support two login modes" +#: templates/authopenid/signin.html:28 +#, python-format +msgid "" +"\n" +" Your answer to %(title)s %(summary)s will be posted once you " +"log in\n" +" " msgstr "" -"Puedes ingresar por cualquiera de los siguientes servicios, o " -"tradicionalmente- usando nombre de usuario y contraseña locales" -#: templates/authopenid/signin.html:26 templates/authopenid/signup.html:49 -msgid "Login with your OpenID" -msgstr "Ingresar con tu OpenID" +#: templates/authopenid/signin.html:35 +#, python-format +msgid "" +"Your question \n" +" %(title)s %(summary)s will be posted once you log in\n" +" " +msgstr "" -#: templates/authopenid/signin.html:28 -msgid "select openid provider" -msgstr "1) Selecciona tu proveedor de OpenID" +#: templates/authopenid/signin.html:40 +msgid "Click to sign in through any of these services." +msgstr "" -#: templates/authopenid/signin.html:32 -msgid "verify openid link and login" +#: templates/authopenid/signin.html:103 +msgid "Enter your <span id=\"enter_your_what\">Provider user name</span>" msgstr "" -"2) Varifica la URL de tu OpenID (escribe tu nombre de usuario donde dice " -"{nombre de usuario} si lo ves) y luego clickea 'ingresar'" -#: templates/authopenid/signin.html:58 +#: templates/authopenid/signin.html:110 +msgid "" +"Enter your <a class=\"openid_logo\" href=\"http://openid.net\">OpenID</a> " +"web address" +msgstr "" + +#: templates/authopenid/signin.html:112 templates/authopenid/signin.html:139 +msgid "Login" +msgstr "Ingresar" + +#: templates/authopenid/signin.html:116 +msgid "we support two login modes" +msgstr "" +"Puedes ingresar por cualquiera de los siguientes servicios, o " +"tradicionalmente- usando nombre de usuario y contraseña locales" + +#: templates/authopenid/signin.html:136 msgid "Use login name and password" msgstr "Nombre de usuario y contraseña" -#: templates/authopenid/signin.html:59 +#: templates/authopenid/signin.html:137 msgid "Login name" msgstr "Nombre de usuario" -#: templates/authopenid/signin.html:63 -msgid "Create new acccount" +#: templates/authopenid/signin.html:141 +#, fuzzy +msgid "Create new account" msgstr "Crear cuenta nueva" -#: templates/authopenid/signin.html:72 +#: templates/authopenid/signin.html:150 msgid "Why use OpenID?" msgstr "¿Porqué usar OpenID?" -#: templates/authopenid/signin.html:76 +#: templates/authopenid/signin.html:154 msgid "with openid it is easier" msgstr "Con OpenID no necesitas crear un nuevo nombre de usuario y contraseña." -#: templates/authopenid/signin.html:79 +#: templates/authopenid/signin.html:157 msgid "reuse openid" msgstr "" "Puedes de forma segura re-usar el mismo nombre de usuario para todos los " "sitios que acepten OpenID." -#: templates/authopenid/signin.html:82 +#: templates/authopenid/signin.html:160 msgid "openid is widely adopted" msgstr "" "OpenID es extensamente usado. Hay más de 160,000,000 cuentas de OpenID en " "uso en el mundo. Mas de 10,000 sitios aceptan OpenID." -#: templates/authopenid/signin.html:85 +#: templates/authopenid/signin.html:163 msgid "openid is supported open standard" msgstr "" "OpenID es basado en un standard abierto, apoyado por muchas organizaciones." -#: templates/authopenid/signin.html:89 +#: templates/authopenid/signin.html:167 msgid "Find out more" msgstr "Averigua más" -#: templates/authopenid/signin.html:90 +#: templates/authopenid/signin.html:168 msgid "Get OpenID" msgstr "Adquiere una OpenID" -#: templates/authopenid/signup.html:2 templates/authopenid/signup.html.py:6 +#: templates/authopenid/signup.html:4 templates/authopenid/signup.html.py:8 msgid "Signup" msgstr "Registrate" -#: templates/authopenid/signup.html:10 +#: templates/authopenid/signup.html:12 msgid "" "We support two types of user registration: conventional username/password, " "and" @@ -2334,66 +2490,195 @@ msgstr "" "Soportamos dos formas de registro de usuario: convencional usuario/" "contraseña, y" -#: templates/authopenid/signup.html:10 +#: templates/authopenid/signup.html:12 msgid "the OpenID method" msgstr "OpenID" -#: templates/authopenid/signup.html:15 +#: templates/authopenid/signup.html:17 msgid "Sorry, looks like we have some errors" msgstr "Ups, parece que hay errores." -#: templates/authopenid/signup.html:33 +#: templates/authopenid/signup.html:35 msgid "Conventional registration" msgstr "Registro clásico" -#: templates/authopenid/signup.html:34 +#: templates/authopenid/signup.html:36 msgid "choose a user name" msgstr "elije un nombre de usuario" -#: templates/authopenid/signup.html:40 +#: templates/authopenid/signup.html:42 msgid "back to login" msgstr "volver al ingreso de usuario" -#: templates/authopenid/signup.html:46 +#: templates/authopenid/signup.html:48 msgid "Register with your OpenID" msgstr "Registrate con tu OpenID" -#: templates/tough/question_retag.html:2 -msgid "Revise tags" -msgstr "Revisar etiquetas" +#: templates/authopenid/signup.html:51 +msgid "Login with your OpenID" +msgstr "Ingresar con tu OpenID" -#: templates/tough/question_retag.html:37 -msgid "tags are requried" -msgstr "las etiquetas son requeridas" +#~ msgid "site slogan" +#~ msgstr " slogan del sitio" -#: templates/tough/question_retag.html:38 -msgid "up to 5 tags, less than 20 characters each" -msgstr "hasta 5 etiquetas, menos de 20 caracteres cada una" +#~ msgid "meta site content" +#~ msgstr "meta descripción" -#: templates/tough/question_retag.html:51 -msgid "Change tags" -msgstr "Cambiar etiquetas" +#~ msgid "copyright message" +#~ msgstr "mensaje de copyright" -#: templates/tough/question_retag.html:74 -msgid "Change now" -msgstr "Cambiar ahora" +#~ msgid "" +#~ "please use space to separate tags (this enables autocomplete feature)" +#~ msgstr "" +#~ "por favor utilice espacio para separar las etiquetas (esto habilitael " +#~ "auto-completado)" -#: templates/tough/question_retag.html:85 -msgid "Why use and modify tags?" -msgstr "¿Porqué usar y modificar etiquetas?" +#~ msgid "Use" +#~ msgstr "Usar" -#: templates/tough/question_retag.html:96 -msgid "tag editors receive special awards from the community" -msgstr "" -"los editores de etiquetas reciben distinciones especiales de la comunidad" +#~ msgid "learn more about OpenID" +#~ msgstr "aprender mas sobre OpenID" + +#~ msgid "Get your own " +#~ msgstr "Obtiene tu propio " + +#~ msgid "Email: (won't be shown to anyone)" +#~ msgstr "Email: (no será mostrado a nadie)" + +#, fuzzy +#~ msgid "Congratulations! You have new badges: " +#~ msgstr "felicitaciones, la comunidad te ha otorgado una distinción" + +#, fuzzy +#~ msgid "go to see" +#~ msgstr "OK para cerrar" + +#~ msgid "congratulations, community gave you a badge" +#~ msgstr "felicitaciones, la comunidad te ha otorgado una distinción" + +#~ msgid "see" +#~ msgstr "ver" + +#~ msgid "profile" +#~ msgstr "perfil" + +#~ msgid "" +#~ "Anyone can ask questions and give answers, points are not necessary for " +#~ "that." +#~ msgstr "" +#~ "Cualquier usuario puede hacer preguntas y dar respuestas, no es necesario " +#~ "tener reputación para ello." + +#~ msgid "" +#~ "As we've said before, users help running this site. Point system helps " +#~ "select users who can administer this community." +#~ msgstr "" +#~ "Como dijimos antes, los usuarios ayudan a crear este sitio. El sistema de " +#~ "reputación permite seleccionar usuarios que pueden moderar esta comunidad." + +#~ msgid "" +#~ "Reputation points roughly measure how community trusts you. These points " +#~ "are given to you directly by other members of the community." +#~ msgstr "" +#~ "Los puntos de reputación miden a groso modo que tan respetado eres en la " +#~ "comunidad. Los puntos son dados a ti directamente por otros miembros de " +#~ "la comunidad" + +#~ msgid "" +#~ "For example, if you ask an interesting question or give a helpful answer, " +#~ "your input will be upvoted and you will gain more trust in the community." +#~ msgstr "" +#~ "Por ejemplo, si haces una pregunta interesante, o das una respuesta " +#~ "valiosa, tu entrada va a ser votada positivamente y tu ganarás confianza " +#~ "en la comunidad." + +#~ msgid "" +#~ "If on the other hand someone gives a misleading answer, the answer will " +#~ "be voted down and he/she loses some points." +#~ msgstr "" +#~ "Si por el contrario, alguien da una respuesta que no corresponde, la " +#~ "respuesta será votada negativamente y el usuario perderá puntos." + +#~ msgid "" +#~ "Each vote in favor will generate <strong>10</strong> points, each vote " +#~ "against will subtract <strong>2</strong> points." +#~ msgstr "" +#~ "Cada voto a favor generará <strong>10</strong> puntos, cada voto negativo " +#~ "restará <strong>2</strong> puntos." -#: templates/tough/unanswered.html:95 -msgid "number of <strong>unanswered</strong> questions" -msgstr "número de respuestas <strong>sin responder</strong>" +#~ msgid "" +#~ "Through the votes of other people you can accumulate a maximum of " +#~ "<strong>200</strong> points." +#~ msgstr "" +#~ "A través del voto de otras personas puedes acumular un máximo de " +#~ "<strong>200</strong> puntos." + +#~ msgid "After accumulating certain number of points, you can do more:" +#~ msgstr "" +#~ "Luego de haber acumulado cierta cantidad de puntos, puedes hacer más:" + +#~ msgid "meta site keywords, comma separated" +#~ msgstr "palabras claves" + +#~ msgid "what is this website" +#~ msgstr "que es este sitio" + +#~ msgid "what can one do on this website" +#~ msgstr "que puede uno hacer en este sitio" + +#~ msgid "Login to answer" +#~ msgstr "Ingresa para responder" + +#~ msgid "Account: change email" +#~ msgstr "Cuenta: cambiar el email" + +#~ msgid "" +#~ "This is where you can change the email address associated with your " +#~ "account. Please keep this email address up to date so we can send you a " +#~ "password-reset email if you request one." +#~ msgstr "" +#~ "Aquí es donde puedes cambiar el email asociado a tu cuenta de usuario.Por " +#~ "favor manten esta dirección de correo al día de forma que podamos " +#~ "mandarte un cambio de contraseña si tu así lo requieres." + +#~ msgid "Email" +#~ msgstr "Email" -#~ msgid "Community gives you awards for your questions, answers and votes." +#~ msgid "" +#~ "Your OpenID is accepted. Please complete this to finish registration." #~ msgstr "" -#~ "La comunidad te da distinciones por tus preguntas, respuestas y votos." +#~ "Tu OpenID es aceptada. Por favor completa lo siguiente para finalizar el " +#~ "registro." + +#~ msgid "New account" +#~ msgstr "Nueva cuenta" + +#~ msgid "User name (<i>will be shown to others, cannot be modified</i>)" +#~ msgstr "" +#~ "Nombre de usuario (<i>será mostrado a otros, no puede ser modificado</i>)" + +#~ msgid "Email (<i>not shared with anyone</i>)" +#~ msgstr "Email (<i>no será compartido con nadie</i>)" + +#~ msgid "select openid provider" +#~ msgstr "1) Selecciona tu proveedor de OpenID" + +#~ msgid "verify openid link and login" +#~ msgstr "" +#~ "2) Varifica la URL de tu OpenID (escribe tu nombre de usuario donde dice " +#~ "{nombre de usuario} si lo ves) y luego clickea 'ingresar'" + +#~ msgid "Revise tags" +#~ msgstr "Revisar etiquetas" + +#~ msgid "tags are requried" +#~ msgstr "las etiquetas son requeridas" + +#~ msgid "Change now" +#~ msgstr "Cambiar ahora" + +#~ msgid "number of <strong>unanswered</strong> questions" +#~ msgstr "número de respuestas <strong>sin responder</strong>" # #~ msgid "editing tips" diff --git a/locale/zh_CN/LC_MESSAGES/django.mo b/locale/zh_CN/LC_MESSAGES/django.mo Binary files differdeleted file mode 100644 index cfcea03d..00000000 --- a/locale/zh_CN/LC_MESSAGES/django.mo +++ /dev/null diff --git a/locale/zh_CN/LC_MESSAGES/django.po b/locale/zh_CN/LC_MESSAGES/django.po index a34a35f2..4d8524b6 100644 --- a/locale/zh_CN/LC_MESSAGES/django.po +++ b/locale/zh_CN/LC_MESSAGES/django.po @@ -379,7 +379,7 @@ msgstr "多个标签请用空格间隔-最多5个标签。(优先使用自动 #: forum/forms.py:53 msgid "tags are required" -msgstr "标签不能为空。" +msgstr " 标签不能为空。" #: forum/forms.py:57 msgid "please use 5 tags or less" @@ -692,6 +692,9 @@ msgstr "预览开关" msgid "Save edit" msgstr "现在修改" +msgid "Save" +msgstr "保存" + #: templates/answer_edit.html:74 templates/close.html:29 #: templates/question_edit.html:120 templates/reopen.html:30 #: templates/user_edit.html:83 @@ -762,18 +765,16 @@ msgid "Community badges" msgstr "社区奖牌" #: templates/badges.html:53 -#, fuzzy -msgid "" +msgid "gold badge description" "Gold badge is very rare. To obtain it you have to show profound knowledge " "and ability in addition to actively participating in the community. Gold " "badge is the highest award in this community." msgstr "" -"你不仅要参与社区的提问、回答、投票等活动,而且需要有高深的知识和能力才能获" +"金牌是十分罕见的。你不仅要参与社区的提问、回答、投票等活动,而且需要有高深的知识和能力才能获" "得。" #: templates/badges.html:61 -#, fuzzy -msgid "" +msgid "silver badge description" "Obtaining silver badge requires significant patience. If you got one, you've " "very significantly contributed to this community" msgstr "它是不同寻常的荣誉,只要你付出足够的努力就会得到。" @@ -782,9 +783,24 @@ msgstr "它是不同寻常的荣誉,只要你付出足够的努力就会得到 msgid "bronze badge: often given as a special honor" msgstr "铜牌:时常授予之特殊荣誉" +msgid "Connect with Twitter" +msgstr "同步Twitter消息" + +msgid "Twitter account name:" +msgstr "账号:" + +msgid "Twitter password:" +msgstr "密码:" + +msgid "Send my Questions to Twitter" +msgstr "发布我的提问到我的Twitter" + +msgid "Send my Answers to Twitter" +msgstr "发布我的回答到我的Twitter" + #: templates/badges.html:68 #, fuzzy -msgid "" +msgid "bronze badge description" "If you are active in this community, you will get this medal - still it is a " "special honor." msgstr "铜牌会在你活跃于社区时产生,它相对容易获得,但也是一种特殊的荣誉。" @@ -1660,6 +1676,9 @@ msgstr "用户投的反对票总数" msgid "Tags" msgstr "个标签" +msgid "Tags help us keep Questions organized" +msgstr "CNProg用标签来分类系统的信息" + #: templates/user_stats.html:94 #, fuzzy, python-format msgid "see other questions tagged '%(tag)s' " diff --git a/settings.py b/settings.py index e2d384c1..fac3c0d5 100644 --- a/settings.py +++ b/settings.py @@ -17,8 +17,9 @@ ADMINS = ( ) MANAGERS = ADMINS +#email server settings SERVER_EMAIL = '' -DEFAULT_FROM_EMAIL = '' +DEFAULT_FROM_EMAIL = 'team@cnprog.com' EMAIL_HOST_USER = '' EMAIL_HOST_PASSWORD = '' EMAIL_SUBJECT_PREFIX = '[cnprog.com]' @@ -31,12 +32,12 @@ TIME_ZONE = 'Asia/Chongqing Asia/Chungking' # LANGUAGE_CODE = 'en-us' SITE_ID = 1 -#OTHER SETTINS +#OTHER SETTINGS APP_TITLE = u'CNProg.com 程序员问答社区' -APP_URL = 'http://www.cnprog.com' APP_KEYWORDS = u'技术问答社区,中国程序员,编程技术社区,程序员社区,程序员论坛,程序员wiki,程序员博客' APP_DESCRIPTION = u'中国程序员的编程技术问答社区。我们做专业的、可协作编辑的技术问答社区。' APP_INTRO = u' <p>CNProg是一个<strong>面向程序员</strong>的可协作编辑的<strong>开放源代码问答社区</strong>。</p><p> 您可以在这里提问各类<strong>程序技术问题</strong> - 问题不分语言和平台。 同时也希望您对力所能及的问题,给予您的宝贵答案。</p>' +APP_COPYRIGHT = 'Copyright CNPROG.COM 2009' ADMIN_MEDIA_PREFIX = '/admin/media/' SECRET_KEY = '$oo^&_m&qwbib=(_4m_n*zn-d=g#s0he5fx9xonnym#8p6yigm' # List of callables that know how to import templates from various sources. @@ -60,7 +61,7 @@ MIDDLEWARE_CLASSES = ( TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.request', - 'django.core.context_processors.auth', + 'context.auth_processor', 'context.application_settings', #'django.core.context_processors.i18n', ) @@ -98,3 +99,9 @@ from settings_local import * USE_I18N = True LANGUAGE_CODE = 'en' +EMAIL_VALIDATION = 'off' +MIN_USERNAME_LENGTH = 1 +EMAIL_UNIQUE = False +APP_URL = 'http://server.com' #used by email notif system and RSS +GOOGLE_SITEMAP_CODE = '55uGNnQVJW8p1bbXeF/Xbh9I7nZBM/wLhRz6N/I1kkA=' +GOOGLE_ANALYTICS_KEY = '' diff --git a/templates/404.html b/templates/404.html index d24edaf0..cd23a36b 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1,5 +1,5 @@ -<!-- template 404.html --> {% extends "base_content.html" %} +<!-- template 404.html --> {% load i18n %} {% block title %}{% spaceless %}404 Error{% endspaceless %}{% endblock %} {% block forestyle%} diff --git a/templates/500.html b/templates/500.html index c99774b3..52dcafae 100644 --- a/templates/500.html +++ b/templates/500.html @@ -1,5 +1,5 @@ -<!-- template 500.html --> {% extends "base_content.html" %} +<!-- template 500.html --> {% load i18n %} {% block title %}{% spaceless %}500 Error{% endspaceless %}{% endblock %} {% block forejs %} @@ -19,7 +19,7 @@ </div> <div id="main-body" class="headNormal"> <div style="padding:5px 0px 10px 0;line-height:25px"> - <h3>{% trans "sorry, system error"</h3> + <h3>{% trans "sorry, system error" %}</h3> <br> {% trans "system error log is recorded, error will be fixed as soon as possible" %}<br> {% trans "please report the error to the site administrators if you wish" %} diff --git a/templates/answer_edit.html b/templates/answer_edit.html index 008d9f78..9f0f1bec 100644 --- a/templates/answer_edit.html +++ b/templates/answer_edit.html @@ -1,5 +1,5 @@ -<!-- template answer_edit.html --> {% extends "base.html" %} +<!-- template answer_edit.html --> {% load i18n %} {% block title %}{% spaceless %}{% trans "Edit answer" %}{% endspaceless %}{% endblock %} {% block forejs %} diff --git a/templates/answer_edit_tips.html b/templates/answer_edit_tips.html index 565c5298..31f71e34 100644 --- a/templates/answer_edit_tips.html +++ b/templates/answer_edit_tips.html @@ -35,7 +35,7 @@ </li> <li> - <b>{% trans "image" %}</b>:![alt {% trans "text" %}](/path/img.jpg "{% trans "title" %}") + <b>{% trans "image" %}</b>:![alt {% trans "text" %}](/path/img.jpg "{% trans "title" %}") </li> <li> diff --git a/templates/ask.html b/templates/ask.html index 1b00a701..4aa18dd5 100644 --- a/templates/ask.html +++ b/templates/ask.html @@ -1,5 +1,5 @@ -<!-- template ask.html --> {% extends "base.html" %} +<!-- template ask.html --> {% load i18n %} {% block title %}{% spaceless %}{% trans "Ask a question" %}{% endspaceless %}{% endblock %} {% block forejs %} @@ -62,6 +62,19 @@ <div id="main-body" class="ask-body"> <div id="askform"> <form id="fmask" action="" method="post" > + {% if not request.user.is_authenticated %} + <div class="message"> + <p>{% trans "login to post question info" %}</p> + </div> + {% else %} + {% ifequal settings.EMAIL_VALIDATION 'on' %} + {% if not request.user.email_isvalid %} + <div class="message"> + {% blocktrans with request.user.email as email %}must have valid {{email}} to post{% endblocktrans %} + </div> + {% endif %} + {% endifequal %} + {% endif %} <p class="form-item"> <label for="id_title" ><strong>{{ form.title.label_tag }}:</strong></label> <span class="form-error"></span><br> {{ form.title }} {{ form.title.errors }} @@ -92,40 +105,17 @@ <br> </p> <p class="form-item"> - <strong>{{ form.tags.label_tag }}:</strong> <span class="form-error"></span><br> + <strong>{{ form.tags.label_tag }}:</strong> {% trans "(required)" %} <span class="form-error"></span><br> {{ form.tags }} {{ form.tags.errors }} - <div class="title-desc"> - {{ form.tags.help_text }} - </div> </p> - <br> + <p class="title-desc"> + {{ form.tags.help_text }} + </p> {% if not request.user.is_authenticated %} - <table id="login-box"> - <tr> - <td style="vertical-align:middle;"> - <strong>{% trans "Use" %} <a href="http://openid.net/" title="{% trans "learn more about OpenID" %}">OpenID</a> {% trans "Login" %}:</strong><br> - {{ form.openid }} - <div class="title-desc"> - {% trans "Get your own "%} <a href="https://www.myopenid.com/" target=="_blank">OpenID</a>。 - </div> - </td> - <td style="vertical-align:middle; padding: 0px 40px 0px 40px"> - <div style="position: absolute; margin-top:40px; background-color:white; margin-left:-10px; padding:5px;">或</div> - <div style="width:1px; border-left:solid 1px #999; height:8em; margin:auto;"></div> - </td> - <td style="vertical-align:middle;"> - <strong>{% trans "User name" %}:</strong><br> - {{ form.user }} - <p> - <strong>{% trans "Email: (won't be shown to anyone)" %}:</strong><br> - {{ form.email }} - </p> - </td> - </tr> - </table> - {% endif %} + <input type="submit" value="{% trans "Login/signup to post your question" %}" class="submit" /> + {% else %} <input type="submit" value="{% trans "Ask your question" %}" class="submit" /> - <br><br> + {% endif %} </form> </div> </div> diff --git a/templates/authopenid/changeemail.html b/templates/authopenid/changeemail.html index 99984b3f..d5acb6c9 100644 --- a/templates/authopenid/changeemail.html +++ b/templates/authopenid/changeemail.html @@ -1,35 +1,81 @@ {% extends "base_content.html" %} {% load i18n %} {% block content %} -<div id="main-bar" class=""> - <h3> - {% trans "Account: change email" %} - </h3> -</div> -<p class="settings-descr">{% blocktrans %}This is where you can change the email address associated with your account. Please keep this email address up to date so we can send you a password-reset email if you request one.{% endblocktrans %}</p> -{% if form.errors %} -<p class="errors">{% trans "Please correct errors below:" %}<br /> - {% if form.email.errors %} - <span class="error">{{ form.email.errors|join:", " }}</span> - {% endif %} - {% if form.password.errors %} - <span class="error">{{ form.password.errors|join:", " }}</span> - {% endif %} -</p> -{% endif %} +<!-- changeemail.html action_type={{action_type}}--> +{% ifequal action_type "change" %} + <div id="main-bar" class="headNormal"> + {% trans "Change email" %} + </div> + <p class="message"> + {% blocktrans %}change {{email}} info{% endblocktrans %} + </p> + {% if form.errors %} + <p class="errors">{% trans "Please correct errors below:" %}<br /> + {% if form.email.errors %} + <span class="error">{{ form.email.errors|join:", " }}</span> + {% endif %} + {% if form.password.errors %} + <span class="error">{{ form.password.errors|join:", " }}</span> + {% endif %} + </p> + {% endif %} -{% if msg %} -<p class="errors">{{ msg }}</p> -{% endif %} + {% if msg %} + <p class="errors">{{ msg }}</p> + {% endif %} -<div class="aligned"> - <form action="." method="post" accept-charset="utf-8"> + <div class="aligned"> + <form action="." method="post" accept-charset="utf-8"> - <div id="form-row"><label for="id_email">{% trans "Email" %}</label>{{ form.email }}</div> - <div id="form-row"><label for="id_password">{% trans "Password" %}</label>{{ form.password }}</div> + <div class="form-row"><label for="id_email">{% trans "Your new Email" %}</label><br>{{ form.email }}</div> + <!--<div class="form-row"><label for="id_password">{% trans "Password" %}</label>{{ form.password }}</div>--> + <div class="submit-row"> + <input class="submit" type="submit" name="change_email" value="{% trans "Change email" %}"> + <input class="submit" type="submit" name="cancel" value="{% trans "Cancel" %}"> + </div> - <p><input type="submit" value="{% trans "Change email" %}"></p> - - </form> - </div> + </form> + </div> +{% endifequal %} +{% ifequal action_type "validate" %} + <div id="main-bar" class="headNormal"> + {% trans "Validate email" %} + </div> + <p class="message"> + {% blocktrans %}validate {{email}} info{% endblocktrans %} + </p> +{% endifequal %} +{% ifequal action_type "keep" %} + <div id="main-bar" class="headNormal"> + {% trans "Email not changed" %} + </div> + <p class="message"> + {% blocktrans %}old {{email}} kept{% endblocktrans %} + </p> +{% endifequal %} +{% ifequal action_type "done_novalidate" %} + <div id="main-bar" class="headNormal"> + {% trans "Email changed" %} + </div> + <p class="message"> + {% blocktrans %}your current {{email}} can be used for this{% endblocktrans %} + </p> +{% endifequal %} +{% ifequal action_type "validation_complete" %} + <div id="main-bar" class="headNormal"> + {% trans "Email verified" %} + </div> + <p class="message"> + {% trans "thanks for verifying email" %} + </p> +{% endifequal %} +{% ifequal action_type "key_not_sent" %} + <div id="main-bar" class="headNormal"> + {% trans "email key not sent" %} + </div> + <p class="message"> + {% blocktrans %}email key not sent {{email}} change email here {{change_link}}{% endblocktrans %} + </p> +{% endifequal %} {% endblock %} +<!-- end changeemail.html --> diff --git a/templates/authopenid/changeopenid.html b/templates/authopenid/changeopenid.html index c1f3d180..9b5a196a 100644 --- a/templates/authopenid/changeopenid.html +++ b/templates/authopenid/changeopenid.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +<!-- changeopenid.html --> {% load i18n %} {% block content %} @@ -31,3 +32,4 @@ </form> </div> {% endblock %} +<!-- end changeopenid.html --> diff --git a/templates/authopenid/changepw.html b/templates/authopenid/changepw.html index f3cf4be0..0e90b172 100644 --- a/templates/authopenid/changepw.html +++ b/templates/authopenid/changepw.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +<!-- changepw.html --> {% load i18n %} {% block head %} @@ -31,3 +32,4 @@ </form> </div> {% endblock %} +<!-- end changepw.html --> diff --git a/templates/authopenid/complete.html b/templates/authopenid/complete.html index 28c38a04..b9a14e16 100644 --- a/templates/authopenid/complete.html +++ b/templates/authopenid/complete.html @@ -1,4 +1,5 @@ -{% extends "base.html" %} +{% extends "base_content.html" %} +<!-- complete.html --> {% load i18n %} {% block head %}{% endblock %} {% block title %}{% spaceless %}{% trans "Connect your OpenID with this site" %}{% endspaceless %}{% endblock %} @@ -7,7 +8,9 @@ {% trans "Connect your OpenID with your account on this site" %} </div> <p id="completetxt" > - <h3>{% trans "Your OpenID is accepted. Please complete this to finish registration." %}</h3> + <div class="message"> + {% blocktrans %}register new {{provider}} account info{% endblocktrans %} + </div> <p style="display:none">{% trans "This account already exists, please use another." %}</p> </p> @@ -41,12 +44,9 @@ <div class="login"> <form name="fregister" action="{% url user_register %}" method="POST"> {{ form.next }} - <fieldset style="padding:10px"> - <legend class="big">{% trans "New account" %}</legend> - <div class="form-row"><label for="id_username">{% trans "User name (<i>will be shown to others, cannot be modified</i>)" %}</label><br />{{ form1.username }}</div> - <div class="form-row"><label for="id_email">{% trans "Email (<i>not shared with anyone</i>)" %}</label><br />{{ form1.email }}</div> - <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="{% trans "create account" %}"></div> - </fieldset> + <div class="form-row"><label for="id_username">{% trans "Screen name label" %}</label><br />{{ form1.username }}</div> + <div class="form-row"><label for="id_email">{% trans "Email address label" %}</label><br />{{ form1.email }}</div> + <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="{% trans "create account" %}"></div> </form> </div> <div class="login" style="display:none"> @@ -65,3 +65,4 @@ </form> </div> {% endblock %} +<!-- end complete.html --> diff --git a/templates/authopenid/confirm_email.txt b/templates/authopenid/confirm_email.txt index 9af177ed..202db0fc 100644 --- a/templates/authopenid/confirm_email.txt +++ b/templates/authopenid/confirm_email.txt @@ -1,12 +1,13 @@ -Thank you for registering. +{% load i18n %} +{% trans "Thank you for registering at our Q&A forum!" %} -Your account details are: +{% trans "Your account details are:" %} -Username: {{ username }} -Password: {{ password }} - - -You may sign in here: -{{ site_url }}signin/ +{% trans "Username:" %} {{ username }} +{% trans "Password:" %} {{ password }} +{% trans "Please sign in here:" %} +{{ site_url }}{% trans "signin/" %} +{% blocktrans %}Sincerely, +Forum Administrator{% endblocktrans %} diff --git a/templates/authopenid/delete.html b/templates/authopenid/delete.html index 19e0884a..d39bc962 100644 --- a/templates/authopenid/delete.html +++ b/templates/authopenid/delete.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +<!-- delete.html --> {% load i18n %} @@ -36,3 +37,4 @@ </form> </div> {% endblock %} +<!-- end delete.html --> diff --git a/templates/authopenid/failure.html b/templates/authopenid/failure.html index 87839ab2..d075d6b0 100644 --- a/templates/authopenid/failure.html +++ b/templates/authopenid/failure.html @@ -1,5 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<!-- failure.html --> <html> <head> <title>OpenID failed</title> @@ -10,4 +11,4 @@ <p>{{ message|escape }}</p> </body> -</html>
\ No newline at end of file +</html><!-- end failure.html --> diff --git a/templates/authopenid/sendpw.html b/templates/authopenid/sendpw.html index a9488c4c..ba81dba4 100644 --- a/templates/authopenid/sendpw.html +++ b/templates/authopenid/sendpw.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +<!-- sendpw.html --> {% load i18n %} {% block title %}{% spaceless %}{% trans "Send new password" %}{% endspaceless %}{% endblock %} @@ -32,3 +33,4 @@ <span class="darkred">{% trans "Note: your new password will be activated only after you click the activation link in the email message" %}</span> </div> {% endblock %} +<!-- end sendpw.html --> diff --git a/templates/authopenid/sendpw_email.txt b/templates/authopenid/sendpw_email.txt index dec062a8..2024061c 100644 --- a/templates/authopenid/sendpw_email.txt +++ b/templates/authopenid/sendpw_email.txt @@ -1,14 +1,14 @@ -Someone has requested to reset your password on {{ site_url }}. -If this is not you, it is safe to ignore this email. +{% load i18n %} +{% blocktrans %}Someone has requested to reset your password on {{ site_url }}. +If it were not you, it is safe to ignore this email.{% endblocktrans %} -Your new account details are: +{% trans "Your new account details are:" %} -Username: {{ username }} -New password: {{ password }} +{% trans "Username:" %} {{ username }} +{% trans "New password:" %} {{ password }} -To confirm reset of your password go to this address: +{% trans "To confirm that you wanted to reset your password please visit:" %} {{ site_url }}{{ url_confirm }}?key={{ confirm_key }} -Regards, - - +{% blocktrans %}Sincerely, +Forum Administrator{% endblocktrans %} diff --git a/templates/authopenid/settings.html b/templates/authopenid/settings.html index ffd5dd8f..a373324e 100644 --- a/templates/authopenid/settings.html +++ b/templates/authopenid/settings.html @@ -1,4 +1,5 @@ {% extends "base_content.html" %} +<!-- settings.html --> {% load i18n %} {% block head %} @@ -39,3 +40,4 @@ </dl> </div> {% endblock %} +<!-- end settings.html --> diff --git a/templates/authopenid/signin.html b/templates/authopenid/signin.html index d8a98329..9a1a6780 100644 --- a/templates/authopenid/signin.html +++ b/templates/authopenid/signin.html @@ -1,42 +1,120 @@ {% extends "base.html" %} +<!-- signin.html --> {% load i18n %} {% block title %}{% spaceless %}{% trans "User login" %}{% endspaceless %}{% endblock %} {% block forejs %} - <script type="text/javascript" src="/content/js/jquery.openid.js?"></script> + <!--<script type="text/javascript" src="/content/js/jquery.openid.js?"></script>--> <script type='text/javascript' src='/content/js/jquery.validate.pack.js'></script> - <script type="text/javascript"> + + <link rel="stylesheet" type="text/css" media="screen" href="/content/jquery-openid/openid.css"/> + <script type="text/javascript" src="/content/jquery-openid/jquery.openid.js"></script> + <script type="text/javascript"> $().ready( function() { $("form.openid:eq(0)").openid(); })</script> + <!--<script type="text/javascript"> $().ready(function(){ openid.init('id_openid_url'); setupFormValidation("#openid_form", {bsignin:{required: true}}); }); - </script> + </script>--> {% endblock %} {% block content %} <div class="headNormal"> {% trans "User login" %} </div> -<div class="login"> - <form name="openid_form" action="{% url user_signin %}" method="post"> - {{ form2.next }} - <p>{% trans "we support two login modes" %}</p> {% if msg %} <p class="warning">{{ msg }}</p> {% endif %} - <fieldset class="fieldset"> - <legend ><strong>{% trans "Login with your OpenID" %}</strong></legend> - <div id="openid_choice"> - <p>{% trans "select openid provider" %}</p> - <div id="openid_btns"> - </div> - <br><br><br> - <p>{% trans "verify openid link and login" %}</p> + {% if answer %} + <div class="message"> + {% blocktrans with answer.question.title as title and answer.summary as summary %} + Your answer to {{title}} {{summary}} will be posted once you log in + {% endblocktrans %} + </div> + {% endif %} + {% if question %} + <div class="message"> + {% blocktrans with question.title as title and question.summary as summary %}Your question + {{title}} {{summary}} will be posted once you log in + {% endblocktrans %} </div> - <p> - {{ form2.openid_url }} <input id="bsignin" name="bsignin" type="submit" value="{% trans "Login" %}" class="openid-login-submit" /> - </p> - </fieldset> - </form> - <div> + {% endif %} + <div style="width:600px;float:left;margin-bottom:5px;">{% trans "Click to sign in through any of these services." %}</div> + <form id="openid_form" name="openid_form" class="openid" method="post" action="{% url user_signin %}"> + <ul class="providers"> + <li class="openid" title="OpenID"> + <div class="logo_box openid_box"> + <img src="/content/jquery-openid/images/openid.gif" alt="icon" /> + </div> + <span><strong>http://{your-openid-url}</strong></span> + </li> + <li class="direct" title="Google"> + <div class="logo_box google_box"> + <img src="/content/jquery-openid/images/google.gif" alt="icon" /><span>https://www.google.com/accounts/o8/id</span> + </div> + </li> + <li class="direct" title="Yahoo"> + <div class="logo_box yahoo_box"> + <img src="/content/jquery-openid/images/yahoo.gif" alt="icon" /><span>http://yahoo.com/</span> + </div> + </li> + <li class="username" title="AOL screen name"> + <div class="logo_box aol_box"> + <img src="/content/jquery-openid/images/aol.gif" alt="icon" /><span>http://openid.aol.com/<strong>username</strong></span> + </div> + </li> + <li class="username first_tiny_li" title="MyOpenID user name"> + <img src="/content/jquery-openid/images/myopenid.ico" alt="icon" /> + <span>http://<strong>username</strong>.myopenid.com/</span> + </li> + <li class="username" title="Flickr user name"> + <img src="/content/jquery-openid/images/flickr.ico" alt="icon" /> + <span>http://flickr.com/<strong>username</strong>/</span> + </li> + <li class="username" title="Technorati user name"> + <img src="/content/jquery-openid/images/technorati.ico" alt="icon" /> + <span>http://technorati.com/people/technorati/<strong>username</strong>/</span> + </li> + <li class="username" title="Wordpress blog name"> + <img src="/content/jquery-openid/images/wordpress.ico" alt="icon" /> + <span>http://<strong>username</strong>.wordpress.com</span> + </li> + <li class="username" title="Blogger blog name"> + <img src="/content/jquery-openid/images/blogger.ico" alt="icon" /> + <span>http://<strong>username</strong>.blogspot.com/</span> + </li> + <li class="username" title="LiveJournal blog name"> + <img src="/content/jquery-openid/images/livejournal.ico" alt="icon" /> + <span>http://<strong>username</strong>.livejournal.com</span> + </li> + <li class="username" title="ClaimID user name"> + <img src="/content/jquery-openid/images/claimid.ico" alt="icon" /> + <span>http://claimid.com/<strong>username</strong></span> + </li> + <li class="username" title="Vidoop user name"> + <img src="/content/jquery-openid/images/vidoop.ico" alt="icon" /> + <span>http://<strong>username</strong>.myvidoop.com/</span> + </li> + <li class="username" title="Verisign user name"> + <img src="/content/jquery-openid/images/verisign.ico" alt="icon" /> + <span>http://<strong>username</strong>.pip.verisignlabs.com/</span> + </li> + </ul> + {{ form2.next }} + <fieldset> + <p id="provider_name_slot">{% trans 'Enter your <span id="enter_your_what">Provider user name</span>' %}</p> + <div><p><span></span> + <input id="openid_username" type="text" name="openid_username" /><span></span> + <input type="submit" value="Login" /> + </p></div> + </fieldset> + <fieldset> + <p>{% trans 'Enter your <a class="openid_logo" href="http://openid.net">OpenID</a> web address' %}</p> + <div><p><input id="openid_url" type="text" value="http://" name="openid_url" /> + <input id="bsignin" name="bsignin" type="submit" value="{% trans "Login" %}" /></p></div> + </fieldset> + </form> +<div class="login"> + <p style="display:none">{% trans "we support two login modes" %}</p> + <div style="display:none"> <br> {% if form1.errors %} <p class="errors"> @@ -60,7 +138,7 @@ <div class="form-row"><label for="id_password">{% trans "Password" %}:</label><br />{{ form1.password }}</div> <div class="submit-row"><input type="submit" class="submit" name="blogin" value="{% trans "Login" %}"> <a href="">{% trans "Forgot your password?" %}</a> - <a href="">{% trans "Create new acccount" %}</a></div> + <a href="">{% trans "Create new account" %}</a></div> </fieldset> </form> </div> @@ -93,3 +171,5 @@ </div> {% endblock%} + <script type="text/javascript"> $( function() { $("form.openid:eq(0)").openid(); })</script> +<!-- end signin.html --> diff --git a/templates/authopenid/signup.html b/templates/authopenid/signup.html index 9ac0aab3..a65dafdc 100644 --- a/templates/authopenid/signup.html +++ b/templates/authopenid/signup.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +<!--signup.html--> {% load i18n %} {% block title %}{% spaceless %}{% trans "Signup" %}{% endspaceless %}{% endblock %} @@ -51,3 +52,4 @@ </form> </div> {% endblock %} +<!--end signup.html--> diff --git a/templates/badge.html b/templates/badge.html index d0906918..029ba0d9 100644 --- a/templates/badge.html +++ b/templates/badge.html @@ -1,5 +1,5 @@ -<!-- template badge.html --> {% extends "base_content.html" %} +<!-- template badge.html --> {% load i18n %} {% load extra_tags %} {% load humanize %} diff --git a/templates/badges.html b/templates/badges.html index 7fd1402a..69ddc39f 100644 --- a/templates/badges.html +++ b/templates/badges.html @@ -1,5 +1,5 @@ -<!-- template badges.html --> {% extends "base.html" %} +<!-- template badges.html --> {% load extra_tags %} {% load humanize %} {% load i18n %} @@ -16,9 +16,10 @@ <div class="headlineA"> <span class="headMedals">{% trans "Badges" %}</span> </div> -<div id="main-body" style="width:100%"> +<div class="badges" id="main-body" style="width:100%"> <p> - {% trans "Community gives you awards for your questions, answers and votes. Below is the list of available badges and number of times each type of badge has been awarded." %} + {% trans "Community gives you awards for your questions, answers and votes." %}<br> + {% trans "Below is the list of available badges and number of times each type of badge has been awarded." %} </p> <br> <div id="medalList"> @@ -44,14 +45,14 @@ {% endblock %} {% block sidebar %} -<div class="boxB"> +<div class="boxC"> <h3>{% trans "Community badges" %}</h3> <div class="body"> <p> <a style="cursor:default;" title="gold badge: the highest honor and is very rare" class="medal"><span class="badge1">●</span> {% trans "gold" %}</a> </p> <p> - {% trans "Gold badge is very rare. To obtain it you have to show profound knowledge and ability in addition to actively participating in the community. Gold badge is the highest award in this community." %} + {% trans "gold badge description" %} </p> <p> <a style="cursor:default;" @@ -59,14 +60,14 @@ class="medal"><span class="badge2">●</span> {% trans "silver" %}</a> </p> <p> - {% trans "Obtaining silver badge requires significant patience. If you got one, you've very significantly contributed to this community" %} + {% trans "silver badge description" %} </p> <p> <a style="cursor:default;" title="{% trans "bronze badge: often given as a special honor" %}" class="medal"> <span class="badge3">●</span> {% trans "bronze" %}</a> </p> <p> - {% trans "If you are active in this community, you will get this medal - still it is a special honor." %} + {% trans "bronze badge description" %} </p> </div> </div> diff --git a/templates/base.html b/templates/base.html index bf24c840..ae389255 100644 --- a/templates/base.html +++ b/templates/base.html @@ -4,18 +4,18 @@ {% load i18n %} <html xmlns="http://www.w3.org/1999/xhtml"> <head> - <title>{% block title %}{% endblock %} - {{ APP_TITLE }}</title> + <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE }}</title> {% spaceless %} {% block meta %}{% endblock %} {% endspaceless %} <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <meta name="verify-v1" content="{{verify_v1_code}}" /> + <meta name="verify-v1" content="{{settings.GOOGLE_SITEMAP_CODE}}" /> <link rel="shortcut icon" href="/content/images/favicon.ico" > <link href="/content/style/style.css" rel="stylesheet" type="text/css" /> <script src="http://www.google.com/jsapi"></script> <script>google.load("jquery", "1.2.6");</script> <script type="text/javascript"> - var i18nLang = 'en'; + var i18nLang = '{{settings.LANGUAGE_CODE}}'; </script> <script type='text/javascript' src='/content/js/com.cnprog.i18n.js'></script> <script type='text/javascript' src='/content/js/jquery.i18n.js'></script> @@ -26,9 +26,8 @@ </script> <script type="text/javascript"> UserVoice.Tab.show({ - //EDIT!!! - key: 'key', - host: 'where.uservoice.com', + key: 'cnprog', + host: 'cnprog.uservoice.com', forum: 'general', alignment: 'left', /* 'left', 'right' */ background_color:'#777', @@ -38,30 +37,31 @@ }) </script>--> <!-- todo move this to settings --> - {% with request.user.get_messages as messages%} {% if messages %} <style type="text/css"> body { margin-top:2.4em; } </style> <script type="text/javascript"> $().ready(function() { + $('#validate_email_alert').click(function(){notify.close(true)}) notify.show(); }); </script> - {% endif %} - {% endwith %} {% block forejs %} {% endblock %} </head> <body> <div class="notify" style="display:none"> - <span>{% if request.user.get_messages %} - {% trans "congratulations, community gave you a badge" %}: {% for message in request.user.get_messages %} - <font class="darkred">{{ message }}</font>, {% endfor %}查看 - <a href="{{ request.user.get_profile_url }}">{% trans "profile" %}</a>{% endif %}</span> - <a class="close-notify" onclick="notify.close(true)">×</a> + {% autoescape off %} + {% if messages %} + {% for message in messages %} + <p class="darkred">{{ message }}<p> + {% endfor %} + {% endif %} + {% endautoescape %} + <a id="close-notify" onclick="notify.close(true)">×</a> </div> {% include "header.html" %} <div id="wrapper"> @@ -89,3 +89,4 @@ {% endblock %} </body> </html> +<!-- end template base.html --> diff --git a/templates/base_content.html b/templates/base_content.html index 39627a0e..4ee9675f 100644 --- a/templates/base_content.html +++ b/templates/base_content.html @@ -1,10 +1,11 @@ -{% load i18n %} <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<!-- base_content.html --> +{% load i18n %} <html> <head> - <title>{% block title %}{% endblock %} - {{ APP_TITLE }}</title> + <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE }}</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <meta name="verify-v1" content="55uGNnQVJW8p1bbXeF/Xbh9I7nZBM/wLhRz6N/I1kkA=" /> + <meta name="verify-v1" content="{{ settings.GOOGLE_SITEMAP_CODE }}" /> <link rel="shortcut icon" href="/content/images/favicon.ico" > <link href="/content/style/style.css" rel="stylesheet" type="text/css" /> {% spaceless %} @@ -13,7 +14,7 @@ <script src="http://www.google.com/jsapi"></script> <script>google.load("jquery", "1.2.6");</script> <script type="text/javascript"> - var i18nLang = 'en'; + var i18nLang = '{{ settings.LANGUAGE_CODE }}'; </script> <script type='text/javascript' src='/content/js/com.cnprog.i18n.js'></script> <script type='text/javascript' src='/content/js/jquery.i18n.js'></script> @@ -38,29 +39,32 @@ </script>--> <!-- todo move this to settings--> - {% with request.user.get_messages as messages%} {% if messages %} <style type="text/css"> body { margin-top:2.4em; } </style> <script type="text/javascript"> $().ready(function() { + var element = $('#validate_email_alert') + element.click(function(){notify.close(true);setTimeout(function(){},1000)}) notify.show(); }); </script> {% endif %} - {% endwith %} {% block forejs %} {% endblock %} </head> <body> <div class="notify" style="display:none"> - <span>{% if request.user.get_messages %} - {% trans "congratulations, community gave you a badge" %}:{% for message in request.user.get_messages %} - <font class="darkred">{{ message }}</font>, {% endfor %}{% trans "see" %} - <a href="{{ request.user.get_profile_url }}">{% trans "profile" %}</a>{% endif %}</span> - <a class="close-notify" onclick="notify.close(true)">×</a> + {% autoescape off %} + {% if messages %} + {% for message in messages %} + <p class="darkred">{{ message }}<p> + {% endfor %} + {% endif %} + {% endautoescape %} + <a id="close-notify" onclick="notify.close(true)">×</a> </div> {% include "header.html" %} <div id="wrapper"> @@ -82,3 +86,4 @@ {% endblock %} </body> </html> +<!-- end template base_content.html --> diff --git a/templates/book.html b/templates/book.html index a58a09f2..dddd13e6 100644 --- a/templates/book.html +++ b/templates/book.html @@ -1,5 +1,5 @@ -<!-- template book.html --> {% extends "base_content.html" %} +<!-- template book.html --> {% load i18n %} {% load extra_tags %} {% load extra_filters %} diff --git a/templates/close.html b/templates/close.html index 32df3e82..d9e73507 100644 --- a/templates/close.html +++ b/templates/close.html @@ -1,5 +1,5 @@ -<!-- template close.html --> {% extends "base_content.html" %} +<!-- template close.html --> {% load i18n %} {% load extra_tags %} {% load humanize %} diff --git a/templates/content/js/com.cnprog.i18n.js b/templates/content/js/com.cnprog.i18n.js index 2d8c90a6..90166eec 100644 --- a/templates/content/js/com.cnprog.i18n.js +++ b/templates/content/js/com.cnprog.i18n.js @@ -1,5 +1,3 @@ -// Evgeny Fadeev evgeny.fadeev@gmail.com localized for english and chinese -// i18nLang variable must be set in html header to extract correct language var i18nZh = { 'insufficient privilege':'用户权限不在操作范围', 'cannot pick own answer as best':'不能设置自己的回答为最佳答案', @@ -59,6 +57,10 @@ var i18nZh = { }; var i18nEn = { + '>15 points requried to upvote':'>15 points requried to upvote ', + 'tags cannot be empty':'please enter at least one tag', + 'anonymous users cannot vote':'anonymous users cannot vote ', + 'anonymous users cannot select favorite questions':'anonymous users cannot select favorite questions ', 'to comment, need': 'to comment, need reputation ', 'please see':'please see ', 'community reputation points':' ', @@ -84,7 +86,7 @@ var i18nEn = { var i18n = { 'en':i18nEn, - 'zh':i18nZh + 'zh_CN':i18nZh }; var i18n_dict = i18n[i18nLang]; diff --git a/templates/content/js/com.cnprog.post.js b/templates/content/js/com.cnprog.post.js index 723e34ae..546cf101 100644 --- a/templates/content/js/com.cnprog.post.js +++ b/templates/content/js/com.cnprog.post.js @@ -48,10 +48,11 @@ var Vote = function(){ var questionControlsId = 'question-controls'; var removeQuestionLinkIdPrefix = 'question-delete-link-'; var removeAnswerLinkIdPrefix = 'answer-delete-link-'; + var questionSubscribeUpdates = 'question-subscribe-updates'; var acceptAnonymousMessage = $.i18n._('insufficient privilege'); var acceptOwnAnswerMessage = $.i18n._('cannot pick own answer as best'); - var favoriteAnonymousMessage = $.i18n._('anonymous user cannot select favorite questions') + var favoriteAnonymousMessage = $.i18n._('anonymous users cannot select favorite questions') + "<a href='/account/signin/?next=/questions/{{QuestionID}}'>" + $.i18n._('please login') + "</a>"; var voteAnonymousMessage = $.i18n._('anonymous users cannot vote') @@ -91,7 +92,9 @@ var Vote = function(){ offensiveQuestion : 7, offensiveAnswer:8, removeQuestion: 9, - removeAnswer:10 + removeAnswer:10, + questionSubscribeUpdates:11, + questionUnsubscribeUpdates:12, }; var getFavoriteButton = function(){ @@ -141,6 +144,10 @@ var Vote = function(){ var removeQuestionLink = 'div#question-controls a[id^='+ removeQuestionLinkIdPrefix +']'; return $(removeQuestionLink); }; + + var getquestionSubscribeUpdatesCheckbox = function(){ + return $('#' + questionSubscribeUpdates); + }; var getremoveAnswersLinks = function(){ var removeAnswerLinks = 'div.answer-controls a[id^='+ removeAnswerLinkIdPrefix +']'; @@ -216,6 +223,15 @@ var Vote = function(){ getremoveQuestionLink().unbind('click').click(function(event){ Vote.remove(this, VoteType.removeQuestion); }); + + getquestionSubscribeUpdatesCheckbox().unbind('click').click(function(event){ + if (this.checked){ + Vote.vote($(event.target), VoteType.questionSubscribeUpdates); + } + else { + Vote.vote($(event.target), VoteType.questionUnsubscribeUpdates); + } + }); getremoveAnswersLinks().unbind('click').click(function(event){ Vote.remove(this, VoteType.removeAnswer) @@ -343,7 +359,6 @@ var Vote = function(){ }; var callback_remove = function(object, voteType, data){ - alert(data.status); if(data.allowed == "0" && data.success == "0"){ showMessage(object, removeAnonymousMessage.replace("{{QuestionID}}", questionId)); } @@ -613,4 +628,4 @@ var commentsFactory = {'question' : questionComments, 'answer' : answerComments} Prettify http://www.apache.org/licenses/LICENSE-2.0 */ -var PR_SHOULD_USE_CONTINUATION = true; var PR_TAB_WIDTH = 8; var PR_normalizedHtml; var PR; var prettyPrintOne; var prettyPrint; function _pr_isIE6() { var isIE6 = navigator && navigator.userAgent && /\bMSIE 6\./.test(navigator.userAgent); _pr_isIE6 = function() { return isIE6; }; return isIE6; } (function() { function wordSet(words) { words = words.split(/ /g); var set = {}; for (var i = words.length; --i >= 0; ) { var w = words[i]; if (w) { set[w] = null; } } return set; } var FLOW_CONTROL_KEYWORDS = "break continue do else for if return while "; var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " + "double enum extern float goto int long register short signed sizeof " + "static struct switch typedef union unsigned void volatile "; var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " + "new operator private protected public this throw true try "; var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool " + "concept concept_map const_cast constexpr decltype " + "dynamic_cast explicit export friend inline late_check " + "mutable namespace nullptr reinterpret_cast static_assert static_cast " + "template typeid typename typeof using virtual wchar_t where "; var JAVA_KEYWORDS = COMMON_KEYWORDS + "boolean byte extends final finally implements import instanceof null " + "native package strictfp super synchronized throws transient "; var CSHARP_KEYWORDS = JAVA_KEYWORDS + "as base by checked decimal delegate descending event " + "fixed foreach from group implicit in interface internal into is lock " + "object out override orderby params readonly ref sbyte sealed " + "stackalloc string select uint ulong unchecked unsafe ushort var "; var JSCRIPT_KEYWORDS = COMMON_KEYWORDS + "debugger eval export function get null set undefined var with " + "Infinity NaN "; var PERL_KEYWORDS = "caller delete die do dump elsif eval exit foreach for " + "goto if import last local my next no our print package redo require " + "sub undef unless until use wantarray while BEGIN END "; var PYTHON_KEYWORDS = FLOW_CONTROL_KEYWORDS + "and as assert class def del " + "elif except exec finally from global import in is lambda " + "nonlocal not or pass print raise try with yield " + "False True None "; var RUBY_KEYWORDS = FLOW_CONTROL_KEYWORDS + "alias and begin case class def" + " defined elsif end ensure false in module next nil not or redo rescue " + "retry self super then true undef unless until when yield BEGIN END "; var SH_KEYWORDS = FLOW_CONTROL_KEYWORDS + "case done elif esac eval fi " + "function in local set then until "; var ALL_KEYWORDS = (CPP_KEYWORDS + CSHARP_KEYWORDS + JSCRIPT_KEYWORDS + PERL_KEYWORDS + PYTHON_KEYWORDS + RUBY_KEYWORDS + SH_KEYWORDS); var PR_STRING = 'str'; var PR_KEYWORD = 'kwd'; var PR_COMMENT = 'com'; var PR_TYPE = 'typ'; var PR_LITERAL = 'lit'; var PR_PUNCTUATION = 'pun'; var PR_PLAIN = 'pln'; var PR_TAG = 'tag'; var PR_DECLARATION = 'dec'; var PR_SOURCE = 'src'; var PR_ATTRIB_NAME = 'atn'; var PR_ATTRIB_VALUE = 'atv'; var PR_NOCODE = 'nocode'; function isWordChar(ch) { return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'); } function spliceArrayInto(inserted, container, containerPosition, countReplaced) { inserted.unshift(containerPosition, countReplaced || 0); try { container.splice.apply(container, inserted); } finally { inserted.splice(0, 2); } } var REGEXP_PRECEDER_PATTERN = function() { var preceders = ["!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=", "&=", "(", "*", "*=", "+=", ",", "-=", "->", "/", "/=", ":", "::", ";", "<", "<<", "<<=", "<=", "=", "==", "===", ">", ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[", "^", "^=", "^^", "^^=", "{", "|", "|=", "||", "||=", "~", "break", "case", "continue", "delete", "do", "else", "finally", "instanceof", "return", "throw", "try", "typeof"]; var pattern = '(?:' + '(?:(?:^|[^0-9.])\\.{1,3})|' + '(?:(?:^|[^\\+])\\+)|' + '(?:(?:^|[^\\-])-)'; for (var i = 0; i < preceders.length; ++i) { var preceder = preceders[i]; if (isWordChar(preceder.charAt(0))) { pattern += '|\\b' + preceder; } else { pattern += '|' + preceder.replace(/([^=<>:&])/g, '\\$1'); } } pattern += '|^)\\s*$'; return new RegExp(pattern); } (); var pr_amp = /&/g; var pr_lt = /</g; var pr_gt = />/g; var pr_quot = /\"/g; function attribToHtml(str) { return str.replace(pr_amp, '&').replace(pr_lt, '<').replace(pr_gt, '>').replace(pr_quot, '"'); } function textToHtml(str) { return str.replace(pr_amp, '&').replace(pr_lt, '<').replace(pr_gt, '>'); } var pr_ltEnt = /</g; var pr_gtEnt = />/g; var pr_aposEnt = /'/g; var pr_quotEnt = /"/g; var pr_ampEnt = /&/g; var pr_nbspEnt = / /g; function htmlToText(html) { var pos = html.indexOf('&'); if (pos < 0) { return html; } for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0; ) { var end = html.indexOf(';', pos); if (end >= 0) { var num = html.substring(pos + 3, end); var radix = 10; if (num && num.charAt(0) === 'x') { num = num.substring(1); radix = 16; } var codePoint = parseInt(num, radix); if (!isNaN(codePoint)) { html = (html.substring(0, pos) + String.fromCharCode(codePoint) + html.substring(end + 1)); } } } return html.replace(pr_ltEnt, '<').replace(pr_gtEnt, '>').replace(pr_aposEnt, "'").replace(pr_quotEnt, '"').replace(pr_ampEnt, '&').replace(pr_nbspEnt, ' '); } function isRawContent(node) { return 'XMP' === node.tagName; } function normalizedHtml(node, out) { switch (node.nodeType) { case 1: var name = node.tagName.toLowerCase(); out.push('<', name); for (var i = 0; i < node.attributes.length; ++i) { var attr = node.attributes[i]; if (!attr.specified) { continue; } out.push(' '); normalizedHtml(attr, out); } out.push('>'); for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out); } if (node.firstChild || !/^(?:br|link|img)$/.test(name)) { out.push('<\/', name, '>'); } break; case 2: out.push(node.name.toLowerCase(), '="', attribToHtml(node.value), '"'); break; case 3: case 4: out.push(textToHtml(node.nodeValue)); break; } } var PR_innerHtmlWorks = null; function getInnerHtml(node) { if (null === PR_innerHtmlWorks) { var testNode = document.createElement('PRE'); testNode.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />')); PR_innerHtmlWorks = !/</.test(testNode.innerHTML); } if (PR_innerHtmlWorks) { var content = node.innerHTML; if (isRawContent(node)) { content = textToHtml(content); } return content; } var out = []; for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out); } return out.join(''); } function makeTabExpander(tabWidth) { var SPACES = ' '; var charInLine = 0; return function(plainText) { var out = null; var pos = 0; for (var i = 0, n = plainText.length; i < n; ++i) { var ch = plainText.charAt(i); switch (ch) { case '\t': if (!out) { out = []; } out.push(plainText.substring(pos, i)); var nSpaces = tabWidth - (charInLine % tabWidth); charInLine += nSpaces; for (; nSpaces >= 0; nSpaces -= SPACES.length) { out.push(SPACES.substring(0, nSpaces)); } pos = i + 1; break; case '\n': charInLine = 0; break; default: ++charInLine; } } if (!out) { return plainText; } out.push(plainText.substring(pos)); return out.join(''); }; } var pr_chunkPattern = /(?:[^<]+|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g; var pr_commentPrefix = /^<!--/; var pr_cdataPrefix = /^<\[CDATA\[/; var pr_brPrefix = /^<br\b/i; var pr_tagNameRe = /^<(\/?)([a-zA-Z]+)/; function extractTags(s) { var matches = s.match(pr_chunkPattern); var sourceBuf = []; var sourceBufLen = 0; var extractedTags = []; if (matches) { for (var i = 0, n = matches.length; i < n; ++i) { var match = matches[i]; if (match.length > 1 && match.charAt(0) === '<') { if (pr_commentPrefix.test(match)) { continue; } if (pr_cdataPrefix.test(match)) { sourceBuf.push(match.substring(9, match.length - 3)); sourceBufLen += match.length - 12; } else if (pr_brPrefix.test(match)) { sourceBuf.push('\n'); ++sourceBufLen; } else { if (match.indexOf(PR_NOCODE) >= 0 && isNoCodeTag(match)) { var name = match.match(pr_tagNameRe)[2]; var depth = 1; end_tag_loop: for (var j = i + 1; j < n; ++j) { var name2 = matches[j].match(pr_tagNameRe); if (name2 && name2[2] === name) { if (name2[1] === '/') { if (--depth === 0) { break end_tag_loop; } } else { ++depth; } } } if (j < n) { extractedTags.push(sourceBufLen, matches.slice(i, j + 1).join('')); i = j; } else { extractedTags.push(sourceBufLen, match); } } else { extractedTags.push(sourceBufLen, match); } } } else { var literalText = htmlToText(match); sourceBuf.push(literalText); sourceBufLen += literalText.length; } } } return { source: sourceBuf.join(''), tags: extractedTags }; } function isNoCodeTag(tag) { return !!tag.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g, ' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/); } function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) { var shortcuts = {}; (function() { var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns); for (var i = allPatterns.length; --i >= 0; ) { var patternParts = allPatterns[i]; var shortcutChars = patternParts[3]; if (shortcutChars) { for (var c = shortcutChars.length; --c >= 0; ) { shortcuts[shortcutChars.charAt(c)] = patternParts; } } } })(); var nPatterns = fallthroughStylePatterns.length; var notWs = /\S/; return function(sourceCode, opt_basePos) { opt_basePos = opt_basePos || 0; var decorations = [opt_basePos, PR_PLAIN]; var lastToken = ''; var pos = 0; var tail = sourceCode; while (tail.length) { var style; var token = null; var match; var patternParts = shortcuts[tail.charAt(0)]; if (patternParts) { match = tail.match(patternParts[1]); token = match[0]; style = patternParts[0]; } else { for (var i = 0; i < nPatterns; ++i) { patternParts = fallthroughStylePatterns[i]; var contextPattern = patternParts[2]; if (contextPattern && !contextPattern.test(lastToken)) { continue; } match = tail.match(patternParts[1]); if (match) { token = match[0]; style = patternParts[0]; break; } } if (!token) { style = PR_PLAIN; token = tail.substring(0, 1); } } decorations.push(opt_basePos + pos, style); pos += token.length; tail = tail.substring(token.length); if (style !== PR_COMMENT && notWs.test(token)) { lastToken = token; } } return decorations; }; } var PR_MARKUP_LEXER = createSimpleLexer([], [[PR_PLAIN, /^[^<]+/, null], [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/, null], [PR_COMMENT, /^<!--[\s\S]*?(?:-->|$)/, null], [PR_SOURCE, /^<\?[\s\S]*?(?:\?>|$)/, null], [PR_SOURCE, /^<%[\s\S]*?(?:%>|$)/, null], [PR_SOURCE, /^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i, null], [PR_TAG, /^<\/?\w[^<>]*>/, null]]); var PR_SOURCE_CHUNK_PARTS = /^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/; function tokenizeMarkup(source) { var decorations = PR_MARKUP_LEXER(source); for (var i = 0; i < decorations.length; i += 2) { if (decorations[i + 1] === PR_SOURCE) { var start, end; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var sourceChunk = source.substring(start, end); var match = sourceChunk.match(PR_SOURCE_CHUNK_PARTS); if (match) { decorations.splice(i, 2, start, PR_TAG, start + match[1].length, PR_SOURCE, start + match[1].length + (match[2] || '').length, PR_TAG); } } } return decorations; } var PR_TAG_LEXER = createSimpleLexer([[PR_ATTRIB_VALUE, /^\'[^\']*(?:\'|$)/, null, "'"], [PR_ATTRIB_VALUE, /^\"[^\"]*(?:\"|$)/, null, '"'], [PR_PUNCTUATION, /^[<>\/=]+/, null, '<>/=']], [[PR_TAG, /^[\w:\-]+/, /^</], [PR_ATTRIB_VALUE, /^[\w\-]+/, /^=/], [PR_ATTRIB_NAME, /^[\w:\-]+/, null], [PR_PLAIN, /^\s+/, null, ' \t\r\n']]); function splitTagAttributes(source, decorations) { for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; if (style === PR_TAG) { var start, end; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var chunk = source.substring(start, end); var subDecorations = PR_TAG_LEXER(chunk, start); spliceArrayInto(subDecorations, decorations, i, 2); i += subDecorations.length - 2; } } return decorations; } function sourceDecorator(options) { var shortcutStylePatterns = [], fallthroughStylePatterns = []; if (options.tripleQuotedStrings) { shortcutStylePatterns.push([PR_STRING, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, '\'"']); } else if (options.multiLineStrings) { shortcutStylePatterns.push([PR_STRING, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, '\'"`']); } else { shortcutStylePatterns.push([PR_STRING, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, '"\'']); } fallthroughStylePatterns.push([PR_PLAIN, /^(?:[^\'\"\`\/\#]+)/, null, ' \r\n']); if (options.hashComments) { shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']); } if (options.cStyleComments) { fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]); fallthroughStylePatterns.push([PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]); } if (options.regexLiterals) { var REGEX_LITERAL = ('^/(?=[^/*])' + '(?:[^/\\x5B\\x5C]' + '|\\x5C[\\s\\S]' + '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+' + '(?:/|$)'); fallthroughStylePatterns.push([PR_STRING, new RegExp(REGEX_LITERAL), REGEXP_PRECEDER_PATTERN]); } var keywords = wordSet(options.keywords); options = null; var splitStringAndCommentTokens = createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns); var styleLiteralIdentifierPuncRecognizer = createSimpleLexer([], [[PR_PLAIN, /^\s+/, null, ' \r\n'], [PR_PLAIN, /^[a-z_$@][a-z_$@0-9]*/i, null], [PR_LITERAL, /^0x[a-f0-9]+[a-z]/i, null], [PR_LITERAL, /^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?[a-z]*/i, null, '123456789'], [PR_PUNCTUATION, /^[^\s\w\.$@]+/, null]]); function splitNonStringNonCommentTokens(source, decorations) { for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; if (style === PR_PLAIN) { var start, end, chunk, subDecs; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; chunk = source.substring(start, end); subDecs = styleLiteralIdentifierPuncRecognizer(chunk, start); for (var j = 0, m = subDecs.length; j < m; j += 2) { var subStyle = subDecs[j + 1]; if (subStyle === PR_PLAIN) { var subStart = subDecs[j]; var subEnd = j + 2 < m ? subDecs[j + 2] : chunk.length; var token = source.substring(subStart, subEnd); if (token === '.') { subDecs[j + 1] = PR_PUNCTUATION; } else if (token in keywords) { subDecs[j + 1] = PR_KEYWORD; } else if (/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(token)) { subDecs[j + 1] = token.charAt(0) === '@' ? PR_LITERAL : PR_TYPE; } } } spliceArrayInto(subDecs, decorations, i, 2); i += subDecs.length - 2; } } return decorations; } return function(sourceCode) { var decorations = splitStringAndCommentTokens(sourceCode); decorations = splitNonStringNonCommentTokens(sourceCode, decorations); return decorations; }; } var decorateSource = sourceDecorator({ keywords: ALL_KEYWORDS, hashComments: true, cStyleComments: true, multiLineStrings: true, regexLiterals: true }); function splitSourceNodes(source, decorations) { for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; if (style === PR_SOURCE) { var start, end; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var subDecorations = decorateSource(source.substring(start, end)); for (var j = 0, m = subDecorations.length; j < m; j += 2) { subDecorations[j] += start; } spliceArrayInto(subDecorations, decorations, i, 2); i += subDecorations.length - 2; } } return decorations; } function splitSourceAttributes(source, decorations) { var nextValueIsSource = false; for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; var start, end; if (style === PR_ATTRIB_NAME) { start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; nextValueIsSource = /^on|^style$/i.test(source.substring(start, end)); } else if (style === PR_ATTRIB_VALUE) { if (nextValueIsSource) { start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var attribValue = source.substring(start, end); var attribLen = attribValue.length; var quoted = (attribLen >= 2 && /^[\"\']/.test(attribValue) && attribValue.charAt(0) === attribValue.charAt(attribLen - 1)); var attribSource; var attribSourceStart; var attribSourceEnd; if (quoted) { attribSourceStart = start + 1; attribSourceEnd = end - 1; attribSource = attribValue; } else { attribSourceStart = start + 1; attribSourceEnd = end - 1; attribSource = attribValue.substring(1, attribValue.length - 1); } var attribSourceDecorations = decorateSource(attribSource); for (var j = 0, m = attribSourceDecorations.length; j < m; j += 2) { attribSourceDecorations[j] += attribSourceStart; } if (quoted) { attribSourceDecorations.push(attribSourceEnd, PR_ATTRIB_VALUE); spliceArrayInto(attribSourceDecorations, decorations, i + 2, 0); } else { spliceArrayInto(attribSourceDecorations, decorations, i, 2); } } nextValueIsSource = false; } } return decorations; } function decorateMarkup(sourceCode) { var decorations = tokenizeMarkup(sourceCode); decorations = splitTagAttributes(sourceCode, decorations); decorations = splitSourceNodes(sourceCode, decorations); decorations = splitSourceAttributes(sourceCode, decorations); return decorations; } function recombineTagsAndDecorations(sourceText, extractedTags, decorations) { var html = []; var outputIdx = 0; var openDecoration = null; var currentDecoration = null; var tagPos = 0; var decPos = 0; var tabExpander = makeTabExpander(PR_TAB_WIDTH); var adjacentSpaceRe = /([\r\n ]) /g; var startOrSpaceRe = /(^| ) /gm; var newlineRe = /\r\n?|\n/g; var trailingSpaceRe = /[ \r\n]$/; var lastWasSpace = true; function emitTextUpTo(sourceIdx) { if (sourceIdx > outputIdx) { if (openDecoration && openDecoration !== currentDecoration) { html.push('</span>'); openDecoration = null; } if (!openDecoration && currentDecoration) { openDecoration = currentDecoration; html.push('<span class="', openDecoration, '">'); } var htmlChunk = textToHtml(tabExpander(sourceText.substring(outputIdx, sourceIdx))).replace(lastWasSpace ? startOrSpaceRe : adjacentSpaceRe, '$1 '); lastWasSpace = trailingSpaceRe.test(htmlChunk); html.push(htmlChunk.replace(newlineRe, '<br />')); outputIdx = sourceIdx; } } while (true) { var outputTag; if (tagPos < extractedTags.length) { if (decPos < decorations.length) { outputTag = extractedTags[tagPos] <= decorations[decPos]; } else { outputTag = true; } } else { outputTag = false; } if (outputTag) { emitTextUpTo(extractedTags[tagPos]); if (openDecoration) { html.push('</span>'); openDecoration = null; } html.push(extractedTags[tagPos + 1]); tagPos += 2; } else if (decPos < decorations.length) { emitTextUpTo(decorations[decPos]); currentDecoration = decorations[decPos + 1]; decPos += 2; } else { break; } } emitTextUpTo(sourceText.length); if (openDecoration) { html.push('</span>'); } return html.join(''); } var langHandlerRegistry = {}; function registerLangHandler(handler, fileExtensions) { for (var i = fileExtensions.length; --i >= 0; ) { var ext = fileExtensions[i]; if (!langHandlerRegistry.hasOwnProperty(ext)) { langHandlerRegistry[ext] = handler; } else if ('console' in window) { console.log('cannot override language handler %s', ext); } } } registerLangHandler(decorateSource, ['default-code']); registerLangHandler(decorateMarkup, ['default-markup', 'html', 'htm', 'xhtml', 'xml', 'xsl']); registerLangHandler(sourceDecorator({ keywords: CPP_KEYWORDS, hashComments: true, cStyleComments: true }), ['c', 'cc', 'cpp', 'cs', 'cxx', 'cyc']); registerLangHandler(sourceDecorator({ keywords: JAVA_KEYWORDS, cStyleComments: true }), ['java']); registerLangHandler(sourceDecorator({ keywords: SH_KEYWORDS, hashComments: true, multiLineStrings: true }), ['bsh', 'csh', 'sh']); registerLangHandler(sourceDecorator({ keywords: PYTHON_KEYWORDS, hashComments: true, multiLineStrings: true, tripleQuotedStrings: true }), ['cv', 'py']); registerLangHandler(sourceDecorator({ keywords: PERL_KEYWORDS, hashComments: true, multiLineStrings: true, regexLiterals: true }), ['perl', 'pl', 'pm']); registerLangHandler(sourceDecorator({ keywords: RUBY_KEYWORDS, hashComments: true, multiLineStrings: true, regexLiterals: true }), ['rb']); registerLangHandler(sourceDecorator({ keywords: JSCRIPT_KEYWORDS, cStyleComments: true, regexLiterals: true }), ['js']); function prettyPrintOne(sourceCodeHtml, opt_langExtension) { try { var sourceAndExtractedTags = extractTags(sourceCodeHtml); var source = sourceAndExtractedTags.source; var extractedTags = sourceAndExtractedTags.tags; if (!langHandlerRegistry.hasOwnProperty(opt_langExtension)) { opt_langExtension = /^\s*</.test(source) ? 'default-markup' : 'default-code'; } var decorations = langHandlerRegistry[opt_langExtension].call({}, source); return recombineTagsAndDecorations(source, extractedTags, decorations); } catch (e) { if ('console' in window) { console.log(e); console.trace(); } return sourceCodeHtml; } } function prettyPrint(opt_whenDone) { var isIE6 = _pr_isIE6(); var codeSegments = [document.getElementsByTagName('pre'), document.getElementsByTagName('code'), document.getElementsByTagName('xmp')]; var elements = []; for (var i = 0; i < codeSegments.length; ++i) { for (var j = 0; j < codeSegments[i].length; ++j) { elements.push(codeSegments[i][j]); } } codeSegments = null; var k = 0; function doWork() { var endTime = (PR_SHOULD_USE_CONTINUATION ? new Date().getTime() + 250 : Infinity); for (; k < elements.length && new Date().getTime() < endTime; k++) { var cs = elements[k]; if (cs.className && cs.className.indexOf('prettyprint') >= 0) { var langExtension = cs.className.match(/\blang-(\w+)\b/); if (langExtension) { langExtension = langExtension[1]; } var nested = false; for (var p = cs.parentNode; p; p = p.parentNode) { if ((p.tagName === 'pre' || p.tagName === 'code' || p.tagName === 'xmp') && p.className && p.className.indexOf('prettyprint') >= 0) { nested = true; break; } } if (!nested) { var content = getInnerHtml(cs); content = content.replace(/(?:\r\n?|\n)$/, ''); var newContent = prettyPrintOne(content, langExtension); if (!isRawContent(cs)) { cs.innerHTML = newContent; } else { var pre = document.createElement('PRE'); for (var i = 0; i < cs.attributes.length; ++i) { var a = cs.attributes[i]; if (a.specified) { var aname = a.name.toLowerCase(); if (aname === 'class') { pre.className = a.value; } else { pre.setAttribute(a.name, a.value); } } } pre.innerHTML = newContent; cs.parentNode.replaceChild(pre, cs); cs = pre; } if (isIE6 && cs.tagName === 'PRE') { var lineBreaks = cs.getElementsByTagName('br'); for (var j = lineBreaks.length; --j >= 0; ) { var lineBreak = lineBreaks[j]; lineBreak.parentNode.replaceChild(document.createTextNode('\r\n'), lineBreak); } } } } } if (k < elements.length) { setTimeout(doWork, 250); } else if (opt_whenDone) { opt_whenDone(); } } doWork(); } window['PR_normalizedHtml'] = normalizedHtml; window['prettyPrintOne'] = prettyPrintOne; window['prettyPrint'] = prettyPrint; window['PR'] = { 'createSimpleLexer': createSimpleLexer, 'registerLangHandler': registerLangHandler, 'sourceDecorator': sourceDecorator, 'PR_ATTRIB_NAME': PR_ATTRIB_NAME, 'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE, 'PR_COMMENT': PR_COMMENT, 'PR_DECLARATION': PR_DECLARATION, 'PR_KEYWORD': PR_KEYWORD, 'PR_LITERAL': PR_LITERAL, 'PR_NOCODE': PR_NOCODE, 'PR_PLAIN': PR_PLAIN, 'PR_PUNCTUATION': PR_PUNCTUATION, 'PR_SOURCE': PR_SOURCE, 'PR_STRING': PR_STRING, 'PR_TAG': PR_TAG, 'PR_TYPE': PR_TYPE }; })();
\ No newline at end of file +var PR_SHOULD_USE_CONTINUATION = true; var PR_TAB_WIDTH = 8; var PR_normalizedHtml; var PR; var prettyPrintOne; var prettyPrint; function _pr_isIE6() { var isIE6 = navigator && navigator.userAgent && /\bMSIE 6\./.test(navigator.userAgent); _pr_isIE6 = function() { return isIE6; }; return isIE6; } (function() { function wordSet(words) { words = words.split(/ /g); var set = {}; for (var i = words.length; --i >= 0; ) { var w = words[i]; if (w) { set[w] = null; } } return set; } var FLOW_CONTROL_KEYWORDS = "break continue do else for if return while "; var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " + "double enum extern float goto int long register short signed sizeof " + "static struct switch typedef union unsigned void volatile "; var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " + "new operator private protected public this throw true try "; var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool " + "concept concept_map const_cast constexpr decltype " + "dynamic_cast explicit export friend inline late_check " + "mutable namespace nullptr reinterpret_cast static_assert static_cast " + "template typeid typename typeof using virtual wchar_t where "; var JAVA_KEYWORDS = COMMON_KEYWORDS + "boolean byte extends final finally implements import instanceof null " + "native package strictfp super synchronized throws transient "; var CSHARP_KEYWORDS = JAVA_KEYWORDS + "as base by checked decimal delegate descending event " + "fixed foreach from group implicit in interface internal into is lock " + "object out override orderby params readonly ref sbyte sealed " + "stackalloc string select uint ulong unchecked unsafe ushort var "; var JSCRIPT_KEYWORDS = COMMON_KEYWORDS + "debugger eval export function get null set undefined var with " + "Infinity NaN "; var PERL_KEYWORDS = "caller delete die do dump elsif eval exit foreach for " + "goto if import last local my next no our print package redo require " + "sub undef unless until use wantarray while BEGIN END "; var PYTHON_KEYWORDS = FLOW_CONTROL_KEYWORDS + "and as assert class def del " + "elif except exec finally from global import in is lambda " + "nonlocal not or pass print raise try with yield " + "False True None "; var RUBY_KEYWORDS = FLOW_CONTROL_KEYWORDS + "alias and begin case class def" + " defined elsif end ensure false in module next nil not or redo rescue " + "retry self super then true undef unless until when yield BEGIN END "; var SH_KEYWORDS = FLOW_CONTROL_KEYWORDS + "case done elif esac eval fi " + "function in local set then until "; var ALL_KEYWORDS = (CPP_KEYWORDS + CSHARP_KEYWORDS + JSCRIPT_KEYWORDS + PERL_KEYWORDS + PYTHON_KEYWORDS + RUBY_KEYWORDS + SH_KEYWORDS); var PR_STRING = 'str'; var PR_KEYWORD = 'kwd'; var PR_COMMENT = 'com'; var PR_TYPE = 'typ'; var PR_LITERAL = 'lit'; var PR_PUNCTUATION = 'pun'; var PR_PLAIN = 'pln'; var PR_TAG = 'tag'; var PR_DECLARATION = 'dec'; var PR_SOURCE = 'src'; var PR_ATTRIB_NAME = 'atn'; var PR_ATTRIB_VALUE = 'atv'; var PR_NOCODE = 'nocode'; function isWordChar(ch) { return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'); } function spliceArrayInto(inserted, container, containerPosition, countReplaced) { inserted.unshift(containerPosition, countReplaced || 0); try { container.splice.apply(container, inserted); } finally { inserted.splice(0, 2); } } var REGEXP_PRECEDER_PATTERN = function() { var preceders = ["!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=", "&=", "(", "*", "*=", "+=", ",", "-=", "->", "/", "/=", ":", "::", ";", "<", "<<", "<<=", "<=", "=", "==", "===", ">", ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[", "^", "^=", "^^", "^^=", "{", "|", "|=", "||", "||=", "~", "break", "case", "continue", "delete", "do", "else", "finally", "instanceof", "return", "throw", "try", "typeof"]; var pattern = '(?:' + '(?:(?:^|[^0-9.])\\.{1,3})|' + '(?:(?:^|[^\\+])\\+)|' + '(?:(?:^|[^\\-])-)'; for (var i = 0; i < preceders.length; ++i) { var preceder = preceders[i]; if (isWordChar(preceder.charAt(0))) { pattern += '|\\b' + preceder; } else { pattern += '|' + preceder.replace(/([^=<>:&])/g, '\\$1'); } } pattern += '|^)\\s*$'; return new RegExp(pattern); } (); var pr_amp = /&/g; var pr_lt = /</g; var pr_gt = />/g; var pr_quot = /\"/g; function attribToHtml(str) { return str.replace(pr_amp, '&').replace(pr_lt, '<').replace(pr_gt, '>').replace(pr_quot, '"'); } function textToHtml(str) { return str.replace(pr_amp, '&').replace(pr_lt, '<').replace(pr_gt, '>'); } var pr_ltEnt = /</g; var pr_gtEnt = />/g; var pr_aposEnt = /'/g; var pr_quotEnt = /"/g; var pr_ampEnt = /&/g; var pr_nbspEnt = / /g; function htmlToText(html) { var pos = html.indexOf('&'); if (pos < 0) { return html; } for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0; ) { var end = html.indexOf(';', pos); if (end >= 0) { var num = html.substring(pos + 3, end); var radix = 10; if (num && num.charAt(0) === 'x') { num = num.substring(1); radix = 16; } var codePoint = parseInt(num, radix); if (!isNaN(codePoint)) { html = (html.substring(0, pos) + String.fromCharCode(codePoint) + html.substring(end + 1)); } } } return html.replace(pr_ltEnt, '<').replace(pr_gtEnt, '>').replace(pr_aposEnt, "'").replace(pr_quotEnt, '"').replace(pr_ampEnt, '&').replace(pr_nbspEnt, ' '); } function isRawContent(node) { return 'XMP' === node.tagName; } function normalizedHtml(node, out) { switch (node.nodeType) { case 1: var name = node.tagName.toLowerCase(); out.push('<', name); for (var i = 0; i < node.attributes.length; ++i) { var attr = node.attributes[i]; if (!attr.specified) { continue; } out.push(' '); normalizedHtml(attr, out); } out.push('>'); for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out); } if (node.firstChild || !/^(?:br|link|img)$/.test(name)) { out.push('<\/', name, '>'); } break; case 2: out.push(node.name.toLowerCase(), '="', attribToHtml(node.value), '"'); break; case 3: case 4: out.push(textToHtml(node.nodeValue)); break; } } var PR_innerHtmlWorks = null; function getInnerHtml(node) { if (null === PR_innerHtmlWorks) { var testNode = document.createElement('PRE'); testNode.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />')); PR_innerHtmlWorks = !/</.test(testNode.innerHTML); } if (PR_innerHtmlWorks) { var content = node.innerHTML; if (isRawContent(node)) { content = textToHtml(content); } return content; } var out = []; for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out); } return out.join(''); } function makeTabExpander(tabWidth) { var SPACES = ' '; var charInLine = 0; return function(plainText) { var out = null; var pos = 0; for (var i = 0, n = plainText.length; i < n; ++i) { var ch = plainText.charAt(i); switch (ch) { case '\t': if (!out) { out = []; } out.push(plainText.substring(pos, i)); var nSpaces = tabWidth - (charInLine % tabWidth); charInLine += nSpaces; for (; nSpaces >= 0; nSpaces -= SPACES.length) { out.push(SPACES.substring(0, nSpaces)); } pos = i + 1; break; case '\n': charInLine = 0; break; default: ++charInLine; } } if (!out) { return plainText; } out.push(plainText.substring(pos)); return out.join(''); }; } var pr_chunkPattern = /(?:[^<]+|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g; var pr_commentPrefix = /^<!--/; var pr_cdataPrefix = /^<\[CDATA\[/; var pr_brPrefix = /^<br\b/i; var pr_tagNameRe = /^<(\/?)([a-zA-Z]+)/; function extractTags(s) { var matches = s.match(pr_chunkPattern); var sourceBuf = []; var sourceBufLen = 0; var extractedTags = []; if (matches) { for (var i = 0, n = matches.length; i < n; ++i) { var match = matches[i]; if (match.length > 1 && match.charAt(0) === '<') { if (pr_commentPrefix.test(match)) { continue; } if (pr_cdataPrefix.test(match)) { sourceBuf.push(match.substring(9, match.length - 3)); sourceBufLen += match.length - 12; } else if (pr_brPrefix.test(match)) { sourceBuf.push('\n'); ++sourceBufLen; } else { if (match.indexOf(PR_NOCODE) >= 0 && isNoCodeTag(match)) { var name = match.match(pr_tagNameRe)[2]; var depth = 1; end_tag_loop: for (var j = i + 1; j < n; ++j) { var name2 = matches[j].match(pr_tagNameRe); if (name2 && name2[2] === name) { if (name2[1] === '/') { if (--depth === 0) { break end_tag_loop; } } else { ++depth; } } } if (j < n) { extractedTags.push(sourceBufLen, matches.slice(i, j + 1).join('')); i = j; } else { extractedTags.push(sourceBufLen, match); } } else { extractedTags.push(sourceBufLen, match); } } } else { var literalText = htmlToText(match); sourceBuf.push(literalText); sourceBufLen += literalText.length; } } } return { source: sourceBuf.join(''), tags: extractedTags }; } function isNoCodeTag(tag) { return !!tag.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g, ' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/); } function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) { var shortcuts = {}; (function() { var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns); for (var i = allPatterns.length; --i >= 0; ) { var patternParts = allPatterns[i]; var shortcutChars = patternParts[3]; if (shortcutChars) { for (var c = shortcutChars.length; --c >= 0; ) { shortcuts[shortcutChars.charAt(c)] = patternParts; } } } })(); var nPatterns = fallthroughStylePatterns.length; var notWs = /\S/; return function(sourceCode, opt_basePos) { opt_basePos = opt_basePos || 0; var decorations = [opt_basePos, PR_PLAIN]; var lastToken = ''; var pos = 0; var tail = sourceCode; while (tail.length) { var style; var token = null; var match; var patternParts = shortcuts[tail.charAt(0)]; if (patternParts) { match = tail.match(patternParts[1]); token = match[0]; style = patternParts[0]; } else { for (var i = 0; i < nPatterns; ++i) { patternParts = fallthroughStylePatterns[i]; var contextPattern = patternParts[2]; if (contextPattern && !contextPattern.test(lastToken)) { continue; } match = tail.match(patternParts[1]); if (match) { token = match[0]; style = patternParts[0]; break; } } if (!token) { style = PR_PLAIN; token = tail.substring(0, 1); } } decorations.push(opt_basePos + pos, style); pos += token.length; tail = tail.substring(token.length); if (style !== PR_COMMENT && notWs.test(token)) { lastToken = token; } } return decorations; }; } var PR_MARKUP_LEXER = createSimpleLexer([], [[PR_PLAIN, /^[^<]+/, null], [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/, null], [PR_COMMENT, /^<!--[\s\S]*?(?:-->|$)/, null], [PR_SOURCE, /^<\?[\s\S]*?(?:\?>|$)/, null], [PR_SOURCE, /^<%[\s\S]*?(?:%>|$)/, null], [PR_SOURCE, /^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i, null], [PR_TAG, /^<\/?\w[^<>]*>/, null]]); var PR_SOURCE_CHUNK_PARTS = /^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/; function tokenizeMarkup(source) { var decorations = PR_MARKUP_LEXER(source); for (var i = 0; i < decorations.length; i += 2) { if (decorations[i + 1] === PR_SOURCE) { var start, end; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var sourceChunk = source.substring(start, end); var match = sourceChunk.match(PR_SOURCE_CHUNK_PARTS); if (match) { decorations.splice(i, 2, start, PR_TAG, start + match[1].length, PR_SOURCE, start + match[1].length + (match[2] || '').length, PR_TAG); } } } return decorations; } var PR_TAG_LEXER = createSimpleLexer([[PR_ATTRIB_VALUE, /^\'[^\']*(?:\'|$)/, null, "'"], [PR_ATTRIB_VALUE, /^\"[^\"]*(?:\"|$)/, null, '"'], [PR_PUNCTUATION, /^[<>\/=]+/, null, '<>/=']], [[PR_TAG, /^[\w:\-]+/, /^</], [PR_ATTRIB_VALUE, /^[\w\-]+/, /^=/], [PR_ATTRIB_NAME, /^[\w:\-]+/, null], [PR_PLAIN, /^\s+/, null, ' \t\r\n']]); function splitTagAttributes(source, decorations) { for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; if (style === PR_TAG) { var start, end; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var chunk = source.substring(start, end); var subDecorations = PR_TAG_LEXER(chunk, start); spliceArrayInto(subDecorations, decorations, i, 2); i += subDecorations.length - 2; } } return decorations; } function sourceDecorator(options) { var shortcutStylePatterns = [], fallthroughStylePatterns = []; if (options.tripleQuotedStrings) { shortcutStylePatterns.push([PR_STRING, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, '\'"']); } else if (options.multiLineStrings) { shortcutStylePatterns.push([PR_STRING, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, '\'"`']); } else { shortcutStylePatterns.push([PR_STRING, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, '"\'']); } fallthroughStylePatterns.push([PR_PLAIN, /^(?:[^\'\"\`\/\#]+)/, null, ' \r\n']); if (options.hashComments) { shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']); } if (options.cStyleComments) { fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]); fallthroughStylePatterns.push([PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]); } if (options.regexLiterals) { var REGEX_LITERAL = ('^/(?=[^/*])' + '(?:[^/\\x5B\\x5C]' + '|\\x5C[\\s\\S]' + '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+' + '(?:/|$)'); fallthroughStylePatterns.push([PR_STRING, new RegExp(REGEX_LITERAL), REGEXP_PRECEDER_PATTERN]); } var keywords = wordSet(options.keywords); options = null; var splitStringAndCommentTokens = createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns); var styleLiteralIdentifierPuncRecognizer = createSimpleLexer([], [[PR_PLAIN, /^\s+/, null, ' \r\n'], [PR_PLAIN, /^[a-z_$@][a-z_$@0-9]*/i, null], [PR_LITERAL, /^0x[a-f0-9]+[a-z]/i, null], [PR_LITERAL, /^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?[a-z]*/i, null, '123456789'], [PR_PUNCTUATION, /^[^\s\w\.$@]+/, null]]); function splitNonStringNonCommentTokens(source, decorations) { for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; if (style === PR_PLAIN) { var start, end, chunk, subDecs; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; chunk = source.substring(start, end); subDecs = styleLiteralIdentifierPuncRecognizer(chunk, start); for (var j = 0, m = subDecs.length; j < m; j += 2) { var subStyle = subDecs[j + 1]; if (subStyle === PR_PLAIN) { var subStart = subDecs[j]; var subEnd = j + 2 < m ? subDecs[j + 2] : chunk.length; var token = source.substring(subStart, subEnd); if (token === '.') { subDecs[j + 1] = PR_PUNCTUATION; } else if (token in keywords) { subDecs[j + 1] = PR_KEYWORD; } else if (/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(token)) { subDecs[j + 1] = token.charAt(0) === '@' ? PR_LITERAL : PR_TYPE; } } } spliceArrayInto(subDecs, decorations, i, 2); i += subDecs.length - 2; } } return decorations; } return function(sourceCode) { var decorations = splitStringAndCommentTokens(sourceCode); decorations = splitNonStringNonCommentTokens(sourceCode, decorations); return decorations; }; } var decorateSource = sourceDecorator({ keywords: ALL_KEYWORDS, hashComments: true, cStyleComments: true, multiLineStrings: true, regexLiterals: true }); function splitSourceNodes(source, decorations) { for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; if (style === PR_SOURCE) { var start, end; start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var subDecorations = decorateSource(source.substring(start, end)); for (var j = 0, m = subDecorations.length; j < m; j += 2) { subDecorations[j] += start; } spliceArrayInto(subDecorations, decorations, i, 2); i += subDecorations.length - 2; } } return decorations; } function splitSourceAttributes(source, decorations) { var nextValueIsSource = false; for (var i = 0; i < decorations.length; i += 2) { var style = decorations[i + 1]; var start, end; if (style === PR_ATTRIB_NAME) { start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; nextValueIsSource = /^on|^style$/i.test(source.substring(start, end)); } else if (style === PR_ATTRIB_VALUE) { if (nextValueIsSource) { start = decorations[i]; end = i + 2 < decorations.length ? decorations[i + 2] : source.length; var attribValue = source.substring(start, end); var attribLen = attribValue.length; var quoted = (attribLen >= 2 && /^[\"\']/.test(attribValue) && attribValue.charAt(0) === attribValue.charAt(attribLen - 1)); var attribSource; var attribSourceStart; var attribSourceEnd; if (quoted) { attribSourceStart = start + 1; attribSourceEnd = end - 1; attribSource = attribValue; } else { attribSourceStart = start + 1; attribSourceEnd = end - 1; attribSource = attribValue.substring(1, attribValue.length - 1); } var attribSourceDecorations = decorateSource(attribSource); for (var j = 0, m = attribSourceDecorations.length; j < m; j += 2) { attribSourceDecorations[j] += attribSourceStart; } if (quoted) { attribSourceDecorations.push(attribSourceEnd, PR_ATTRIB_VALUE); spliceArrayInto(attribSourceDecorations, decorations, i + 2, 0); } else { spliceArrayInto(attribSourceDecorations, decorations, i, 2); } } nextValueIsSource = false; } } return decorations; } function decorateMarkup(sourceCode) { var decorations = tokenizeMarkup(sourceCode); decorations = splitTagAttributes(sourceCode, decorations); decorations = splitSourceNodes(sourceCode, decorations); decorations = splitSourceAttributes(sourceCode, decorations); return decorations; } function recombineTagsAndDecorations(sourceText, extractedTags, decorations) { var html = []; var outputIdx = 0; var openDecoration = null; var currentDecoration = null; var tagPos = 0; var decPos = 0; var tabExpander = makeTabExpander(PR_TAB_WIDTH); var adjacentSpaceRe = /([\r\n ]) /g; var startOrSpaceRe = /(^| ) /gm; var newlineRe = /\r\n?|\n/g; var trailingSpaceRe = /[ \r\n]$/; var lastWasSpace = true; function emitTextUpTo(sourceIdx) { if (sourceIdx > outputIdx) { if (openDecoration && openDecoration !== currentDecoration) { html.push('</span>'); openDecoration = null; } if (!openDecoration && currentDecoration) { openDecoration = currentDecoration; html.push('<span class="', openDecoration, '">'); } var htmlChunk = textToHtml(tabExpander(sourceText.substring(outputIdx, sourceIdx))).replace(lastWasSpace ? startOrSpaceRe : adjacentSpaceRe, '$1 '); lastWasSpace = trailingSpaceRe.test(htmlChunk); html.push(htmlChunk.replace(newlineRe, '<br />')); outputIdx = sourceIdx; } } while (true) { var outputTag; if (tagPos < extractedTags.length) { if (decPos < decorations.length) { outputTag = extractedTags[tagPos] <= decorations[decPos]; } else { outputTag = true; } } else { outputTag = false; } if (outputTag) { emitTextUpTo(extractedTags[tagPos]); if (openDecoration) { html.push('</span>'); openDecoration = null; } html.push(extractedTags[tagPos + 1]); tagPos += 2; } else if (decPos < decorations.length) { emitTextUpTo(decorations[decPos]); currentDecoration = decorations[decPos + 1]; decPos += 2; } else { break; } } emitTextUpTo(sourceText.length); if (openDecoration) { html.push('</span>'); } return html.join(''); } var langHandlerRegistry = {}; function registerLangHandler(handler, fileExtensions) { for (var i = fileExtensions.length; --i >= 0; ) { var ext = fileExtensions[i]; if (!langHandlerRegistry.hasOwnProperty(ext)) { langHandlerRegistry[ext] = handler; } else if ('console' in window) { console.log('cannot override language handler %s', ext); } } } registerLangHandler(decorateSource, ['default-code']); registerLangHandler(decorateMarkup, ['default-markup', 'html', 'htm', 'xhtml', 'xml', 'xsl']); registerLangHandler(sourceDecorator({ keywords: CPP_KEYWORDS, hashComments: true, cStyleComments: true }), ['c', 'cc', 'cpp', 'cs', 'cxx', 'cyc']); registerLangHandler(sourceDecorator({ keywords: JAVA_KEYWORDS, cStyleComments: true }), ['java']); registerLangHandler(sourceDecorator({ keywords: SH_KEYWORDS, hashComments: true, multiLineStrings: true }), ['bsh', 'csh', 'sh']); registerLangHandler(sourceDecorator({ keywords: PYTHON_KEYWORDS, hashComments: true, multiLineStrings: true, tripleQuotedStrings: true }), ['cv', 'py']); registerLangHandler(sourceDecorator({ keywords: PERL_KEYWORDS, hashComments: true, multiLineStrings: true, regexLiterals: true }), ['perl', 'pl', 'pm']); registerLangHandler(sourceDecorator({ keywords: RUBY_KEYWORDS, hashComments: true, multiLineStrings: true, regexLiterals: true }), ['rb']); registerLangHandler(sourceDecorator({ keywords: JSCRIPT_KEYWORDS, cStyleComments: true, regexLiterals: true }), ['js']); function prettyPrintOne(sourceCodeHtml, opt_langExtension) { try { var sourceAndExtractedTags = extractTags(sourceCodeHtml); var source = sourceAndExtractedTags.source; var extractedTags = sourceAndExtractedTags.tags; if (!langHandlerRegistry.hasOwnProperty(opt_langExtension)) { opt_langExtension = /^\s*</.test(source) ? 'default-markup' : 'default-code'; } var decorations = langHandlerRegistry[opt_langExtension].call({}, source); return recombineTagsAndDecorations(source, extractedTags, decorations); } catch (e) { if ('console' in window) { console.log(e); console.trace(); } return sourceCodeHtml; } } function prettyPrint(opt_whenDone) { var isIE6 = _pr_isIE6(); var codeSegments = [document.getElementsByTagName('pre'), document.getElementsByTagName('code'), document.getElementsByTagName('xmp')]; var elements = []; for (var i = 0; i < codeSegments.length; ++i) { for (var j = 0; j < codeSegments[i].length; ++j) { elements.push(codeSegments[i][j]); } } codeSegments = null; var k = 0; function doWork() { var endTime = (PR_SHOULD_USE_CONTINUATION ? new Date().getTime() + 250 : Infinity); for (; k < elements.length && new Date().getTime() < endTime; k++) { var cs = elements[k]; if (cs.className && cs.className.indexOf('prettyprint') >= 0) { var langExtension = cs.className.match(/\blang-(\w+)\b/); if (langExtension) { langExtension = langExtension[1]; } var nested = false; for (var p = cs.parentNode; p; p = p.parentNode) { if ((p.tagName === 'pre' || p.tagName === 'code' || p.tagName === 'xmp') && p.className && p.className.indexOf('prettyprint') >= 0) { nested = true; break; } } if (!nested) { var content = getInnerHtml(cs); content = content.replace(/(?:\r\n?|\n)$/, ''); var newContent = prettyPrintOne(content, langExtension); if (!isRawContent(cs)) { cs.innerHTML = newContent; } else { var pre = document.createElement('PRE'); for (var i = 0; i < cs.attributes.length; ++i) { var a = cs.attributes[i]; if (a.specified) { var aname = a.name.toLowerCase(); if (aname === 'class') { pre.className = a.value; } else { pre.setAttribute(a.name, a.value); } } } pre.innerHTML = newContent; cs.parentNode.replaceChild(pre, cs); cs = pre; } if (isIE6 && cs.tagName === 'PRE') { var lineBreaks = cs.getElementsByTagName('br'); for (var j = lineBreaks.length; --j >= 0; ) { var lineBreak = lineBreaks[j]; lineBreak.parentNode.replaceChild(document.createTextNode('\r\n'), lineBreak); } } } } } if (k < elements.length) { setTimeout(doWork, 250); } else if (opt_whenDone) { opt_whenDone(); } } doWork(); } window['PR_normalizedHtml'] = normalizedHtml; window['prettyPrintOne'] = prettyPrintOne; window['prettyPrint'] = prettyPrint; window['PR'] = { 'createSimpleLexer': createSimpleLexer, 'registerLangHandler': registerLangHandler, 'sourceDecorator': sourceDecorator, 'PR_ATTRIB_NAME': PR_ATTRIB_NAME, 'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE, 'PR_COMMENT': PR_COMMENT, 'PR_DECLARATION': PR_DECLARATION, 'PR_KEYWORD': PR_KEYWORD, 'PR_LITERAL': PR_LITERAL, 'PR_NOCODE': PR_NOCODE, 'PR_PLAIN': PR_PLAIN, 'PR_PUNCTUATION': PR_PUNCTUATION, 'PR_SOURCE': PR_SOURCE, 'PR_STRING': PR_STRING, 'PR_TAG': PR_TAG, 'PR_TYPE': PR_TYPE }; })(); diff --git a/templates/content/js/com.cnprog.utils.js b/templates/content/js/com.cnprog.utils.js index 683b7a3f..e271ed78 100644 --- a/templates/content/js/com.cnprog.utils.js +++ b/templates/content/js/com.cnprog.utils.js @@ -119,4 +119,4 @@ var CPValidator = function(){ }(); //Search Engine Keyword Highlight with Javascript //http://scott.yang.id.au/code/se-hilite/ -Hilite={elementid:"content",exact:true,max_nodes:1000,onload:true,style_name:"hilite",style_name_suffix:true,debug_referrer:""};Hilite.search_engines=[["local","q"],["cnprog\\.","q"],["google\\.","q"],["search\\.yahoo\\.","p"],["search\\.msn\\.","q"],["search\\.live\\.","query"],["search\\.aol\\.","userQuery"],["ask\\.com","q"],["altavista\\.","q"],["feedster\\.","q"],["search\\.lycos\\.","q"],["alltheweb\\.","q"],["technorati\\.com/search/([^\\?/]+)",1],["dogpile\\.com/info\\.dogpl/search/web/([^\\?/]+)",1,true]];Hilite.decodeReferrer=function(d){var g=null;var e=new RegExp("");for(var c=0;c<Hilite.search_engines.length;c++){var f=Hilite.search_engines[c];e.compile("^http://(www\\.)?"+f[0],"i");var b=d.match(e);if(b){var a;if(isNaN(f[1])){a=Hilite.decodeReferrerQS(d,f[1])}else{a=b[f[1]+1]}if(a){a=decodeURIComponent(a);if(f.length>2&&f[2]){a=decodeURIComponent(a)}a=a.replace(/\'|"/g,"");a=a.split(/[\s,\+\.]+/);return a}break}}return null};Hilite.decodeReferrerQS=function(f,d){var b=f.indexOf("?");var c;if(b>=0){var a=new String(f.substring(b+1));b=0;c=0;while((b>=0)&&((c=a.indexOf("=",b))>=0)){var e,g;e=a.substring(b,c);b=a.indexOf("&",c)+1;if(e==d){if(b<=0){return a.substring(c+1)}else{return a.substring(c+1,b-1)}}else{if(b<=0){return null}}}}return null};Hilite.hiliteElement=function(f,e){if(!e||f.childNodes.length==0){return}var c=new Array();for(var b=0;b<e.length;b++){e[b]=e[b].toLowerCase();if(Hilite.exact){c.push("\\b"+e[b]+"\\b")}else{c.push(e[b])}}c=new RegExp(c.join("|"),"i");var a={};for(var b=0;b<e.length;b++){if(Hilite.style_name_suffix){a[e[b]]=Hilite.style_name+(b+1)}else{a[e[b]]=Hilite.style_name}}var d=function(m){var j=c.exec(m.data);if(j){var n=j[0];var i="";var h=m.splitText(j.index);var g=h.splitText(n.length);var l=m.ownerDocument.createElement("SPAN");m.parentNode.replaceChild(l,h);l.className=a[n.toLowerCase()];l.appendChild(h);return l}else{return m}};Hilite.walkElements(f.childNodes[0],1,d)};Hilite.hilite=function(){var a=Hilite.debug_referrer?Hilite.debug_referrer:document.referrer;var b=null;a=Hilite.decodeReferrer(a);if(a&&((Hilite.elementid&&(b=document.getElementById(Hilite.elementid)))||(b=document.body))){Hilite.hiliteElement(b,a)}};Hilite.walkElements=function(d,f,e){var a=/^(script|style|textarea)/i;var c=0;while(d&&f>0){c++;if(c>=Hilite.max_nodes){var b=function(){Hilite.walkElements(d,f,e)};setTimeout(b,50);return}if(d.nodeType==1){if(!a.test(d.tagName)&&d.childNodes.length>0){d=d.childNodes[0];f++;continue}}else{if(d.nodeType==3){d=e(d)}}if(d.nextSibling){d=d.nextSibling}else{while(f>0){d=d.parentNode;f--;if(d.nextSibling){d=d.nextSibling;break}}}}};if(Hilite.onload){if(window.attachEvent){window.attachEvent("onload",Hilite.hilite)}else{if(window.addEventListener){window.addEventListener("load",Hilite.hilite,false)}else{var __onload=window.onload;window.onload=function(){Hilite.hilite();__onload()}}}};
\ No newline at end of file +Hilite={elementid:"content",exact:true,max_nodes:1000,onload:true,style_name:"hilite",style_name_suffix:true,debug_referrer:""};Hilite.search_engines=[["local","q"],["cnprog\\.","q"],["google\\.","q"],["search\\.yahoo\\.","p"],["search\\.msn\\.","q"],["search\\.live\\.","query"],["search\\.aol\\.","userQuery"],["ask\\.com","q"],["altavista\\.","q"],["feedster\\.","q"],["search\\.lycos\\.","q"],["alltheweb\\.","q"],["technorati\\.com/search/([^\\?/]+)",1],["dogpile\\.com/info\\.dogpl/search/web/([^\\?/]+)",1,true]];Hilite.decodeReferrer=function(d){var g=null;var e=new RegExp("");for(var c=0;c<Hilite.search_engines.length;c++){var f=Hilite.search_engines[c];e.compile("^http://(www\\.)?"+f[0],"i");var b=d.match(e);if(b){var a;if(isNaN(f[1])){a=Hilite.decodeReferrerQS(d,f[1])}else{a=b[f[1]+1]}if(a){a=decodeURIComponent(a);if(f.length>2&&f[2]){a=decodeURIComponent(a)}a=a.replace(/\'|"/g,"");a=a.split(/[\s,\+\.]+/);return a}break}}return null};Hilite.decodeReferrerQS=function(f,d){var b=f.indexOf("?");var c;if(b>=0){var a=new String(f.substring(b+1));b=0;c=0;while((b>=0)&&((c=a.indexOf("=",b))>=0)){var e,g;e=a.substring(b,c);b=a.indexOf("&",c)+1;if(e==d){if(b<=0){return a.substring(c+1)}else{return a.substring(c+1,b-1)}}else{if(b<=0){return null}}}}return null};Hilite.hiliteElement=function(f,e){if(!e||f.childNodes.length==0){return}var c=new Array();for(var b=0;b<e.length;b++){e[b]=e[b].toLowerCase();if(Hilite.exact){c.push("\\b"+e[b]+"\\b")}else{c.push(e[b])}}c=new RegExp(c.join("|"),"i");var a={};for(var b=0;b<e.length;b++){if(Hilite.style_name_suffix){a[e[b]]=Hilite.style_name+(b+1)}else{a[e[b]]=Hilite.style_name}}var d=function(m){var j=c.exec(m.data);if(j){var n=j[0];var i="";var h=m.splitText(j.index);var g=h.splitText(n.length);var l=m.ownerDocument.createElement("SPAN");m.parentNode.replaceChild(l,h);l.className=a[n.toLowerCase()];l.appendChild(h);return l}else{return m}};Hilite.walkElements(f.childNodes[0],1,d)};Hilite.hilite=function(){var a=Hilite.debug_referrer?Hilite.debug_referrer:document.referrer;var b=null;a=Hilite.decodeReferrer(a);if(a&&((Hilite.elementid&&(b=document.getElementById(Hilite.elementid)))||(b=document.body))){Hilite.hiliteElement(b,a)}};Hilite.walkElements=function(d,f,e){var a=/^(script|style|textarea)/i;var c=0;while(d&&f>0){c++;if(c>=Hilite.max_nodes){var b=function(){Hilite.walkElements(d,f,e)};setTimeout(b,50);return}if(d.nodeType==1){if(!a.test(d.tagName)&&d.childNodes.length>0){d=d.childNodes[0];f++;continue}}else{if(d.nodeType==3){d=e(d)}}if(d.nextSibling){d=d.nextSibling}else{while(f>0){d=d.parentNode;f--;if(d.nextSibling){d=d.nextSibling;break}}}}};if(Hilite.onload){if(window.attachEvent){window.attachEvent("onload",Hilite.hilite)}else{if(window.addEventListener){window.addEventListener("load",Hilite.hilite,false)}else{var __onload=window.onload;window.onload=function(){Hilite.hilite();__onload()}}}}; diff --git a/templates/content/style/openid.css b/templates/content/style/openid.css index 7a892840..0d201df2 100644 --- a/templates/content/style/openid.css +++ b/templates/content/style/openid.css @@ -42,4 +42,4 @@ } .openid_selected { border: 4px solid #DDD; - }
\ No newline at end of file + } diff --git a/templates/content/style/style.css b/templates/content/style/style.css index 1cd5d438..fa20b014 100644 --- a/templates/content/style/style.css +++ b/templates/content/style/style.css @@ -2,13 +2,15 @@ @import url(/content/style/openid.css); @import url(/content/style/prettify.css); /* 公用 */ -body{background:#FFF; font-size:12px; line-height:150%; margin:0; padding:0; color:#000; font-family: "segoe ui",Helvetica,微软雅黑,宋体,Tahoma,Verdana,MingLiu,PMingLiu,Arial,sans-serif; +body{background:#FFF; font-size:12px; line-height:150%; margin:0; padding:0; color:#000; font-family: sans-serif; } div{margin:0 auto; padding:0;} h1,h2,h3,h4,h5,h6,ul,li,dl,dt,dd,form,img,p{margin:0; padding:0; border:none; } input, select {font-family:Trebuchet MS,"segoe ui",Helvetica,"Microsoft YaHei",宋体,Tahoma,Verdana,MingLiu,PMingLiu,Arial,sans-serif;} -p{margin-bottom:4px; font-size:13px; line-height:160%;} +p{margin-bottom:13px; font-size:13px; line-height:140%;} a {color:#333333; text-decoration:none;} + +.badges a {color:#763333;text-decoration:underline;} a:hover {text-decoration:underline;} .block{width:960px; height:auto;} .fleft{float:left;} @@ -76,45 +78,55 @@ blockquote /*页面布局*/ #wrapper {width:960px;margin:auto;padding:0;} -#roof {margin-top:0px;background:#FFF;} -#room {padding-top:10px;background-color:#FFF;border-bottom:1px solid #777;} -#CALeft{width:700px; float:left; position:relative;padding-left:5px} -#CARight{width:240px; float:right; padding-right:5px} +#roof { + position:relative; + margin-top:0px; + background:#FFF; +} +#room {padding:10px 0 10px 0;background-color:#FFF;border-bottom:1px solid #777;} +#CALeft{width:710px; float:left; position:relative;} +#CARight{width:240px; float:right;} #CAFull{float:left;padding:0 5px 0 5px;width:950px;} -#ground {width:100%;border-top:1px solid #000; padding-top:6px; padding-bottom:10px; text-align:center;background:#777;} -/*#licenseLogo {top:10px;right:10px;}*/ +#ground {width:100%;border-top:1px solid #000; padding-top:6px; padding-bottom:0px; text-align:center;background:#777;} +/*#licenseLogo {position:absolute;top:10px;right:10px;}*/ /*顶部及导航栏*/ -#top {height:20px; text-align:right; padding:3px;background-color:#ffffff;} -#header {width:960px;} +#top { + position:absolute; + top:0px; + right:0px; + height:20px; + text-align:right; + color:black; + padding:3px; + background-color:#ffffff; + width:500px; +} +/*#header {width:960px;}*/ #top a {height:35px; text-align:right; /*letter-spacing:1px; */ margin-left:20px;text-decoration:underline; font-size:12px; color:#333333;} -#logo {padding:5px;} +#logo { + padding: 5px 0px 0px 0px; + margin-bottom:-3px; +} #navBar {float:clear;position:relative;display:block;width:960px;} #navBar .nav {margin:20px 0px 0px 16px; /*letter-spacing:1px; */ } -#navBar .nav a {color:#333; background-color:#F9F7ED; - border-bottom: none; - border-left: 1px solid #aaaaaa; - border-right: 1px solid #aaaaaa; - border-top: 1px solid #aaaaaa; - padding:0px 12px 3px 12px; height:25px; line-height:30px;margin-left:10px; font-size:15px; font-weight:400; text-decoration:none;display: block;float: left;} +#navBar .nav a {color:#333333; background-color:#F9F7ED; + border: 1px solid #aaaaaa; + border-bottom: none; + padding:0px 12px 3px 12px; height:25px; line-height:30px;margin-left:10px; font-size:14px; font-weight:400; text-decoration:none;display: block;float: left;} #navBar .nav a:hover {text-decoration:underline} -#navBar .nav a.on {height:24px;line-height:28px; - border-top:1px solid #e66222; - border-bottom: 1px solid #d64000; - border-right:1px solid #e66222; - border-left:1px solid #e66222; - /*background:#A31E39; */ - background:#d64000; - color:#FFF; font-weight:600; text-decoration:none} +#navBar .nav a.on {height:24px;line-height:28px;border:1px solid #d64000; background:#B02B2C; color:#FFF; font-weight:600; text-decoration:none} #navBar .nav a.special {font-size:15px; color:#B02B2C; font-weight:bold; text-decoration:none; } #navBar .nav a.special:hover {text-decoration:underline;} #navBar .nav div.focus {float:right; padding-right:0px;} /*搜索栏*/ -#searchBar {background-color:#9db2b1;padding:5px;} /* #B02B2C */ +#searchBar { + background-color:#9db2b1;/*#e9b96e;*/ + padding:5px 0 0 0;} /* #B02B2C */ #searchBar .content { } #searchBar .searchInput {font-size:13px; height:18px; width:400px;} #searchBar .searchBtn {font-size:14px; height:26px; width:80px;} @@ -130,9 +142,7 @@ blockquote #listA .qstA thumb {float:left; } #listA .qstA H2 {font-size:15px; font-weight:800; margin:8px auto;padding:0px;} #listA .qstA H2 a {color:#663333; } -#listA .qstA .stat {font-size:13px; - /*letter-spacing:1px;*/ - float:right;} +#listA .qstA .stat {font-size:13px;letter-spacing:1px;float:right;} #listA .qstA .stat span {margin-right:5px;} #listA .qstA .stat td {min-width:40px;text-align:center;} #listA .qstA .stat .num {font-family:arial;color:#905213; font-size:20px; font-weight:800;} @@ -146,8 +156,9 @@ blockquote #listA .qstA .author {font-weight:400; } #listA .qstA .author a{ } #listA .qstA .summary{margin-right:5px;} + .evenMore {font-size:14px; font-weight:800;} -.questions-count{font-size:32px;font-family:arial;font-weight:600;padding:5px;color:#777;} +.questions-count{font-size:32px;font-family:sans-serif;font-weight:600;padding:0 0 5px 7px;color:#a40000;} /*内容块*/ .boxA {background:#777; padding:6px; margin-bottom:8px;} @@ -166,13 +177,13 @@ blockquote /** PAGINATOR **/ .paginator { padding:5px 0 10px 0; - font:normal 12px arial; + font:normal 12px sans-serif; } .paginator .prev-na, .paginator .next-na { padding:.3em; - font:bold .875em arial; + font:bold .875em sans-serif; } .paginator .prev-na, @@ -189,7 +200,7 @@ blockquote background-color:#fff; color:#777; padding:.3em; - font:bold 100% arial; + font:bold 100% sans-serif; } .paginator .prev, .paginator .prev-na { margin-right:.5em; } @@ -224,7 +235,7 @@ blockquote .paginator .text{ color:#777; padding:.3em; - font:bold 100% arial; + font:bold 100% sans-serif; } .paginator-container{ @@ -237,11 +248,14 @@ blockquote } /*标签*/ -.tag {font-size:100%; font-weight:normal; color:#333; text-decoration:none;background-color:#EEE; border-left:3px solid #777; border-top:1px solid #EEE; border-bottom:1px solid #CCC; border-right:1px solid #CCC; padding:1px 8px 1px 8px;} -.tags {font-family:arial; line-height:200%; display:block; margin-top:5px;} -.tags a {font-size:100%; font-weight:normal; color:#333; text-decoration:none;background-color:#EEE; border-left:3px solid #777; border-top:1px solid #EEE; border-bottom:1px solid #CCC; border-right:1px solid #CCC; padding:1px 8px 1px 8px;} +.tag {font-size:13px; font-weight:normal; color:#333; text-decoration:none;background-color:#EEE; border-left:3px solid #777; border-top:1px solid #EEE; border-bottom:1px solid #CCC; border-right:1px solid #CCC; padding:1px 8px 1px 8px;} +.tags {font-family:sans-serif; line-height:200%; display:block; margin-top:5px;} +.tags a {font-size:13px; font-weight:normal; color:#333; text-decoration:none;background-color:#EEE; border-left:3px solid #777; border-top:1px solid #EEE; border-bottom:1px solid #CCC; border-right:1px solid #CCC; padding:1px 8px 1px 8px;} .tags a:hover {background-color:#fFF;color:#333;} -.tag-number {font-weight:700;font-family:arial;} +.tagsbox {line-height:200%;} +.tagsbox a {font-size:13px; font-weight:normal; color:#333; text-decoration:none;background-color:#EEE; border-left:3px solid #777; border-top:1px solid #EEE; border-bottom:1px solid #CCC; border-right:1px solid #CCC; padding:1px 8px 1px 8px;} +.tagsbox a:hover {background-color:#fFF;color:#333;} +.tag-number {font-weight:700;font-family:sans-serif;} /*奖牌*/ a.medal { font-size:14px; line-height:250%; font-weight:800; color:#333; text-decoration:none; background:url(/content/images/medala.gif) no-repeat; border-left:1px solid #EEE; border-top:1px solid #EEE; border-bottom:1px solid #CCC; border-right:1px solid #CCC; padding:4px 12px 4px 6px;} @@ -291,9 +305,7 @@ a:hover.medal {color:#333; text-decoration:none; background:url(/content/images .headMedals {float:left; height:23px; line-height:23px; margin:5px 0 0 5px;padding:0px 6px 0px 15px; font-size:15px; font-weight:700; border-bottom:0px solid #777; border-left:0px solid #darkred; background-color:#FFF;background:url(/content/images/dot-list.gif) no-repeat left center;} .headLogin {float:left; padding:3px; font-size:15px; font-weight:800; background:url(/content/images/ico_login.gif) no-repeat; padding-left:24px;} .headNormal {text-align:left;padding:3px; font-size:15px; margin-bottom:12px; font-weight:800;border-bottom:1px solid #777;} -.headUser {text-align:left;padding:5px; font-size:20px; - /*letter-spacing:1px;*/ - margin-bottom:12px; font-weight:800;border-bottom:1px solid #777;} +.headUser {text-align:left;padding:5px; font-size:20px; letter-spacing:1px;margin-bottom:12px; font-weight:800;border-bottom:1px solid #777;} /*RSS订阅*/ #feeds {margin:10px 0; } #feeds a {background:url(/content/images/feed-icon-small.png) no-repeat 0; padding-left:18px; font-weight:700; font-size:13px; } @@ -322,7 +334,11 @@ a:hover.medal {color:#333; text-decoration:none; background:url(/content/images max-width:600px; } .question-mark{ - background-color:#E9E9FF; + /*background-color:#fff5e0; + border-top: 1px solid #eeeeec; + border-right: 1px solid #babdb6; + border-bottom: 1px solid #babdb6; + border-left: 1px solid #eeeeec;*/ text-align:left; padding:5px; overflow:hidden; @@ -411,6 +427,7 @@ div.comments { div.post-comments{ width:100%; + margin-bottom:10px; } form.post-comments textarea { @@ -433,6 +450,9 @@ span.form-error { font-weight:normal; margin-left:5px; } +p.form-item { + margin:0px; +} div.comments-container, div.comments-container-accepted, div.comments-container-owner, div.comments-container-deleted { display:none; @@ -473,11 +493,8 @@ a.comment-user:hover { /*回答*/ #answers {} .answer{ - border-bottom:1px dotted #666666; - padding-bottom:20px; - padding-top:20px; + padding-top:10px; width: 100%; - margin-bottom:10px; } .answer-body{ min-height:80px; @@ -511,7 +528,7 @@ a.comment-user:hover { .answered-accepted { background: #CCC; - color: #663333; + color: #763333; } .unanswered @@ -547,10 +564,11 @@ a.comment-user:hover { } /*标签列表*/ +/* .tagsbox {} -.tagsbox a {color:#000;line-height:30px;margin-right:10px;font-size:100%;background-color:#F9F7ED;padding:3px;} -.tagsbox a:hover {text-decoration:none;background-color:#F9F7CD;color:#B02B2C;} -.tagsList {margin:0; list-style-type:none;padding:0px;min-height:360px;} +.tagsbox a {color:#000;line-height:30px;margin-right:10px;font-size:100%;background-color:#F9F7ED;padding:3px;border:1px solid #aaaaaa;} +.tagsbox a:hover {text-decoration:none;background-color:#F9F7ED;color:#B02B2C;} */ +.tagsList {margin:0; list-style-type:none;padding:0px;min-height:360px;} .tagsList li {width:235px; float:left;} .badge-list{margin:0; list-style-type:none;} /*登录*/ @@ -563,7 +581,12 @@ a.comment-user:hover { .error{color:red;} .error-list li{padding:5px;} .login{margin-bottom:10px;} -.fieldset{border:solid 1px #777;margin-top:10px;padding:10px;} +.fieldset{ +/* border:solid 1px #777;*/ + border: none; + margin-top:10px; + padding:10px; +} .openid-input{background:url(/content/images/openid.gif) no-repeat;padding-left:15px;cursor:pointer;} .openid-login-input{ background-position:center left; @@ -701,7 +724,7 @@ span.form-error { .revision-number{ font-size:300%; font-weight:bold; - font-family:arial; + font-family:sans-serif; } .revision .body{ @@ -913,7 +936,7 @@ div.started .reputation-score { padding:3px; font-weight:bold; background-color:#CCC; - color:#663333; + color:#763333; } .revision-summary{ @@ -992,8 +1015,21 @@ ul.bulleta li {background:url(/content/images/bullet_green.gif) no-repeat 0px 2p .user ul {margin:0; list-style-type:none;} .user .thumb{clear:both;float:left; margin-right:4px; display:inline;} .yellowbg{background:yellow;} -.subtitle{line-height:30px;font-size:15px; font-weight:700;} -.message{padding:5px;font-weight:bold;background-color:#eee;margin:10px 0 10px 0;} + +.message{ + padding:5px; + margin:10px 0 10px 0; + background-color:#eee; + border: 1px solid #aaaaaa; +} +.message h1 { + padding-top:0px; + font-size:15px; +} +.message p { + margin-bottom:0px; +} + .warning{color:red;} .darkred{color:darkred;} .submit{ @@ -1015,30 +1051,68 @@ ul.bulleta li {background:url(/content/images/bullet_green.gif) no-repeat 0px 2p left: 0px; width: 100%; z-index: 100; - padding: 7px 0 5px 0; + padding: 0; text-align: center; - font-size: 130%; font-weight: Bold; color: #444; background-color: #F4A83D; } - -.notify span -{ - float: left; - width: 95%; - text-align: center; +.notify p { + margin-top:5px; + margin-bottom:5px; + font-size:16px; } - -.close-notify +#close-notify { - float: right; - margin-right: 20px; + position:absolute; + right:5px; + top:5px; + padding:0 3px 0 3px; color: #735005; text-decoration: none; + font-size:14px; + line-height:18px; background-color: #FAD163; border: 2px #735005 solid; - padding-left: 3px; - padding-right: 3px; cursor:pointer; } +#close-notify:hover { + text-decoration:none; +} + +.big { + font-size:15px; +} +.bigger { + font-size:14px; +} +.strong { + font-weight:bold; +} +.orange +{ + color:#d64000; + font-weight:bold; +} + +.about div { + padding:10px 5px 10px 5px; + border-top:1px dashed #aaaaaa; +} +.about div.first { + padding-top:0; + border-top:none; +} +.about p { + margin-bottom:10px; +} +.about a {color:#d64000;text-decoration:underline;} +.about h3{ + line-height:30px; + font-size:15px; + font-weight:700; + padding-top: 0px; +} +.highlight { + background-color:#FFF8C6; +} diff --git a/templates/faq.html b/templates/faq.html index 253d3590..78c433ae 100644 --- a/templates/faq.html +++ b/templates/faq.html @@ -10,104 +10,139 @@ <div class="headNormal"> {% trans "Frequently Asked Questions " %}(FAQ) </div> -<div id="main-body" style="width:100%"> - - <h3 class="subtitle">{% trans "What kinds of questions can I ask here?" %}</h3> - <p>{% trans "Most importanly - questions should be <strong>relevant</strong> to this community." %}<br> - {% trans "Before asking the question - please make sure to use search to see whether your question has alredy been answered."%}<br> - </p><br> - - <h3 class="subtitle">{% trans "What questions should I avoid asking?" %}</h3> - <p>{% trans "Please avoid asking questions that are not relevant to this community, too subjective and argumentative." %}</p> - </p><br> - - <h3 class="subtitle">{% trans "What should I avoid in my answers?" %}</h3> - <p>{% trans "site title" %} {% trans "is a Q&A site, not a discussion group. Therefore - please avoid having discussions in your answers, comment facility allows some space for brief discussions." %} - </p><br> +<div id="main-body" class="about" style="width:100%"> + + <div class="first"> + <h3 class="subtitle">{% trans "What kinds of questions can I ask here?" %}</h3> + <p>{% trans "Most importanly - questions should be <strong>relevant</strong> to this community." %} + {% trans "Before asking the question - please make sure to use search to see whether your question has alredy been answered."%} + </p> + + <h3 class="subtitle">{% trans "What questions should I avoid asking?" %}</h3> + <p>{% trans "Please avoid asking questions that are not relevant to this community, too subjective and argumentative." %}</p> + </p> + </div> - <h3 class="subtitle">{% trans "Who moderates this community?" %}</h3> - <p>{% trans "The short answer is: <strong>you</strong>." %}<br> - {% trans "This website is moderated by the users." %} - {% trans "The reputation system allows users earn the authorization to perform a variety of moderation tasks." %} - </p><br> + <div> + <h3 class="subtitle">{% trans "What should I avoid in my answers?" %}</h3> + <p>{% trans "site title" %} {% trans "is a Q&A site, not a discussion group. Therefore - please avoid having discussions in your answers, comment facility allows some space for brief discussions." %}</p> + </div> - <h3 class="subtitle">{% trans "How does reputation system work?" %}</h3> - <p>{% trans "Anyone can ask questions and give answers, points are not necessary for that." %}<br> - {% trans "As we've said before, users help running this site. Point system helps select users who can administer this community."%} - {% trans "Reputation points roughly measure how community trusts you. These points are given to you directly by other members of the community." %} - </p> - <p> - {% trans "For example, if you ask an interesting question or give a helpful answer, your input will be upvoted and you will gain more trust in the community." %} - {% trans "If on the other hand someone gives a misleading answer, the answer will be voted down and he/she loses some points." %} - {% trans "Each vote in favor will generate <strong>10</strong> points, each vote against will subtract <strong>2</strong> points." %} - {% trans "Through the votes of other people you can accumulate a maximum of <strong>200</strong> points." %} - {% trans "After accumulating certain number of points, you can do more:" %} - <table style="font-family:arial;" cellspacing="3" cellpadding="3"> - <tr> - <th width="40px" style="text-align:right"></th> - <th width="300px"></th> - </tr> - <tr> - <td style="text-align:right;padding-right:5px"><strong>15</strong></td> - <td>{% trans "upvote" %}</td> - </tr> - <tr> - <td style="text-align:right;padding-right:5px"><strong>15</strong></td> - <td>{% trans "use tags" %}</td> - </tr> - <tr> - <td style="text-align:right;padding-right:5px"><strong>50</strong></td> - <td>{% trans "add comments" %}</td> - </tr> - <tr> - <td style="text-align:right;padding-right:5px"><strong>100</strong></td> - <td>{% trans "downvote" %}</td> - </tr><tr> - <td style="text-align:right;padding-right:5px"><strong>250</strong></td> - <td>打开关闭自己的问题</td> - </tr> - <tr> - <td style="text-align:right;padding-right:5px"><strong>500</strong></td> - <td>{% trans "retag questions" %}</td> - </tr> - <tr> - <td style="text-align:right;padding-right:5px"><strong>750</strong></td> - <td>{% trans "edit community wiki questions" %}</td> - </tr> - <tr> - <td style="text-align:right;padding-right:5px"><strong>2000</strong></td> - <td>{% trans "edit any answer" %}</td> - </tr> - <tr> - <td style="text-align:right;padding-right:5px"><strong>3000</strong></td> - <td>{% trans "open any closed question" %}</td> - </tr> - <tr> - <td style="text-align:right;padding-right:5px"><strong>5000</strong></td> - <td>{% trans "delete any comment" %}</td> - </tr> - <tr> - <td style="text-align:right;padding-right:5px"><strong>10000</strong></td> - <td>{% trans "delete any questions and answers and perform other moderation tasks" %}</td> - </tr> + <div> + <h3 class="subtitle">{% trans "Who moderates this community?" %}</h3> + <p>{% trans "The short answer is: <strong>you</strong>." %} + {% trans "This website is moderated by the users." %} + {% trans "The reputation system allows users earn the authorization to perform a variety of moderation tasks." %} + </p> + </div> + + <div> + <h3 class="subtitle">{% trans "How does reputation system work?" %}</h3> + <p>{% trans "Rep system summary" %}</p> + <p> + For example, if you ask an interesting question or give a helpful answer, your input will be upvoted. + On the other hand if the answer is misleading - it will be downvoted. + Each vote in favor will generate <strong>10</strong> points, each vote against will subtract <strong>2</strong> points. + There is a limit of <strong>200</strong> points that can be accumulated per question or answer. + + The table below explains reputation point requirements for each type of moderation task. + </p> + + <table style="font-family:arial;" cellspacing="3" cellpadding="3"> + <tr> + <th width="40px" style="text-align:right"></th> + <th width="300px"></th> + </tr> + <!-- + <tr> + <td style="text-align:right;padding-right:5px"><strong>15</strong></td> + <td>{% trans "upvote" %}</td> + </tr> + <tr> + <td style="text-align:right;padding-right:5px"><strong>15</strong></td> + <td>{% trans "use tags" %}</td> + </tr> + --> + <tr> + <td style="text-align:right;padding-right:5px"><strong>50</strong></td> + <td>{% trans "add comments" %}</td> + </tr> + <tr> + <td style="text-align:right;padding-right:5px"><strong>100</strong></td> + <td>{% trans "downvote" %}</td> + </tr><tr> + <td style="text-align:right;padding-right:5px"><strong>250</strong></td> + <td>{% trans "open and close own questions" %}</td> + </tr> + <tr> + <td style="text-align:right;padding-right:5px"><strong>500</strong></td> + <td>{% trans "retag questions" %}</td> + </tr> + <tr> + <td style="text-align:right;padding-right:5px"><strong>750</strong></td> + <td>{% trans "edit community wiki questions" %}</td> + </tr> + <tr> + <td style="text-align:right;padding-right:5px"><strong>2000</strong></td> + <td>{% trans "edit any answer" %}</td> + </tr> + <tr> + <td style="text-align:right;padding-right:5px"><strong>3000</strong></td> + <td>{% trans "open any closed question" %}</td> + </tr> + <tr> + <td style="text-align:right;padding-right:5px"><strong>5000</strong></td> + <td>{% trans "delete any comment" %}</td> + </tr> + <tr> + <td style="text-align:right;padding-right:5px"><strong>10000</strong></td> + <td>{% trans "delete any questions and answers and perform other moderation tasks" %}</td> + </tr> - </table> - - </p><br> - - <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> - </p><br> + </table> + </div> + {% ifequal settings.EMAIL_VALIDATION 'on' %} + <div> + <a id='validate'></a><h3 class="subtitle">{% trans "how to validate email title" %}</h3> + <!--special case here message must contain paragraphs--> + {% trans "how to validate email info" %} + </div> + {% endifequal %} + <div> + <a id='gravatar'></a><h3 class="subtitle">{% trans "what is gravatar" %}</h3> + <p>{% trans "gravatar faq info" %}</p> + </div> + <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> + </p> + </div> - <h3 class="subtitle">{% trans "Why other people can edit my questions/answers?" %}</h3> - <p> {% trans "Goal of this site is..." %} {% trans "So questions and answers can be edited like wiki pages by experienced users of this site and this improves the overall quality of the knowledge base content." %} - {% trans "If this approach is not for you, we respect your choice." %} - </p><br> - <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 "." %} - </p> - <br><br> + <div> + <h3 class="subtitle">{% trans "Why other people can edit my questions/answers?" %}</h3> + <p> {% trans "Goal of this site is..." %} {% trans "So questions and answers can be edited like wiki pages by experienced users of this site and this improves the overall quality of the knowledge base content." %} + {% trans "If this approach is not for you, we respect your choice." %} + </p> + </div> + <div> + <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 "." %} + --> + </p> + </div> </div> +<script type="text/javascript"> + //highlihts section if url has matching #anchor_name + $(document).ready(function (){ + var hash = window.location.hash; + if (hash.length > 1){ + $(hash).parent().addClass('highlight'); + window.location.hash = hash; + } + }) +</script> {% endblock %} <!-- end template faq.html --> diff --git a/templates/footer.html b/templates/footer.html index 207104ce..637ca0d8 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -26,7 +26,7 @@ </script> <script type="text/javascript"> try { - var pageTracker = _gat._getTracker({{ google_analytics_key }}); + var pageTracker = _gat._getTracker({{ settings.GOOGLE_ANALYTICS_KEY }}); pageTracker._trackPageview(); } catch(err) {} </script> diff --git a/templates/header.html b/templates/header.html index 64cf2bf0..db08a39a 100644 --- a/templates/header.html +++ b/templates/header.html @@ -1,30 +1,29 @@ <!-- template header.html --> {% 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="{% url user_signout %}">{% trans "logout" %}</a> - {% else %} - <a href="{% url user_signin %}">{% trans "login" %}</a> - <a href="{% url user_signup %}">{% trans "signup" %}</a> - {% endif %} - <a href="/about">{% trans "about" %}</a> - <a href="/faq">{% trans "faq" %}</a> - </div> - </div> <div id="roof"> <div id="navBar"> + <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/">{% trans "logout" %}</a> + {% else %} + <a href="/account/signin">{% trans "login" %}</a> + {% endif %} + <a href="/about">{% trans "about" %}</a> + <a href="/faq">{% trans "faq" %}</a> + <!--</div>--> + </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="23%"> - <div id="logo"> - <a href="/"> - <img src="/content/images/logo.png" title="{% trans "back to home page" %}" /> - </a> - </div> - </td> + <div id="logo"> + <a href="/"> + <img src="/content/images/logo.png" title="{% trans "back to home page" %}" /> + </a> + </div> + </td> <td width="77%" valign="bottom"> <div class="nav"> <a id="nav_questions" href="/questions/" >{% trans "questions" %}</a> diff --git a/templates/index.html b/templates/index.html index db2bb12e..a1ab06a4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,11 +1,12 @@ {% extends "base.html" %} +<!-- index.html --> {% load i18n %} {% load extra_tags %} {% load humanize %} {% load extra_filters %} {% block title %}{% spaceless %}{% trans "Home" %}{% endspaceless %}{% endblock %} -{% block meta %}<meta name="keywords" content="{{ APP_KEYWORDS }}" /> - <meta name="description" content="{{ APP_DESCRIPTION }}" />{% endblock %} +{% block meta %}<meta name="keywords" content="{{ settings.APP_KEYWORDS }}" /> + <meta name="description" content="{{ settings.APP_DESCRIPTION }}" />{% endblock %} {% block forejs %} <script type="text/javascript"> $().ready(function(){ @@ -78,7 +79,7 @@ <div class="boxA"> <h3>{% trans "welcome to website" %}</h3> <div class="body"> - {{ APP_INTRO|safe }} + {{ 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> @@ -117,6 +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 quesionts" %}</a>, {% trans "or" %} <a href="/tags/">{% trans "popular tags" %}</a>{% trans "." %} {% trans "Please help us answer" %} <a href="/questions/unanswered">{% trans "unanswered questions" %}</a>{% trans "." %}</span> +<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> </div> {% endblock %} +<!-- index.html --> diff --git a/templates/logout.html b/templates/logout.html index 6270924a..e05a4328 100644 --- a/templates/logout.html +++ b/templates/logout.html @@ -1,5 +1,5 @@ -<!-- template logout.html --> {% extends "base_content.html" %} +<!-- template logout.html --> {% load extra_tags %} {% load humanize %} {% load i18n %} @@ -22,4 +22,4 @@ <br><br> </div> {% endblock %} -<!-- ent template logout.html --> +<!-- end logout.html --> diff --git a/templates/pagesize.html b/templates/pagesize.html index 90003749..5037f1f6 100644 --- a/templates/pagesize.html +++ b/templates/pagesize.html @@ -1,3 +1,4 @@ +<!-- template pagesize.html --> {% spaceless %} {% load i18n %} {% if is_paginated %} @@ -23,3 +24,4 @@ </div> {% endif %} {% endspaceless %} +<!-- end template pagesize.html --> diff --git a/templates/question.html b/templates/question.html index 5ba08b63..eaff9da3 100644 --- a/templates/question.html +++ b/templates/question.html @@ -1,5 +1,8 @@ +{% extends "base.html" %} <!-- question.html --> -{% extends "base.html" %}{% load extra_tags %}{% load extra_filters %}{% load humanize %} +{% load extra_tags %} +{% load extra_filters %} +{% load humanize %} {% load i18n %} {% block title %}{% spaceless %}{{ question.get_question_title }}{% endspaceless %}{% endblock %} {% block forejs %} @@ -250,10 +253,10 @@ </div> {% endif %} - {% ifnotequal question.answer_count 0 %} + {% ifnotequal answers.length 0 %} <div class="tabBar"> <a name="sort-top"></a> - <div class="headQuestions">{{ question.answer_count }}{% trans "Answers" %}:</div> + <div class="headQuestions">{{ answers|length }}{% trans "Answers" %}:</div> <div class="tabsA"> <a id="oldest" href="?sort=oldest#sort-top" title="{% trans "oldest answers will be shown first" %}">{% trans "oldest answers" %}</a> <a id="latest" href="?sort=latest#sort-top" title="{% trans "newest answers will be shown first" %}">{% trans "newest answers" %}</a> @@ -431,10 +434,12 @@ </div> {% if not question.closed %} - {% if request.user.is_authenticated %} <div style="padding:10px 0 0 0;"> <div class="headNormal">{% trans "Your answer" %}:</div> </div> + {% if not request.user.is_authenticated %} + <div class="message">{% trans "you can answer anonymously and then login" %}</div> + {% endif %} <div id="description" class="" > <div id="wmd-button-bar" class="wmd-panel"></div> @@ -458,9 +463,11 @@ </div> <br> <input type="submit" value="{% trans "Answer the question" %}" class="submit"><span class="form-error"></span> - {% else %} - <input id="btLogin" type="button" class="submit" style="width:200px" value="{% trans "Login to answer" %}"> - {% endif %} + {% if request.user.is_authenticated %} + {{ answer.email_notify }} <label for="question-subscribe-updates">{% trans "Notify me daily if there are any new answers." %}</label> + {% else %} + <input type="checkbox" disabled><label>{% trans "once you sign in you will be able to subscribe for any updates here" %}</label> + {% endif %} {% endif %} <br><br> </form> diff --git a/templates/question_edit.html b/templates/question_edit.html index 6fe8bb41..9ad60a88 100644 --- a/templates/question_edit.html +++ b/templates/question_edit.html @@ -1,5 +1,5 @@ -<!-- question_edit.html --> {% extends "base.html" %} +<!-- question_edit.html --> {% load i18n %} {% block title %}{% spaceless %}{% trans "Edit question" %}{% endspaceless %}{% endblock %} {% block forejs %} diff --git a/templates/question_retag.html b/templates/question_retag.html index aebf93a5..c7062e30 100644 --- a/templates/question_retag.html +++ b/templates/question_retag.html @@ -1,5 +1,6 @@ {% extends "base.html" %} -{% block title %}{% spaceless %}修改问题标签{% endspaceless %}{% endblock %} +<!-- question_retag.html --> +{% block title %}{% spaceless %}{% trans "Change tags" %}{% endspaceless %}{% endblock %} {% block forejs %} <script type='text/javascript' src='/content/js/com.cnprog.editor.js'></script> <script type='text/javascript' src='/content/js/com.cnprog.post.js'></script> @@ -34,8 +35,8 @@ }, messages: { tags: { - required: " 标签不能为空。", - maxlength: " 最多5个标签,每个标签长度小于20个字符。" + required: "{% trans "tags are required" %}", + maxlength: "{% trans "up to 5 tags, less than 20 characters each" %} } } @@ -48,7 +49,7 @@ {% block content %} <div id="main-bar" class="headNormal"> - 修改标签 [<a href="{{ question.get_absolute_url }}">返回</a>] + {% trans "Change tags" %} [<a href="{{ question.get_absolute_url }}">{% trans "back" %}</a>] </div> <div id="main-body" class="ask-body"> <div id="askform"> @@ -71,8 +72,8 @@ <br> <div class="error" ></div> - <input type="submit" value="现在修改" class="submit" /> - <input type="button" value="取消" class="submit" onclick="history.back(-1);" /> + <input type="submit" value="{% trans "Save edit" %}" class="submit" /> + <input type="button" value="{% trans "Cancel" %}" class="submit" onclick="history.back(-1);" /> <br> <br> </form> @@ -82,20 +83,16 @@ {% block sidebar %} <div class="boxC"> - <p class="subtitle">为什么我只能修改问题标签?</p> + <p class="subtitle">{% trans "Why use and modify tags?" %}</p> <ul class="list-item"> - <li> - CNProg用标签来分类系统的信息 - + {% trans "tags help us keep Questions organized" %} </li> <li> 修改完整问题需要用户的积分达到一定条件(比如:积分 >= 3000分,自己发布的问题除外),而用户积分达到比较低的时候,就可以修改问题的标签(比如:积分 >= 500, 这里指所有问题的标签)。 - </li> <li> - 修改标签的用户将授予特殊的社区奖牌 - + {% trans "tag editors receive special awards from the community" %} </li> </ul> <a href="{% url faq %}" style="float:right;position:relative">faq »</a> @@ -106,4 +103,4 @@ {% block endjs %} {% endblock %} - +<!-- end question_retag.html --> diff --git a/templates/questions.html b/templates/questions.html index a531d954..5dac0156 100644 --- a/templates/questions.html +++ b/templates/questions.html @@ -1,6 +1,5 @@ -<!-- questions.html --> {% extends "base.html" %} -{% load i18n %} +<!-- questions.html --> {% load extra_tags %} {% load i18n %} {% load humanize %} @@ -112,13 +111,20 @@ {% plural %} have total {{q_num}} questions tagged {{tagname}} {% endblocktrans %} - {% endif %} - {% if searchtitle %} - {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num %} - have total {{q_num}} questions containing {{searchtitle}} - {% plural %} - have total {{q_num}} questions containing {{searchtitle}} - {% endblocktrans %} + {% else %} + {% if searchtitle %} + {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num %} + have total {{q_num}} questions containing {{searchtitle}} + {% plural %} + have total {{q_num}} questions containing {{searchtitle}} + {% endblocktrans %} + {% else %} + {% blocktrans count questions as cnt with questions_count|intcomma as q_num %} + have total {{q_num}} questions + {% plural %} + have total {{q_num}} questions + {% endblocktrans %} + {% endif %} {% endif %} {% ifequal tab_id "latest" %} @@ -139,13 +145,15 @@ <p>{% trans "Questions are sorted by the <strong>number of votes</strong>." %} {% trans "Most voted questions are shown first." %}</p> {% endifequal %} + + </p> </div> <div class="boxC"> <h3 class="subtitle">{% trans "Related tags" %}</h3> <div class="tags"> {% for tag in tags %} - <a rel="tag" title="{% blocktrans with tag.name as tagname %}see questions tagged '{{ tagname }}'{% endblocktrans %}" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a> + <a rel="tag" title="{% trans "see questions tagged" %}'{{ tag.name }}'{% trans "using tags" %}" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a> <span class="tag-number">× {{ tag.used_count|intcomma }}</span> <br> {% endfor %} diff --git a/templates/revisions_answer.html b/templates/revisions_answer.html index 5ab12fbf..9c2e53eb 100644 --- a/templates/revisions_answer.html +++ b/templates/revisions_answer.html @@ -1,5 +1,5 @@ -<!-- revisions_answer.html --> {% extends "base_content.html" %} +<!-- revisions_answer.html --> {% load i18n %} {% load extra_tags %} {% load extra_filters %} diff --git a/templates/revisions_question.html b/templates/revisions_question.html index 77a421bb..7ada3e74 100644 --- a/templates/revisions_question.html +++ b/templates/revisions_question.html @@ -1,5 +1,5 @@ -<!-- revisions_question.html --> {% extends "base_content.html" %} +<!-- revisions_question.html --> <!--somehow very similar to revisions_answer.html--> {% load extra_tags %} {% load i18n %} @@ -99,5 +99,4 @@ {% block endjs %} {% endblock %} - <!-- end revisions_question.html --> diff --git a/templates/unanswered.html b/templates/unanswered.html index 926f2ffd..13b3a3b2 100644 --- a/templates/unanswered.html +++ b/templates/unanswered.html @@ -1,5 +1,5 @@ -<!-- unanswered.html --> {% extends "base.html" %} +<!-- unanswered.html --> {% load extra_tags %} {% load i18n %} {% load humanize %} diff --git a/templates/user.html b/templates/user.html index 8db15902..efca80e6 100644 --- a/templates/user.html +++ b/templates/user.html @@ -1,5 +1,5 @@ -<!-- user.html --> {% extends "base_content.html" %} +<!-- user.html --> {% load extra_tags %} {% load humanize %} {% block title %}{% spaceless %}{{ page_title }}{% endspaceless %}{% endblock %} @@ -16,14 +16,12 @@ $("#nav_profile").attr('className',"on"); {% else %} $("#nav_users").attr('className',"on"); - {% endifequal %} - }); + }); </script> {% block userjs %} {% endblock %} {% endblock %} - {% block content %} <div id="mainbar-full"> {% include "user_info.html" %} diff --git a/templates/user_edit.html b/templates/user_edit.html index 0f927374..b49cea31 100644 --- a/templates/user_edit.html +++ b/templates/user_edit.html @@ -1,5 +1,5 @@ -<!-- user_edit.html --> {% extends "base_content.html" %} +<!-- user_edit.html --> {% load extra_tags %} {% load humanize %} {% load i18n %} diff --git a/templates/user_favorites.html b/templates/user_favorites.html index d47670bd..185423c6 100644 --- a/templates/user_favorites.html +++ b/templates/user_favorites.html @@ -1,5 +1,5 @@ -<!-- user_favorites.html --> {% extends "user.html" %} +<!-- user_favorites.html --> {% load extra_tags %} {% load humanize %} diff --git a/templates/user_info.html b/templates/user_info.html index 8e6dca84..8d35015c 100644 --- a/templates/user_info.html +++ b/templates/user_info.html @@ -70,12 +70,14 @@ <td>{% get_age view_user.date_of_birth %} {% trans "age unit" %}</td> </tr> {% endif %} + <!-- {% if votes_today_left %} <tr> <td>{% trans "todays unused votes" %}</td> <td><strong class="darkred">{{ votes_today_left }}</strong> {% trans "votes left" %}</td> </tr> {% endif %} + --> </table> </td> <td width="380"> diff --git a/templates/user_preferences.html b/templates/user_preferences.html index 3a760a25..eb7c4761 100644 --- a/templates/user_preferences.html +++ b/templates/user_preferences.html @@ -1,20 +1,23 @@ {% extends "user.html" %} +<!-- user_preferences.html --> +{% load i18n %} {% load extra_tags %} {% load humanize %} {% block usercontent %} <div style="padding:5px;"> <fieldset> - <legend><b>同步Twitter消息</b></legend> + <legend><b>{% trans "Connect with Twitter" %}</b></legend> <form> - <label for="name">账号:</label> + <label for="name">{% trans "Twitter account name:" %}</label> <input id="name" /><br> - <label for="password">密码:</label> + <label for="password">{% trans "Twitter password:" %}</label> <input id="password" type="password"/><br> - <input id="cbMessage" type="checkbox" />发布我的提问到我的Twitter<br> - <input id="cbReply" type="checkbox" />发布我的回答到我的Twitter<br> - <input type="submit" value="保存" /> + <input id="cbMessage" type="checkbox" />{% trans "Send my Questions to Twitter" %}<br> + <input id="cbReply" type="checkbox" />{% trans "Send my Answers to Twitter" %}<br> + <input type="submit" value="{% trans "Save" %}" /> </form> </fieldset> </div> {% endblock %} +<!-- end user_preferences.html --> diff --git a/templates/user_recent.html b/templates/user_recent.html index 70c074ad..7f6c9c8c 100644 --- a/templates/user_recent.html +++ b/templates/user_recent.html @@ -1,5 +1,5 @@ -<!-- user_recent.html --> {% extends "user.html" %} +<!-- user_recent.html --> {% load extra_tags %} {% load humanize %} diff --git a/templates/user_reputation.html b/templates/user_reputation.html index 7a1c7366..bb7200de 100644 --- a/templates/user_reputation.html +++ b/templates/user_reputation.html @@ -1,5 +1,5 @@ -<!-- user_reputation.html --> {% extends "user.html" %} +<!-- user_reputation.html --> {% load extra_tags %} {% load humanize %} {% block userjs %} diff --git a/templates/user_responses.html b/templates/user_responses.html index 45aab21b..d739395b 100644 --- a/templates/user_responses.html +++ b/templates/user_responses.html @@ -1,5 +1,5 @@ -<!-- user_responses.html --> {% extends "user.html" %} +<!-- user_responses.html --> {% load extra_tags %} {% load humanize %} diff --git a/templates/user_stats.html b/templates/user_stats.html index a5be1a77..432a5b34 100644 --- a/templates/user_stats.html +++ b/templates/user_stats.html @@ -1,5 +1,5 @@ -<!-- user_stats.html --> {% extends "user.html" %} +<!-- user_stats.html --> {% load i18n %} {% load extra_tags %} {% load humanize %} diff --git a/templates/user_tabs.html b/templates/user_tabs.html index 03a9d111..bcc12b8f 100644 --- a/templates/user_tabs.html +++ b/templates/user_tabs.html @@ -22,13 +22,11 @@ <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> - <!-- {% 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> {% endif %} - --> </div> </div> <!-- end user_tabs.html --> diff --git a/templates/user_votes.html b/templates/user_votes.html index ec967704..80fa27ee 100644 --- a/templates/user_votes.html +++ b/templates/user_votes.html @@ -1,5 +1,5 @@ -<!-- user_votes.html --> {% extends "user.html" %} +<!-- user_votes.html --> {% load extra_tags %} {% load humanize %} {% load i18n %} @@ -23,6 +23,9 @@ urlpatterns = patterns('', ), (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'), |