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
ac391de5
Commit
ac391de5
authored
Apr 12, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update words count on save
parent
0fee36f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
trans/models/unit.py
trans/models/unit.py
+4
-0
No files found.
trans/models/unit.py
View file @
ac391de5
...
...
@@ -726,6 +726,10 @@ class Unit(models.Model):
# Keep the force_insert for parent save
force_insert
=
kwargs
.
get
(
'force_insert'
,
False
)
# Store number of words
if
not
same_content
:
self
.
num_words
=
len
(
self
.
get_source_plurals
()[
0
].
split
())
# Actually save the unit
super
(
Unit
,
self
).
save
(
*
args
,
**
kwargs
)
...
...
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