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
ddcbc556
Commit
ddcbc556
authored
Jul 09, 2015
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
a46216b3
f98a1c21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
weblate/trans/models/subproject.py
weblate/trans/models/subproject.py
+4
-11
No files found.
weblate/trans/models/subproject.py
View file @
ddcbc556
...
...
@@ -395,15 +395,12 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
self
.
_all_flags
=
None
self
.
_linked_subproject
=
None
self
.
_repository
=
None
self
.
_filemask_re
=
None
@
property
def
filemask_re
(
self
):
if
self
.
_filemask_re
is
None
:
self
.
_filemask_re
=
re
.
compile
(
fnmatch
.
translate
(
self
.
filemask
).
replace
(
'.*'
,
'(.*)'
)
)
return
self
.
_filemask_re
return
re
.
compile
(
fnmatch
.
translate
(
self
.
filemask
).
replace
(
'.*'
,
'(.*)'
)
)
@
property
def
log_prefix
(
self
):
...
...
@@ -967,14 +964,10 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
'''
Parses language code from path.
'''
# No * in mask?
if
'*'
not
in
self
.
filemask
:
return
''
# Parse filename
matches
=
self
.
filemask_re
.
match
(
path
)
if
not
matches
:
if
not
matches
or
not
matches
.
lastindex
:
# Assume English language for template
if
path
==
self
.
template
:
return
'en'
...
...
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