Commit 90a0e20c authored by lln-ijinus's avatar lln-ijinus

Merge pull request #1 from nijel/master

Update from original
parents 65c2a767 673eb0ea
......@@ -14,14 +14,15 @@ python:
# build matrix configuration
env:
matrix:
- CI_PIP_DEPS="Django>=1.8,<1.9" CI_MODE=lint
- CI_PIP_DEPS="Django>=1.8,<1.9" CI_MODE=setup
- CI_PIP_DEPS="Django>=1.8,<1.9" CI_DATABASE=mysql
- CI_PIP_DEPS="Django>=1.8,<1.9" CI_DATABASE=postgresql
- CI_PIP_DEPS="Django>=1.9,<1.10" CI_MODE=lint
- CI_PIP_DEPS="Django>=1.9,<1.10" CI_MODE=setup
- CI_PIP_DEPS="Django>=1.9,<1.10" CI_DATABASE=mysql
- CI_PIP_DEPS="Django>=1.9,<1.10" CI_DATABASE=postgresql
- CI_PIP_DEPS="Django>=1.7,<1.8"
- CI_PIP_DEPS="Django>=1.8,<1.9"
- CI_PIP_DEPS="Django>=1.9,<1.10"
- CI_PIP_DEPS="--pre django"
- CI_PIP_DEPS="Django>=1.8,<1.9" CI_DATABASE=postgresql CI_MODE=selenium
- CI_PIP_DEPS="Django>=1.9,<1.10" CI_DATABASE=postgresql CI_MODE=selenium
global:
- DJANGO_SETTINGS_MODULE=weblate.settings_test
- CI_REQUIREMENTS=travis
......
......@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Weblate 1.2\n"
"Report-Msgid-Bugs-To: weblate@lists.cihar.com\n"
"POT-Creation-Date: 2015-11-27 10:34+0000\n"
"PO-Revision-Date: 2015-11-30 00:20+0000\n"
"PO-Revision-Date: 2015-12-01 00:08+0000\n"
"Last-Translator: Tobias Bannert <tobannert@gmail.com>\n"
"Language-Team: German "
"<https://hosted.weblate.org/projects/weblate/master/de/>\n"
......@@ -4766,7 +4766,7 @@ msgstr "In URLs und Dateinamen verwendeter Name."
#: weblate/trans/models/project.py:88
msgid "Main website of translated project."
msgstr "Haupt-Website des übersetzten Projekts."
msgstr "Hauptseite des übersetzten Projektes."
#: weblate/trans/models/project.py:91
msgid "Mailing list"
......
......@@ -8,10 +8,10 @@ msgstr ""
"Project-Id-Version: Weblate 1.2\n"
"Report-Msgid-Bugs-To: weblate@lists.cihar.com\n"
"POT-Creation-Date: 2015-11-27 10:34+0000\n"
"PO-Revision-Date: 2015-11-19 21:18+0000\n"
"PO-Revision-Date: 2015-12-03 09:41+0000\n"
"Last-Translator: Παναγιώτης Παπάζογλου <papaz_p@yahoo.com>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/weblate/master/el/"
">\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/weblate/master/el/>"
"\n"
"Language: el\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
......@@ -2715,13 +2715,13 @@ msgstr "Αλλαγή ρυθμίσεων συνδρομής"
#: weblate/html/mail/changed_translation.html:11
#: weblate/html/mail/changed_translation.txt:3
#, fuzzy, python-format
#, python-format
#| msgid ""
#| "there has been a change in translation on %(translation)s at "
#| "%(site_title)s."
msgid ""
"There has been a change in translation on %(translation)s at %(site_title)s."
msgstr "υπήρξε αλλαγή στη μετάφραση στο %(translation)s στο %(site_title)s."
msgstr "Υπήρξε αλλαγή στη μετάφραση στο %(translation)s στο %(site_title)s."
#: weblate/html/mail/changed_translation.html:18
#: weblate/html/mail/changed_translation.txt:5
......@@ -2793,10 +2793,10 @@ msgstr "Μπορείτε να μεταφράσετε στο %(translation_url)s"
#: weblate/html/mail/merge_failure.html:11
#: weblate/html/mail/merge_failure.txt:3
#, fuzzy, python-format
#, python-format
#| msgid "there has been a merge failure on %(subproject)s at %(site_title)s."
msgid "There has been a merge failure on %(subproject)s at %(site_title)s."
msgstr "υπήρξε ένα σφάλμα ένωσης του %(subproject)s στο %(site_title)s."
msgstr "Υπήρξε ένα σφάλμα ένωσης του %(subproject)s στο %(site_title)s."
#: weblate/html/mail/merge_failure.html:15
msgid "Error message"
......@@ -2821,10 +2821,10 @@ msgid "Merge failure in %(subproject)s"
msgstr "Σφάλμα ένωσης στο %(subproject)s"
#: weblate/html/mail/new_comment.html:11 weblate/html/mail/new_comment.txt:3
#, fuzzy, python-format
#, python-format
#| msgid "there has been a new comment on %(subproject)s at %(site_title)s."
msgid "There has been a new comment on %(subproject)s at %(site_title)s."
msgstr "υπήρξε ένα νέο σχόλιο του %(subproject)s στο %(site_title)s."
msgstr "Υπήρξε ένα νέο σχόλιο του %(subproject)s στο %(site_title)s."
#: weblate/html/mail/new_comment.html:28 weblate/html/mail/new_comment.txt:9
#: weblate/html/unit-context.html.py:8
......@@ -2838,7 +2838,7 @@ msgstr "Νέο σχόλιο στο %(subproject)s"
#: weblate/html/mail/new_contributor.html:11
#: weblate/html/mail/new_contributor.txt:3
#, fuzzy, python-format
#, python-format
#| msgid ""
#| "%(username)s has just made a first contribution on %(translation)s at "
#| "%(site_title)s."
......@@ -2855,7 +2855,7 @@ msgid "New contributor in %(translation)s"
msgstr "Νέα συμβολή στο %(translation)s"
#: weblate/html/mail/new_language.html:11 weblate/html/mail/new_language.txt:3
#, fuzzy, python-format
#, python-format
#| msgid ""
#| "there has been a request for new language on %(translation)s at "
#| "%(site_title)s."
......@@ -2863,7 +2863,7 @@ msgid ""
"There has been a request for new language on %(translation)s at "
"%(site_title)s."
msgstr ""
"υπήρξε ένα αίτημα για νέα γλώσσα στη %(translation)s στο %(site_title)s."
"Υπήρξε ένα αίτημα για νέα γλώσσα στη %(translation)s στο %(site_title)s."
#: weblate/html/mail/new_language.html:15 weblate/html/mail/new_language.txt:5
msgid ""
......@@ -2905,13 +2905,13 @@ msgid "New language request in %(translation)s"
msgstr "Νέο αίτημα γλώσσας στη %(translation)s"
#: weblate/html/mail/new_string.html:11 weblate/html/mail/new_string.txt:3
#, fuzzy, python-format
#, python-format
#| msgid ""
#| "there are new strings to translate on %(translation)s at %(site_title)s."
msgid ""
"There are new strings to translate on %(translation)s at %(site_title)s."
msgstr ""
"υπάρχουν νέα κείμενα για μετάφραση στο %(translation)s του %(site_title)s."
"Υπάρχουν νέα κείμενα για μετάφραση στο %(translation)s του %(site_title)s."
#: weblate/html/mail/new_string_subject.txt:3
#, python-format
......@@ -2920,14 +2920,14 @@ msgstr "Νέο κείμενο για μετάφραση στο %(translation)s"
#: weblate/html/mail/new_suggestion.html:11
#: weblate/html/mail/new_suggestion.txt:3
#, fuzzy, python-format
#, python-format
#| msgid ""
#| "there is a new suggestion to evaluate on %(translation)s at "
#| "%(site_title)s."
msgid ""
"There is a new suggestion to evaluate on %(translation)s at %(site_title)s."
msgstr ""
"υπάρχει νέα πρόταση για εκτίμηση στο %(translation)s του %(site_title)s."
"Υπάρχει νέα πρόταση για εκτίμηση στο %(translation)s του %(site_title)s."
#: weblate/html/mail/new_suggestion.html:28
#: weblate/html/mail/new_suggestion.txt:9
......@@ -2946,11 +2946,11 @@ msgstr "Αυτόματη πρόταση στο %(translation)s"
#: weblate/html/mail/new_translation.html:11
#: weblate/html/mail/new_translation.txt:3
#, fuzzy, python-format
#, python-format
#| msgid ""
#| "there has been a new translation on %(translation)s at %(site_title)s."
msgid "There has been a new translation on %(translation)s at %(site_title)s."
msgstr "υπήρξε νέα μετάφραση του %(translation)s στο %(site_title)s."
msgstr "Υπήρξε νέα μετάφραση του %(translation)s στο %(site_title)s."
#: weblate/html/mail/new_translation.txt:13
msgid "Previously not translated"
......@@ -4033,14 +4033,13 @@ msgid "Translation contains extra zero-width space character"
msgstr "Η μετάφραση περιέχει πρόσθετο χαρακτήρα διαστήματος μηδενικού πλάτους"
#: weblate/trans/checks/chars.py:373
#, fuzzy
#| msgid "Manage your translations"
msgid "Maximum length of translation"
msgstr "Διαχειριστείτε τις μεταφράσεις σας"
msgstr "Μέγιστο μήκος μετάφρασης"
#: weblate/trans/checks/chars.py:374
msgid "Translation should not exceed given length"
msgstr ""
msgstr "Η μετάφραση δεν πρέπει να υπερβαίνει το δοθέν μήκος"
#: weblate/trans/checks/consistency.py:30
msgid "Missing plurals"
......
......@@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: weblate@lists.cihar.com\n"
"POT-Creation-Date: 2015-11-27 10:34+0000\n"
"PO-Revision-Date: 2015-09-28 13:15+0200\n"
"PO-Revision-Date: 2015-12-06 22:17+0000\n"
"Last-Translator: Green Lunar <genghiskhan@gmx.ca>\n"
"Language-Team: Hebrew <https://hosted.weblate.org/projects/weblate/master/he/"
">\n"
"Language-Team: Hebrew "
"<https://hosted.weblate.org/projects/weblate/master/he/>\n"
"Language: he\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 2.5\n"
"X-Generator: Weblate 2.5-dev\n"
#: weblate/accounts/auth.py:47
msgid ""
......@@ -339,10 +339,9 @@ msgid "Changes in last quarter"
msgstr ""
#: weblate/billing/models.py:72
#, fuzzy
#| msgid "Activity in last year"
msgid "Changes in last year"
msgstr "פעילות בשנה האחרונה"
msgstr "שינויים בשנה האחרונה"
#: weblate/billing/models.py:80 weblate/trans/admin.py:46
msgid "VCS repositories"
......
......@@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: weblate@lists.cihar.com\n"
"POT-Creation-Date: 2015-11-27 10:34+0000\n"
"PO-Revision-Date: 2015-02-22 17:11+0200\n"
"Last-Translator: Koo Young Min <youngminz.kr@gmail.com>\n"
"Language-Team: Korean <https://hosted.weblate.org/projects/weblate/master/ko/"
">\n"
"PO-Revision-Date: 2015-12-03 05:36+0000\n"
"Last-Translator: Justin Kim <justin.joy.9to5@gmail.com>\n"
"Language-Team: Korean "
"<https://hosted.weblate.org/projects/weblate/master/ko/>\n"
"Language: ko\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 2.2\n"
"X-Generator: Weblate 2.5-dev\n"
#: weblate/accounts/auth.py:47
msgid ""
......@@ -202,10 +202,9 @@ msgid "Translated languages"
msgstr "사용된 언어"
#: weblate/accounts/models.py:471
#, fuzzy
#| msgid "Please choose the language into which you would like to translate."
msgid "Choose languages to which you can translate."
msgstr "번역하려는 언어를 선택하십시오."
msgstr "번역할 수 있는 언어를 선택하십시오."
#: weblate/accounts/models.py:475
msgid "Secondary languages"
......@@ -4048,14 +4047,13 @@ msgid "Translation contains extra zero-width space character"
msgstr "번역은 여분의 너비가 0 인 공간 문자가 포함합니다"
#: weblate/trans/checks/chars.py:373
#, fuzzy
#| msgid "Manage your translations"
msgid "Maximum length of translation"
msgstr "내 번역 관리"
msgstr "번역 문자열의 최대 길이"
#: weblate/trans/checks/chars.py:374
msgid "Translation should not exceed given length"
msgstr ""
msgstr "번역 문자열은 입력된 길이를 초과할 수 없습니다"
#: weblate/trans/checks/consistency.py:30
msgid "Missing plurals"
......
This diff is collapsed.
......@@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: weblate@lists.cihar.com\n"
"POT-Creation-Date: 2015-11-27 10:34+0000\n"
"PO-Revision-Date: 2015-11-19 21:31+0000\n"
"Last-Translator: Olexandr Nesterenko <olexn@ukr.net>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/weblate/"
"javascript/uk/>\n"
"PO-Revision-Date: 2015-12-04 12:45+0000\n"
"Last-Translator: Андрій Бандура <andriykopanytsia@gmail.com>\n"
"Language-Team: Ukrainian "
"<https://hosted.weblate.org/projects/weblate/javascript/uk/>\n"
"Language: uk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 2.5-dev\n"
#. Translators: Verb for copy operation
......@@ -79,37 +79,37 @@ msgstr "Субота"
#: weblate/static/loader-bootstrap.js:711
msgctxt "Short (eg. three letter) name of day in week"
msgid "Sun"
msgstr ""
msgstr "Нед"
#: weblate/static/loader-bootstrap.js:705
msgctxt "Short (eg. three letter) name of day in week"
msgid "Mon"
msgstr ""
msgstr "Пон"
#: weblate/static/loader-bootstrap.js:706
msgctxt "Short (eg. three letter) name of day in week"
msgid "Tue"
msgstr ""
msgstr "Вів"
#: weblate/static/loader-bootstrap.js:707
msgctxt "Short (eg. three letter) name of day in week"
msgid "Wed"
msgstr ""
msgstr "Сер"
#: weblate/static/loader-bootstrap.js:708
msgctxt "Short (eg. three letter) name of day in week"
msgid "Thu"
msgstr ""
msgstr "Чет"
#: weblate/static/loader-bootstrap.js:709
msgctxt "Short (eg. three letter) name of day in week"
msgid "Fri"
msgstr ""
msgstr "П'ят"
#: weblate/static/loader-bootstrap.js:710
msgctxt "Short (eg. three letter) name of day in week"
msgid "Sat"
msgstr ""
msgstr "Суб"
#: weblate/static/loader-bootstrap.js:714
#: weblate/static/loader-bootstrap.js:721
......
......@@ -54,6 +54,9 @@ cd ${OPENSHIFT_REPO_DIR}
# Pin Django version to 1.8 to avoid surprises when 1.9 comes out.
sed -e 's/Django[<>=]\+.*/Django>=1.8,<1.9/' $OPENSHIFT_REPO_DIR/requirements.txt >/tmp/requirements.txt
# Prevent lxml 3.5 or later to be used on OpenShift because its compilation needs more memory than small gears can provide.
sed -e 's/lxml[<>=]\+.*/\0,<3.5/' $OPENSHIFT_REPO_DIR/requirements.txt >/tmp/requirements.txt
sh "pip install -U -r /tmp/requirements.txt"
# Install optional dependencies without failing if some can't be installed.
......
......@@ -49,7 +49,8 @@ load-plugins=pylint_django
# R0921,R0922 Is raised when abstract classes are used in different module
# E1002 Produces lot of false positives with Django 1.5
# R0401(cyclic-import) we have too many of them
disable=C0111,I0011,W0142,W0613,W0703,R0201,E1103,E1101,R0401,R0921,R0922,E1002
# C0411(wrong-import-order) should be probably fixed
disable=C0111,I0011,W0142,W0613,W0703,R0201,E1103,E1101,R0401,R0921,R0922,E1002,C0411
[REPORTS]
......
......@@ -18,19 +18,20 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from itertools import chain
import unicodedata
from django import forms
from django.utils.translation import ugettext_lazy as _, pgettext
from django.contrib.auth import authenticate
from django.contrib.auth.models import User
from django.utils.encoding import force_unicode
from crispy_forms.helper import FormHelper
from weblate.accounts.models import Profile, VerifiedEmail
from weblate.accounts.captcha import MathCaptcha
from weblate.lang.models import Language
from weblate.trans.models import Project
from django.contrib.auth.models import User
from django.utils.encoding import force_unicode
from itertools import chain
import unicodedata
from weblate.logger import LOGGER
try:
......
......@@ -70,7 +70,7 @@ class Command(BaseCommand):
)
continue
if not line['last_name'] in line['first_name']:
if line['last_name'] not in line['first_name']:
full_name = u'{0} {1}'.format(
line['first_name'],
line['last_name']
......
......@@ -58,6 +58,7 @@ class MiddlewareTest(TestCase):
middleware.process_view(request, self.view_method, (), {})
)
# Protection for protected path and not logged in user
# pylint: disable=R0204
request.user = AnonymousUser()
self.assertIsInstance(
middleware.process_view(request, self.view_method, (), {}),
......
......@@ -404,7 +404,7 @@ class FileFormat(object):
'''
name = ''
format_id = ''
loader = (None, None)
loader = ('', '')
monolingual = None
check_flags = ()
unit_class = FileUnit
......
......@@ -199,7 +199,7 @@ class PluralTextarea(forms.Textarea):
)
# Show plural equation for more strings
pluralmsg = ''
pluralmsg = u''
if len(values) > 1:
pluralinfo = u'<abbr title="{0}">{1}</abbr>: {2}'.format(
ugettext(
......
......@@ -104,7 +104,7 @@ class MachineTranslation(object):
if text.startswith('\xef\xbb\xbf'):
text = text.decode('UTF-8-sig')
# Replace literal \t
text = text.replace(
text = text.strip().replace(
'\t', '\\t'
).replace(
'\r', '\\r'
......
......@@ -993,8 +993,10 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
Returns files matching current mask.
'''
prefix = os.path.join(self.get_path(), '')
matches = glob(os.path.join(self.get_path(), self.filemask))
matches = set([f.replace(prefix, '') for f in matches])
matches = set([
f.replace(prefix, '')
for f in glob(os.path.join(self.get_path(), self.filemask))
])
# We want to list template among translations as well
if self.has_template():
if self.edit_template:
......
......@@ -851,7 +851,7 @@ class Translation(models.Model, URLMixin, PercentMixin, LoggerMixin):
return False, None
# Check for changes
if (not add and
if ((not add or unit.target == '') and
unit.target == pounit.get_target() and
unit.fuzzy == pounit.is_fuzzy()):
return False, pounit
......
......@@ -438,6 +438,7 @@ class Unit(models.Model, LoggerMixin):
)
# Check if we actually need to change anything
# pylint: disable=R0916
if (not created and
location == self.location and
flags == self.flags and
......
......@@ -22,18 +22,18 @@
Whoosh based full text search.
'''
import shutil
from whoosh.fields import SchemaClass, TEXT, ID
from whoosh.filedb.filestore import FileStorage
from whoosh.writing import AsyncWriter, BufferedWriter
from whoosh import qparser
from django.dispatch import receiver
from django.db.models.signals import post_migrate
from django.db.utils import IntegrityError
from django.db import transaction
from weblate import appsettings
from whoosh.writing import AsyncWriter, BufferedWriter
from django.dispatch import receiver
from weblate.lang.models import Language
from weblate.trans.data import data_dir
import shutil
STORAGE = FileStorage(data_dir('whoosh'))
......
......@@ -95,10 +95,10 @@ class CheckTestCase(TestCase):
self.test_empty = ('', '', '')
self.test_good_matching = ('string', 'string', '')
self.test_good_none = ('string', 'string', '')
self.test_good_ignore = None
self.test_failure_1 = None
self.test_failure_2 = None
self.test_failure_3 = None
self.test_good_ignore = ()
self.test_failure_1 = ()
self.test_failure_2 = ()
self.test_failure_3 = ()
self.test_ignore_check = (
'x', 'x', self.check.ignore_string if self.check else ''
)
......@@ -107,7 +107,7 @@ class CheckTestCase(TestCase):
'''
Performs single check if we have data to test.
'''
if data is None or self.check is None:
if not data or self.check is None:
return
result = self.check.check_single(
data[0],
......@@ -169,7 +169,7 @@ class CheckTestCase(TestCase):
)
def test_check_failure_1_singular(self):
if self.test_failure_1 is None or self.check is None:
if not self.test_failure_1 or self.check is None:
return
self.assertTrue(
self.check.check_target(
......@@ -180,7 +180,7 @@ class CheckTestCase(TestCase):
)
def test_check_failure_1_plural(self):
if self.test_failure_1 is None or self.check is None:
if not self.test_failure_1 or self.check is None:
return
self.assertTrue(
self.check.check_target(
......
......@@ -59,6 +59,7 @@ GLOSBE_JSON = u'''
}
'''.encode('utf-8')
MYMEMORY_JSON = u'''
\r\n
{"responseData":{"translatedText":"svět"},"responseDetails":"",
"responseStatus":200,
"matches":[
......
from django.test import LiveServerTestCase
# -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from unittest import SkipTest
import time
import django
import os
import new
import json
import httplib
import base64
from django.test import LiveServerTestCase
from django.core.urlresolvers import reverse
from django.core import mail
from django.contrib.auth.models import User
try:
from selenium import webdriver
from selenium.common.exceptions import (
......@@ -8,16 +38,6 @@ try:
HAS_SELENIUM = True
except ImportError:
HAS_SELENIUM = False
from django.core.urlresolvers import reverse
from django.core import mail
from django.contrib.auth.models import User
import time
import django
import os
import new
import json
import httplib
import base64
from weblate.trans.tests.test_views import RegistrationTestMixin
from weblate.trans.tests import OverrideSettings
......
......@@ -157,14 +157,11 @@ def search(translation, request):
# Remove old search results
cleanup_session(request.session)
if name is not None:
name = unicode(name)
# Store in cache and return
search_id = str(uuid.uuid1())
search_result = {
'query': search_query,
'name': name,
'name': unicode(name) if name else None,
'ids': unit_ids,
'search_id': search_id,
'ttl': int(time.time()) + 86400,
......@@ -444,8 +441,7 @@ def handle_suggestions(translation, request, this_unit_url, next_unit_url):
# Perform operation
try:
sugid = int(sugid)
suggestion = Suggestion.objects.get(pk=sugid)
suggestion = Suggestion.objects.get(pk=int(sugid))
if 'accept' in request.POST or 'accept_edit' in request.POST:
suggestion.accept(translation, request)
......
......@@ -67,7 +67,7 @@ class Widget(object):
'''
name = None
colors = ('grey', 'white', 'black')
progress = None
progress = {}
alpha = False
extension = 'png'
content_type = 'image/png'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment