From d4b4451a4861402446987f3a6f7526760fbb88a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bruno=20K=C3=BChnen=20Meneguello?=
<1322552+bkmeneguello@users.noreply.github.com>
Date: Mon, 15 Feb 2021 15:46:48 -0300
Subject: [PATCH] Improved list and quote handling, also fix a typo
---
nw/gui/about.py | 2 +-
nw/gui/build.py | 16 ++++++++++++----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/nw/gui/about.py b/nw/gui/about.py
index c0615d7c..fd87fc9f 100644
--- a/nw/gui/about.py
+++ b/nw/gui/about.py
@@ -222,7 +222,7 @@ class GuiAbout(QDialog):
"%s
" % self.tr("{0}: {1}").format(
self.tr("Author"), theTheme.syntaxAuthor
),
- "%s
" % self.tr("{0} {1}").format(
+ "%s
" % self.tr("{0}: {1}").format(
self.tr("Credit"), theTheme.syntaxCredit
),
self.tr("{0}: {1}").format(
diff --git a/nw/gui/build.py b/nw/gui/build.py
index 1ddf7b3d..0d11674b 100644
--- a/nw/gui/build.py
+++ b/nw/gui/build.py
@@ -331,16 +331,24 @@ class GuiBuildNovel(QDialog):
self.fileGroup.setLayout(self.fileForm)
self.novelFiles = QSwitch(width=wS, height=hS)
- self.novelFiles.setToolTip(self.tr(
- "Include files with layouts 'Book', 'Page', 'Partition', "
- "'Chapter', 'Unnumbered', and 'Scene'."
+ 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.setChecked(
self.optState.getBool("GuiBuildNovel", "addNovel", True)
)
self.noteFiles = QSwitch(width=wS, height=hS)
- self.noteFiles.setToolTip(self.tr("Include files with layout 'Note'."))
+ self.noteFiles.setToolTip(self.tr("Include files with layout {0}.").format(
+ self.locale().quoteString(self.tr("Note"))
+ ))
self.noteFiles.setChecked(
self.optState.getBool("GuiBuildNovel", "addNotes", False)
)