Просмотр исходного кода

Added meta descriptions to public user pages

Rafał Pitoń 10 лет назад
Родитель
Сommit
5b944fd63f

+ 1 - 1
misago/templates/misago/base.html

@@ -6,7 +6,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <title>{% block title %}{{ misago_settings.forum_name }}{% endblock %}</title>
     <title>{% block title %}{{ misago_settings.forum_name }}{% endblock %}</title>
-    <meta name="description" content="{% block meta_description %}{% endblock %}">
+    <meta name="description" content="{% block meta-description %}{% endblock %}">
     <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
     <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
     <!--[if lt IE 9]>
     <!--[if lt IE 9]>
       <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
       <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>

+ 1 - 1
misago/templates/misago/index.html

@@ -10,7 +10,7 @@
 {% endblock title %}
 {% endblock title %}
 
 
 
 
-{% block meta_description %}{{ misago_settings.forum_index_meta_description }}{% endblock meta_description %}
+{% block meta-description %}{{ misago_settings.forum_index_meta_description }}{% endblock meta-description %}
 
 
 
 
 {% block content %}
 {% block content %}

+ 6 - 3
misago/templates/misago/profile/base.html

@@ -2,9 +2,12 @@
 {% load i18n %}
 {% load i18n %}
 
 
 
 
-{% block title %}
-{{ profile.username }}: {{ active_page.name }} {% if page_number > 1 %}({{ number }}) {% endif %}| {{ block.super }}
-{% endblock title %}
+{% block title %}{{ profile.username }}: {{ active_page.name }} {% if page_number > 1 %}({% blocktrans with page=page_number %}Page {{ number }}{% endblocktrans %}) {% endif %}| {{ block.super }}{% endblock title %}
+
+
+{% block meta-description %}{% blocktrans trimmed with user=profile.username joined_on=profile.joined_on|date %}
+{{ user }} is member since {{ joined_on }}.
+{% endblocktrans %}{% endblock meta-description %}
 
 
 
 
 {% block content %}
 {% block content %}

+ 7 - 0
misago/templates/misago/profile/followers.html

@@ -2,6 +2,13 @@
 {% load humanize i18n misago_avatars misago_pagination %}
 {% load humanize i18n misago_avatars misago_pagination %}
 
 
 
 
+{% block meta-description %}{% blocktrans trimmed with user=profile.username followers=profile.followers|intcomma count counter=profile.followers %}
+{{ user }} is followed by {{ followers }} user.
+{% plural %}
+{{ user }} is followed by {{ followers }} users.
+{% endblocktrans %}{% endblock meta-description %}
+
+
 {% block page %}
 {% block page %}
 {% if followers.object_list %}
 {% if followers.object_list %}
   <p class="lead">
   <p class="lead">

+ 8 - 0
misago/templates/misago/profile/follows.html

@@ -2,6 +2,14 @@
 {% load humanize i18n misago_avatars misago_pagination %}
 {% load humanize i18n misago_avatars misago_pagination %}
 
 
 
 
+{% block meta-description %}
+{% blocktrans trimmed with user=profile.username follows=profile.following|intcomma count counter=profile.following %}
+{{ user }} is following {{ follows }} user.
+{% plural %}
+{{ user }} is following {{ follows }} users.
+{% endblocktrans %}{% endblock meta-description %}
+
+
 {% block page %}
 {% block page %}
 {% if followers.object_list %}
 {% if followers.object_list %}
   <p class="lead">
   <p class="lead">

+ 9 - 2
misago/templates/misago/profile/name_history.html

@@ -2,6 +2,13 @@
 {% load humanize i18n misago_avatars misago_capture misago_pagination %}
 {% load humanize i18n misago_avatars misago_capture misago_pagination %}
 
 
 
 
+{% block meta-description %}{% blocktrans trimmed with user=profile.username changes=name_changes.paginator.count|intcomma joined_on=profile.joined_on|date count counter=name_changes.paginator.count %}
+{{ user }} username was changed {{ changes }} time since {{ joined_on }}.
+{% plural %}
+{{ user }} username was changed {{ changes }} times since {{ joined_on }}.
+{% endblocktrans %}{% endblock meta-description %}
+
+
 {% block page %}
 {% block page %}
 {% if name_changes.object_list %}
 {% if name_changes.object_list %}
   <p class="lead">
   <p class="lead">
@@ -13,9 +20,9 @@
       {% endblocktrans %}
       {% endblocktrans %}
     {% else %}
     {% else %}
       {% blocktrans trimmed with user=profile.username changes=name_changes.paginator.count|intcomma count counter=name_changes.paginator.count %}
       {% blocktrans trimmed with user=profile.username changes=name_changes.paginator.count|intcomma count counter=name_changes.paginator.count %}
-      {{ user }} name was changed {{ changes }} time.
+      {{ user }} username was changed {{ changes }} time.
       {% plural %}
       {% plural %}
-      {{ user }} name was changed {{ changes }} times.
+      {{ user }} username was changed {{ changes }} times.
       {% endblocktrans %}
       {% endblocktrans %}
     {% endif %}
     {% endif %}
   </p>
   </p>

+ 8 - 1
misago/templates/misago/profile/posts.html

@@ -1,5 +1,12 @@
 {% extends "misago/profile/base.html" %}
 {% extends "misago/profile/base.html" %}
-{% load i18n %}
+{% load humanize i18n %}
+
+
+{% block meta-description %}{% blocktrans trimmed with user=profile.username posts=profile.posts|intcomma joined_on=profile.joined_on|date count counter=profile.posts %}
+{{ user }} has posted {{ posts }} message since {{ joined_on }}.
+{% plural %}
+{{ user }} has posted {{ posts }} messages since {{ joined_on }}.
+{% endblocktrans %}{% endblock meta-description %}
 
 
 
 
 {% block page %}
 {% block page %}

+ 8 - 1
misago/templates/misago/profile/threads.html

@@ -1,5 +1,12 @@
 {% extends "misago/profile/base.html" %}
 {% extends "misago/profile/base.html" %}
-{% load i18n %}
+{% load humanize i18n %}
+
+
+{% block meta-description %}{% blocktrans trimmed with user=profile.username threads=profile.threads|intcomma joined_on=profile.joined_on|date count counter=profile.threads %}
+{{ user }} has started {{ threads }} thread since {{ joined_on }}.
+{% plural %}
+{{ user }} has started {{ threads }} threads since {{ joined_on }}.
+{% endblocktrans %}{% endblock meta-description %}
 
 
 
 
 {% block page %}
 {% block page %}

+ 8 - 1
misago/templates/misago/profile/warnings.html

@@ -1,5 +1,12 @@
 {% extends "misago/profile/base.html" %}
 {% extends "misago/profile/base.html" %}
-{% load i18n misago_avatars misago_capture misago_pagination %}
+{% load humanize i18n misago_avatars misago_capture misago_pagination %}
+
+
+{% block meta-description %}{% blocktrans trimmed with user=profile.username warnings=warnings.paginator.count|intcomma joined_on=profile.joined_on|date count counter=warnings.paginator.count %}
+{{ user }} was warned {{ warnings }} time since {{ joined_on }}.
+{% plural %}
+{{ user }} was warned {{ warnings }} times since {{ joined_on }}.
+{% endblocktrans %}{% endblock meta-description %}
 
 
 
 
 {% block page %}
 {% block page %}

+ 2 - 2
misago/templates/misago/userslists/active_posters.html

@@ -2,9 +2,9 @@
 {% load humanize i18n %}
 {% load humanize i18n %}
 
 
 
 
-{% block meta_description %}{% blocktrans trimmed with days=tracked_period %}
+{% block meta-description %}{% blocktrans trimmed with days=tracked_period %}
 List of users that have posted new messages during last {{ days }} days.
 List of users that have posted new messages during last {{ days }} days.
-{% endblocktrans %}{% endblock %}
+{% endblocktrans %}{% endblock meta-description %}
 
 
 
 
 {% block users-list %}
 {% block users-list %}

+ 1 - 1
misago/templates/misago/userslists/online.html

@@ -2,7 +2,7 @@
 {% load humanize i18n misago_avatars misago_batch %}
 {% load humanize i18n misago_avatars misago_batch %}
 
 
 
 
-{% block meta_description %}{% trans "List of signed in users currently browsing forums." %}{% endblock %}
+{% block meta-description %}{% trans "List of signed in users currently browsing forums." %}{% endblock meta-description %}
 
 
 
 
 {% block users-list %}
 {% block users-list %}

+ 2 - 2
misago/templates/misago/userslists/rank.html

@@ -2,12 +2,12 @@
 {% load humanize i18n %}
 {% load humanize i18n %}
 
 
 
 
-{% block meta_description %}{% blocktrans trimmed with rank=rank.name users=users.paginator.count|intcomma count counter=users.paginator.count %}
+{% block meta-description %}{% blocktrans trimmed with rank=rank.name users=users.paginator.count|intcomma count counter=users.paginator.count %}
 There is {{ users }} user with {{ rank }} rank.
 There is {{ users }} user with {{ rank }} rank.
 {% plural %}
 {% plural %}
 There are {{ users }} users with {{ rank }} rank.
 There are {{ users }} users with {{ rank }} rank.
 {% endblocktrans %}{% if rank.description %}
 {% endblocktrans %}{% if rank.description %}
-{{ rank.description|escape|urlize|linebreaks }}{% endif %}{% endblock %}
+{{ rank.description|escape|urlize|linebreaks }}{% endif %}{% endblock meta-description %}
 
 
 
 
 {% block users-list %}
 {% block users-list %}