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
6d723503
Commit
6d723503
authored
Jul 24, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better name for git locking
parent
db948905
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
weblate/html/js/git-status.html
weblate/html/js/git-status.html
+2
-2
weblate/trans/models.py
weblate/trans/models.py
+5
-5
No files found.
weblate/html/js/git-status.html
View file @
6d723503
...
...
@@ -11,8 +11,8 @@
{% if perms.trans.reset_translation %}
<li><a
href=
"{{ object.get_reset_url }}"
title=
"{% trans "
Reset
all
changes
in
local
repository
"
%}"
class=
"confirm-reset"
>
{% trans "Reset" %}
</a></li>
{% endif %}
{% if perms.trans.lock_translation and object.is_lockable %}
{% if object.is_locked %}
{% if perms.trans.lock_translation and object.is_
git_
lockable %}
{% if object.is_
git_
locked %}
<li><a
href=
"{{ object.get_unlock_url }}"
title=
"{% trans "
Allow
changes
in
the
repository
"
%}"
>
{% trans "Unlock" %}
</a></li>
{% else %}
<li><a
href=
"{{ object.get_lock_url }}"
title=
"{% trans "
Prevent
any
changes
in
the
repository
"
%}"
>
{% trans "Lock" %}
</a></li>
...
...
weblate/trans/models.py
View file @
6d723503
...
...
@@ -160,10 +160,10 @@ class Project(models.Model):
'project'
:
self
.
slug
})
def
is_lockable
(
self
):
def
is_
git_
lockable
(
self
):
return
True
def
is_locked
(
self
):
def
is_
git_
locked
(
self
):
return
max
([
sp
.
locked
for
sp
in
self
.
subproject_set
.
all
()])
@
models
.
permalink
...
...
@@ -366,10 +366,10 @@ class SubProject(models.Model):
'subproject'
:
self
.
slug
})
def
is_lockable
(
self
):
def
is_
git_
lockable
(
self
):
return
True
def
is_locked
(
self
):
def
is_
git_
locked
(
self
):
return
self
.
locked
@
models
.
permalink
...
...
@@ -937,7 +937,7 @@ class Translation(models.Model):
'lang'
:
self
.
language
.
code
})
def
is_lockable
(
self
):
def
is_
git_
lockable
(
self
):
return
False
@
models
.
permalink
...
...
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