Skip to main content

Simple Django plugin providing pluralize_pl template filter that works similarly to Django’s built-in pluralize plugin but respects Polish grammar rules.

The plugin only makes sense in project that doesn’t use Django’s translation system, which already has built-in support for pluralization based on grammar rules of the target language.

Quick start

  1. Install the plugin from PyPi:

    pip install django-pluralize-pl
  1. Add pluralize_pl to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'pluralize_pl',
    ]
  2. Load pluralize_pl in your templates:

    {% load pluralize_pl %}
  3. Use the pluralize_pl filter when you need it:

    {{ comments | pluralize_pl:"komentarz,komentarzy,komentarze" }}

Overview

pluralize_pl is fully compatible with Django’s pluralize filter. It works the same as long as you are giving it up to 2 comma-separated arguments. The difference is, you can provide it with a third argument, which will be used as a second plural form and applied according to Polish grammar rules:

  • If value is 0, {{ value|pluralize_pl:"komentarz,komentarzy,komentarze" }} displays “komentarzy”.

  • If value is 1, {{ value|pluralize_pl:"komentarz,komentarzy,komentarze" }} displays “komentarz”.

  • If value is 2, {{ value|pluralize_pl:"komentarz,komentarzy,komentarze" }} displays “komentarze”.

  • If value is 5, {{ value|pluralize_pl:"komentarz,komentarzy,komentarze" }} displays “komentarzy”.

Metadata

Release files for django-pluralize-pl 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-pluralize-pl 0.2.1
File Size Uploaded Provenance Actions
django-pluralize-pl-0.2.1.tar.gz 3.5 kB Without provenance Details for django-pluralize-pl-0.2.1.tar.gz

Release files / django-pluralize-pl-0.2.1.tar.gz

Download URL django-pluralize-pl-0.2.1.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1c2a6d706d8452ab31efb729c2fb03f5feb4e4a8848fb3aa1ef573138f956697
BLAKE2b-256 checksum
How to use checksums
0f63c8a4ce457577b722a4f33b98bb53bc28c0f73bf48be3851e6644f614a154
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Security for django-pluralize-pl 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page