Update plural forms

This commit is contained in:
Michal Čihař 2012-02-29 13:46:25 +01:00
parent bbc4e35bb2
commit 56ee242b2c
2 changed files with 5 additions and 0 deletions

View File

@ -8,3 +8,6 @@ class Language(models.Model):
def __unicode__(self):
return self.name
def get_plural_form(self):
return 'nplurals=%d; plural=%s;' % (self.nplurals, self.pluralequation)

View File

@ -11,6 +11,7 @@ import logging
import git
import traceback
from translate.storage import factory
from datetime import datetime
import trans
from trans.managers import TranslationManager, UnitManager
@ -289,6 +290,7 @@ class Translation(models.Model):
store.updateheader(
add = True,
last_translator = author,
plural_forms = self.language.get_plural_form(),
x_generator = 'Weblate %s' % trans.VERSION
)
store.save()