Commit 33d0a856 authored by Michal Čihař's avatar Michal Čihař

Another conversion of method to property

parent 0a37bf95
......@@ -921,7 +921,8 @@ class SubProject(models.Model):
self.get_template_filename(),
)
def get_template_store(self):
@property
def template_store(self):
'''
Gets translate-toolkit store for template.
'''
......
......@@ -445,7 +445,7 @@ class Translation(models.Model):
# Load translation file
store = self.store
# Load translation template
template_store = self.subproject.get_template_store()
template_store = self.subproject.template_store
if template_store is None:
for unit in store.units:
# We care only about translatable strings
......@@ -815,7 +815,7 @@ class Translation(models.Model):
found = True
else:
# Need to create new unit based on template
template_store = self.subproject.get_template_store()
template_store = self.subproject.template_store
pounit = template_store.findid(unit.context)
add = True
found = pounit is not None
......
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