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 -1
View File
@@ -151,6 +151,10 @@ class Tokenizer():
self._trComment = self.tr("Comment")
self._trNotes = self.tr("Notes")
self._spellLang = self.theProject.projLang
if self._spellLang is None:
self._spellLang = self.theParent.mainConf.spellLanguage
return
##
@@ -664,7 +668,7 @@ class Tokenizer():
theTitle = theTitle.replace(r"%sc%", str(self.numChScene))
theTitle = theTitle.replace(r"%sca%", str(self.numAbsScene))
if r"%chw%" in theTitle:
theTitle = theTitle.replace(r"%chw%", numberToWord(self.numChapter, "en"))
theTitle = theTitle.replace(r"%chw%", numberToWord(self.numChapter, self._spellLang))
if r"%chi%" in theTitle:
theTitle = theTitle.replace(r"%chi%", numberToRoman(self.numChapter, True))
if r"%chI%" in theTitle: