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:
Veronica K. B. Olsen
2021-02-15 23:43:56 +01:00
parent 2e4148a9eb
commit 8db140fe89
5 changed files with 141 additions and 65 deletions
+5 -5
View File
@@ -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