From dfe88a968115a406cb32c70d6de426cb19bba1d3 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sat, 6 Jan 2018 18:48:40 +0100 Subject: [PATCH] Fix typos in code comments, invisible to end-users. --- manuskript/converters/__init__.py | 2 +- manuskript/converters/abstractConverter.py | 4 ++-- manuskript/exporter/pandoc/PDF.py | 2 +- manuskript/importer/abstractImporter.py | 2 +- manuskript/importer/markdownImporter.py | 2 +- manuskript/loadSave.py | 2 +- manuskript/load_save/version_0.py | 4 ++-- manuskript/load_save/version_1.py | 8 ++++---- manuskript/main.py | 2 +- manuskript/mainWindow.py | 18 +++++++++--------- manuskript/models/abstractModel.py | 6 +++--- manuskript/models/characterModel.py | 4 ++-- manuskript/models/outlineItem.py | 2 +- manuskript/models/plotModel.py | 4 ++-- manuskript/models/references.py | 2 +- manuskript/models/worldModel.py | 2 +- manuskript/settingsWindow.py | 2 +- manuskript/ui/collapsibleDockWidgets.py | 2 +- manuskript/ui/editors/editorWidget.py | 2 +- manuskript/ui/editors/fullScreenEditor.py | 2 +- manuskript/ui/editors/mainEditor.py | 8 ++++---- manuskript/ui/editors/tabSplitter.py | 6 +++--- manuskript/ui/editors/themes.py | 2 +- manuskript/ui/importers/generalSettings.py | 2 +- manuskript/ui/importers/importer.py | 4 ++-- manuskript/ui/search.py | 2 +- manuskript/ui/style.py | 4 ++-- manuskript/ui/views/metadataView.py | 2 +- manuskript/ui/views/outlineBasics.py | 4 ++-- manuskript/ui/views/textEditView.py | 10 +++++----- manuskript/ui/views/treeDelegates.py | 2 +- manuskript/ui/welcome.py | 10 +++++----- 32 files changed, 65 insertions(+), 65 deletions(-) diff --git a/manuskript/converters/__init__.py b/manuskript/converters/__init__.py index b4c7eb1..060f230 100644 --- a/manuskript/converters/__init__.py +++ b/manuskript/converters/__init__.py @@ -30,7 +30,7 @@ def HTML2PlainText(html): if pandocConverter.isValid(): return pandocConverter.convert(html, _from="html", to="plain") - # Last resort: probably resource ineficient + # Last resort: probably resource inefficient e = QTextEdit() e.setHtml(html) return e.toPlainText() diff --git a/manuskript/converters/abstractConverter.py b/manuskript/converters/abstractConverter.py index d38c3af..99ac650 100644 --- a/manuskript/converters/abstractConverter.py +++ b/manuskript/converters/abstractConverter.py @@ -4,12 +4,12 @@ class abstractConverter: """ - A convertor is used to convert (duh) between stuff. They provide access + A converter is used to convert (duh) between stuff. They provide access to external libraries that may or may not be present. Now, things are a bit messy, since classes in `exporter` (and `importer` to a lesser extent) do the same. In a better world, classes from `exporter` and `importer` would - use convertors to do their stuff. (TODO) + use converters to do their stuff. (TODO) """ name = "" diff --git a/manuskript/exporter/pandoc/PDF.py b/manuskript/exporter/pandoc/PDF.py index 46b82e8..ac1551d 100644 --- a/manuskript/exporter/pandoc/PDF.py +++ b/manuskript/exporter/pandoc/PDF.py @@ -12,7 +12,7 @@ from manuskript.ui.views.PDFViewer import PDFViewer class PDF(abstractOutput): - """PDF Viewer using PDS.js. Cf. https://github.com/mozilla/pdf.js/wiki/Setup-PDF.js-in-a-website""" + """PDF Viewer using PDF.js. Cf. https://github.com/mozilla/pdf.js/wiki/Setup-PDF.js-in-a-website""" name = "PDF" description = qApp.translate("Export", "Needs latex to be installed.") diff --git a/manuskript/importer/abstractImporter.py b/manuskript/importer/abstractImporter.py index ba810af..3bb45c2 100644 --- a/manuskript/importer/abstractImporter.py +++ b/manuskript/importer/abstractImporter.py @@ -33,7 +33,7 @@ class abstractImporter: def startImport(self, filePath, parentItem, settingsWidget): """ Takes a str path to the file/folder to import, and the settingsWidget - returnend by `self.settingsWidget()` containing the user set settings, + returned by `self.settingsWidget()` containing the user set settings, and return `outlineItem`s. """ pass diff --git a/manuskript/importer/markdownImporter.py b/manuskript/importer/markdownImporter.py index cf0696d..107931e 100644 --- a/manuskript/importer/markdownImporter.py +++ b/manuskript/importer/markdownImporter.py @@ -52,7 +52,7 @@ class markdownImporter(abstractImporter): ``` # Level 1 - Some texte content. + Some text content. Level 1 will become a text element. # Level 1 This content has no name. diff --git a/manuskript/loadSave.py b/manuskript/loadSave.py index 0903fb4..e603a85 100644 --- a/manuskript/loadSave.py +++ b/manuskript/loadSave.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # --!-- coding: utf8 --!-- -# The loadSave file calls the propper functions to load and save file +# The loadSave file calls the proper functions to load and save file # trying to detect the proper file format if it comes from an older version import os import zipfile diff --git a/manuskript/load_save/version_0.py b/manuskript/load_save/version_0.py index 1135eee..2e31150 100644 --- a/manuskript/load_save/version_0.py +++ b/manuskript/load_save/version_0.py @@ -2,7 +2,7 @@ # --!-- coding: utf8 --!-- # Version 0 of file saving format. -# Was used at the begining and up util version XXX when +# Was used at the beginning and up until version XXX when # it was superseded by Version 1, which is more open and flexible import os import zipfile @@ -184,7 +184,7 @@ def loadFilesFromZip(zipname): def loadStandardItemModelXML(mdl, xml, fromString=False): """Load data to a QStandardItemModel mdl from xml. - By default xml is a filename. If fromString=True, xml is a string containg the data.""" + By default xml is a filename. If fromString=True, xml is a string containing the data.""" # print(qApp.tr("Loading {}... ").format(xml), end="") diff --git a/manuskript/load_save/version_1.py b/manuskript/load_save/version_1.py index 0751a21..048ae26 100644 --- a/manuskript/load_save/version_1.py +++ b/manuskript/load_save/version_1.py @@ -4,7 +4,7 @@ # Version 1 of file saving format. # Aims at providing a plain-text way of saving a project # (except for some elements), allowing collaborative work -# versioning and third-partty editing. +# versioning and third-party editing. import os import re @@ -101,7 +101,7 @@ def saveProject(zip=None): Saves the project. If zip is False, the project is saved as a multitude of plain-text files for the most parts and some XML or zip? for settings and stuff. If zip is True, everything is saved as a single zipped file. Easier to carry around, but does not allow - collaborative work, versionning, or third-party editing. + collaborative work, versioning, or third-party editing. @param zip: if True, saves as a single file. If False, saves as plain-text. If None, tries to determine based on settings. @return: True if successful, False otherwise. @@ -289,7 +289,7 @@ def saveProject(zip=None): #################################################################################################################### # Settings - # Saved in readable text (json) for easier versionning. But they mustn't be shared, it seems. + # Saved in readable text (json) for easier versioning. But they mustn't be shared, it seems. # Maybe include them only if zipped? # Well, for now, we keep them here... @@ -839,7 +839,7 @@ def loadProject(project, zip=None): #################################################################################################################### # Texts # We read outline form the outline folder. If revisions are saved, then there's also a revisions.xml which contains - # everything, but the outline folder takes precedence (in cases it's been edited outside of manuksript. + # everything, but the outline folder takes precedence (in cases it's been edited outside of manuskript. mdl = mw.mdlOutline log("\nReading outline:") diff --git a/manuskript/main.py b/manuskript/main.py index a39a590..a9428b3 100644 --- a/manuskript/main.py +++ b/manuskript/main.py @@ -97,7 +97,7 @@ def run(): """ # Need to return and keep `app` otherwise it gets deleted. app, MW = prepare() - # Seperating launch to avoid segfault, so it seem. + # Separating launch to avoid segfault, so it seem. # Cf. http://stackoverflow.com/questions/12433491/is-this-pyqt-4-python-bug-or-wrongly-behaving-code launch(MW) diff --git a/manuskript/mainWindow.py b/manuskript/mainWindow.py index 0bc3ba4..1289241 100644 --- a/manuskript/mainWindow.py +++ b/manuskript/mainWindow.py @@ -210,7 +210,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): # Hide the dock d.setVisible(False) else: - # Restore the dock's visibily based on stored value + # Restore the dock's visibility based on stored value d.setVisible(self._dckVisibility[d.objectName()]) # Lock is used only once, at start up. We can remove it @@ -221,7 +221,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): """ While switching to welcome screen, we have to hide all the docks. Otherwise one could use the search dock, and manuskript would crash. - Plus it's unncessary distraction. + Plus it's unnecessary distraction. But we also want to restore them to their visibility prior to switching, so we store states. """ @@ -632,7 +632,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.setWindowTitle(pName + " - " + self.tr("Manuskript")) # Stuff - # self.checkPersosID() # Should'n be necessary any longer + # self.checkPersosID() # Shouldn't be necessary any longer self.currentProject = project QSettings().setValue("lastProject", project) @@ -699,7 +699,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.dckCheatSheet.objectName() : False, self.dckSearch.objectName() : False, } - self._dckVisibility["LOCK"] = True # prevent overiding loaded values + self._dckVisibility["LOCK"] = True # prevent overriding loaded values if sttgns.contains("metadataState"): state = [False if v == "false" else True for v in sttgns.value("metadataState")] @@ -712,7 +712,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): if sttgns.contains("splitterRedacV"): self.splitterRedacV.restoreState(sttgns.value("splitterRedacV")) if sttgns.contains("toolbar"): - # self.toolbar is not initialized yet, so we just store balue + # self.toolbar is not initialized yet, so we just store value self._toolbarState = sttgns.value("toolbar") else: self._toolbarState = "" @@ -747,7 +747,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.saveDatas() # closeEvent - # QMainWindow.closeEvent(self, event) # Causin segfaults? + # QMainWindow.closeEvent(self, event) # Causing segfaults? def startTimerNoChanges(self): if settings.autoSaveNoChanges: @@ -1440,14 +1440,14 @@ class MainWindow(QMainWindow, Ui_MainWindow): def viewModeFictionVisibilitySwitch(self, val): """ - Swtiches the visibility of some UI components useful for fiction only + Switches the visibility of some UI components useful for fiction only @param val: sets visibility to val """ - # Menu navigation & boutton in toolbar + # Menu navigation & button in toolbar self.toolbar.setDockVisibility(self.dckNavigation, val) - # POV in metadatas + # POV in metadata from manuskript.ui.views.propertiesView import propertiesView for w in findWidgetsOfClass(propertiesView): w.lblPOV.setVisible(val) diff --git a/manuskript/models/abstractModel.py b/manuskript/models/abstractModel.py index c885c5b..4240a18 100644 --- a/manuskript/models/abstractModel.py +++ b/manuskript/models/abstractModel.py @@ -22,7 +22,7 @@ try: locale.setlocale(locale.LC_ALL, '') except: # Invalid locale, but not really a big deal because it's used only for - # number formating + # number formatting pass import time, os @@ -261,7 +261,7 @@ class abstractModel(QAbstractItemModel): return Qt.CopyAction | Qt.MoveAction def canDropMimeData(self, data, action, row, column, parent): - """Ensures that we are not droping an item into itself.""" + """Ensures that we are not dropping an item into itself.""" if not data.hasFormat("application/xml"): return False @@ -326,7 +326,7 @@ class abstractModel(QAbstractItemModel): # For example if selecting: # - Parent # - Child - # And draging them, items encoded in mime data are: [Parent, Child], + # And dragging them, items encoded in mime data are: [Parent, Child], # but Child is already contained in Parent, so if we do nothing we end # up with: # - Parent diff --git a/manuskript/models/characterModel.py b/manuskript/models/characterModel.py index bfe389f..a42f8f0 100644 --- a/manuskript/models/characterModel.py +++ b/manuskript/models/characterModel.py @@ -114,7 +114,7 @@ class characterModel(QAbstractItemModel): return QAbstractItemModel.flags(self, index) ############################################################################### -# CHARACTER QUERRIES +# CHARACTER QUERIES ############################################################################### def character(self, row): @@ -133,7 +133,7 @@ class characterModel(QAbstractItemModel): return self.character(row).importance() ############################################################################### -# MODEL QUERRIES +# MODEL QUERIES ############################################################################### def getCharactersByImportance(self): diff --git a/manuskript/models/outlineItem.py b/manuskript/models/outlineItem.py index b42f8e2..46d2d24 100644 --- a/manuskript/models/outlineItem.py +++ b/manuskript/models/outlineItem.py @@ -17,7 +17,7 @@ try: locale.setlocale(locale.LC_ALL, '') except: # Invalid locale, but not really a big deal because it's used only for - # number formating + # number formatting pass diff --git a/manuskript/models/plotModel.py b/manuskript/models/plotModel.py index 1db1dc4..6b634ea 100644 --- a/manuskript/models/plotModel.py +++ b/manuskript/models/plotModel.py @@ -44,7 +44,7 @@ class plotModel(QStandardItemModel): if item.child(i, PlotStep.ID): _ID = item.child(i, PlotStep.ID).text() - # Don't know why sometimes name is None (while drag'n'droping + # Don't know why sometimes name is None (while drag'n'dropping # several items) if item.child(i, PlotStep.name): name = item.child(i, PlotStep.name).text() @@ -77,7 +77,7 @@ class plotModel(QStandardItemModel): return "0" # Default to "Minor" def getSubPlotTextsByID(self, plotID, subplotRaw): - """Returns a tuple (name, summary) for the suplot whose raw in the model + """Returns a tuple (name, summary) for the subplot whose raw in the model is ``subplotRaw``, of plot whose ID is ``plotID``. """ plotIndex = self.getIndexFromID(plotID) diff --git a/manuskript/models/references.py b/manuskript/models/references.py index bd73fef..17696c8 100644 --- a/manuskript/models/references.py +++ b/manuskript/models/references.py @@ -89,7 +89,7 @@ def infos(ref): _type = match.group(1) _ref = match.group(2) - # A text or outine item + # A text or outline item if _type == TextLetter: m = mainWindow().mdlOutline idx = m.getIndexByID(_ref) diff --git a/manuskript/models/worldModel.py b/manuskript/models/worldModel.py index 2e5ff75..9b194ef 100644 --- a/manuskript/models/worldModel.py +++ b/manuskript/models/worldModel.py @@ -79,7 +79,7 @@ class worldModel(QStandardItemModel): return c def listAll(self): - """Returns a list of tupple ``(name, ID, path)`` for all items.""" + """Returns a list of tuple ``(name, ID, path)`` for all items.""" lst = [] def readAll(item): diff --git a/manuskript/settingsWindow.py b/manuskript/settingsWindow.py index 97ebda4..8551323 100644 --- a/manuskript/settingsWindow.py +++ b/manuskript/settingsWindow.py @@ -486,7 +486,7 @@ class settingsWindow(QWidget, Ui_Settings): def updateEditorSettings(self): """ - Stores settings for editor appareance. + Stores settings for editor appearance. """ # Background diff --git a/manuskript/ui/collapsibleDockWidgets.py b/manuskript/ui/collapsibleDockWidgets.py index 3479f23..08c7331 100644 --- a/manuskript/ui/collapsibleDockWidgets.py +++ b/manuskript/ui/collapsibleDockWidgets.py @@ -71,7 +71,7 @@ class collapsibleDockWidgets(QToolBar): `defaultVisibility` is the default visibility of the item when it is added. This allows for the widget to be added to `collapsibleDockWidgets` after they've been created but before they are shown, and yet specify their - desired visibility. Otherwise it creates troubes, see #167 on github: + desired visibility. Otherwise it creates troubles, see #167 on github: https://github.com/olivierkes/manuskript/issues/167. """ a = QAction(text, self) diff --git a/manuskript/ui/editors/editorWidget.py b/manuskript/ui/editors/editorWidget.py index 3b4a49d..bd5a165 100644 --- a/manuskript/ui/editors/editorWidget.py +++ b/manuskript/ui/editors/editorWidget.py @@ -156,7 +156,7 @@ class editorWidget(QWidget, Ui_editorWidget_ui): def setView(self): # index = mainWindow().treeRedacOutline.currentIndex() - # Couting the number of other selected items + # Counting the number of other selected items # sel = [] # for i in mainWindow().treeRedacOutline.selectionModel().selection().indexes(): # if i.column() != 0: continue diff --git a/manuskript/ui/editors/fullScreenEditor.py b/manuskript/ui/editors/fullScreenEditor.py index cc0f065..b9c8b45 100644 --- a/manuskript/ui/editors/fullScreenEditor.py +++ b/manuskript/ui/editors/fullScreenEditor.py @@ -243,7 +243,7 @@ class fullScreenEditor(QWidget): if hasattr(widget, "_autoHide") and not widget._autoHide: return - # Hides wiget in the bottom right corner + # Hides widget in the bottom right corner widget.move(self.geometry().bottomRight() + QPoint(1, 1)) def showWidget(self, widget): diff --git a/manuskript/ui/editors/mainEditor.py b/manuskript/ui/editors/mainEditor.py index e42e98e..34557c8 100644 --- a/manuskript/ui/editors/mainEditor.py +++ b/manuskript/ui/editors/mainEditor.py @@ -27,8 +27,8 @@ class mainEditor(QWidget, Ui_mainEditor): It contains two main elements: - 1. A `tabSplitter`, which can open any numer of `outlineItem`s either in tabs - (in `QTabWidget`) and/or in splitted views (children `tabSplitter`s). + 1. A `tabSplitter`, which can open any number of `outlineItem`s either in tabs + (in `QTabWidget`) and/or in split views (children `tabSplitter`s). 2. An horizontal layout contain a number of buttons and information: - Go up button @@ -37,7 +37,7 @@ class mainEditor(QWidget, Ui_mainEditor): - Label showing stats about displayed `outlineItem` - Fullscreen button - `mainEditor` is responsible for opening indexes, propagating event to relevent + `mainEditor` is responsible for opening indexes, propagating event to relevant views, opening and closing tabs, etc. +---------------------------| mainEditor |--------------------------------+ @@ -207,7 +207,7 @@ class mainEditor(QWidget, Ui_mainEditor): if tabWidget is None: tabWidget = self.currentTabWidget() - # Checking if tab is already openned + # Checking if tab is already opened for w in self.allTabs(tabWidget): if w.currentIndex == index: tabWidget.setCurrentWidget(w) diff --git a/manuskript/ui/editors/tabSplitter.py b/manuskript/ui/editors/tabSplitter.py index 751ea9a..13adfaf 100644 --- a/manuskript/ui/editors/tabSplitter.py +++ b/manuskript/ui/editors/tabSplitter.py @@ -13,8 +13,8 @@ from manuskript.ui.editors.tabSplitter_ui import Ui_tabSplitter class tabSplitter(QWidget, Ui_tabSplitter): """ - `tabSplitter` is used to have mutliple `outlineItem`s open, either in tabs - and/or in splitted views. Each tab contains an `editorWidget` which is responsible + `tabSplitter` is used to have multiple `outlineItem`s open, either in tabs + and/or in split views. Each tab contains an `editorWidget` which is responsible for showing one single `outlineItem` in several ways. `tabSplitter` is managed mainly through the `mainEditor` which is responsible @@ -39,7 +39,7 @@ class tabSplitter(QWidget, Ui_tabSplitter): # try: # self.tab.setTabBarAutoHide(True) # except AttributeError: - # print("Info: install Qt 5.4 or higher to use tabbar auto-hide in editor.") + # print("Info: install Qt 5.4 or higher to use tab bar auto-hide in editor.") # Button to split self.btnSplit = QPushButton(self) diff --git a/manuskript/ui/editors/themes.py b/manuskript/ui/editors/themes.py index 6b1222d..e7f8cff 100644 --- a/manuskript/ui/editors/themes.py +++ b/manuskript/ui/editors/themes.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # --!-- coding: utf8 --!-- -# Lots of stuff from here comes from the excellet focuswriter. +# Lots of stuff from here comes from the excellent focuswriter. import os import re diff --git a/manuskript/ui/importers/generalSettings.py b/manuskript/ui/importers/generalSettings.py index 74074aa..c01cdf1 100644 --- a/manuskript/ui/importers/generalSettings.py +++ b/manuskript/ui/importers/generalSettings.py @@ -72,7 +72,7 @@ class generalSettings(QWidget, Ui_generalSettings): def splitScenes(self): """ - Return wheter the user wants to split scenes. + Return whether the user wants to split scenes. If unchecked, returns False. If checked, returns the escaped split mark, or default (in placeholderText). """ diff --git a/manuskript/ui/importers/importer.py b/manuskript/ui/importers/importer.py index 3d6f298..0e378e4 100644 --- a/manuskript/ui/importers/importer.py +++ b/manuskript/ui/importers/importer.py @@ -65,7 +65,7 @@ class importerDialog(QWidget, Ui_importer): def populateImportList(self): def addFormat(name, icon, identifier): - # Identifier serves to distingues 2 importers that would have the + # Identifier serves to distinguish 2 importers that would have the # same name. self.cmbImporters.addItem(QIcon.fromTheme(icon), name, identifier) @@ -255,7 +255,7 @@ class importerDialog(QWidget, Ui_importer): # Signal every views that important model changes have happened. self.mw.mdlOutline.layoutChanged.emit() - # I'm getting seg fault over this message sometimes... + # I'm getting segfault over this message sometimes... # Using status bar message instead... #QMessageBox.information(self, self.tr("Import status"), #self.tr("Import Complete.")) diff --git a/manuskript/ui/search.py b/manuskript/ui/search.py index 480a7d3..06441ae 100644 --- a/manuskript/ui/search.py +++ b/manuskript/ui/search.py @@ -84,7 +84,7 @@ class search(QWidget, Ui_search): def search(self): text = self.text.text() - # Chosing the right columns + # Choosing the right columns lstColumns = [ ("Title", Outline.title), ("Text", Outline.text), diff --git a/manuskript/ui/style.py b/manuskript/ui/style.py index dc6b581..4dc21ee 100644 --- a/manuskript/ui/style.py +++ b/manuskript/ui/style.py @@ -15,7 +15,7 @@ from manuskript import functions as F p = qApp.palette() # window = "#d6d2d0" #"#eee" / #eff0f1 window = p.color(QPalette.Window).name() # General background -windowText = p.color(QPalette.WindowText).name() # General foregroung +windowText = p.color(QPalette.WindowText).name() # General foreground base = p.color(QPalette.Base).name() # Other background alternateBase = p.color(QPalette.AlternateBase).name() # Other background text = p.color(QPalette.Text).name() # Base Text @@ -68,7 +68,7 @@ def styleMainWindow(mw): mw.setStyleSheet(mainWindowSS()) mw.lstTabs.verticalScrollBar().setStyleSheet(simpleScrollBarV()) - # Custon palette? + # Custom palette? #qApp.setPalette(appPalette()) mw.treeRedacOutline.setStyleSheet(""" diff --git a/manuskript/ui/views/metadataView.py b/manuskript/ui/views/metadataView.py index a387cf7..bbbbc6b 100644 --- a/manuskript/ui/views/metadataView.py +++ b/manuskript/ui/views/metadataView.py @@ -93,7 +93,7 @@ class metadataView(QWidget, Ui_metadataView): # Behavior 2: # Allow edition of multiple indexes. # Bug: Multiple selections of items sometimes gets Notes/references - # field to be ereased. See #10 on github. + # field to be erased. See #10 on github. #self.txtSummarySentence.setCurrentModelIndexes(indexes) #self.txtSummaryFull.setCurrentModelIndexes(indexes) #self.txtNotes.setCurrentModelIndexes(indexes) diff --git a/manuskript/ui/views/outlineBasics.py b/manuskript/ui/views/outlineBasics.py index af9d131..2dfa9ff 100644 --- a/manuskript/ui/views/outlineBasics.py +++ b/manuskript/ui/views/outlineBasics.py @@ -331,7 +331,7 @@ class outlineBasics(QAbstractItemView): def duplicate(self): """ - Duplicates item(s), while preserving clipbaord content. + Duplicates item(s), while preserving clipboard content. """ mimeData = self.model().mimeData(self.selectionModel().selectedIndexes()) self.paste(mimeData) @@ -341,7 +341,7 @@ class outlineBasics(QAbstractItemView): Move selected items up or down. """ - # we store selected indexesret + # we store selected indexes currentID = self.model().ID(self.currentIndex()) selIDs = [self.model().ID(i) for i in self.selectedIndexes()] diff --git a/manuskript/ui/views/textEditView.py b/manuskript/ui/views/textEditView.py index fd19fe3..2b285a0 100644 --- a/manuskript/ui/views/textEditView.py +++ b/manuskript/ui/views/textEditView.py @@ -147,7 +147,7 @@ class textEditView(QTextEdit): def currentIndex(self): """ - Getter function used to normalized views acces with QAbstractItemViews. + Getter function used to normalized views access with QAbstractItemViews. """ if self._index: return self._index @@ -156,7 +156,7 @@ class textEditView(QTextEdit): def getSelection(self): """ - Getter function used to normalized views acces with QAbstractItemViews. + Getter function used to normalized views access with QAbstractItemViews. """ return [self.currentIndex()] @@ -227,7 +227,7 @@ class textEditView(QTextEdit): QWidget#{name}{{ background: {bg}; }}""".format( - # We style by name, otherwise all heriting widgets get the same + # We style by name, otherwise all inheriting widgets get the same # colored background, for example context menu. name=self.parent().objectName(), bg=background, @@ -480,7 +480,7 @@ class textEditView(QTextEdit): QTextEdit.wheelEvent(self, event) class SpellAction(QAction): - """A special QAction that returns the text in a signal. Used for spellckech.""" + """A special QAction that returns the text in a signal. Used for spellcheck.""" correct = pyqtSignal(str) @@ -584,7 +584,7 @@ class textEditView(QTextEdit): def callMainTreeView(self, functionName): """ - The tree view in mainwindow must have same index as the text + The tree view in main window must have same index as the text edit that has focus. So we can pass it the call for documents edits like: duplicate, move up, etc. """ diff --git a/manuskript/ui/views/treeDelegates.py b/manuskript/ui/views/treeDelegates.py index b8e8fcf..fa59702 100644 --- a/manuskript/ui/views/treeDelegates.py +++ b/manuskript/ui/views/treeDelegates.py @@ -14,7 +14,7 @@ from manuskript.ui import style as S class treeTitleDelegate(QStyledItemDelegate): """The main purpose of ``treeTitleDelegate`` is to paint outline items - in the treeview with propers colors according to settings. + in the treeview with proper colors according to settings. """ def __init__(self, parent=None): diff --git a/manuskript/ui/welcome.py b/manuskript/ui/welcome.py index 01c0579..964d2f8 100644 --- a/manuskript/ui/welcome.py +++ b/manuskript/ui/welcome.py @@ -75,9 +75,9 @@ class welcome(QWidget, Ui_welcome): def getAutoLoadValues(self): """ - Reads manuskript system's settings and returns a tupple: + Reads manuskript system's settings and returns a tuple: - `bool`: whether manuskript should automatically load - the last openend project or display the + the last opened project or display the welcome widget. - `str`: the absolute path to the last opened project. """ @@ -149,7 +149,7 @@ class welcome(QWidget, Ui_welcome): def saveAsFile(self): """File dialog that request a file, existing or not. - Save datas to that file, which then becomes the current project.""" + Save data to that file, which then becomes the current project.""" filename = QFileDialog.getSaveFileName(self, self.tr("Save project as..."), ".", @@ -307,7 +307,7 @@ class welcome(QWidget, Ui_welcome): def templateAddLevel(self): if len(self.template[1]) > 0 and \ self.template[1][len(self.template[1]) - 1][1] == None: - # has word cound, so insert before + # has word count, so insert before self.template[1].insert(len(self.template[1]) - 1, (10, self.tr("Text"))) else: # No word count, so insert at end @@ -401,7 +401,7 @@ class welcome(QWidget, Ui_welcome): if t and t[0][2] == "Non-fiction": settings.viewMode = "simple" - # Données + # Tasks self.mw.mdlFlatData = QStandardItemModel(2, 8, self.mw) # Persos