From: Zygmunt Krynicki Date: Mon, 13 Jun 2011 12:12:31 +0000 (+0200) Subject: Merge branch 'master' of git://github.com/spanasik/django-pagination X-Git-Tag: release-2.0~33 X-Git-Url: https://git.mdrn.pl/django-pagination.git/commitdiff_plain/c6d9f1ade306811fbda6016aa902749caced9b7c?hp=36fda9e844f537bd16548e18a7648c619df9545b Merge branch 'master' of git://github.com/spanasik/django-pagination Conflicts: linaro_django_pagination/templates/pagination/pagination.html linaro_django_pagination/templatetags/pagination_tags.py --- diff --git a/linaro_django_pagination/locale/ru/LC_MESSAGES/django.po b/linaro_django_pagination/locale/ru/LC_MESSAGES/django.po new file mode 100644 index 0000000..e47973e --- /dev/null +++ b/linaro_django_pagination/locale/ru/LC_MESSAGES/django.po @@ -0,0 +1,28 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-07-11 16:14+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#: templates/pagination/pagination.html:5 +#: templates/pagination/pagination.html:7 +msgid "previous" +msgstr "Предыдущая" + +#: templates/pagination/pagination.html:21 +#: templates/pagination/pagination.html:23 +msgid "next" +msgstr "Следующая" diff --git a/linaro_django_pagination/middleware.py b/linaro_django_pagination/middleware.py index f8a2a6f..676f909 100644 --- a/linaro_django_pagination/middleware.py +++ b/linaro_django_pagination/middleware.py @@ -1,10 +1,10 @@ -def get_page(self): +def get_page(self, suffix): """ A function which will be monkeypatched onto the request to get the current integer representing the current page. """ try: - return int(self.REQUEST['page']) + return int(self.REQUEST['page%s' % suffix]) except (KeyError, ValueError, TypeError): return 1 @@ -14,4 +14,4 @@ class PaginationMiddleware(object): it exists in either **GET** or **POST** portions of the request. """ def process_request(self, request): - request.__class__.page = property(get_page) \ No newline at end of file + request.__class__.page = get_page \ No newline at end of file diff --git a/linaro_django_pagination/templates/pagination/pagination.html b/linaro_django_pagination/templates/pagination/pagination.html index 037f6d3..c2fb72d 100644 --- a/linaro_django_pagination/templates/pagination/pagination.html +++ b/linaro_django_pagination/templates/pagination/pagination.html @@ -2,7 +2,7 @@ {% load i18n %}