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
be63f89c
Commit
be63f89c
authored
Apr 17, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validate whether there are not more resources for single language
parent
2b9737c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
weblate/trans/models.py
weblate/trans/models.py
+8
-1
No files found.
weblate/trans/models.py
View file @
be63f89c
...
...
@@ -397,8 +397,15 @@ class SubProject(models.Model):
def
clean
(
self
):
self
.
sync_git_repo
()
if
len
(
self
.
get_mask_matches
())
==
0
:
matches
=
self
.
get_mask_matches
()
if
len
(
matches
)
==
0
:
raise
ValidationError
(
_
(
'The mask did not match any files!'
))
langs
=
{}
for
match
in
matches
:
code
=
self
.
get_lang_code
(
match
)
if
code
in
langs
:
raise
ValidationError
(
_
(
'There are more files for single language, please adjust the mask and use subprojects for translating different resources.'
))
langs
[
code
]
=
match
def
save
(
self
,
*
args
,
**
kwargs
):
self
.
sync_git_repo
()
...
...
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