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
a1ba86dc
Commit
a1ba86dc
authored
Feb 28, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache whether entry is translated
parent
b35b9d24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
trans/models.py
trans/models.py
+4
-1
No files found.
trans/models.py
View file @
a1ba86dc
...
...
@@ -211,6 +211,7 @@ class Unit(models.Model):
source
=
models
.
TextField
()
target
=
models
.
TextField
(
default
=
''
,
blank
=
True
)
fuzzy
=
models
.
BooleanField
(
default
=
False
)
translated
=
models
.
BooleanField
(
default
=
False
)
objects
=
UnitManager
()
...
...
@@ -219,12 +220,14 @@ class Unit(models.Model):
flags
=
''
# FIXME
target
=
join_plural
(
unit
.
target
.
strings
)
fuzzy
=
unit
.
isfuzzy
()
if
not
force
and
location
==
self
.
location
and
flags
==
self
.
flags
and
target
==
self
.
target
and
fuzzy
==
self
.
fuzzy
:
translated
=
unit
.
istranslated
()
if
not
force
and
location
==
self
.
location
and
flags
==
self
.
flags
and
target
==
self
.
target
and
fuzzy
==
self
.
fuzzy
and
translated
==
self
.
translated
:
return
self
.
location
=
location
self
.
flags
=
flags
self
.
target
=
target
self
.
fuzzy
=
fuzzy
self
.
translated
=
translated
self
.
save
(
force_insert
=
force
)
def
is_plural
(
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