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
baa25bd6
Commit
baa25bd6
authored
Mar 11, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn file format class into property
Using class attribute seems more readable than self.get_file_format().
parent
ce989757
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
trans/models/subproject.py
trans/models/subproject.py
+4
-3
No files found.
trans/models/subproject.py
View file @
baa25bd6
...
...
@@ -890,7 +890,8 @@ class SubProject(models.Model):
def
git_needs_push
(
self
):
return
self
.
git_check_merge
(
'origin/%s..'
%
self
.
branch
)
def
get_file_format
(
self
):
@
property
def
file_format_cls
(
self
):
'''
Returns file format object.
'''
...
...
@@ -902,7 +903,7 @@ class SubProject(models.Model):
'''
Returns true if subproject is using template for translation
'''
monolingual
=
self
.
get_file_format
()
.
monolingual
monolingual
=
self
.
file_format_cls
.
monolingual
return
(
(
monolingual
or
monolingual
is
None
)
and
self
.
template
!=
''
...
...
@@ -913,7 +914,7 @@ class SubProject(models.Model):
'''
Returns whether we're handling fuzzy mark in the database.
'''
return
self
.
get_file_format
()
.
mark_fuzzy
return
self
.
file_format_cls
.
mark_fuzzy
def
get_template_store
(
self
):
'''
...
...
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