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
33d0a856
Commit
33d0a856
authored
Mar 11, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another conversion of method to property
parent
0a37bf95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
trans/models/subproject.py
trans/models/subproject.py
+2
-1
trans/models/translation.py
trans/models/translation.py
+2
-2
No files found.
trans/models/subproject.py
View file @
33d0a856
...
@@ -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.
'''
'''
...
...
trans/models/translation.py
View file @
33d0a856
...
@@ -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
...
...
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