diff --git a/oioioi/base/processors.py b/oioioi/base/processors.py
index 98d714808..d040643fa 100644
--- a/oioioi/base/processors.py
+++ b/oioioi/base/processors.py
@@ -1,5 +1,6 @@
from django.core.urlresolvers import get_script_prefix
from oioioi.base.menu import side_pane_menus_registry
+from django.conf import settings
def base_url(request):
@@ -9,3 +10,7 @@ def base_url(request):
def side_menus(request):
menus = [m for m in side_pane_menus_registry if m.condition(request)]
return {'side_menus': menus}
+
+
+def site_name(request):
+ return {'site_name': settings.SITE_NAME}
diff --git a/oioioi/base/templates/admin/base_site.html b/oioioi/base/templates/admin/base_site.html
index 283052611..c107425b7 100644
--- a/oioioi/base/templates/admin/base_site.html
+++ b/oioioi/base/templates/admin/base_site.html
@@ -36,10 +36,10 @@
{% all_with_prefix extra_head_ %}
{% endblock %}
-{% block title %}{{ title }} | {% trans 'OIOIOI Admin' %}{% endblock %}
+{% block title %}{{ title }} - {% blocktrans %}{{ site_name }} Admin{% endblocktrans %}{% endblock %}
{% block branding %}
-
{% trans 'OIOIOI Admin' %}
+ {% blocktrans %}{{ site_name }} Admin{% endblocktrans %}
{% endblock %}
{% block footer %}
diff --git a/oioioi/base/templates/base.html b/oioioi/base/templates/base.html
index da34fa8d2..da605d1e4 100644
--- a/oioioi/base/templates/base.html
+++ b/oioioi/base/templates/base.html
@@ -7,7 +7,7 @@
{% block head %}
- {% block title %}OIOIOI{% endblock %}
+ {% block title %}{% trans "Main page" %}{% endblock %} - {{ site_name }}
{% block styles %}
{% compress css %}
diff --git a/oioioi/base/templates/ingredients/navbar_branding.html b/oioioi/base/templates/ingredients/navbar_branding.html
index 641260855..ac74485c6 100644
--- a/oioioi/base/templates/ingredients/navbar_branding.html
+++ b/oioioi/base/templates/ingredients/navbar_branding.html
@@ -1 +1 @@
-OIOIOI
+{{ site_name }}
diff --git a/oioioi/base/templates/registration/password_reset_confirm.html b/oioioi/base/templates/registration/password_reset_confirm.html
index 67b2e6e77..0306a7760 100644
--- a/oioioi/base/templates/registration/password_reset_confirm.html
+++ b/oioioi/base/templates/registration/password_reset_confirm.html
@@ -1,7 +1,7 @@
{% extends "simple-centered.html" %}
{% load i18n %}
-{% block title %}{% trans 'Password reset' %}{% endblock %}
+{% block title %}{% trans "Enter new password" %} - {% trans "Password reset" %}{% endblock %}
{% block content %}
diff --git a/oioioi/complaints/templates/complaints/make.html b/oioioi/complaints/templates/complaints/make.html
index 89d3b091c..b203485ba 100644
--- a/oioioi/complaints/templates/complaints/make.html
+++ b/oioioi/complaints/templates/complaints/make.html
@@ -1,7 +1,7 @@
{% extends "base-with-menu.html" %}
{% load i18n %}
-{% block title %}{% trans "Complaints" %}{% endblock %}
+{% block title %}{% trans "Make complaint" %} - {% trans "Complaints" %}{% endblock %}
{% block content %}
{% trans "Complaint form" %}
diff --git a/oioioi/contests/templates/contests/html_statement.html b/oioioi/contests/templates/contests/html_statement.html
index 344b45e05..ea428fe76 100644
--- a/oioioi/contests/templates/contests/html_statement.html
+++ b/oioioi/contests/templates/contests/html_statement.html
@@ -1,6 +1,8 @@
{% extends "base-with-menu.html" %}
{% load i18n %}
+{% block title %}{{ problem_name }} - {% trans "Problem statement" %}{% endblock %}
+
{% block content %}
{{ content }}
{% endblock %}
diff --git a/oioioi/contests/templates/contests/nothing_to_submit.html b/oioioi/contests/templates/contests/nothing_to_submit.html
index a3170677a..b1217da5d 100644
--- a/oioioi/contests/templates/contests/nothing_to_submit.html
+++ b/oioioi/contests/templates/contests/nothing_to_submit.html
@@ -1,7 +1,7 @@
{% extends "base-with-menu.html" %}
{% load i18n %}
-{% block title %}{% trans "Submit solution" %}{% endblock %}
+{% block title %}{% trans "No problems available" %} - {% trans "Submit solution" %}{% endblock %}
{% block content %}
{% trans "Submit solution" %}
diff --git a/oioioi/contests/templates/contests/submission.html b/oioioi/contests/templates/contests/submission.html
index cfc4ef05e..0ed881f68 100644
--- a/oioioi/contests/templates/contests/submission.html
+++ b/oioioi/contests/templates/contests/submission.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% load check_perm %}
-{% block title %}{% trans "Submission" %} {{ submission.id }}{% endblock %}
+{% block title %}{% blocktrans with submission.id as id %}Submission {{ id }}{% endblocktrans %}{% endblock %}
{% block scripts %}
{{ block.super }}
diff --git a/oioioi/contests/views.py b/oioioi/contests/views.py
index 3798b173c..48510e6d6 100644
--- a/oioioi/contests/views.py
+++ b/oioioi/contests/views.py
@@ -97,8 +97,12 @@ def problem_statement_zip_index_view(request, contest_id, problem_instance,
statement_id):
response = problem_statement_zip_view(request, contest_id,
problem_instance, statement_id, 'index.html')
+
+ problem_statement = get_object_or_404(ProblemStatement, id=statement_id)
+
return TemplateResponse(request, 'contests/html_statement.html',
- {'content': mark_safe(response.content)})
+ {'content': mark_safe(response.content),
+ 'problem_name' : problem_statement.problem.name})
@enforce_condition(contest_exists & can_enter_contest)
diff --git a/oioioi/dashboard/templates/dashboard/dashboard.html b/oioioi/dashboard/templates/dashboard/dashboard.html
index 0e161c12a..1e43f0956 100644
--- a/oioioi/dashboard/templates/dashboard/dashboard.html
+++ b/oioioi/dashboard/templates/dashboard/dashboard.html
@@ -1,10 +1,13 @@
{% extends "base-with-menu.html" %}
+{% load i18n %}
{% block styles %}
{{ block.super }}
{% endblock %}
+{% block title %}{% trans "Contest dashboard" %}{% endblock %}
+
{% block content %}
{% for header in headers %}{{ header }}{% endfor %}
{% for fragment in fragments %}{{ fragment }}{% endfor %}
diff --git a/oioioi/default_settings.py b/oioioi/default_settings.py
index 7b932cb03..626f10f3c 100644
--- a/oioioi/default_settings.py
+++ b/oioioi/default_settings.py
@@ -14,6 +14,9 @@
TEMPLATE_DEBUG = DEBUG
INTERNAL_IPS = ('127.0.0.1',)
+# Site name displayed in the title
+SITE_NAME = 'OIOIOI'
+
# Run uwsgi daemon. Shall be True, False or 'auto'.
# 'auto' means daemon will be run iff DEBUG is disabled.
UWSGI_ENABLED = 'auto'
@@ -88,6 +91,7 @@
'oioioi.su.processors.real_user',
'oioioi.base.processors.base_url',
'oioioi.base.processors.side_menus',
+ 'oioioi.base.processors.site_name',
'oioioi.jotform.processors.jotform',
'oioioi.contests.processors.register_current_contest',
'oioioi.contests.processors.register_recent_contests',
diff --git a/oioioi/deployment/settings.py.template b/oioioi/deployment/settings.py.template
index 1e5007b7f..766e1f3d5 100644
--- a/oioioi/deployment/settings.py.template
+++ b/oioioi/deployment/settings.py.template
@@ -8,6 +8,9 @@ DEBUG = True
TEMPLATE_DEBUG = DEBUG
+# Site name displayed in the title
+SITE_NAME = 'OIOIOI'
+
# Email addresses to send error message reports.
ADMINS = (
('Your Name', 'youremail@example.com'),
diff --git a/oioioi/forum/templates/forum/confirm_delete.html b/oioioi/forum/templates/forum/confirm_delete.html
index cfdbd2e21..6b9324490 100644
--- a/oioioi/forum/templates/forum/confirm_delete.html
+++ b/oioioi/forum/templates/forum/confirm_delete.html
@@ -1,7 +1,7 @@
{% extends "simple-centered-confirmation.html" %}
{% load i18n %}
-{% block title %}{% trans "Confirmation" %}{% endblock %}
+{% block title %}{% trans "Delete confirmation" %} - {% trans "Forum" %}{% endblock %}
{% block help_text %}
{% blocktrans with el=elem %}Are you sure, that you want to delete {{ elem }}?{% endblocktrans %}
diff --git a/oioioi/forum/templates/forum/edit_post.html b/oioioi/forum/templates/forum/edit_post.html
index 1da64e1d1..ef2f9a886 100644
--- a/oioioi/forum/templates/forum/edit_post.html
+++ b/oioioi/forum/templates/forum/edit_post.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% load check_perm %}
-{% block title %}{% trans "Thread" %}: {{ thread.name }} - {% trans "Edit post" %}{% endblock %}
+{% block title %}{% trans "Edit post" %} - {% trans "Thread" %}: {{ thread.name }}{% endblock %}
{% block content %}
{% check_perm 'contests.contest_admin' for contest as is_admin %}
diff --git a/oioioi/forum/templates/forum/forum.html b/oioioi/forum/templates/forum/forum.html
index 4839dded2..bedd31644 100644
--- a/oioioi/forum/templates/forum/forum.html
+++ b/oioioi/forum/templates/forum/forum.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% load check_perm %}
-{% block title %}{% trans "Forum" %}: {{ forum }}{% endblock %}
+{% block title %}{{ forum }} - {% trans "Forum" %}{% endblock %}
{% block content %}
{% check_perm 'contests.contest_admin' for contest as is_admin %}
diff --git a/oioioi/forum/tests.py b/oioioi/forum/tests.py
index a1680e6ff..665af374f 100644
--- a/oioioi/forum/tests.py
+++ b/oioioi/forum/tests.py
@@ -188,13 +188,13 @@ def test_remove_posts(self):
# user can remove p2 (last post, added by user)
response = self.try_to_remove_post(p2)
self.assertEqual(200, response.status_code)
- self.assertIn('Confirmation', response.content)
+ self.assertIn('Delete confirmation', response.content)
p2.delete()
# user tries to remove post p1 (and he can!)
response = self.try_to_remove_post(p1)
self.assertEqual(200, response.status_code)
- self.assertIn('Confirmation', response.content)
+ self.assertIn('Delete confirmation', response.content)
p1.delete()
# user tries to remove post p0 but cannot (added earlier than 15min ago)
diff --git a/oioioi/oireports/templates/oireports/no_reports.html b/oioioi/oireports/templates/oireports/no_reports.html
index 8bedc9c72..8a901bed1 100644
--- a/oioioi/oireports/templates/oireports/no_reports.html
+++ b/oioioi/oireports/templates/oireports/no_reports.html
@@ -1,7 +1,7 @@
{% extends "base-with-menu.html" %}
{% load i18n %}
-{% block title %}{% trans "Report" %}{% endblock %}
+{% block title %}{% trans "No reports available" %}{% endblock %}
{% block content %}
{% trans "Report" %}
diff --git a/oioioi/participants/templates/participants/registration.html b/oioioi/participants/templates/participants/registration.html
index 7eab44d7b..f357489f9 100644
--- a/oioioi/participants/templates/participants/registration.html
+++ b/oioioi/participants/templates/participants/registration.html
@@ -11,6 +11,8 @@
{{ form.media.js }}
{% endblock %}
+{% block title %}{% trans "Register to the contest" %}{% endblock %}
+
{% block content %}
{% trans "Register to the contest" %}
diff --git a/oioioi/participants/templates/participants/unregister.html b/oioioi/participants/templates/participants/unregister.html
index 0d6fd50ca..04ebf7d00 100644
--- a/oioioi/participants/templates/participants/unregister.html
+++ b/oioioi/participants/templates/participants/unregister.html
@@ -1,6 +1,8 @@
{% extends "base-with-menu.html" %}
{% load i18n %}
+{% block title %}{% trans "Confirm unregistration" %}{% endblock %}
+
{% block content %}