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
179880ac
Commit
179880ac
authored
May 07, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set unit priority on import
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
8e35a9ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
weblate/trans/models/unit.py
weblate/trans/models/unit.py
+8
-7
No files found.
weblate/trans/models/unit.py
View file @
179880ac
...
@@ -419,6 +419,12 @@ class Unit(models.Model):
...
@@ -419,6 +419,12 @@ class Unit(models.Model):
previous_source
==
self
.
previous_source
):
previous_source
==
self
.
previous_source
):
return
return
# Ensure we track source string
source
,
source_created
=
Source
.
objects
.
get_or_create
(
checksum
=
self
.
checksum
,
subproject
=
self
.
translation
.
subproject
)
# Store updated values
# Store updated values
self
.
position
=
pos
self
.
position
=
pos
self
.
location
=
location
self
.
location
=
location
...
@@ -430,6 +436,7 @@ class Unit(models.Model):
...
@@ -430,6 +436,7 @@ class Unit(models.Model):
self
.
comment
=
comment
self
.
comment
=
comment
self
.
contentsum
=
contentsum
self
.
contentsum
=
contentsum
self
.
previous_source
=
previous_source
self
.
previous_source
=
previous_source
self
.
priority
=
source
.
priority
self
.
save
(
self
.
save
(
force_insert
=
created
,
force_insert
=
created
,
backend
=
True
,
backend
=
True
,
...
@@ -437,14 +444,8 @@ class Unit(models.Model):
...
@@ -437,14 +444,8 @@ class Unit(models.Model):
same_state
=
same_state
same_state
=
same_state
)
)
# Ensure we track source string
dummy
,
created
=
Source
.
objects
.
get_or_create
(
checksum
=
self
.
checksum
,
subproject
=
self
.
translation
.
subproject
)
# Create change object for new source string
# Create change object for new source string
if
created
:
if
source_
created
:
from
weblate.trans.models.changes
import
Change
from
weblate.trans.models.changes
import
Change
Change
.
objects
.
create
(
Change
.
objects
.
create
(
...
...
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