63 QMessageBox.warning(
None, i18n(
"Folder cannot be used"), i18n(
"Krita doesn't have write access to this folder, so files cannot be made. Please choose a different folder."), QMessageBox.StandardButton.Ok)
69 wizard.setWindowTitle(i18n(
"Comic Project Setup"))
70 wizard.setOption(QWizard.WizardOption.IndependentPages,
True)
71 wizard.setWizardStyle(QWizard.WizardStyle.ClassicStyle)
74 basicsPage = QWizardPage()
75 basicsPage.setTitle(i18n(
"Basic Comic Project Settings"))
76 formLayout = QFormLayout()
77 basicsPage.setLayout(formLayout)
78 projectLayout = QHBoxLayout()
81 self.
lnProjectName.setToolTip(i18n(
"A Project name. This can be different from the eventual title"))
82 btnRandom = QPushButton()
83 btnRandom.setText(i18n(
"Generate"))
84 btnRandom.setToolTip(i18n(
"If you cannot come up with a project name, our highly sophisticated project name generator will serve to give a classy yet down to earth name."))
87 projectLayout.addWidget(btnRandom)
88 lnConcept = QLineEdit()
89 lnConcept.setToolTip(i18n(
"What is your comic about? This is mostly for your own convenience so do not worry about what it says too much."))
91 self.
cmbLanguage.setToolTip(i18n(
"The main language the comic is in"))
92 self.
cmbLanguage.setEntryToCode(str(QLocale.system().name()).split(
"_")[0])
94 if QLocale.system() != QLocale.c():
96 self.
cmbCountry.setEntryToCode(str(QLocale.system().name()).split(
"_")[-1])
104 labelDirectory = QLabel(i18n(
"Make a new directory with the project name."))
105 labelDirectory.setWordWrap(
True)
106 stringDirectoryTooltip = i18n(
"This allows you to select a generic comics project directory, in which a new folder will be made for the project using the given project name.")
108 labelDirectory.setToolTip(stringDirectoryTooltip)
112 self.
lnPagesDirectory.setToolTip(i18n(
"The name for the folder where the pages are contained. If it does not exist, it will be created."))
115 self.
lnExportDirectory.setToolTip(i18n(
"The name for the folder where the export is put. If it does not exist, it will be created."))
118 self.
lnTemplateLocation.setToolTip(i18n(
"The name for the folder where the page templates are sought in."))
122 self.
lnTranslationLocation.setToolTip(
"This is the location that POT files will be stored to and PO files will be read from.")
123 formLayout.addRow(i18n(
"Comic concept:"), lnConcept)
124 formLayout.addRow(i18n(
"Project name:"), projectLayout)
125 formLayout.addRow(i18n(
"Main language:"), self.
cmbLanguage)
128 buttonMetaData = QPushButton(i18n(
"Meta Data"))
131 wizard.addPage(basicsPage)
133 foldersPage = QWizardPage()
134 foldersPage.setTitle(i18n(
"Folder names and other."))
135 folderFormLayout = QFormLayout()
136 foldersPage.setLayout(folderFormLayout)
143 folderFormLayout.addRow(
"", buttonMetaData)
144 wizard.addPage(foldersPage)
159 if projectPath.exists()
is False: