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
2ad8db92
Commit
2ad8db92
authored
Jul 24, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
List only used languages in preferences. (issue #86)
parent
0e41e302
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
docs/changes.rst
docs/changes.rst
+1
-0
weblate/accounts/forms.py
weblate/accounts/forms.py
+8
-0
No files found.
docs/changes.rst
View file @
2ad8db92
...
...
@@ -20,6 +20,7 @@ Relased on ? 2012.
* Better layout of main page.
* Support for automatically pushing changes on every commit.
* Support for email notifications of translators.
* List only used languages in preferences.
weblate 1.1
-----------
...
...
weblate/accounts/forms.py
View file @
2ad8db92
...
...
@@ -2,6 +2,7 @@ from django import forms
from
django.utils.translation
import
ugettext_lazy
as
_
from
weblate.accounts.models
import
Profile
from
weblate.lang.models
import
Language
from
django.contrib.auth.models
import
User
from
registration.forms
import
RegistrationFormUniqueEmail
...
...
@@ -14,6 +15,13 @@ class ProfileForm(forms.ModelForm):
'secondary_languages'
,
)
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
ProfileForm
,
self
).
__init__
(
*
args
,
**
kwargs
)
# Limit languages to ones which have translation
qs
=
Language
.
objects
.
filter
(
translation__total__gt
=
0
).
distinct
()
self
.
fields
[
'languages'
].
queryset
=
qs
self
.
fields
[
'secondary_languages'
].
queryset
=
qs
class
SubscriptionForm
(
forms
.
ModelForm
):
class
Meta
:
model
=
Profile
...
...
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