Skip to content

Commit

Permalink
i18n, update documentation and version number
Browse files Browse the repository at this point in the history
  • Loading branch information
tangochin committed Jan 31, 2018
1 parent 5450cb4 commit 0bc835c
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 20 deletions.
26 changes: 26 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,32 @@ You can also retrive the value directly, like this:

<h1 class="special">{{ my_meta.heading.value }}</h1>

Subdomains
----------

``django-seo`` supports subdomains, for example, via `django-subdomains <https://pypi.python.org/pypi/django-subdomains>`_ . In order to use subdomains support in your seo-model, specify the option ``use_subdomains``:

.. code-block:: python
from djangoseo import seo
class MyMetadata(seo.Metadata):
title = seo.Tag(head=True, max_length=68)
description = seo.MetaTag(max_length=155)
keywords = seo.KeywordTag()
heading = seo.Tag(name="h1")
class Meta:
verbose_name = 'Meta tag'
verbose_name_plural = 'Meta tags'
use_subdomains = True
After that, you can specify a specific subdomain on which to display the metadata and redefine the subdomain in the template tag to output the data:

.. code-block:: html

{% get_metadata SeoModelWithSubdomains under "msk" %}

Redirects
---------

Expand Down
Binary file modified djangoseo/locale/ru/LC_MESSAGES/django.mo
Binary file not shown.
43 changes: 24 additions & 19 deletions djangoseo/locale/ru/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-30 12:47+0500\n"
"POT-Creation-Date: 2018-01-31 14:21+0500\n"
"Last-Translator: Adrian Tangochin <tangochin@yandex.ru>\n"
"Language-Team: Russian\n"
"Language: \n"
Expand All @@ -18,36 +18,45 @@ msgstr ""
"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
"%100>=11 && n%100<=14)? 2 : 3);\n"

#: admin.py:184 admin.py:216 backends.py:349 backends.py:453
#: admin.py:184 admin.py:216 backends.py:364 backends.py:473
msgid "model"
msgstr "модель"

#: admin.py:219 backends.py:353
#: admin.py:219 backends.py:368
msgid "ID"
msgstr "ID"

#: admin.py:257 backends.py:271
#: admin.py:257 backends.py:281
msgid "view"
msgstr ""

#: backends.py:199 backends.py:341
#: backends.py:204 backends.py:356
msgid "path"
msgstr "адрес"

#: backends.py:208 backends.py:282 backends.py:363 backends.py:461
#: models.py:48
#: backends.py:213 backends.py:292 backends.py:378 backends.py:481
#: models.py:49
msgid "site"
msgstr "сайт"

#: backends.py:213 backends.py:287 backends.py:368 backends.py:466
#: backends.py:218 backends.py:297 backends.py:383 backends.py:486
msgid "language"
msgstr "язык"

#: backends.py:223 backends.py:297 backends.py:378 backends.py:476
#: models.py:55
#: backends.py:228 backends.py:307 backends.py:393 backends.py:496
#: models.py:56
msgid "subdomain"
msgstr "поддомен"

#: backends.py:235 backends.py:314 backends.py:400 backends.py:503
#: models.py:63
msgid "all subdomains"
msgstr "все поддомены"

#: backends.py:237 backends.py:316 backends.py:402 backends.py:505
msgid "Metadata works for all subdomains"
msgstr "Метаданные работают для всех поддоменов"

#: fields.py:60 fields.py:69
#, python-format
msgid "If empty, %s"
Expand All @@ -63,26 +72,22 @@ msgstr ""
msgid "If empty, %s will be used."
msgstr ""

#: models.py:37
#: models.py:38
msgid "Redirect pattern"
msgstr "Шаблон перенаправления"

#: models.py:38
#: models.py:39
msgid "Redirect patterns"
msgstr "Шаблоны перенаправления"

#: models.py:42
#: models.py:43
msgid "URL pattern"
msgstr "шаблон URL"

#: models.py:51
#: models.py:52
msgid "redirect path"
msgstr "адрес для перенаправления"

#: models.py:62
msgid "all subdomains"
msgstr "все поддомены"

#: models.py:64
#: models.py:65
msgid "Pattern works for all subdomains"
msgstr "Шаблон работает для всех поддоменов"
2 changes: 1 addition & 1 deletion djangoseo/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding:utf-8 -*-
VERSION = (2, 3, '4wf', 'final', 0)
VERSION = (2, 4, '0wf', 'final', 0)


def get_version():
Expand Down

0 comments on commit 0bc835c

Please sign in to comment.