From a46e7abdc2050cc482dfa2a1002a3a7099005331 Mon Sep 17 00:00:00 2001 From: Delaine Wendling Date: Wed, 8 May 2019 08:29:44 -0500 Subject: [PATCH] Updating imports and version --- setup.py | 2 +- src/shuttle/sync.py | 10 +++++----- src/shuttle/transifex.py | 11 ++++++----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index 64ac4bc..0ca639d 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ README = open(os.path.join(here, 'README.rst')).read() NEWS = open(os.path.join(here, 'NEWS.txt')).read() -version = '0.2.2' +version = '0.4' install_requires = [ 'babel', diff --git a/src/shuttle/sync.py b/src/shuttle/sync.py index c752be9..494c267 100644 --- a/src/shuttle/sync.py +++ b/src/shuttle/sync.py @@ -6,9 +6,9 @@ import babel.messages.pofile from deskapi.models import DeskApi2 from django.conf import settings -import txlib.api.statistics -import txlib.api.translations -from txlib.http.exceptions import NotFoundError +import txlib_too.api.statistics +import txlib_too.api.translations +from txlib_too.http.exceptions import NotFoundError from transifex import Tx @@ -216,7 +216,7 @@ def push(self): def pull(self): """Pull topics from Transifex.""" - topic_stats = txlib.api.statistics.Statistics.get( + topic_stats = txlib_too.api.statistics.Statistics.get( project_slug=self.tx_project_slug, resource_slug=self.TOPIC_STRINGS_SLUG, ) @@ -237,7 +237,7 @@ def pull(self): if locale_stats['completed'] == '100%': # get the resource from Tx - translation = txlib.api.translations.Translation.get( + translation = txlib_too.api.translations.Translation.get( project_slug=self.tx_project_slug, slug=self.TOPIC_STRINGS_SLUG, lang=locale, diff --git a/src/shuttle/transifex.py b/src/shuttle/transifex.py index 66beaed..a6d049d 100644 --- a/src/shuttle/transifex.py +++ b/src/shuttle/transifex.py @@ -1,9 +1,9 @@ from django.conf import settings -from txlib import registry -from txlib.http import auth -from txlib.http.exceptions import NotFoundError, RemoteServerError -from txlib.http import http_requests -from txlib.api import ( +from txlib_too import registry +from txlib_too.http import auth +from txlib_too.http.exceptions import NotFoundError, RemoteServerError +from txlib_too.http import http_requests +from txlib_too.api import ( project, resources, translations, @@ -16,6 +16,7 @@ DEFAULT_SOURCE_LANGUAGE = 'en_US' DEFAULT_I18N_TYPE = 'HTML' + class Tx(object): def __init__(self, project_slug_prefix):