Make the number to word function ready for multiple langauges, and make some minor changes to tooltips in build and status bar
This commit is contained in:
+2
-13
@@ -331,24 +331,13 @@ class GuiBuildNovel(QDialog):
|
||||
self.fileGroup.setLayout(self.fileForm)
|
||||
|
||||
self.novelFiles = QSwitch(width=wS, height=hS)
|
||||
self.novelFiles.setToolTip(self.tr("Include files with layouts {0}.").format(
|
||||
self.locale().createSeparatedList([
|
||||
self.locale().quoteString(self.tr('Book')),
|
||||
self.locale().quoteString(self.tr('Page')),
|
||||
self.locale().quoteString(self.tr('Partition')),
|
||||
self.locale().quoteString(self.tr('Chapter')),
|
||||
self.locale().quoteString(self.tr('Unnumbered')),
|
||||
self.locale().quoteString(self.tr('Scene')),
|
||||
])
|
||||
))
|
||||
self.novelFiles.setToolTip(self.tr("Include files with layouts other than 'Note'."))
|
||||
self.novelFiles.setChecked(
|
||||
self.optState.getBool("GuiBuildNovel", "addNovel", True)
|
||||
)
|
||||
|
||||
self.noteFiles = QSwitch(width=wS, height=hS)
|
||||
self.noteFiles.setToolTip(self.tr("Include files with layout {0}.").format(
|
||||
self.locale().quoteString(self.tr("Note"))
|
||||
))
|
||||
self.noteFiles.setToolTip(self.tr("Include files with layout 'Note'."))
|
||||
self.noteFiles.setChecked(
|
||||
self.optState.getBool("GuiBuildNovel", "addNotes", False)
|
||||
)
|
||||
|
||||
+5
-5
@@ -147,20 +147,20 @@ class GuiMainStatus(QStatusBar):
|
||||
qApp.processEvents()
|
||||
return
|
||||
|
||||
def setLanguage(self, theLang, theProvider=""):
|
||||
def setLanguage(self, theLanguage, theProvider=""):
|
||||
"""Set the language code for the spell checker.
|
||||
"""
|
||||
if theLang is None:
|
||||
if theLanguage is None:
|
||||
self.langText.setText(self.tr("None"))
|
||||
self.langText.setToolTip("")
|
||||
else:
|
||||
qLocal = QLocale(theLang)
|
||||
qLocal = QLocale(theLanguage)
|
||||
spLang = qLocal.nativeLanguageName().title()
|
||||
self.langText.setText(spLang)
|
||||
if theProvider:
|
||||
self.langText.setToolTip("%s (%s)" % (theLang, theProvider))
|
||||
self.langText.setToolTip("%s (%s)" % (theLanguage, theProvider))
|
||||
else:
|
||||
self.langText.setToolTip(theLang)
|
||||
self.langText.setToolTip(theLanguage)
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user