mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-08 05:54:32 +12:00
Fix misc. typos
Found via `codespell -q 3 -S *.ts,./libs,./sample-projects -L searchin`
This commit is contained in:
parent
0943d81317
commit
2fd45dc42c
|
@ -62,7 +62,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||||
self.projectDirty = None # has the user made any unsaved changes ?
|
self.projectDirty = None # has the user made any unsaved changes ?
|
||||||
self._lastFocus = None
|
self._lastFocus = None
|
||||||
self._lastMDEditView = None
|
self._lastMDEditView = None
|
||||||
self._defaultCursorFlashTime = 1000 # Overriden at startup with system
|
self._defaultCursorFlashTime = 1000 # Overridden at startup with system
|
||||||
# value. In manuskript.main.
|
# value. In manuskript.main.
|
||||||
self._autoLoadProject = None # Used to load a command line project
|
self._autoLoadProject = None # Used to load a command line project
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ from manuskript import enums
|
||||||
|
|
||||||
class abstractItem():
|
class abstractItem():
|
||||||
|
|
||||||
# Enum kept on the class for easier acces
|
# Enum kept on the class for easier access
|
||||||
enum = enums.Abstract
|
enum = enums.Abstract
|
||||||
|
|
||||||
# Used for XML export
|
# Used for XML export
|
||||||
|
@ -105,7 +105,7 @@ class abstractItem():
|
||||||
return self._data[self.enum.type]
|
return self._data[self.enum.type]
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# Parent / Children managment
|
# Parent / Children management
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
def child(self, row):
|
def child(self, row):
|
||||||
|
|
|
@ -87,7 +87,7 @@ class settingsWindow(QWidget, Ui_Settings):
|
||||||
tr["Russian"] = "manuskript_ru.qm"
|
tr["Russian"] = "manuskript_ru.qm"
|
||||||
tr["Svenska"] = "manuskript_sv.qm"
|
tr["Svenska"] = "manuskript_sv.qm"
|
||||||
tr["Turkish"] = "manuskript_tr.qm"
|
tr["Turkish"] = "manuskript_tr.qm"
|
||||||
tr["Ukranian"] = "manuskript_uk.qm"
|
tr["Ukrainian"] = "manuskript_uk.qm"
|
||||||
tr["Chinese (Simplified)"] = "manuskript_zh_CN.qm"
|
tr["Chinese (Simplified)"] = "manuskript_zh_CN.qm"
|
||||||
self.translations = tr
|
self.translations = tr
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@ app, MW = main.prepare(tests=True)
|
||||||
# self.btnAddSubPlot.clicked.connect(self.updateSubPlotView, F.AUC)
|
# self.btnAddSubPlot.clicked.connect(self.updateSubPlotView, F.AUC)
|
||||||
# Yet the disconnectAll() function has been called.
|
# Yet the disconnectAll() function has been called.
|
||||||
# Workaround: we remove the necessity for connection to be unique. This
|
# Workaround: we remove the necessity for connection to be unique. This
|
||||||
# works for now, but could create issues later one when we want to tests
|
# works for now, but could create issues later on when we want to test
|
||||||
# those specific functionnality. Maybe it will be called several times.
|
# this specific functionality. Maybe it will be called several times?
|
||||||
# At that moment, we will need to catch the exception in the MainWindow,
|
# At that moment, we will need to catch the exception in the MainWindow,
|
||||||
# or better: understand why it happens at all, and only on some signals.
|
# or better: understand why it happens at all, and only on some signals.
|
||||||
from manuskript import functions as F
|
from manuskript import functions as F
|
||||||
|
|
|
@ -73,7 +73,7 @@ class editorWidget(QWidget, Ui_editorWidget_ui):
|
||||||
def resizeEvent(self, event):
|
def resizeEvent(self, event):
|
||||||
"""
|
"""
|
||||||
textEdit's scrollBar has been reparented to self. So we need to
|
textEdit's scrollBar has been reparented to self. So we need to
|
||||||
update it's geomtry when self is resized, and put it where we want it
|
update it's geometry when self is resized, and put it where we want it
|
||||||
to be.
|
to be.
|
||||||
"""
|
"""
|
||||||
# Update scrollbar geometry
|
# Update scrollbar geometry
|
||||||
|
|
|
@ -86,7 +86,7 @@ class BasicHighlighter(QSyntaxHighlighter):
|
||||||
|
|
||||||
def doHighlightBlock(self, text):
|
def doHighlightBlock(self, text):
|
||||||
"""
|
"""
|
||||||
Virtual funtion to subclass.
|
Virtual function to subclass.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ class MarkdownHighlighter(BasicHighlighter):
|
||||||
def unfocusConditions(self):
|
def unfocusConditions(self):
|
||||||
"""
|
"""
|
||||||
Returns:
|
Returns:
|
||||||
- True if the text is suposed to be unfocused
|
- True if the text is supposed to be unfocused
|
||||||
- (start, end) if block is supposed to be unfocused except for that part.
|
- (start, end) if block is supposed to be unfocused except for that part.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ class MarkdownHighlighter(BasicHighlighter):
|
||||||
theme = {
|
theme = {
|
||||||
"markup": markup}
|
"markup": markup}
|
||||||
|
|
||||||
#Exemple:
|
#Example:
|
||||||
#"color": Qt.red,
|
#"color": Qt.red,
|
||||||
#"deltaSize": 10,
|
#"deltaSize": 10,
|
||||||
#"background": Qt.yellow,
|
#"background": Qt.yellow,
|
||||||
|
@ -477,7 +477,7 @@ class MarkdownHighlighter(BasicHighlighter):
|
||||||
self.transparentFormat(fmt)
|
self.transparentFormat(fmt)
|
||||||
self.transparentFormat(markupFormat)
|
self.transparentFormat(markupFormat)
|
||||||
|
|
||||||
# Format openning Markup
|
# Format opening Markup
|
||||||
self.setFormat(token.position, token.openingMarkupLength,
|
self.setFormat(token.position, token.openingMarkupLength,
|
||||||
markupFormat)
|
markupFormat)
|
||||||
|
|
||||||
|
|
|
@ -365,7 +365,7 @@ class MarkdownTokenizer(HighlightTokenizer):
|
||||||
spaceCount += 1
|
spaceCount += 1
|
||||||
|
|
||||||
# If this list item is the first in the list, ensure the
|
# If this list item is the first in the list, ensure the
|
||||||
# number of spaces preceeding the bullet point does not
|
# number of spaces preceding the bullet point does not
|
||||||
# exceed three, as that would indicate a code block rather
|
# exceed three, as that would indicate a code block rather
|
||||||
# than a bullet point list.
|
# than a bullet point list.
|
||||||
|
|
||||||
|
@ -832,15 +832,15 @@ class MarkdownTokenizer(HighlightTokenizer):
|
||||||
markupStartCount=0, markupEndCount=0,
|
markupStartCount=0, markupEndCount=0,
|
||||||
replaceMarkupChars=False, replaceAllChars=False):
|
replaceMarkupChars=False, replaceAllChars=False):
|
||||||
"""
|
"""
|
||||||
Tokenizes a block of text, searching for all occurrances of regex.
|
Tokenizes a block of text, searching for all occurrences of regex.
|
||||||
Occurrances are set to the given token type and added to the list of
|
Occurrences are set to the given token type and added to the list of
|
||||||
tokens. The markupStartCount and markupEndCount values are used to
|
tokens. The markupStartCount and markupEndCount values are used to
|
||||||
indicate how many markup special characters preceed and follow the
|
indicate how many markup special characters precede and follow the
|
||||||
main text, respectively.
|
main text, respectively.
|
||||||
|
|
||||||
For example, if the matched string is "**bold**", and
|
For example, if the matched string is "**bold**", and
|
||||||
markupStartCount = 2 and markupEndCount = 2, then the asterisks
|
markupStartCount = 2 and markupEndCount = 2, then the asterisks
|
||||||
preceeding and following the word "bold" will be set as opening and
|
preceding and following the word "bold" will be set as opening and
|
||||||
closing markup in the token.
|
closing markup in the token.
|
||||||
|
|
||||||
If replaceMarkupChars is true, then the markupStartCount and
|
If replaceMarkupChars is true, then the markupStartCount and
|
||||||
|
|
|
@ -1855,7 +1855,7 @@ class Ui_Settings(object):
|
||||||
self.chkAutoSaveNoChanges.setText(_translate("Settings", "If no changes during"))
|
self.chkAutoSaveNoChanges.setText(_translate("Settings", "If no changes during"))
|
||||||
self.label_14.setText(_translate("Settings", "seconds."))
|
self.label_14.setText(_translate("Settings", "seconds."))
|
||||||
self.chkSaveOnQuit.setText(_translate("Settings", "Save on project close"))
|
self.chkSaveOnQuit.setText(_translate("Settings", "Save on project close"))
|
||||||
self.chkSaveToZip.setToolTip(_translate("Settings", "<html><head/><body><p>If you check this option, your project will be save as one single file. Easier to copy or backup, but does not allow collaborative editing, or versionning.<br/>If this is unchecked, your project will be save as a folder containing many small files.</p></body></html>"))
|
self.chkSaveToZip.setToolTip(_translate("Settings", "<html><head/><body><p>If you check this option, your project will be save as one single file. Easier to copy or backup, but does not allow collaborative editing, or versioning.<br/>If this is unchecked, your project will be save as a folder containing many small files.</p></body></html>"))
|
||||||
self.chkSaveToZip.setText(_translate("Settings", "Save to one single file"))
|
self.chkSaveToZip.setText(_translate("Settings", "Save to one single file"))
|
||||||
self.lblTitleGeneral_2.setText(_translate("Settings", "Revisions"))
|
self.lblTitleGeneral_2.setText(_translate("Settings", "Revisions"))
|
||||||
self.label_44.setText(_translate("Settings", "Revisions are a way to keep track of modifications. For each text item, it stores any changes you make to the main text, allowing you to see and restoring previous versions."))
|
self.label_44.setText(_translate("Settings", "Revisions are a way to keep track of modifications. For each text item, it stores any changes you make to the main text, allowing you to see and restoring previous versions."))
|
||||||
|
|
|
@ -423,7 +423,7 @@
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>If you check this option, your project will be save as one single file. Easier to copy or backup, but does not allow collaborative editing, or versionning.<br/>If this is unchecked, your project will be save as a folder containing many small files.</p></body></html></string>
|
<string><html><head/><body><p>If you check this option, your project will be saved as one single file. Easier to copy or backup, but does not allow collaborative editing, or versioning.<br/>If this is unchecked, your project will be saved as a folder containing many small files.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="statusTip">
|
<property name="statusTip">
|
||||||
<string/>
|
<string/>
|
||||||
|
|
|
@ -243,7 +243,7 @@ class MDEditView(textEditView):
|
||||||
def comment(self):
|
def comment(self):
|
||||||
cursor = self.textCursor()
|
cursor = self.textCursor()
|
||||||
|
|
||||||
# Select begining and end of words
|
# Select beginning and end of words
|
||||||
self.selectWord(cursor)
|
self.selectWord(cursor)
|
||||||
|
|
||||||
if cursor.hasSelection():
|
if cursor.hasSelection():
|
||||||
|
@ -294,7 +294,7 @@ class MDEditView(textEditView):
|
||||||
|
|
||||||
def lineFormattingMarkup(self, markup):
|
def lineFormattingMarkup(self, markup):
|
||||||
"""
|
"""
|
||||||
Adds `markup` at the begining of block.
|
Adds `markup` at the beginning of block.
|
||||||
"""
|
"""
|
||||||
cursor = self.textCursor()
|
cursor = self.textCursor()
|
||||||
cursor.movePosition(cursor.StartOfBlock)
|
cursor.movePosition(cursor.StartOfBlock)
|
||||||
|
@ -303,7 +303,7 @@ class MDEditView(textEditView):
|
||||||
def insertFormattingMarkup(self, markup):
|
def insertFormattingMarkup(self, markup):
|
||||||
cursor = self.textCursor()
|
cursor = self.textCursor()
|
||||||
|
|
||||||
# Select begining and end of words
|
# Select beginning and end of words
|
||||||
self.selectWord(cursor)
|
self.selectWord(cursor)
|
||||||
|
|
||||||
if cursor.hasSelection():
|
if cursor.hasSelection():
|
||||||
|
|
Loading…
Reference in a new issue