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
89a7da30
Commit
89a7da30
authored
Feb 28, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move author definition
parent
c5892f62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
trans/models.py
trans/models.py
+3
-3
No files found.
trans/models.py
View file @
89a7da30
...
...
@@ -222,12 +222,11 @@ class Translation(models.Model):
self
.
revision
=
blob
.
hexsha
self
.
save
()
def
git_commit
(
self
,
request
):
def
git_commit
(
self
,
author
):
'''
Commits translation to git.
'''
repo
=
self
.
subproject
.
get_repo
()
author
=
'%s <%s>'
%
(
request
.
user
.
get_full_name
(),
request
.
user
.
email
)
logger
.
info
(
'Commiting %s as %s'
,
self
.
filename
,
author
)
repo
.
git
.
commit
(
self
.
filename
,
...
...
@@ -254,8 +253,9 @@ class Translation(models.Model):
# We should have only one match
break
if
need_save
:
author
=
'%s <%s>'
%
(
request
.
user
.
get_full_name
(),
request
.
user
.
email
)
store
.
save
()
self
.
git_commit
(
request
)
self
.
git_commit
(
author
)
class
Unit
(
models
.
Model
):
translation
=
models
.
ForeignKey
(
Translation
)
...
...
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