forked from 0x2620/pandora
fix translation creation
This commit is contained in:
parent
48aba7bde8
commit
f2ad63143a
1 changed files with 4 additions and 1 deletions
|
@ -264,6 +264,9 @@ class Annotation(models.Model):
|
|||
from translation.models import Translation
|
||||
layer = self.get_layer()
|
||||
if layer.get('translate'):
|
||||
for lang in settings.CONFIG['languages']:
|
||||
if lang == settings.CONFIG['language']:
|
||||
continue
|
||||
Translation.objects.get_or_create(lang=lang, key=self.value, defaults={'type': Translation.CONTENT})
|
||||
|
||||
def delete(self, *args, **kwargs):
|
||||
|
|
Loading…
Reference in a new issue