From 5fc7a775269f3b1e58868e44aa0815e4e38d1678 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Fri, 29 Jun 2018 01:05:33 +0300 Subject: [PATCH] Spellcheck all plugins --- README.md | 2 +- appindicator_integration/plugin.py | 2 +- clickable_nicknames/clickable_nicknames.py | 2 +- clients_icons/clients_icons.py | 4 ++-- juick/plugin.py | 14 +++++++------- latex/config_dialog.ui | 2 +- omemo/CHANGELOG | 4 ++-- omemo/omemo/aes_gcm_native.py | 2 +- omemo/omemo/sql.py | 4 ++-- omemo/omemo_connection.py | 16 ++++++++-------- omemo/omemoplugin.py | 5 +++-- omemo/xmpp.py | 2 +- pgp/pgpplugin.py | 2 +- whiteboard/plugin.py | 2 +- whiteboard/whiteboard_widget.py | 18 +++++++++--------- 15 files changed, 41 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index e8abf7f..b452e2b 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ First, thanks for that! Here is how to start: **Before you put in any work, please contact us on [gajim@conference.gajim.org](xmpp:gajim@conference.gajim.org?join)** -**Dont use dev.gajim.org for any projects that are not directly for the benefit of Gajim** +**Don't use dev.gajim.org for any projects that are not directly for the benefit of Gajim** ## Plugins list diff --git a/appindicator_integration/plugin.py b/appindicator_integration/plugin.py index ed34be8..0ceadc0 100644 --- a/appindicator_integration/plugin.py +++ b/appindicator_integration/plugin.py @@ -2,7 +2,7 @@ """ Appindicator integration plugin. -Rewriten from Ubuntu Ayatana Integration plugin +Rewritten from Ubuntu Ayatana Integration plugin 2013 Denis Borenko 2017 Philipp Hörist :license: GPLv3 diff --git a/clickable_nicknames/clickable_nicknames.py b/clickable_nicknames/clickable_nicknames.py index e2be333..cd93cbd 100644 --- a/clickable_nicknames/clickable_nicknames.py +++ b/clickable_nicknames/clickable_nicknames.py @@ -112,7 +112,7 @@ class Base(object): if event.type == Gdk.EventType.BUTTON_PRESS and event.button.button == 1: # left mouse button clicked begin_iter = iter_.copy() - # we get the begining of the tag + # we get the beginning of the tag while not begin_iter.begins_tag(texttag): begin_iter.backward_char() end_iter = iter_.copy() diff --git a/clients_icons/clients_icons.py b/clients_icons/clients_icons.py index ef33e4a..38dc4b6 100644 --- a/clients_icons/clients_icons.py +++ b/clients_icons/clients_icons.py @@ -208,7 +208,7 @@ class ClientsIconsPlugin(GajimPlugin): client_name = _('Unknown') caps_ = None if caps: - # libpurple returns pidgin.im/ only, we have to look for ressource name + # libpurple returns pidgin.im/ only, we have to look for resource name if 'pidgin.im/' in caps: caps = 'libpurple' for client in LIBPURPLE_CLIENTS: @@ -447,7 +447,7 @@ class ClientsIconsPlugin(GajimPlugin): self.set_icon(roster.model, iter_, self.renderer_num, None, contact) return - # higest contact changed + # highest contact changed if roster.model[iter_][self.renderer_num] is not None: caps = contact.client_caps._node if caps: diff --git a/juick/plugin.py b/juick/plugin.py index 5736cd0..57fbd85 100644 --- a/juick/plugin.py +++ b/juick/plugin.py @@ -274,7 +274,7 @@ class Base(object): if event.type == Gdk.EventType.BUTTON_PRESS and event.button.button == 3: # show popup menu (right mouse button clicked) begin_iter = iter_.copy() - # we get the begining of the tag + # we get the beginning of the tag while not begin_iter.begins_tag(texttag): begin_iter.backward_char() end_iter = iter_.copy() @@ -290,27 +290,27 @@ class Base(object): nick = self.juick_nick_re.search(word) if post is None and nick is None: return - childs = self.juick_link_menu.get_children() + children = self.juick_link_menu.get_children() if post: self.juick_post_full = app.interface.sharp_slash_re\ .search(word).group(0) self.juick_post_uid = post.group(1) for menuitem in range(7): - childs[menuitem].show() + children[menuitem].show() for menuitem in range(7, 13): - childs[menuitem].hide() + children[menuitem].hide() if nick: self.juick_nick = nick.group(0) for menuitem in range(7): - childs[menuitem].hide() + children[menuitem].hide() for menuitem in range(7, 13): - childs[menuitem].show() + children[menuitem].show() self.juick_link_menu.popup(None, None, None, None, event.button.button, event.time) if event.type == Gdk.EventType.BUTTON_PRESS and event.button.button == 1: # insert message num or nick (left mouse button clicked) begin_iter = iter_.copy() - # we get the begining of the tag + # we get the beginning of the tag while not begin_iter.begins_tag(texttag): begin_iter.backward_char() end_iter = iter_.copy() diff --git a/latex/config_dialog.ui b/latex/config_dialog.ui index 631a74b..39a6744 100644 --- a/latex/config_dialog.ui +++ b/latex/config_dialog.ui @@ -3,7 +3,7 @@ - Plug-in decription should be displayed here. This text will be erased during PluginsWindow initialization. + Plug-in description should be displayed here. This text will be erased during PluginsWindow initialization. diff --git a/omemo/CHANGELOG b/omemo/CHANGELOG index cf4172f..beeba35 100644 --- a/omemo/CHANGELOG +++ b/omemo/CHANGELOG @@ -96,7 +96,7 @@ - Query only the most recent PEP items 2.3.6 / 2017-08-21 -- Adapt to Gaim beeing now a Package +- Adapt to Gaim being now a Package 2.3.5 / 2017-08-07 - Support 12bit IVs on httpupload files @@ -139,7 +139,7 @@ - Fix a bug when publishing devices - Fix copying fingerprint - Fix layout issue -- Dont handle type 'normal' messages +- Don't handle type 'normal' messages 2.0.1 / 2017-01-14 - Better XEP Compliance diff --git a/omemo/omemo/aes_gcm_native.py b/omemo/omemo/aes_gcm_native.py index fc80c31..de3b7b5 100644 --- a/omemo/omemo/aes_gcm_native.py +++ b/omemo/omemo/aes_gcm_native.py @@ -25,7 +25,7 @@ from cryptography.hazmat.primitives.ciphers import algorithms from cryptography.hazmat.primitives.ciphers.modes import GCM # On Windows we have to import a specific backend because the -# default_backend() mechanism doesnt work in Gajim for Windows. +# default_backend() mechanism doesn't work in Gajim for Windows. # Its because of how Gajim is build with cx_freeze if os.name == 'nt': diff --git a/omemo/omemo/sql.py b/omemo/omemo/sql.py index c7ffe18..3252b27 100644 --- a/omemo/omemo/sql.py +++ b/omemo/omemo/sql.py @@ -33,7 +33,7 @@ class SQLDatabase(): c.execute("PRAGMA synchronous=NORMAL;") c.execute("PRAGMA journal_mode;") mode = c.fetchone()[0] - # WAL is a persistent DB mode, dont override it if user has set it + # WAL is a persistent DB mode, don't override it if user has set it if mode != 'wal': c.execute("PRAGMA journal_mode=MEMORY;") self.dbConn.commit() @@ -93,7 +93,7 @@ class SQLDatabase(): """ Migrates the DB """ - # Find all double entrys and delete them + # Find all double entries and delete them if user_version(self.dbConn) < 2: delete_dupes = """ DELETE FROM identities WHERE _id not in ( SELECT MIN(_id) diff --git a/omemo/omemo_connection.py b/omemo/omemo_connection.py index ab983e5..272cbb6 100644 --- a/omemo/omemo_connection.py +++ b/omemo/omemo_connection.py @@ -287,8 +287,8 @@ class OMEMOConnection: from_jid = self.omemo.store. \ getJidFromDevice(msg_dict['sid']) if not from_jid: - log.error('%s => Cant decrypt GroupChat Message ' - 'from %s', self.account, msg.resource) + log.error("%s => Can't decrypt GroupChat Message " + "from %s", self.account, msg.resource) msg.encrypted = 'drop' return self.groupchat[msg.jid][msg.resource] = from_jid @@ -301,7 +301,7 @@ class OMEMOConnection: plaintext = self.gc_message[msg_dict['payload']] del self.gc_message[msg_dict['payload']] else: - log.error('%s => Cant decrypt own GroupChat Message', + log.error("%s => Can't decrypt own GroupChat Message", self.account) msg.encrypted = 'drop' return @@ -497,9 +497,9 @@ class OMEMOConnection: 'namespace': NS_OMEMO}) event.msg_iq.addChild(node=eme_node) - # Add Message for devices that dont support OMEMO - support_msg = _('You received a message encrypted with ' \ - 'OMEMO but your client doesnt support OMEMO.') + # Add Message for devices that don't support OMEMO + support_msg = _("You received a message encrypted with " \ + "OMEMO but your client doesn't support OMEMO.") event.msg_iq.setBody(support_msg) # Store Hint for MAM @@ -602,7 +602,7 @@ class OMEMOConnection: self._handle_device_list_update(None, event.stanza) - # Dont propagate event further + # Don't propagate event further return True def _handle_device_list_update(self, conn, stanza, fetch_bundle=False): @@ -695,7 +695,7 @@ class OMEMOConnection: self.account, stanza.getError()) def are_keys_missing(self, contact_jid): - """ Checks if devicekeys are missing and querys the + """ Checks if devicekeys are missing and queries the bundles Parameters diff --git a/omemo/omemoplugin.py b/omemo/omemoplugin.py index 79108f0..d9b735c 100644 --- a/omemo/omemoplugin.py +++ b/omemo/omemoplugin.py @@ -41,10 +41,11 @@ from omemo.xmpp import DevicelistPEP from omemo.gtk.key import KeyDialog from omemo.gtk.config import OMEMOConfigDialog + CRYPTOGRAPHY_MISSING = 'You are missing Python3-Cryptography' AXOLOTL_MISSING = 'You are missing Python3-Axolotl or use an outdated version' -PROTOBUF_MISSING = 'OMEMO cant import Google Protobuf, you can find help in ' \ - 'the GitHub Wiki' +PROTOBUF_MISSING = "OMEMO can't import Google Protobuf, you can find help in " \ + "the GitHub Wiki" ERROR_MSG = '' diff --git a/omemo/xmpp.py b/omemo/xmpp.py index 8d810e1..c2cab20 100644 --- a/omemo/xmpp.py +++ b/omemo/xmpp.py @@ -18,7 +18,7 @@ # """ This module handles all the XMPP logic like creating different kind of -stanza nodes and geting data from stanzas. +stanza nodes and getting data from stanzas. """ import logging diff --git a/pgp/pgpplugin.py b/pgp/pgpplugin.py index 82e8e57..19d50bc 100644 --- a/pgp/pgpplugin.py +++ b/pgp/pgpplugin.py @@ -256,7 +256,7 @@ class OldPGPPlugin(GajimPlugin): 'namespace': nbxmpp.NS_ENCRYPTED}) obj.msg_iq.addChild(node=eme_node) - # Set xhtml to None so it doesnt get logged + # Set xhtml to None so it doesn't get logged obj.xhtml = None obj.encrypted = self.encryption_name self.add_additional_data(obj.additional_data) diff --git a/whiteboard/plugin.py b/whiteboard/plugin.py index bd7592a..40d458a 100644 --- a/whiteboard/plugin.py +++ b/whiteboard/plugin.py @@ -428,7 +428,7 @@ class JingleWhiteboard(JingleContent): self.session.connection.connection.send(message) def send_items(self, items, rids): - # recieves dict items and a list of rids of items to send + # receives dict items and a list of rids of items to send # TODO: is there a less clumsy way that doesn't involve passing # whole list self.send_whiteboard_node(items, rids) diff --git a/whiteboard/whiteboard_widget.py b/whiteboard/whiteboard_widget.py index 49f3385..b1f390c 100644 --- a/whiteboard/whiteboard_widget.py +++ b/whiteboard/whiteboard_widget.py @@ -135,7 +135,7 @@ class Whiteboard(object): self.item_data = None # Will be {ID: {type:'element', data:[node, goocanvas]}, ID2: {}} instance - self.recieving = {} + self.receiving = {} def on_tool_button_toggled(self, widget): for btn in self.tool_buttons: @@ -289,25 +289,25 @@ class Whiteboard(object): def recieve_element(self, element): node = self.image.g.addChild(name=element.getAttr('name')) self.image.g.addChild(node=node) - self.recieving[element.getAttr('rid')] = {'type':'element', + self.receiving[element.getAttr('rid')] = {'type':'element', 'data':[node], 'children':[]} def recieve_attr(self, element): - node = self.recieving[element.getAttr('parent')]['data'][0] + node = self.receiving[element.getAttr('parent')]['data'][0] node.setAttr(element.getAttr('name'), element.getAttr('chdata')) - self.recieving[element.getAttr('rid')] = {'type':'attr', + self.receiving[element.getAttr('rid')] = {'type':'attr', 'data':element.getAttr('name'), 'parent':node} - self.recieving[element.getAttr('parent')]['children'].append(element.getAttr('rid')) + self.receiving[element.getAttr('parent')]['children'].append(element.getAttr('rid')) def apply_new(self): - for x in self.recieving.keys(): - if self.recieving[x]['type'] == 'element': - self.image.add_recieved(x, self.recieving) + for x in self.receiving.keys(): + if self.receiving[x]['type'] == 'element': + self.image.add_recieved(x, self.receiving) - self.recieving = {} + self.receiving = {} class SVGObject():