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
41642ce7
Commit
41642ce7
authored
Mar 28, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not generate change objects for automatic translations
parent
facdaf5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
trans/models.py
trans/models.py
+3
-2
trans/views.py
trans/views.py
+1
-1
No files found.
trans/models.py
View file @
41642ce7
...
...
@@ -691,7 +691,7 @@ class Unit(models.Model):
return
ret
def
save_backend
(
self
,
request
,
propagate
=
True
):
def
save_backend
(
self
,
request
,
propagate
=
True
,
gen_change
=
True
):
# Store to backend
(
saved
,
pounit
)
=
self
.
translation
.
update_unit
(
self
,
request
)
self
.
translated
=
pounit
.
istranslated
()
...
...
@@ -705,7 +705,8 @@ class Unit(models.Model):
# Force commiting on completing translation
if
old_translated
<
self
.
translation
.
translated
and
self
.
translation
.
translated
==
self
.
translation
.
total
:
self
.
translation
.
commit_pending
()
Change
.
objects
.
create
(
unit
=
self
,
user
=
request
.
user
)
if
gen_change
:
Change
.
objects
.
create
(
unit
=
self
,
user
=
request
.
user
)
# Propagate to other projects
if
propagate
:
allunits
=
Unit
.
objects
.
same
(
self
).
exclude
(
id
=
self
.
id
)
...
...
trans/views.py
View file @
41642ce7
...
...
@@ -161,7 +161,7 @@ def auto_translation(request, project, subproject, lang):
update
=
update
[
0
]
unit
.
fuzzy
=
update
.
fuzzy
unit
.
target
=
update
.
target
unit
.
save_backend
(
request
,
False
)
unit
.
save_backend
(
request
,
False
,
False
)
messages
.
add_message
(
request
,
messages
.
INFO
,
_
(
'Automatic translation completed.'
))
else
:
messages
.
add_message
(
request
,
messages
.
ERROR
,
_
(
'Failed to process form!'
))
...
...
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