Commit 0177e25f authored by Weblate's avatar Weblate

Merge remote-tracking branch 'origin/master'

parents a4f9a0f7 42435090
......@@ -62,7 +62,7 @@ msgstr "Podeu afegir altres adreces electròniques a la pestanya Autenticació."
#: weblate/accounts/forms.py:282 weblate/accounts/forms.py:360
#: weblate/html/project.html:165
msgid "Full name"
msgstr "El vostre nom complert"
msgstr "El vostre nom complet"
#: weblate/accounts/forms.py:291
msgid "Subject"
......@@ -605,7 +605,7 @@ msgstr "Registre"
#: weblate/html/accounts/email-sent.html:11
msgid "Registration almost complete"
msgstr "Registre quasi complert"
msgstr "Registre quasi complet"
#: weblate/html/accounts/email-sent.html:14
msgid ""
......
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-04-04 18:41
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('trans', '0060_auto_20160310_0950'),
]
operations = [
migrations.AlterUniqueTogether(
name='translation',
unique_together=set([('subproject', 'language')]),
),
]
......@@ -1463,6 +1463,13 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
)
fullname = os.path.join(self.get_path(), filename)
# Ignore request if file exists (possibly race condition as
# the processing of new language can take some time and user
# can submit again)
if os.path.exists(fullname):
translation.check_sync(request=request)
return
self.file_format_cls.add_language(
fullname,
language,
......
......@@ -162,6 +162,7 @@ class Translation(models.Model, URLMixin, PercentMixin, LoggerMixin):
('use_mt', "Can use machine translation"),
)
app_label = 'trans'
unique_together = ('subproject', 'language')
def __init__(self, *args, **kwargs):
"""Constructor to initialize some cache properties."""
......
......@@ -97,6 +97,7 @@ class GroupACLTest(ModelTestCase):
self.privileged = User.objects.create(username="privileged")
self.group = Group.objects.create(name="testgroup")
self.project = self.subproject.project
self.subproject.translation_set.all().delete()
self.language = Language.objects.get_default()
self.trans = Translation.objects.create(
subproject=self.subproject, language=self.language,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment