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
6c9dc740
Commit
6c9dc740
authored
Jan 16, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indentation in managements commands
parent
df11a4a4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
25 deletions
+47
-25
weblate/accounts/management/commands/setupgroups.py
weblate/accounts/management/commands/setupgroups.py
+11
-6
weblate/lang/management/commands/setuplang.py
weblate/lang/management/commands/setuplang.py
+6
-3
weblate/trans/management/commands/checkgit.py
weblate/trans/management/commands/checkgit.py
+1
-0
weblate/trans/management/commands/commit_pending.py
weblate/trans/management/commands/commit_pending.py
+7
-4
weblate/trans/management/commands/commitgit.py
weblate/trans/management/commands/commitgit.py
+1
-0
weblate/trans/management/commands/loadpo.py
weblate/trans/management/commands/loadpo.py
+8
-5
weblate/trans/management/commands/rebuild_index.py
weblate/trans/management/commands/rebuild_index.py
+5
-3
weblate/trans/management/commands/update_index.py
weblate/trans/management/commands/update_index.py
+8
-4
No files found.
weblate/accounts/management/commands/setupgroups.py
View file @
6c9dc740
...
...
@@ -22,20 +22,25 @@ from django.core.management.base import BaseCommand
from
optparse
import
make_option
from
weblate.accounts.models
import
create_groups
,
move_users
class
Command
(
BaseCommand
):
help
=
'setups default groups'
help
=
'setups default
user
groups'
option_list
=
BaseCommand
.
option_list
+
(
make_option
(
'--move'
,
make_option
(
'--move'
,
action
=
'store_true'
,
dest
=
'move'
,
default
=
False
,
help
=
'Move all users to Users group'
),
make_option
(
'--no-update'
,
help
=
'Move all users to Users group'
),
make_option
(
'--no-update'
,
action
=
'store_false'
,
dest
=
'update'
,
default
=
True
,
help
=
'Prevents updates to existing group definitions'
),
)
help
=
'Prevents updates to existing group definitions'
),
)
def
handle
(
self
,
*
args
,
**
options
):
'''
...
...
weblate/lang/management/commands/setuplang.py
View file @
6c9dc740
...
...
@@ -22,16 +22,19 @@ from django.core.management.base import BaseCommand
from
optparse
import
make_option
from
weblate.lang.models
import
Language
class
Command
(
BaseCommand
):
help
=
'Populates language definitions'
option_list
=
BaseCommand
.
option_list
+
(
make_option
(
'--no-update'
,
make_option
(
'--no-update'
,
action
=
'store_false'
,
dest
=
'update'
,
default
=
True
,
help
=
'Prevents updates to existing language definitions'
),
)
help
=
'Prevents updates to existing language definitions'
),
)
def
handle
(
self
,
*
args
,
**
options
):
'''
...
...
weblate/trans/management/commands/checkgit.py
View file @
6c9dc740
...
...
@@ -20,6 +20,7 @@
from
weblate.trans.management.commands
import
WeblateCommand
class
Command
(
WeblateCommand
):
help
=
'checks status of git repo'
...
...
weblate/trans/management/commands/commit_pending.py
View file @
6c9dc740
...
...
@@ -23,24 +23,27 @@ from django.utils import timezone
from
datetime
import
timedelta
from
optparse
import
make_option
class
Command
(
WeblateCommand
):
help
=
'commits pending changes older than given age'
option_list
=
WeblateCommand
.
option_list
+
(
make_option
(
'--age'
,
make_option
(
'--age'
,
action
=
'store'
,
type
=
'int'
,
dest
=
'age'
,
default
=
24
,
help
=
'Age of changes to commit in hours (default is 24 hours)'
),
make_option
(
'--lang'
,
make_option
(
'--lang'
,
action
=
'store'
,
type
=
'string'
,
dest
=
'lang'
,
default
=
None
,
help
=
'Limit only to given languages (comma separated list)'
),
)
)
def
handle
(
self
,
*
args
,
**
options
):
...
...
@@ -55,7 +58,7 @@ class Command(WeblateCommand):
translations
=
subproject
.
translation_set
.
all
()
else
:
translations
=
subproject
.
translation_set
.
filter
(
language_code__in
=
langs
language_code__in
=
langs
)
for
translation
in
translations
:
...
...
weblate/trans/management/commands/commitgit.py
View file @
6c9dc740
...
...
@@ -20,6 +20,7 @@
from
weblate.trans.management.commands
import
WeblateCommand
class
Command
(
WeblateCommand
):
help
=
'forces commiting changes to git repo'
...
...
weblate/trans/management/commands/loadpo.py
View file @
6c9dc740
...
...
@@ -21,27 +21,30 @@
from
weblate.trans.management.commands
import
WeblateCommand
from
optparse
import
make_option
class
Command
(
WeblateCommand
):
help
=
'(re)loads translations from disk'
option_list
=
WeblateCommand
.
option_list
+
(
make_option
(
'--force'
,
make_option
(
'--force'
,
action
=
'store_true'
,
dest
=
'force'
,
default
=
False
,
help
=
'Force rereading files even when they should be up to date'
),
make_option
(
'--lang'
,
make_option
(
'--lang'
,
action
=
'store'
,
type
=
'string'
,
dest
=
'lang'
,
default
=
None
,
help
=
'Limit only to given languages (comma separated list)'
),
)
)
def
handle
(
self
,
*
args
,
**
options
):
langs
=
None
if
options
[
'lang'
]
is
not
None
:
langs
=
options
[
'lang'
].
split
(
','
)
for
s
in
self
.
get_subprojects
(
*
args
,
**
options
):
s
.
create_translations
(
options
[
'force'
],
langs
)
for
s
ubproject
in
self
.
get_subprojects
(
*
args
,
**
options
):
s
ubproject
.
create_translations
(
options
[
'force'
],
langs
)
weblate/trans/management/commands/rebuild_index.py
View file @
6c9dc740
...
...
@@ -28,12 +28,14 @@ from optparse import make_option
class
Command
(
WeblateCommand
):
help
=
'rebuilds index for fulltext search'
option_list
=
WeblateCommand
.
option_list
+
(
make_option
(
'--clean'
,
make_option
(
'--clean'
,
action
=
'store_true'
,
dest
=
'clean'
,
default
=
False
,
help
=
'removes also all words from database'
),
)
help
=
'removes also all words from database'
),
)
def
handle
(
self
,
*
args
,
**
options
):
languages
=
Language
.
objects
.
all
()
...
...
weblate/trans/management/commands/update_index.py
View file @
6c9dc740
...
...
@@ -45,12 +45,16 @@ class Command(BaseCommand):
for
lang
in
languages
:
with
FULLTEXT_INDEX
.
target_writer
(
lang
=
lang
.
code
,
buffered
=
False
)
as
writer
:
for
update
in
base
.
filter
(
unit__translation__language
=
lang
).
exclude
(
unit__target
=
''
).
iterator
():
units
=
base
.
filter
(
unit__translation__language
=
lang
).
exclude
(
unit__target
=
''
)
for
update
in
units
.
iterator
():
Unit
.
objects
.
add_to_target_index
(
update
.
unit
.
checksum
,
update
.
unit
.
target
,
writer
)
writer
)
base
.
delete
()
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