The word "Synopsis" should be translated to GUI language when it appears in document viewer

This commit is contained in:
Veronica K. B. Olsen
2021-02-18 20:46:27 +01:00
parent e9763f4ec6
commit 5f3822ac1a
4 changed files with 505 additions and 481 deletions
+250 -240
View File
File diff suppressed because it is too large Load Diff
+250 -240
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -405,10 +405,11 @@ class ToHtml(Tokenizer):
def _formatSynopsis(self, tText):
"""Apply HTML formatting to synopsis.
"""
sSynop = self._localLookup("Synopsis")
if self.genMode == self.M_PREVIEW:
sSynop = self._trSynopsis
return f"<p class='comment'><span class='synopsis'>{sSynop}:</span> {tText}</p>\n"
else:
sSynop = self._localLookup("Synopsis")
return f"<p class='synopsis'><strong>{sSynop}:</strong> {tText}</p>\n"
def _formatComments(self, tText):
+3
View File
@@ -147,6 +147,9 @@ class Tokenizer():
self._localLookup = self.theProject.localLookup
self.tr = partial(QCoreApplication.translate, "Tokenizer")
# Cached Translations
self._trSynopsis = self.tr("Synopsis")
return
##