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
5b11db8a
Commit
5b11db8a
authored
Jun 05, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow format strings in a message
parent
ab432ca3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
docs/config.rst
docs/config.rst
+9
-0
weblate/trans/models.py
weblate/trans/models.py
+6
-1
No files found.
docs/config.rst
View file @
5b11db8a
...
...
@@ -15,6 +15,15 @@ All settings are stored in :file:`settings.py` (as usual for Django).
Message used on each commit Weblate does.
You can use following format strings in the message:
``%(language)s``
Language code
``%(subproject)s``
Subproject name
``%(project)s``
Project name
.. envvar:: ENABLE_HOOKS
Whether to enable anonymous remote hooks.
...
...
weblate/trans/models.py
View file @
5b11db8a
...
...
@@ -801,10 +801,15 @@ class Translation(models.Model):
'''
Commits translation to git.
'''
msg
=
settings
.
COMMIT_MESSAGE
%
{
'language'
:
self
.
language
.
code
,
'subproject'
:
self
.
subproject
.
name
,
'project'
:
self
.
subproject
.
project
.
name
,
}
gitrepo
.
git
.
commit
(
self
.
filename
,
author
=
author
.
encode
(
'utf-8'
),
m
=
settings
.
COMMIT_MESSAGE
m
=
msg
)
if
sync
:
self
.
store_hash
()
...
...
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