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
3509fa5a
Commit
3509fa5a
authored
Nov 12, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Management commands for locking/unlocking translations.
parent
7bc5d3c8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
0 deletions
+97
-0
docs/admin/management.rst
docs/admin/management.rst
+26
-0
docs/changes.rst
docs/changes.rst
+1
-0
trans/management/commands/lock_translation.py
trans/management/commands/lock_translation.py
+31
-0
trans/management/commands/unlock_translation.py
trans/management/commands/unlock_translation.py
+31
-0
trans/tests/test_commands.py
trans/tests/test_commands.py
+8
-0
No files found.
docs/admin/management.rst
View file @
3509fa5a
...
@@ -141,6 +141,19 @@ to date. Additionally you can limit languages to process with ``--lang``.
...
@@ -141,6 +141,19 @@ to date. Additionally you can limit languages to process with ``--lang``.
You can either define which project or subproject to update (eg.
You can either define which project or subproject to update (eg.
``weblate/master``) or use ``--all`` to update all existing subprojects.
``weblate/master``) or use ``--all`` to update all existing subprojects.
lock_translation <project|project/subproject>
---------------------------------------------
.. django-admin:: lock_translation
Locks given subproject for translating. This is useful in case you want to do
some maintenance on underlaying repository.
You can either define which project or subproject to update (eg.
``weblate/master``) or use ``--all`` to update all existing subprojects.
.. seealso:: :djadmin:`unlock_translation`
pushgit <project|project/subproject>
pushgit <project|project/subproject>
------------------------------------
------------------------------------
...
@@ -176,6 +189,19 @@ uptodate.
...
@@ -176,6 +189,19 @@ uptodate.
.. seealso:: :ref:`fulltext`
.. seealso:: :ref:`fulltext`
unlock_translation <project|project/subproject>
-----------------------------------------------
.. django-admin:: unlock_translation
Unnocks given subproject for translating. This is useful in case you want to do
some maintenance on underlaying repository.
You can either define which project or subproject to update (eg.
``weblate/master``) or use ``--all`` to update all existing subprojects.
.. seealso:: :djadmin:`lock_translation`
setupgroups
setupgroups
-----------
-----------
...
...
docs/changes.rst
View file @
3509fa5a
...
@@ -8,6 +8,7 @@ Released on ? 2013.
...
@@ -8,6 +8,7 @@ Released on ? 2013.
* Django 1.6 compatibility.
* Django 1.6 compatibility.
* No longer maintained compatibility with Django 1.4.
* No longer maintained compatibility with Django 1.4.
* Management commands for locking/unlocking translations.
weblate 1.8
weblate 1.8
-----------
-----------
...
...
trans/management/commands/lock_translation.py
0 → 100644
View file @
3509fa5a
# -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2013 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from
trans.management.commands
import
WeblateCommand
class
Command
(
WeblateCommand
):
help
=
'locks subproject for editing'
def
handle
(
self
,
*
args
,
**
options
):
for
subproject
in
self
.
get_subprojects
(
*
args
,
**
options
):
if
not
subproject
.
locked
:
subproject
.
locked
=
True
subproject
.
save
()
trans/management/commands/unlock_translation.py
0 → 100644
View file @
3509fa5a
# -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2013 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from
trans.management.commands
import
WeblateCommand
class
Command
(
WeblateCommand
):
help
=
'unlocks subproject for editing'
def
handle
(
self
,
*
args
,
**
options
):
for
subproject
in
self
.
get_subprojects
(
*
args
,
**
options
):
if
subproject
.
locked
:
subproject
.
locked
=
False
subproject
.
save
()
trans/tests/test_commands.py
View file @
3509fa5a
...
@@ -288,3 +288,11 @@ class RebuildIndexTest(CheckGitTest):
...
@@ -288,3 +288,11 @@ class RebuildIndexTest(CheckGitTest):
all
=
True
,
all
=
True
,
clean
=
True
,
clean
=
True
,
)
)
class
LockTranslationTest
(
CheckGitTest
):
command_name
=
'lock_translation'
class
UnLockTranslationTest
(
CheckGitTest
):
command_name
=
'unlock_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