Commit d63ec96a authored by Michal Čihař's avatar Michal Čihař

Rename trans application

parent 631d90ff
......@@ -66,8 +66,8 @@ For example you can enable only few of them:
.. code-block:: python
AUTOFIX_LIST = (
'trans.autofixes.whitespace.SameBookendingWhitespace',
'trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis',
'weblate.trans.autofixes.whitespace.SameBookendingWhitespace',
'weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis',
)
.. seealso:: :ref:`autofix`, :ref:`custom-autofix`
......@@ -95,9 +95,9 @@ For example you can enable only few of them:
.. code-block:: python
CHECK_LIST = (
'trans.checks.same.SameCheck',
'trans.checks.format.CFormatCheck',
'trans.checks.chars.ZeroWidthSpaceCheck',
'weblate.trans.checks.same.SameCheck',
'weblate.trans.checks.format.CFormatCheck',
'weblate.trans.checks.chars.ZeroWidthSpaceCheck',
)
.. seealso:: :ref:`checks`, :ref:`custom-checks`
......@@ -190,15 +190,15 @@ List of enabled machine translation services to use.
.. code-block:: python
MACHINE_TRANSLATION_SERVICES = (
'trans.machine.apertium.ApertiumTranslation',
'trans.machine.glosbe.GlosbeTranslation',
'trans.machine.google.GoogleTranslation',
'trans.machine.microsoft.MicrosoftTranslation',
'trans.machine.mymemory.MyMemoryTranslation',
'trans.machine.opentran.OpenTranTranslation',
'trans.machine.tmserver.TMServerTranslation',
'trans.machine.weblatetm.WeblateSimilarTranslation',
'trans.machine.weblatetm.WeblateTranslation',
'weblate.trans.machine.apertium.ApertiumTranslation',
'weblate.trans.machine.glosbe.GlosbeTranslation',
'weblate.trans.machine.google.GoogleTranslation',
'weblate.trans.machine.microsoft.MicrosoftTranslation',
'weblate.trans.machine.mymemory.MyMemoryTranslation',
'weblate.trans.machine.opentran.OpenTranTranslation',
'weblate.trans.machine.tmserver.TMServerTranslation',
'weblate.trans.machine.weblatetm.WeblateSimilarTranslation',
'weblate.trans.machine.weblatetm.WeblateTranslation',
)
.. seealso:: :ref:`machine-translation-setup`, :ref:`machine-translation`
......
......@@ -23,7 +23,7 @@ from django.utils.translation import ugettext as _, pgettext_lazy
from django.utils.safestring import mark_safe
from translate.lang.data import languages
from lang import data
from trans.mixins import PercentMixin
from weblate.trans.mixins import PercentMixin
from south.signals import post_migrate
from django.db.models.signals import post_syncdb
......@@ -426,7 +426,7 @@ class Language(models.Model, PercentMixin):
return self._percents
# Import translations
from trans.models.translation import Translation
from weblate.trans.models.translation import Translation
# Get prercents
result = Translation.objects.get_percents(language=self)
......
......@@ -22,7 +22,7 @@ from django.utils.translation import ugettext as _
from django.template import RequestContext
from django.core.urlresolvers import reverse
from lang.models import Language
from trans.models import Project, Dictionary, Change
from weblate.trans.models import Project, Dictionary, Change
from urllib import urlencode
......
......@@ -25,7 +25,7 @@ from django.contrib.auth.forms import AuthenticationForm
from weblate.accounts.models import Profile, VerifiedEmail
from weblate.accounts.captcha import MathCaptcha
from lang.models import Language
from trans.models import Project
from weblate.trans.models import Project
from django.contrib.auth.models import User
from django.utils.encoding import force_unicode
from itertools import chain
......
......@@ -35,8 +35,8 @@ from south.signals import post_migrate
from social.apps.django_app.default.models import UserSocialAuth
from lang.models import Language
from trans.models import Project, Change
from trans.util import (
from weblate.trans.models import Project, Change
from weblate.trans.util import (
get_user_display, get_site_url, get_distinct_translations
)
import weblate
......@@ -542,7 +542,7 @@ class Profile(models.Model):
'''
Returns list of secondary units.
'''
from trans.models.unit import Unit
from weblate.trans.models.unit import Unit
secondary_langs = self.secondary_languages.exclude(
id=unit.translation.language.id
)
......
......@@ -44,9 +44,9 @@ from weblate.accounts.models import (
from weblate.accounts.captcha import hash_question, unhash_question, MathCaptcha
from weblate.accounts.middleware import RequireLoginMiddleware
from trans.tests.test_views import ViewTestCase
from trans.tests.test_util import get_test_file
from trans.models.unitdata import Suggestion, Comment
from weblate.trans.tests.test_views import ViewTestCase
from weblate.trans.tests.test_util import get_test_file
from weblate.trans.models.unitdata import Suggestion, Comment
from lang.models import Language
from weblate import appsettings
......
......@@ -40,7 +40,7 @@ from social.apps.django_app.utils import BACKENDS
from social.apps.django_app.views import complete
from weblate.accounts.models import set_lang, Profile
from trans.models import Change, Project
from weblate.trans.models import Change, Project
from weblate.accounts.forms import (
ProfileForm, SubscriptionForm, UserForm, ContactForm
)
......
......@@ -19,7 +19,7 @@
#
from django.conf import settings
from trans.util import get_script_name
from weblate.trans.util import get_script_name
import os
......@@ -97,42 +97,42 @@ WHOOSH_INDEX = get('WHOOSH_INDEX', os.path.join(WEB_ROOT, 'whoosh-index'))
# List of quality checks
CHECK_LIST = get('CHECK_LIST', (
'trans.checks.same.SameCheck',
'trans.checks.chars.BeginNewlineCheck',
'trans.checks.chars.EndNewlineCheck',
'trans.checks.chars.BeginSpaceCheck',
'trans.checks.chars.EndSpaceCheck',
'trans.checks.chars.EndStopCheck',
'trans.checks.chars.EndColonCheck',
'trans.checks.chars.EndQuestionCheck',
'trans.checks.chars.EndExclamationCheck',
'trans.checks.chars.EndEllipsisCheck',
'trans.checks.format.PythonFormatCheck',
'trans.checks.format.PythonBraceFormatCheck',
'trans.checks.format.PHPFormatCheck',
'trans.checks.format.CFormatCheck',
'trans.checks.consistency.PluralsCheck',
'trans.checks.consistency.ConsistencyCheck',
'trans.checks.chars.NewlineCountingCheck',
'trans.checks.markup.BBCodeCheck',
'trans.checks.chars.ZeroWidthSpaceCheck',
'trans.checks.markup.XMLTagsCheck',
'trans.checks.source.OptionalPluralCheck',
'trans.checks.source.EllipsisCheck',
'trans.checks.source.MultipleFailingCheck',
'weblate.trans.checks.same.SameCheck',
'weblate.trans.checks.chars.BeginNewlineCheck',
'weblate.trans.checks.chars.EndNewlineCheck',
'weblate.trans.checks.chars.BeginSpaceCheck',
'weblate.trans.checks.chars.EndSpaceCheck',
'weblate.trans.checks.chars.EndStopCheck',
'weblate.trans.checks.chars.EndColonCheck',
'weblate.trans.checks.chars.EndQuestionCheck',
'weblate.trans.checks.chars.EndExclamationCheck',
'weblate.trans.checks.chars.EndEllipsisCheck',
'weblate.trans.checks.format.PythonFormatCheck',
'weblate.trans.checks.format.PythonBraceFormatCheck',
'weblate.trans.checks.format.PHPFormatCheck',
'weblate.trans.checks.format.CFormatCheck',
'weblate.trans.checks.consistency.PluralsCheck',
'weblate.trans.checks.consistency.ConsistencyCheck',
'weblate.trans.checks.chars.NewlineCountingCheck',
'weblate.trans.checks.markup.BBCodeCheck',
'weblate.trans.checks.chars.ZeroWidthSpaceCheck',
'weblate.trans.checks.markup.XMLTagsCheck',
'weblate.trans.checks.source.OptionalPluralCheck',
'weblate.trans.checks.source.EllipsisCheck',
'weblate.trans.checks.source.MultipleFailingCheck',
))
# List of automatic fixups
AUTOFIX_LIST = get('AUTOFIX_LIST', (
'trans.autofixes.whitespace.SameBookendingWhitespace',
'trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis',
'trans.autofixes.chars.RemoveZeroSpace',
'weblate.trans.autofixes.whitespace.SameBookendingWhitespace',
'weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis',
'weblate.trans.autofixes.chars.RemoveZeroSpace',
))
# List of machine translations
MACHINE_TRANSLATION_SERVICES = get('MACHINE_TRANSLATION_SERVICES', (
'trans.machine.weblatetm.WeblateSimilarTranslation',
'trans.machine.weblatetm.WeblateTranslation',
'weblate.trans.machine.weblatetm.WeblateSimilarTranslation',
'weblate.trans.machine.weblatetm.WeblateTranslation',
))
# Whether machine translations are enabled
......
......@@ -238,7 +238,7 @@ INSTALLED_APPS = (
'django.contrib.sitemaps',
'social.apps.django_app.default',
'south',
'trans',
'weblate.trans',
'lang',
'weblate.accounts',
# Needed for javascript localization
......@@ -256,12 +256,12 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
'django.core.context_processors.csrf',
'django.contrib.messages.context_processors.messages',
'trans.context_processors.weblate_context',
'weblate.trans.context_processors.weblate_context',
)
# Custom exception reporter to include some details
DEFAULT_EXCEPTION_REPORTER_FILTER = \
'trans.debug.WeblateExceptionReporterFilter'
'weblate.trans.debug.WeblateExceptionReporterFilter'
# Default logging of Weblate messages
# - to syslog in production (if available)
......@@ -424,36 +424,36 @@ WHOOSH_INDEX = os.path.join(WEB_ROOT, 'whoosh-index')
# List of quality checks
#CHECK_LIST = (
# 'trans.checks.same.SameCheck',
# 'trans.checks.chars.BeginNewlineCheck',
# 'trans.checks.chars.EndNewlineCheck',
# 'trans.checks.chars.BeginSpaceCheck',
# 'trans.checks.chars.EndSpaceCheck',
# 'trans.checks.chars.EndStopCheck',
# 'trans.checks.chars.EndColonCheck',
# 'trans.checks.chars.EndQuestionCheck',
# 'trans.checks.chars.EndExclamationCheck',
# 'trans.checks.chars.EndEllipsisCheck',
# 'trans.checks.format.PythonFormatCheck',
# 'trans.checks.format.PythonBraceFormatCheck',
# 'trans.checks.format.PHPFormatCheck',
# 'trans.checks.format.CFormatCheck',
# 'trans.checks.consistency.PluralsCheck',
# 'trans.checks.consistency.ConsistencyCheck',
# 'trans.checks.chars.NewlineCountingCheck',
# 'trans.checks.markup.BBCodeCheck',
# 'trans.checks.chars.ZeroWidthSpaceCheck',
# 'trans.checks.markup.XMLTagsCheck',
# 'trans.checks.source.OptionalPluralCheck',
# 'trans.checks.source.EllipsisCheck',
# 'trans.checks.source.MultipleFailingCheck',
# 'weblate.trans.checks.same.SameCheck',
# 'weblate.trans.checks.chars.BeginNewlineCheck',
# 'weblate.trans.checks.chars.EndNewlineCheck',
# 'weblate.trans.checks.chars.BeginSpaceCheck',
# 'weblate.trans.checks.chars.EndSpaceCheck',
# 'weblate.trans.checks.chars.EndStopCheck',
# 'weblate.trans.checks.chars.EndColonCheck',
# 'weblate.trans.checks.chars.EndQuestionCheck',
# 'weblate.trans.checks.chars.EndExclamationCheck',
# 'weblate.trans.checks.chars.EndEllipsisCheck',
# 'weblate.trans.checks.format.PythonFormatCheck',
# 'weblate.trans.checks.format.PythonBraceFormatCheck',
# 'weblate.trans.checks.format.PHPFormatCheck',
# 'weblate.trans.checks.format.CFormatCheck',
# 'weblate.trans.checks.consistency.PluralsCheck',
# 'weblate.trans.checks.consistency.ConsistencyCheck',
# 'weblate.trans.checks.chars.NewlineCountingCheck',
# 'weblate.trans.checks.markup.BBCodeCheck',
# 'weblate.trans.checks.chars.ZeroWidthSpaceCheck',
# 'weblate.trans.checks.markup.XMLTagsCheck',
# 'weblate.trans.checks.source.OptionalPluralCheck',
# 'weblate.trans.checks.source.EllipsisCheck',
# 'weblate.trans.checks.source.MultipleFailingCheck',
#)
# List of automatic fixups
#AUTOFIX_LIST = (
# 'trans.autofixes.whitespace.SameBookendingWhitespace',
# 'trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis',
# 'trans.autofixes.chars.RemoveZeroSpace',
# 'weblate.trans.autofixes.whitespace.SameBookendingWhitespace',
# 'weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis',
# 'weblate.trans.autofixes.chars.RemoveZeroSpace',
#)
# List of scripts to use in custom processing
......@@ -462,17 +462,17 @@ WHOOSH_INDEX = os.path.join(WEB_ROOT, 'whoosh-index')
# List of machine translations
#MACHINE_TRANSLATION_SERVICES = (
# 'trans.machine.apertium.ApertiumTranslation',
# 'trans.machine.glosbe.GlosbeTranslation',
# 'trans.machine.google.GoogleTranslation',
# 'trans.machine.google.GoogleWebTranslation',
# 'trans.machine.microsoft.MicrosoftTranslation',
# 'trans.machine.mymemory.MyMemoryTranslation',
# 'trans.machine.opentran.OpenTranTranslation',
# 'trans.machine.tmserver.AmagamaTranslation',
# 'trans.machine.tmserver.TMServerTranslation',
# 'trans.machine.weblatetm.WeblateSimilarTranslation',
# 'trans.machine.weblatetm.WeblateTranslation',
# 'weblate.trans.machine.apertium.ApertiumTranslation',
# 'weblate.trans.machine.glosbe.GlosbeTranslation',
# 'weblate.trans.machine.google.GoogleTranslation',
# 'weblate.trans.machine.google.GoogleWebTranslation',
# 'weblate.trans.machine.microsoft.MicrosoftTranslation',
# 'weblate.trans.machine.mymemory.MyMemoryTranslation',
# 'weblate.trans.machine.opentran.OpenTranTranslation',
# 'weblate.trans.machine.tmserver.AmagamaTranslation',
# 'weblate.trans.machine.tmserver.TMServerTranslation',
# 'weblate.trans.machine.weblatetm.WeblateSimilarTranslation',
# 'weblate.trans.machine.weblatetm.WeblateTranslation',
#)
# E-mail address that error messages come from.
......
......@@ -45,8 +45,8 @@ MT_MYMEMORY_EMAIL = 'test@weblate.org'
# Enable some machine translations
MACHINE_TRANSLATION_SERVICES = (
'trans.machine.microsoft.MicrosoftTranslation',
'trans.machine.dummy.DummyTranslation',
'weblate.trans.machine.microsoft.MicrosoftTranslation',
'weblate.trans.machine.dummy.DummyTranslation',
)
# Silent logging setup
......
......@@ -19,7 +19,7 @@
#
from django.contrib.sitemaps import GenericSitemap, Sitemap
from trans.models import Project, SubProject, Translation
from weblate.trans.models import Project, SubProject, Translation
from weblate.accounts.models import Profile
project_dict = {
......@@ -55,7 +55,7 @@ class PagesSitemap(Sitemap):
return item[0]
def lastmod(self, item):
from trans.models import Change
from weblate.trans.models import Change
return Change.objects.all()[0].timestamp
def priority(self, item):
......
......@@ -49,9 +49,9 @@ def check_versions(sender, app, **kwargs):
'''
Check required versions.
'''
appname = 'trans.models'
if app == 'trans' or getattr(app, '__name__', '') == appname:
from trans.requirements import get_versions, check_version
if (app == 'trans'
or getattr(app, '__name__', '') == 'weblate.trans.models'):
from weblate.trans.requirements import get_versions, check_version
versions = get_versions()
failure = False
......
......@@ -20,7 +20,7 @@
from django.contrib import admin
from django.conf import settings
from trans.models import (
from weblate.trans.models import (
Project, SubProject, Translation, Advertisement,
Unit, Suggestion, Comment, Check, Dictionary, Change
)
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.models import SubProject
from weblate.trans.models import SubProject
from django.contrib.sites.models import Site
from django.template import RequestContext
from django.shortcuts import render_to_response
......@@ -28,7 +28,7 @@ from django.contrib import messages
from django.conf import settings
from weblate import settings_example
from weblate import appsettings
from trans.util import HAS_LIBRAVATAR
from weblate.trans.util import HAS_LIBRAVATAR
from weblate.accounts.forms import HAS_ICU
import weblate
import django
......
......@@ -23,7 +23,7 @@ a sortable data object so fixes are applied in desired order.
'''
from weblate import appsettings
from trans.util import load_class
from weblate.trans.util import load_class
autofixes = []
for path in appsettings.AUTOFIX_LIST:
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.autofixes.base import AutoFix
from weblate.trans.autofixes.base import AutoFix
from django.utils.translation import ugettext_lazy as _
......
......@@ -20,7 +20,7 @@
import re
from django.utils.translation import ugettext_lazy as _
from trans.autofixes.base import AutoFix
from weblate.trans.autofixes.base import AutoFix
class SameBookendingWhitespace(AutoFix):
......
......@@ -19,7 +19,7 @@
#
from weblate import appsettings
from trans.util import load_class
from weblate.trans.util import load_class
# Initialize checks list
CHECKS = {}
......
......@@ -19,7 +19,7 @@
#
from django.utils.translation import ugettext_lazy as _
from trans.checks.base import TargetCheck, CountingCheck
from weblate.trans.checks.base import TargetCheck, CountingCheck
class BeginNewlineCheck(TargetCheck):
......
......@@ -19,7 +19,7 @@
#
from django.utils.translation import ugettext_lazy as _
from trans.checks.base import TargetCheck
from weblate.trans.checks.base import TargetCheck
class PluralsCheck(TargetCheck):
......@@ -52,7 +52,7 @@ class ConsistencyCheck(TargetCheck):
)
def check(self, sources, targets, unit):
from trans.models import Unit
from weblate.trans.models import Unit
# Do not check consistency if user asked not to have it
if not unit.translation.subproject.allow_translation_propagation:
return False
......
......@@ -19,7 +19,7 @@
#
from django.utils.translation import ugettext_lazy as _
from trans.checks.base import TargetCheck
from weblate.trans.checks.base import TargetCheck
import re
PYTHON_PRINTF_MATCH = re.compile(
......
......@@ -21,7 +21,7 @@
from django.utils.translation import ugettext_lazy as _
from xml.etree import cElementTree
import re
from trans.checks.base import TargetCheck
from weblate.trans.checks.base import TargetCheck
BBCODE_MATCH = re.compile(
r'\[(?P<tag>[^]]*)(?=(@[^]]*)?\](.*?)\[\/(?P=tag)\])',
......
......@@ -19,8 +19,8 @@
#
from django.utils.translation import ugettext_lazy as _
from trans.checks.base import TargetCheck
from trans.checks.format import (
from weblate.trans.checks.base import TargetCheck
from weblate.trans.checks.format import (
PYTHON_PRINTF_MATCH, PHP_PRINTF_MATCH, C_PRINTF_MATCH,
PYTHON_BRACE_MATCH,
)
......
......@@ -19,7 +19,7 @@
#
from django.utils.translation import ugettext_lazy as _
from trans.checks.base import SourceCheck
from weblate.trans.checks.base import SourceCheck
import re
# Matches (s) not followed by alphanumeric chars or at the end
......@@ -68,7 +68,7 @@ class MultipleFailingCheck(SourceCheck):
)
def check_source(self, source, unit):
from trans.models.unitdata import Check
from weblate.trans.models.unitdata import Check
related = Check.objects.filter(
contentsum=unit.contentsum,
project=unit.translation.subproject.project
......
......@@ -21,7 +21,7 @@
import weblate
from weblate import appsettings
from datetime import datetime
from trans.util import get_site_url
from weblate.trans.util import get_site_url
URL_BASE = 'http://weblate.org/?utm_source=weblate&utm_term=%s'
URL_DONATE = 'http://weblate.org/donate/?utm_source=weblate&utm_term=%s'
......
......@@ -22,7 +22,7 @@ Wrapper to include useful information in error mails.
'''
from django.views.debug import SafeExceptionReporterFilter
from trans.requirements import get_versions_string
from weblate.trans.requirements import get_versions_string
class WeblateExceptionReporterFilter(SafeExceptionReporterFilter):
......
......@@ -24,9 +24,9 @@ from django.shortcuts import get_object_or_404
from weblate import appsettings
from django.core.urlresolvers import reverse
from trans.models import Change
from weblate.trans.models import Change
from lang.models import Language
from trans.views.helper import get_translation, get_subproject, get_project
from weblate.trans.views.helper import get_translation, get_subproject, get_project
class ChangesFeed(Feed):
......
......@@ -29,7 +29,7 @@ from translate.storage.php import phpunit
from translate.storage.ts2 import tsunit
from translate.storage import mo
from translate.storage import factory
from trans.util import get_string, join_plural
from weblate.trans.util import get_string, join_plural
from translate.misc import quote
import weblate
import subprocess
......
......@@ -26,7 +26,7 @@ from django.utils.safestring import mark_safe
from django.utils.encoding import smart_unicode
from django.forms import ValidationError
from lang.models import Language
from trans.models import Unit
from weblate.trans.models import Unit
from urllib import urlencode
import weblate
......
......@@ -19,7 +19,7 @@
#
from weblate import appsettings
from trans.util import load_class
from weblate.trans.util import load_class
# Initialize checks list
MACHINE_TRANSLATION_SERVICES = {}
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.machine.base import MachineTranslation
from weblate.trans.machine.base import MachineTranslation
from weblate import appsettings
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.machine.base import MachineTranslation
from weblate.trans.machine.base import MachineTranslation
class DummyTranslation(MachineTranslation):
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.machine.base import MachineTranslation
from weblate.trans.machine.base import MachineTranslation
from weblate import appsettings
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.machine.base import MachineTranslation, MachineTranslationError
from weblate.trans.machine.base import MachineTranslation, MachineTranslationError
from django.core.exceptions import ImproperlyConfigured
from weblate import appsettings
......
......@@ -19,7 +19,7 @@
#
from datetime import datetime, timedelta
from trans.machine.base import MachineTranslation, MachineTranslationError
from weblate.trans.machine.base import MachineTranslation, MachineTranslationError
from django.core.exceptions import ImproperlyConfigured
from weblate import appsettings
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.machine.base import MachineTranslation
from weblate.trans.machine.base import MachineTranslation
from weblate import appsettings
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.machine.base import MachineTranslation
from weblate.trans.machine.base import MachineTranslation
import urllib
from weblate import appsettings
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.machine.base import MachineTranslation
from weblate.trans.machine.base import MachineTranslation
from django.core.exceptions import ImproperlyConfigured
import urllib
......
......@@ -18,8 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.machine.base import MachineTranslation
from trans.models.unit import Unit
from weblate.trans.machine.base import MachineTranslation
from weblate.trans.models.unit import Unit
def format_unit_match(unit, quality):
......
......@@ -23,7 +23,7 @@ Helper classes for management commands.
from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
from trans.models import Unit, SubProject, Translation
from weblate.trans.models import Unit, SubProject, Translation
class WeblateCommand(BaseCommand):
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.management.commands import WeblateCommand
from weblate.trans.management.commands import WeblateCommand
class Command(WeblateCommand):
......
......@@ -19,7 +19,7 @@
#
from django.core.management.base import BaseCommand
from trans.models import Suggestion, Comment, Check, Unit, Project
from weblate.trans.models import Suggestion, Comment, Check, Unit, Project
from lang.models import Language
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.management.commands import WeblateLangCommand
from weblate.trans.management.commands import WeblateLangCommand
from django.utils import timezone
from datetime import timedelta
from optparse import make_option
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.management.commands import WeblateCommand
from weblate.trans.management.commands import WeblateCommand
class Command(WeblateCommand):
......
......@@ -22,9 +22,9 @@ from django.core.management.base import BaseCommand, CommandError
from django.db.models import Q
# In Django 1.5, this should come from django.utils.text
from django.template.defaultfilters import slugify
from trans.models import SubProject, Project
from trans.formats import FILE_FORMATS
from trans.util import is_repo_link
from weblate.trans.models import SubProject, Project
from weblate.trans.formats import FILE_FORMATS
from weblate.trans.util import is_repo_link
from glob import glob
from optparse import make_option
import tempfile
......
......@@ -20,7 +20,7 @@
from django.core.management.base import BaseCommand
from optparse import make_option
from trans.models import Check
from weblate.trans.models import Check
class Command(BaseCommand):
......
......@@ -19,7 +19,7 @@
#
from django.core.management.base import BaseCommand
from trans.requirements import get_versions_string
from weblate.trans.requirements import get_versions_string
class Command(BaseCommand):
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.management.commands import WeblateLangCommand
from weblate.trans.management.commands import WeblateLangCommand
from optparse import make_option
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.management.commands import WeblateCommand
from weblate.trans.management.commands import WeblateCommand
class Command(WeblateCommand):
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.management.commands import WeblateCommand
from weblate.trans.management.commands import WeblateCommand
from optparse import make_option
......
......@@ -18,9 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.management.commands import WeblateCommand
from weblate.trans.management.commands import WeblateCommand
from lang.models import Language
from trans.search import update_index, create_source_index, create_target_index
from weblate.trans.search import update_index, create_source_index, create_target_index
from optparse import make_option
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.management.commands import WeblateCommand
from weblate.trans.management.commands import WeblateCommand
class Command(WeblateCommand):
......
......@@ -19,8 +19,8 @@
#
from django.core.management.base import BaseCommand
from trans.models import IndexUpdate, Unit
from trans.search import update_index
from weblate.trans.models import IndexUpdate, Unit
from weblate.trans.search import update_index
class Command(BaseCommand):
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.management.commands import WeblateLangCommand
from weblate.trans.management.commands import WeblateLangCommand
class Command(WeblateLangCommand):
......
......@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from trans.management.commands import WeblateCommand
from weblate.trans.management.commands import WeblateCommand
class Command(WeblateCommand):
......
This diff is collapsed.
This diff is collapsed.
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