diff --git a/lang/models.py b/lang/models.py index 1da438ba2..a2ab9dafe 100644 --- a/lang/models.py +++ b/lang/models.py @@ -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) diff --git a/trans/models.py b/trans/models.py index 3f04d7238..3641a803b 100644 --- a/trans/models.py +++ b/trans/models.py @@ -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()