mirror of
https://github.com/DMOJ/online-judge.git
synced 2024-11-25 16:32:37 +08:00
Fix period in sentences
This commit is contained in:
parent
ac5a14742f
commit
932cbf1b04
@ -54,7 +54,7 @@ def verify_email(backend, details, *args, **kwargs):
|
||||
|
||||
class UsernameForm(forms.Form):
|
||||
username = forms.RegexField(regex=r'^\w+$', max_length=30, label='Username',
|
||||
error_messages={'invalid': 'A username must contain letters, numbers, or underscores'})
|
||||
error_messages={'invalid': 'A username must contain letters, numbers, or underscores.'})
|
||||
|
||||
def clean_username(self):
|
||||
if User.objects.filter(username=self.cleaned_data['username']).exists():
|
||||
|
@ -133,7 +133,7 @@ class ProblemDataCompiler(object):
|
||||
case.save(update_fields=('checker_args', 'input_file', 'output_file'))
|
||||
elif case.type == 'E':
|
||||
if not batch:
|
||||
raise ProblemDataError(_('Attempt to end batch outside of one in case #%d') % i)
|
||||
raise ProblemDataError(_('Attempt to end batch outside of one in case #%d.') % i)
|
||||
case.is_pretest = batch['is_pretest']
|
||||
case.input_file = ''
|
||||
case.output_file = ''
|
||||
|
@ -34,9 +34,9 @@ def checker_args_cleaner(self):
|
||||
return ''
|
||||
try:
|
||||
if not isinstance(json.loads(data), dict):
|
||||
raise ValidationError(_('Checker arguments must be a JSON object'))
|
||||
raise ValidationError(_('Checker arguments must be a JSON object.'))
|
||||
except ValueError:
|
||||
raise ValidationError(_('Checker arguments is invalid JSON'))
|
||||
raise ValidationError(_('Checker arguments is invalid JSON.'))
|
||||
return data
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@ bad_mail_regex = list(map(re.compile, settings.BAD_MAIL_PROVIDER_REGEX))
|
||||
class CustomRegistrationForm(RegistrationForm):
|
||||
username = forms.RegexField(regex=r'^\w+$', max_length=30, label=_('Username'),
|
||||
error_messages={'invalid': _('A username must contain letters, '
|
||||
'numbers, or underscores')})
|
||||
'numbers, or underscores.')})
|
||||
timezone = ChoiceField(label=_('Timezone'), choices=TIMEZONE,
|
||||
widget=Select2Widget(attrs={'style': 'width:100%'}))
|
||||
language = ModelChoiceField(queryset=Language.objects.all(), label=_('Preferred language'), empty_label=None,
|
||||
|
@ -38,7 +38,7 @@
|
||||
{% endif %}
|
||||
{%- else -%}
|
||||
{% if contest.start_time > now %}
|
||||
{{- _('Starting in %(countdown)s', countdown=as_countdown(contest.time_before_start)) -}}
|
||||
{{- _('Starting in %(countdown)s.', countdown=as_countdown(contest.time_before_start)) -}}
|
||||
{% elif contest.end_time < now %}
|
||||
{{- _('Contest is over.') -}}
|
||||
{% else %}
|
||||
|
@ -254,7 +254,7 @@
|
||||
{% if contest.start_time %}
|
||||
<br>
|
||||
{% if contest.time_before_start %}
|
||||
<span class="time">{{ _('Starting in %(countdown)s.', countdown=as_countdown(contest.time_before_start)) }}</span>
|
||||
<span class="time">{{ _('Starting in %(countdown)s', countdown=as_countdown(contest.time_before_start)) }}</span>
|
||||
{% endif %}
|
||||
{{ time_left(contest) }}
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user