Skip to content

Commit

Permalink
Lower minimal length of search text
Browse files Browse the repository at this point in the history
For languages like Chinese asking for more than two chars is ridiculous
(issue WeblateOrg#335).
  • Loading branch information
nijel committed Aug 30, 2013
1 parent f4558f1 commit 2deba92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion trans/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class SearchForm(forms.Form):
# pylint: disable=C0103
q = forms.CharField(
label=_('Query'),
min_length=4,
min_length=2,
)
search = forms.ChoiceField(
label=_('Search type'),
Expand Down
2 changes: 1 addition & 1 deletion trans/tests/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ def test_search(self):
# Short string
self.do_search(
{'q': 'x'},
'Ensure this value has at least 4 characters (it has 1).'
'Ensure this value has at least 2 characters (it has 1).'
)
# Wrong type
self.do_search(
Expand Down

0 comments on commit 2deba92

Please sign in to comment.