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
89fb9370
Commit
89fb9370
authored
Feb 09, 2016
by
Jitka Novotna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pylint
parent
4388591c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
22 deletions
+22
-22
weblate/accounts/forms.py
weblate/accounts/forms.py
+2
-1
weblate/accounts/models.py
weblate/accounts/models.py
+1
-1
weblate/trans/context_processors.py
weblate/trans/context_processors.py
+8
-8
weblate/trans/formats.py
weblate/trans/formats.py
+2
-2
weblate/trans/models/changes.py
weblate/trans/models/changes.py
+2
-3
weblate/trans/templatetags/translations.py
weblate/trans/templatetags/translations.py
+2
-2
weblate/trans/tests/test_views.py
weblate/trans/tests/test_views.py
+2
-2
weblate/trans/widgets.py
weblate/trans/widgets.py
+3
-3
No files found.
weblate/accounts/forms.py
View file @
89fb9370
...
...
@@ -242,7 +242,8 @@ class DashboardSettingsForm(forms.ModelForm):
'''
Check if component list is selected when required.
'''
if self.cleaned_data['
dashboard_view
']==Profile.DASHBOARD_COMPONENT_LIST and
\
if self.cleaned_data['
dashboard_view
'] ==
\
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."))
...
...
weblate/accounts/models.py
View file @
89fb9370
...
...
@@ -507,7 +507,7 @@ class Profile(models.Model):
(
DASHBOARD_COMPONENT_LIST
,
_
(
'Component list'
)),
)
dashboard_view
=
models
.
CharField
(
max_length
=
100
,
max_length
=
100
,
choices
=
DASHBOARD_CHOICES
,
verbose_name
=
_
(
'Default dashboard view'
),
default
=
DASHBOARD_SUBSCRIPTIONS
,
...
...
weblate/trans/context_processors.py
View file @
89fb9370
...
...
@@ -26,7 +26,7 @@ from weblate.trans.site import get_site_url
from
weblate.trans.models.componentlist
import
ComponentList
from
weblate.trans.models.project
import
Project
from
weblate.trans.models.translation
import
Translation
from
weblate.accounts.models
import
Profile
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'
...
...
@@ -50,14 +50,14 @@ def weblate_context(request):
subscribed_projects
=
None
usersubscriptions
=
None
userlanguages
=
None
active_tab_slug
=
Profile
.
DASHBOARD_ALL
active_tab_slug
=
Profile
.
DASHBOARD_ALL
if
request
.
user
.
is_authenticated
():
active_tab_slug
=
request
.
user
.
profile
.
dashboard_view
if
active_tab_slug
==
Profile
.
DASHBOARD_COMPONENT_LIST
:
clist
=
request
.
user
.
profile
.
dashboard_component_list
active_tab_slug
=
clist
.
tab_slug
()
dashboard_choices
[
active_tab_slug
]
=
clist
.
name
dashboard_choices
[
active_tab_slug
]
=
clist
.
name
subscribed_projects
=
request
.
user
.
profile
.
subscriptions
.
all
()
...
...
@@ -77,11 +77,11 @@ def weblate_context(request):
for
componentlist
in
componentlists
:
componentlist
.
translations
=
Translation
.
objects
.
filter
(
language__in
=
request
.
user
.
profile
.
languages
.
all
(),
subproject__in
=
componentlist
.
components
.
all
()
).
order_by
(
'subproject__project__name'
,
'subproject__name'
).
select_related
()
language__in
=
request
.
user
.
profile
.
languages
.
all
(),
subproject__in
=
componentlist
.
components
.
all
()
).
order_by
(
'subproject__project__name'
,
'subproject__name'
).
select_related
()
return
{
...
...
weblate/trans/formats.py
View file @
89fb9370
...
...
@@ -30,11 +30,11 @@ import csv
import
traceback
import
importlib
from
django.utils.translation
import
ugettext_lazy
as
_
import
six
from
six
import
StringIO
from
django.utils.translation
import
ugettext_lazy
as
_
from
translate.convert
import
po2php
from
translate.storage.lisa
import
LISAfile
from
translate.storage.properties
import
propunit
,
propfile
...
...
weblate/trans/models/changes.py
View file @
89fb9370
...
...
@@ -18,14 +18,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import
six.moves
from
django.db
import
models
from
django.contrib.auth.models
import
User
from
django.db.models
import
Count
,
Q
from
django.utils.encoding
import
python_2_unicode_compatible
from
django.utils.encoding
import
python_2_unicode_compatible
,
force_text
from
django.utils.translation
import
ugettext
as
_
,
ugettext_lazy
from
django.utils
import
timezone
from
django.utils.encoding
import
force_text
import
six.moves
from
weblate.trans.models.project
import
Project
from
weblate.accounts.avatar
import
get_user_display
...
...
weblate/trans/templatetags/translations.py
View file @
89fb9370
...
...
@@ -613,5 +613,5 @@ def whiteboard_messages(project=None, subproject=None, language=None):
@
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
))
active
=
"active"
if
slug
==
context
[
'active_tab_slug'
]
else
""
return
mark_safe
(
'class="tab-pane %s" id="%s"'
%
(
active
,
slug
))
weblate/trans/tests/test_views.py
View file @
89fb9370
...
...
@@ -27,14 +27,14 @@ from xml.dom import minidom
from
six.moves.urllib.parse
import
urlsplit
from
six
import
StringIO
from
PIL
import
Image
from
django.test.client
import
RequestFactory
from
django.contrib.auth.models
import
Group
,
User
from
django.core.urlresolvers
import
reverse
from
django.contrib.messages.storage.fallback
import
FallbackStorage
from
django.core
import
mail
from
PIL
import
Image
from
weblate.trans.models
import
WhiteboardMessage
from
weblate.trans.tests.test_models
import
RepoTestCase
from
weblate.accounts.models
import
Profile
...
...
weblate/trans/widgets.py
View file @
89fb9370
...
...
@@ -20,14 +20,14 @@
import
os.path
from
django.utils.translation
import
ugettext
as
_
from
django.template.loader
import
render_to_string
from
PIL
import
Image
,
ImageDraw
from
six
import
StringIO
from
six.moves.urllib.parse
import
quote
from
django.utils.translation
import
ugettext
as
_
from
django.template.loader
import
render_to_string
from
weblate.trans.fonts
import
is_base
,
get_font
from
weblate.appsettings
import
ENABLE_HTTPS
...
...
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