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