Define some extra languages
This commit is contained in:
parent
4780f64678
commit
00f8eca6f8
@ -2,6 +2,10 @@ from django.core.management.base import BaseCommand, CommandError
|
||||
from lang.models import Language
|
||||
from translate.lang import data
|
||||
|
||||
EXTRALANGS = [
|
||||
('ur', 'Urdu', 2, '(n != 1)'),
|
||||
]
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Populates language definitions'
|
||||
|
||||
@ -12,4 +16,10 @@ class Command(BaseCommand):
|
||||
name = props[0],
|
||||
nplurals = props[1],
|
||||
pluralequation = props[2])
|
||||
for props in EXTRALANGS:
|
||||
lang, created = Language.objects.get_or_create(
|
||||
code = props[0],
|
||||
name = props[1],
|
||||
nplurals = props[2],
|
||||
pluralequation = props[3])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user