Ticket #20311: patch

File patch, 1003 bytes (added by naktinis@…, 12 years ago)

Patch

  • django/core/management/commands/makemessages.py

    From c25d0fa3e42480ca906c9fbece097ed4552fe1d8 Mon Sep 17 00:00:00 2001
    From: Rimvydas Naktinis <naktinis@gmail.com>
    Date: Wed, 24 Apr 2013 11:57:50 +0300
    Subject: [PATCH] Avoid double Plural-Forms entry in translation files.
    
    ---
     django/core/management/commands/makemessages.py |    2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py
    index a7e9817..b811e6b 100644
    a b class Command(NoArgsCommand):  
    414414                    lines = []
    415415                    seen = False
    416416                    for line in msgs.split('\n'):
     417                        if plural_forms_re.search(line):
     418                            continue
    417419                        if not line and not seen:
    418420                            line = '%s\n' % m.group('value')
    419421                            seen = True
Back to Top