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
906e0626
Commit
906e0626
authored
Feb 10, 2016
by
jitka
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2 from matejcik/jitka-pylints
fix,pylints
parents
6b6cc1a4
78d9b229
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
9 deletions
+10
-9
weblate/accounts/forms.py
weblate/accounts/forms.py
+3
-1
weblate/trans/context_processors.py
weblate/trans/context_processors.py
+0
-2
weblate/trans/models/componentlist.py
weblate/trans/models/componentlist.py
+2
-2
weblate/trans/templatetags/translations.py
weblate/trans/templatetags/translations.py
+2
-1
weblate/trans/views/basic.py
weblate/trans/views/basic.py
+3
-3
No files found.
weblate/accounts/forms.py
View file @
906e0626
...
...
@@ -227,6 +227,7 @@ class UserSettingsForm(forms.ModelForm):
'
hide_source_secondary
',
)
class DashboardSettingsForm(forms.ModelForm):
'''
Dashboard settings form.
...
...
@@ -246,7 +247,8 @@ class DashboardSettingsForm(forms.ModelForm):
Profile.DASHBOARD_COMPONENT_LIST and
\
self.cleaned_data['
dashboard_component_list
'] is None:
raise forms.ValidationError(
_("Componest list must be selected when used as default."))
_("Component list must be selected when used as default."))
class UserForm(forms.ModelForm):
'''
...
...
weblate/trans/context_processors.py
View file @
906e0626
...
...
@@ -24,8 +24,6 @@ import weblate
from
weblate
import
appsettings
from
weblate.trans.site
import
get_site_url
from
weblate.trans.models.project
import
Project
from
weblate.trans.models.translation
import
Translation
from
weblate.accounts.models
import
Profile
URL_BASE
=
'https://weblate.org/?utm_source=weblate&utm_term=%s'
URL_DONATE
=
'https://weblate.org/donate/?utm_source=weblate&utm_term=%s'
...
...
weblate/trans/models/componentlist.py
View file @
906e0626
...
...
@@ -34,14 +34,14 @@ class ComponentList(models.Model):
max_length
=
100
,
unique
=
True
,
help_text
=
_
(
'Name to display'
)
)
)
slug
=
models
.
SlugField
(
verbose_name
=
_
(
'URL slug'
),
db_index
=
True
,
unique
=
True
,
max_length
=
100
,
help_text
=
_
(
'Name used in URLs and file names.'
)
)
)
components
=
models
.
ManyToManyField
(
'SubProject'
)
...
...
weblate/trans/templatetags/translations.py
View file @
906e0626
...
...
@@ -611,7 +611,8 @@ def whiteboard_messages(project=None, subproject=None, language=None):
return
mark_safe
(
'
\
n
'
.
join
(
ret
))
@
register
.
simple_tag
(
takes_context
=
True
)
def
active_tab
(
context
,
slug
):
active
=
"active"
if
slug
==
context
[
'active_tab_slug'
]
else
""
return
mark_safe
(
'class="tab-pane %s" id="%s"'
%
(
active
,
slug
))
return
mark_safe
(
'class="tab-pane %s" id="%s"'
%
(
active
,
slug
))
weblate/trans/views/basic.py
View file @
906e0626
...
...
@@ -71,8 +71,9 @@ def home(request):
wb_messages
=
WhiteboardMessage
.
objects
.
all
()
projects
=
Project
.
objects
.
all_acl
(
request
.
user
)
subproject_list
=
None
if
projects
.
count
()
==
1
:
projects
=
SubProject
.
objects
.
filter
(
subproject_list
=
SubProject
.
objects
.
filter
(
project
=
projects
[
0
]
).
select_related
()
...
...
@@ -127,12 +128,11 @@ def home(request):
'subproject__project__name'
,
'subproject__name'
).
select_related
()
return
render
(
request
,
'index.html'
,
{
'projects'
:
projects
,
'projects'
:
subproject_list
or
projects
,
'top_translations'
:
top_translations
.
select_related
(
'user'
),
'top_suggestions'
:
top_suggestions
.
select_related
(
'user'
),
'last_changes'
:
last_changes
,
...
...
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