Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
4d5b8e38
Commit
4d5b8e38
authored
Aug 26, 2015
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
29865697
5cbe3e34
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
29 deletions
+31
-29
weblate/trans/models/subproject.py
weblate/trans/models/subproject.py
+31
-29
No files found.
weblate/trans/models/subproject.py
View file @
4d5b8e38
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#
from
django.db
import
models
from
django.db
import
models
,
transaction
from
django.utils.translation
import
ugettext
as
_
,
ugettext_lazy
from
django.utils.translation
import
ugettext
as
_
,
ugettext_lazy
from
django.core.mail
import
mail_admins
from
django.core.mail
import
mail_admins
from
django.core.exceptions
import
ValidationError
from
django.core.exceptions
import
ValidationError
...
@@ -966,6 +966,7 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
...
@@ -966,6 +966,7 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
matches
=
self
.
get_mask_matches
()
matches
=
self
.
get_mask_matches
()
language_re
=
re
.
compile
(
self
.
language_regex
)
language_re
=
re
.
compile
(
self
.
language_regex
)
for
pos
,
path
in
enumerate
(
matches
):
for
pos
,
path
in
enumerate
(
matches
):
with
transaction
.
atomic
():
code
=
self
.
get_lang_code
(
path
)
code
=
self
.
get_lang_code
(
path
)
if
langs
is
not
None
and
code
not
in
langs
:
if
langs
is
not
None
and
code
not
in
langs
:
self
.
log_info
(
'skipping %s'
,
path
)
self
.
log_info
(
'skipping %s'
,
path
)
...
@@ -995,6 +996,7 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
...
@@ -995,6 +996,7 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
if
langs
is
None
:
if
langs
is
None
:
todelete
=
self
.
translation_set
.
exclude
(
id__in
=
translations
)
todelete
=
self
.
translation_set
.
exclude
(
id__in
=
translations
)
if
todelete
.
exists
():
if
todelete
.
exists
():
with
transaction
.
atomic
():
self
.
log_info
(
self
.
log_info
(
'removing stale translations: %s'
,
'removing stale translations: %s'
,
','
.
join
([
trans
.
language
.
code
for
trans
in
todelete
])
','
.
join
([
trans
.
language
.
code
for
trans
in
todelete
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment