Added spelling language to config, and updated sample project
This commit is contained in:
+6
-1
@@ -70,11 +70,13 @@ class Config:
|
||||
self.doReplaceDash = True
|
||||
self.doReplaceDots = True
|
||||
self.wordCountTimer = 5.0
|
||||
|
||||
|
||||
self.fmtDoubleQuotes = ["“","”"]
|
||||
self.fmtSingleQuotes = ["‘","’"]
|
||||
self.fmtApostrophe = "’"
|
||||
|
||||
self.spellLanguage = "en_GB"
|
||||
|
||||
# Check if config file exists
|
||||
if path.isfile(path.join(self.confPath,self.confFile)):
|
||||
self.loadConfig()
|
||||
@@ -140,6 +142,8 @@ class Config:
|
||||
self.doReplaceDash = confParser.getboolean(cnfSec,"repdash")
|
||||
if confParser.has_option(cnfSec,"repdots"):
|
||||
self.doReplaceDots = confParser.getboolean(cnfSec,"repdots")
|
||||
if confParser.has_option(cnfSec,"spellcheck"):
|
||||
self.spellLanguage = confParser.get(cnfSec,"spellcheck")
|
||||
|
||||
## Path
|
||||
cnfSec = "Path"
|
||||
@@ -183,6 +187,7 @@ class Config:
|
||||
confParser.set(cnfSec,"repdquotes", str(self.doReplaceDQuote))
|
||||
confParser.set(cnfSec,"repdash", str(self.doReplaceDash))
|
||||
confParser.set(cnfSec,"repdots", str(self.doReplaceDots))
|
||||
confParser.set(cnfSec,"spellcheck", str(self.spellLanguage))
|
||||
|
||||
## Path
|
||||
cnfSec = "Path"
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ class GuiDocEditor(QTextEdit):
|
||||
|
||||
# Core Elements
|
||||
self.theDoc = self.document()
|
||||
self.theDict = enchant.Dict("en_GB")
|
||||
self.theDict = enchant.Dict(self.mainConf.spellLanguage)
|
||||
self.hLight = GuiDocHighlighter(self.theDoc, self.theDict)
|
||||
|
||||
# Editor State
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# This is a New File!
|
||||
|
||||
Although, not so new now that it has text in it an everything …
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<novelWriterXML appVersion="0.0.1" fileVersion="1.0" timeStamp="2019-05-04 17:22:40">
|
||||
<novelWriterXML appVersion="0.0.1" fileVersion="1.0" timeStamp="2019-05-04 22:24:32">
|
||||
<project>
|
||||
<name>Sample Project</name>
|
||||
<title>Sample Project</title>
|
||||
@@ -61,9 +61,9 @@
|
||||
<status>0</status>
|
||||
<expanded>False</expanded>
|
||||
<layout>SCENE</layout>
|
||||
<charCount>0</charCount>
|
||||
<wordCount>0</wordCount>
|
||||
<paraCount>0</paraCount>
|
||||
<charCount>69</charCount>
|
||||
<wordCount>17</wordCount>
|
||||
<paraCount>1</paraCount>
|
||||
</item>
|
||||
<item handle="f6622b4617424" order="1" parent="None">
|
||||
<name>Characters</name>
|
||||
@@ -127,14 +127,14 @@
|
||||
<expanded>True</expanded>
|
||||
</item>
|
||||
<item handle="4cd0bd12b087d" order="0" parent="f75dac270c2a7">
|
||||
<name>New File</name>
|
||||
<name>Orphaned File 1</name>
|
||||
<type>FILE</type>
|
||||
<class>NOVEL</class>
|
||||
<class>NO_CLASS</class>
|
||||
<status>0</status>
|
||||
<expanded>False</expanded>
|
||||
<layout>SCENE</layout>
|
||||
<charCount>3</charCount>
|
||||
<wordCount>1</wordCount>
|
||||
<layout>NO_LAYOUT</layout>
|
||||
<charCount>0</charCount>
|
||||
<wordCount>0</wordCount>
|
||||
<paraCount>0</paraCount>
|
||||
</item>
|
||||
</content>
|
||||
|
||||
Reference in New Issue
Block a user