Use new shared plurals code
This commit is contained in:
parent
e8956cfbeb
commit
0fa050534e
@ -2,6 +2,8 @@ from django.db import models
|
|||||||
|
|
||||||
from lang.models import Language
|
from lang.models import Language
|
||||||
|
|
||||||
|
from util import is_plural, split_plural, join_plural
|
||||||
|
|
||||||
class TranslationManager(models.Manager):
|
class TranslationManager(models.Manager):
|
||||||
def update_from_blob(self, subproject, code, path, blob):
|
def update_from_blob(self, subproject, code, path, blob):
|
||||||
'''
|
'''
|
||||||
@ -19,7 +21,7 @@ class UnitManager(models.Manager):
|
|||||||
'''
|
'''
|
||||||
Process translation toolkit unit and stores/updates database entry.
|
Process translation toolkit unit and stores/updates database entry.
|
||||||
'''
|
'''
|
||||||
src = '\x00\x00'.join(unit.source.strings)
|
src = join_plural(unit.source.strings)
|
||||||
ctx = unit.getcontext()
|
ctx = unit.getcontext()
|
||||||
dbunit, created = self.get_or_create(
|
dbunit, created = self.get_or_create(
|
||||||
translation = translation,
|
translation = translation,
|
||||||
|
Loading…
Reference in New Issue
Block a user