From d090230b672e164ff2ffdb29d7d4ed7c58b650d8 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:41:16 +0100 Subject: [PATCH] Make it optional to split string for chapter and scene count on welcome dialog (#1750) --- novelwriter/tools/welcome.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/novelwriter/tools/welcome.py b/novelwriter/tools/welcome.py index 99d0c901..08fb7ddf 100644 --- a/novelwriter/tools/welcome.py +++ b/novelwriter/tools/welcome.py @@ -630,10 +630,15 @@ class _NewProjectForm(QWidget): self.numChapters.setValue(5) self.numChapters.setToolTip(self.tr("Set to 0 to only add scenes")) + lblChA, _, lblChB = self.tr("Add {0} chapter documents").partition(r"{0}") + lblScA, _, lblScB = self.tr("Add {0} scene documents (to each chapter)").partition(r"{0}") + self.chapterBox = QHBoxLayout() - self.chapterBox.addWidget(QLabel(self.tr("Add"))) + if lblChA: + self.chapterBox.addWidget(QLabel(lblChA)) self.chapterBox.addWidget(self.numChapters) - self.chapterBox.addWidget(QLabel(self.tr("chapter documents"))) + if lblChB: + self.chapterBox.addWidget(QLabel(lblChB)) self.chapterBox.addStretch(1) self.numScenes = NSpinBox(self) @@ -641,9 +646,11 @@ class _NewProjectForm(QWidget): self.numScenes.setValue(5) self.sceneBox = QHBoxLayout() - self.sceneBox.addWidget(QLabel(self.tr("Add"))) + if lblScA: + self.sceneBox.addWidget(QLabel(lblScA)) self.sceneBox.addWidget(self.numScenes) - self.sceneBox.addWidget(QLabel(self.tr("scene documents (to each chapter)"))) + if lblScB: + self.sceneBox.addWidget(QLabel(lblScB)) self.sceneBox.addStretch(1) self.novelForm = QVBoxLayout()