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
6fd2cc39
Commit
6fd2cc39
authored
Nov 27, 2015
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consistent handling of extra params
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
e50279c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
weblate/trans/management/commands/import_project.py
weblate/trans/management/commands/import_project.py
+8
-6
weblate/trans/tests/test_commands.py
weblate/trans/tests/test_commands.py
+1
-1
No files found.
weblate/trans/management/commands/import_project.py
View file @
6fd2cc39
...
...
@@ -71,7 +71,7 @@ class Command(BaseCommand):
help
=
'File format type, defaults to autodetection'
,
),
make_option
(
'--language-
filter
'
,
'--language-
regex
'
,
default
=
None
,
help
=
(
'Language filter regular expression to be used for created'
...
...
@@ -108,7 +108,7 @@ class Command(BaseCommand):
self
.
filemask
=
None
self
.
component_re
=
None
self
.
file_format
=
None
self
.
language_
filter
=
None
self
.
language_
regex
=
None
self
.
license
=
None
self
.
license_url
=
None
self
.
main_component
=
None
...
...
@@ -209,7 +209,7 @@ class Command(BaseCommand):
self
.
filemask
=
args
[
3
]
self
.
vcs
=
options
[
'vcs'
]
self
.
file_format
=
options
[
'file_format'
]
self
.
language_
filter
=
options
[
'language_filter
'
]
self
.
language_
regex
=
options
[
'language_regex
'
]
self
.
main_component
=
options
[
'main_component'
]
self
.
name_template
=
options
[
'name_template'
]
self
.
license
=
options
[
'license'
]
...
...
@@ -300,13 +300,15 @@ class Command(BaseCommand):
'vcs'
:
self
.
vcs
,
}
optionals
=
(
'license'
,
'license_url'
)
optionals
=
(
'license'
,
'license_url'
,
'language_regex'
)
for
key
in
optionals
:
value
=
getattr
(
self
,
key
)
if
value
is
not
None
:
result
[
key
]
=
value
if
self
.
language_filter
is
not
None
:
result
[
'language_regex'
]
=
self
.
language_filter
return
result
def
import_initial
(
self
,
project
,
repo
,
branch
):
...
...
weblate/trans/tests/test_commands.py
View file @
6fd2cc39
...
...
@@ -87,7 +87,7 @@ class ImportProjectTest(RepoTestCase):
self
.
git_repo_path
,
'master'
,
'**/*.po'
,
language_
filter
=
'cs'
language_
regex
=
'cs'
)
# We should have loaded four subprojects
self
.
assertEqual
(
project
.
subproject_set
.
count
(),
4
)
...
...
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