diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2018-03-31 14:55:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-31 14:55:04 +0200 |
commit | 1873ed81705399658ce7628f1148327a5c595909 (patch) | |
tree | 7abea01f509a5efc136dfddbf260f60d80268186 /src | |
parent | Renew certificate. (diff) | |
parent | Correct spelling mistakes. (diff) | |
download | newspipe-1873ed81705399658ce7628f1148327a5c595909.tar.gz newspipe-1873ed81705399658ce7628f1148327a5c595909.tar.bz2 newspipe-1873ed81705399658ce7628f1148327a5c595909.zip |
Merge pull request #37 from EdwardBetts/spelling
Correct spelling mistakes.
Diffstat (limited to 'src')
-rw-r--r-- | src/bootstrap.py | 2 | ||||
-rw-r--r-- | src/crawler/default_crawler.py | 2 | ||||
-rw-r--r-- | src/lib/article_utils.py | 2 | ||||
-rw-r--r-- | src/lib/feed_utils.py | 4 | ||||
-rw-r--r-- | src/web/controllers/abstract.py | 2 | ||||
-rw-r--r-- | src/web/translations/fr/LC_MESSAGES/messages.po | 4 | ||||
-rw-r--r-- | src/web/translations/messages.pot | 2 | ||||
-rw-r--r-- | src/web/views/admin.py | 2 | ||||
-rw-r--r-- | src/web/views/api/v2/common.py | 6 | ||||
-rw-r--r-- | src/web/views/api/v3/common.py | 2 |
10 files changed, 14 insertions, 14 deletions
diff --git a/src/bootstrap.py b/src/bootstrap.py index 5af29c69..8e337c4a 100644 --- a/src/bootstrap.py +++ b/src/bootstrap.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # -*- coding: utf-8 - -# required imports and code exection for basic functionning +# required imports and code execution for basic functionning import os import conf diff --git a/src/crawler/default_crawler.py b/src/crawler/default_crawler.py index 3a60ede4..08afeb33 100644 --- a/src/crawler/default_crawler.py +++ b/src/crawler/default_crawler.py @@ -100,7 +100,7 @@ async def parse_feed(user, feed): up_feed['error_count'] = 0 up_feed['last_error'] = "" - # Feed informations + # Feed information construct_feed_from(feed.link, parsed_feed).update(up_feed) if feed.title and 'title' in up_feed: # do not override the title set by the user diff --git a/src/lib/article_utils.py b/src/lib/article_utils.py index 49494e85..9891e29f 100644 --- a/src/lib/article_utils.py +++ b/src/lib/article_utils.py @@ -23,7 +23,7 @@ def extract_id(entry): async def construct_article(entry, feed, fields=None, fetch=True): - "Safe method to transorm a feedparser entry into an article" + "Safe method to transform a feedparser entry into an article" now = datetime.utcnow() article = {} def push_in_article(key, value): diff --git a/src/lib/feed_utils.py b/src/lib/feed_utils.py index 492391aa..4c2cee29 100644 --- a/src/lib/feed_utils.py +++ b/src/lib/feed_utils.py @@ -42,7 +42,7 @@ def construct_feed_from(url=None, fp_parsed=None, feed=None, query_site=True): fp_parsed = feedparser.parse(response.content, request_headers=response.headers) except Exception: - logger.exception('failed to retreive that url') + logger.exception('failed to retrieve that url') fp_parsed = {'bozo': True} assert url is not None and fp_parsed is not None feed = feed or {} @@ -74,7 +74,7 @@ def construct_feed_from(url=None, fp_parsed=None, feed=None, query_site=True): try: response = requests.get(feed['site_link'], **requests_kwargs) except Exception: - logger.exception('failed to retreive %r', feed['site_link']) + logger.exception('failed to retrieve %r', feed['site_link']) return feed bs_parsed = BeautifulSoup(response.content, 'html.parser', parse_only=SoupStrainer('head')) diff --git a/src/web/controllers/abstract.py b/src/web/controllers/abstract.py index 47cc365f..764ff305 100644 --- a/src/web/controllers/abstract.py +++ b/src/web/controllers/abstract.py @@ -63,7 +63,7 @@ class AbstractController: def _get(self, **filters): """ Will add the current user id if that one is not none (in which case the decision has been made in the code that the query shouldn't be user - dependant) and the user is not an admin and the filters doesn't already + dependent) and the user is not an admin and the filters doesn't already contains a filter for that user. """ if self._user_id_key is not None and self.user_id \ diff --git a/src/web/translations/fr/LC_MESSAGES/messages.po b/src/web/translations/fr/LC_MESSAGES/messages.po index 0c194346..3c1bafff 100644 --- a/src/web/translations/fr/LC_MESSAGES/messages.po +++ b/src/web/translations/fr/LC_MESSAGES/messages.po @@ -870,7 +870,7 @@ msgstr "Utilisateur %(nick)s supprimé avec succès." #: ../views/admin.py:96 #, python-format -msgid "An error occured while trying to delete a user: %(error)s" +msgid "An error occurred while trying to delete a user: %(error)s" msgstr "" "Une erreur est apparue lors de la suppression de l'utilisateur: %(error)s" @@ -1306,7 +1306,7 @@ msgstr "Interdit." #~ msgid "Indexing database..." #~ msgstr "Indexation la base de données..." -#~ msgid "An error occured" +#~ msgid "An error occurred" #~ msgstr "Une erreur est survenue." #~ msgid "Option not available on Heroku." diff --git a/src/web/translations/messages.pot b/src/web/translations/messages.pot index b3de9487..20a2dcc2 100644 --- a/src/web/translations/messages.pot +++ b/src/web/translations/messages.pot @@ -839,7 +839,7 @@ msgstr "" #: ../views/admin.py:96 #, python-format -msgid "An error occured while trying to delete a user: %(error)s" +msgid "An error occurred while trying to delete a user: %(error)s" msgstr "" #: ../views/admin.py:114 diff --git a/src/web/views/admin.py b/src/web/views/admin.py index 4de4009a..c9aa0977 100644 --- a/src/web/views/admin.py +++ b/src/web/views/admin.py @@ -93,7 +93,7 @@ def delete_user(user_id=None): nick=user.nickname), 'success') except Exception as error: flash( - gettext('An error occured while trying to delete a user: %(error)s', + gettext('An error occurred while trying to delete a user: %(error)s', error=error), 'danger') return redirect(url_for('admin.dashboard')) diff --git a/src/web/views/api/v2/common.py b/src/web/views/api/v2/common.py index 04b19d78..8a53d7e6 100644 --- a/src/web/views/api/v2/common.py +++ b/src/web/views/api/v2/common.py @@ -45,7 +45,7 @@ def authenticate(func): if not ucontr.check_password(user, request.authorization.password): raise Forbidden("Couldn't authenticate your user") if not user.is_active: - raise Forbidden("User is desactivated") + raise Forbidden("User is deactivated") login_user_bundle(user) if current_user.is_authenticated: return func(*args, **kwargs) @@ -116,7 +116,7 @@ class PyAggResourceNew(PyAggAbstractResource): class PyAggResourceExisting(PyAggAbstractResource): def get(self, obj_id=None): - """Retreive a single object""" + """Retrieve a single object""" return self.controller.get(id=obj_id) def put(self, obj_id=None): @@ -216,7 +216,7 @@ class PyAggResourceMulti(PyAggAbstractResource): except Exception as error: status = 206 results.append(error) - # if no operation succeded, it's not partial anymore, returning err 500 + # if no operation succeeded, it's not partial anymore, returning err 500 if status == 206 and results.count('ok') == 0: status = 500 return results, status diff --git a/src/web/views/api/v3/common.py b/src/web/views/api/v3/common.py index eb354482..b2a5ea3f 100644 --- a/src/web/views/api/v3/common.py +++ b/src/web/views/api/v3/common.py @@ -47,7 +47,7 @@ def auth_func(*args, **kw): raise ProcessingException("Couldn't authenticate your user", code=401) if not user.is_active: - raise ProcessingException("User is desactivated", code=401) + raise ProcessingException("User is deactivated", code=401) login_user_bundle(user) if not current_user.is_authenticated: raise ProcessingException(description='Not authenticated!', code=401) |