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
ed8a8234
Commit
ed8a8234
authored
Oct 13, 2015
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for merging comments on file upload.
Fixes #874 Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
84178043
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
2 deletions
+10
-2
docs/changes.rst
docs/changes.rst
+1
-0
weblate/trans/forms.py
weblate/trans/forms.py
+6
-0
weblate/trans/models/translation.py
weblate/trans/models/translation.py
+2
-2
weblate/trans/views/files.py
weblate/trans/views/files.py
+1
-0
No files found.
docs/changes.rst
View file @
ed8a8234
...
...
@@ -9,6 +9,7 @@ Released on ? 2015.
* Fixed automatic translation for project owners.
* Improved performance of commit and push operations.
* New management command to add suggestions from command line.
* Added support for merging comments on file upload.
weblate 2.4
-----------
...
...
weblate/trans/forms.py
View file @
ed8a8234
...
...
@@ -358,6 +358,12 @@ class SimpleUploadForm(forms.Form):
required
=
False
,
initial
=
True
,
)
merge_comments
=
forms
.
BooleanField
(
label
=
_
(
'Merge translation comments'
),
help_text
=
_
(
'Merges comments into the translation.'
),
required
=
False
,
initial
=
True
,
)
class
UploadForm
(
SimpleUploadForm
):
...
...
weblate/trans/models/translation.py
View file @
ed8a8234
...
...
@@ -1083,7 +1083,7 @@ class Translation(models.Model, URLMixin, PercentMixin, LoggerMixin):
return
ret
def
merge_store
(
self
,
request
,
author
,
store2
,
overwrite
,
merge_header
,
add_fuzzy
,
fuzzy
):
add_fuzzy
,
fuzzy
,
merge_comments
=
False
):
'''
Merges translate-toolkit store into current translation.
'''
...
...
@@ -1116,7 +1116,7 @@ class Translation(models.Model, URLMixin, PercentMixin, LoggerMixin):
continue
# Actually update translation
unit1
.
merge
(
unit2
.
unit
,
overwrite
=
True
,
comments
=
False
)
unit1
.
merge
(
unit2
.
unit
,
overwrite
=
True
,
comments
=
merge_comments
)
# Handle
if
add_fuzzy
or
set_fuzzy
:
...
...
weblate/trans/views/files.py
View file @
ed8a8234
...
...
@@ -117,6 +117,7 @@ def upload_translation(request, project, subproject, lang):
overwrite
,
author
,
merge_header
=
form
.
cleaned_data
[
'merge_header'
],
merge_comments
=
form
.
cleaned_data
[
'merge_comments'
],
method
=
form
.
cleaned_data
[
'method'
],
fuzzy
=
form
.
cleaned_data
[
'fuzzy'
],
)
...
...
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