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
8a9a38a0
Commit
8a9a38a0
authored
Aug 19, 2015
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
479e8e4a
1679609e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
weblate/media/loader-bootstrap.js
weblate/media/loader-bootstrap.js
+4
-1
weblate/trans/models/dictionary.py
weblate/trans/models/dictionary.py
+9
-3
No files found.
weblate/media/loader-bootstrap.js
View file @
8a9a38a0
...
...
@@ -55,7 +55,10 @@ function submitForm(evt) {
$form
=
$
(
'
.translation-form
'
);
}
if
(
$form
.
length
>
0
)
{
$form
.
find
(
'
input[type="submit"]
'
)[
0
].
click
();
var
submits
=
$form
.
find
(
'
input[type="submit"]
'
);
if
(
submits
.
length
>
0
)
{
submits
[
0
].
click
();
}
}
return
false
;
}
...
...
weblate/trans/models/dictionary.py
View file @
8a9a38a0
...
...
@@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import
sys
from
django.db
import
models
from
django.db.models
import
Q
from
django.utils.encoding
import
force_unicode
...
...
@@ -25,6 +26,7 @@ from weblate.lang.models import Language
from
weblate.trans.formats
import
AutoFormat
,
StringIOMode
from
weblate.trans.models.project
import
Project
from
translate.storage.csvl10n
import
csvfile
from
weblate.trans.util
import
report_error
from
django.core.urlresolvers
import
reverse
from
whoosh.analysis
import
(
LanguageAnalyzer
,
StandardAnalyzer
,
StemmingAnalyzer
,
NgramAnalyzer
...
...
@@ -151,9 +153,13 @@ class DictionaryManager(models.Manager):
# Extract words from all plurals and from context
for
text
in
unit
.
get_source_plurals
()
+
[
unit
.
context
]:
for
analyzer
in
analyzers
:
words
=
words
.
union
(
# Some Whoosh analyzers break on unicode
try
:
words
.
update
(
[
token
.
text
for
token
in
analyzer
(
force_unicode
(
text
))]
)
except
UnicodeDecodeError
as
error
:
report_error
(
error
,
sys
.
exc_info
())
# Grab all words in the dictionary
dictionary
=
self
.
filter
(
...
...
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