Commit 1e33bc14 authored by Pino Toscano's avatar Pino Toscano

i18n fixes

- translate visibile strings in Python plugins
- avoid string puzzles
- avoid contractions ("don't" -> "do not", etc)
- avoid extra exclamation marks, since it is not a game
- style fixes
- spell "JSON", and "URL" correctly
parent 41c72fc7
......@@ -23,7 +23,7 @@ class AssignProfileDialog(Extension):
def assignProfile(self):
doc = Application.activeDocument()
if doc is None:
QMessageBox.information(Application.activeWindow().qwindow(), "Assign Profile", "There is no active document.")
QMessageBox.information(Application.activeWindow().qwindow(), i18n("Assign Profile"), i18n("There is no active document."))
return
self.dialog = QDialog(Application.activeWindow().qwindow())
......@@ -53,7 +53,7 @@ class AssignProfileDialog(Extension):
pass
def createActions(self, window):
action = window.createAction("assing_profile_to_image", "Assign Profile to Image")
action = window.createAction("assing_profile_to_image", i18n("Assign Profile to Image"))
action.triggered.connect(self.assignProfile)
......
......@@ -22,8 +22,8 @@ class ColorSpaceExtension(krita.Extension):
pass
def createActions(self, window):
action = window.createAction("color_space", "Color Space")
action.setToolTip("Plugin to change color space to selected documents")
action = window.createAction("color_space", i18n("Color Space"))
action.setToolTip(i18n("Plugin to change color space of selected documents."))
action.triggered.connect(self.initialize)
def initialize(self):
......
......@@ -28,7 +28,7 @@ class UIColorSpace(object):
self.mainLayout = QVBoxLayout(self.mainDialog)
self.formLayout = QFormLayout()
self.documentLayout = QVBoxLayout()
self.refreshButton = QPushButton(QIcon(':/icons/refresh.svg'), "Refresh")
self.refreshButton = QPushButton(QIcon(':/icons/refresh.svg'), i18n("Refresh"))
self.widgetDocuments = QListWidget()
self.colorModelComboBox = colormodelcombobox.ColorModelComboBox(self)
self.colorDepthComboBox = colordepthcombobox.ColorDepthComboBox(self)
......@@ -58,10 +58,10 @@ class UIColorSpace(object):
self.documentLayout.addWidget(self.widgetDocuments)
self.documentLayout.addWidget(self.refreshButton)
self.formLayout.addRow('Documents', self.documentLayout)
self.formLayout.addRow('Color Model', self.colorModelComboBox)
self.formLayout.addRow('Color Depth', self.colorDepthComboBox)
self.formLayout.addRow('Color Profile', self.colorProfileComboBox)
self.formLayout.addRow(i18n("Documents:"), self.documentLayout)
self.formLayout.addRow(i18n("Color model:"), self.colorModelComboBox)
self.formLayout.addRow(i18n("Color depth:"), self.colorDepthComboBox)
self.formLayout.addRow(i18n("Color profile:"), self.colorProfileComboBox)
self.line = QFrame()
self.line.setFrameShape(QFrame.HLine)
......@@ -72,7 +72,7 @@ class UIColorSpace(object):
self.mainLayout.addWidget(self.buttonBox)
self.mainDialog.resize(500, 300)
self.mainDialog.setWindowTitle("Color Space")
self.mainDialog.setWindowTitle(i18n("Color Space"))
self.mainDialog.setSizeGripEnabled(True)
self.mainDialog.show()
self.mainDialog.activateWindow()
......@@ -117,9 +117,9 @@ class UIColorSpace(object):
self.msgBox = QMessageBox(self.mainDialog)
if selectedDocuments:
self.convertColorSpace(selectedDocuments)
self.msgBox.setText("The selected documents has been converted.")
self.msgBox.setText(i18n("The selected documents has been converted."))
else:
self.msgBox.setText("Select at least one document.")
self.msgBox.setText(i18n("Select at least one document."))
self.msgBox.exec_()
def convertColorSpace(self, documents):
......
......@@ -40,10 +40,10 @@ class comic_export_resize_widget(QGroupBox):
def __init__(self, configName, batch=False, fileType=True):
super().__init__()
self.configName = configName
self.setTitle("Adjust Workingfile")
self.setTitle(i18n("Adjust Working File"))
formLayout = QFormLayout()
self.setLayout(formLayout)
self.crop = QCheckBox(i18n("Crop files before resize."))
self.crop = QCheckBox(i18n("Crop files before resize"))
self.cmbFile = QComboBox()
self.cmbFile.addItems(["png", "jpg", "webp"])
self.resizeMethod = QComboBox()
......@@ -217,7 +217,7 @@ class comic_export_setting_dialog(QDialog):
def __init__(self):
super().__init__()
self.setLayout(QVBoxLayout())
self.setWindowTitle(i18n("Export settings"))
self.setWindowTitle(i18n("Export Settings"))
buttons = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
buttons.accepted.connect(self.accept)
......@@ -230,14 +230,14 @@ class comic_export_setting_dialog(QDialog):
# Set which layers to remove before export.
mainExportSettings = QWidget()
mainExportSettings.setLayout(QVBoxLayout())
groupExportCrop = QGroupBox(i18n("Crop settings"))
groupExportCrop = QGroupBox(i18n("Crop Settings"))
formCrop = QFormLayout()
groupExportCrop.setLayout(formCrop)
self.chk_toOutmostGuides = QCheckBox(i18n("Crop to outmost guides"))
self.chk_toOutmostGuides.setChecked(True)
self.chk_toOutmostGuides.setToolTip(i18n("This will crop to the outmost guides if possible and otherwise use the underlying crop settings."))
formCrop.addRow("", self.chk_toOutmostGuides)
btn_fromSelection = QPushButton(i18n("Set margins from active selection"))
btn_fromSelection = QPushButton(i18n("Set Margins from Active Selection"))
btn_fromSelection.clicked.connect(self.slot_set_margin_from_selection)
# This doesn't work.
formCrop.addRow("", btn_fromSelection)
......@@ -281,11 +281,11 @@ class comic_export_setting_dialog(QDialog):
self.CBZgroupResize = comic_export_resize_widget("CBZ")
CBZexportSettings.layout().addWidget(self.CBZgroupResize)
self.CBZactive.clicked.connect(self.CBZgroupResize.setEnabled)
CBZgroupMeta = QGroupBox(i18n("Metadata to add"))
CBZgroupMeta = QGroupBox(i18n("Metadata to Add"))
# CBZexportSettings.layout().addWidget(CBZgroupMeta)
CBZgroupMeta.setLayout(QFormLayout())
mainWidget.addTab(CBZexportSettings, "CBZ")
mainWidget.addTab(CBZexportSettings, i18n("CBZ"))
# ACBF, crop, resize, creator name, version history, panel layer, text layers.
ACBFExportSettings = QWidget()
......@@ -297,25 +297,25 @@ class comic_export_setting_dialog(QDialog):
self.lnACBFSource = QLineEdit()
self.lnACBFSource.setToolTip(i18n("Whether the acbf file is an adaption of an existing source, and if so, how to find information about that source. So for example, for an adapted webcomic, the official website url should go here."))
self.lnACBFID = QLabel()
self.lnACBFID.setToolTip(i18n("By default this will be filled with a generated universal unique identifier. The ID by itself is merely so that comic book library management programs can figure out if this particular comic is already in their database and whether it has been rated. Of course, the UUID can be changed into something else by manually changing the json, but this is advanced usage."))
self.lnACBFID.setToolTip(i18n("By default this will be filled with a generated universal unique identifier. The ID by itself is merely so that comic book library management programs can figure out if this particular comic is already in their database and whether it has been rated. Of course, the UUID can be changed into something else by manually changing the JSON, but this is advanced usage."))
self.spnACBFVersion = QSpinBox()
self.ACBFhistoryModel = QStandardItemModel()
acbfHistoryList = QListView()
acbfHistoryList.setModel(self.ACBFhistoryModel)
btn_add_history = QPushButton(i18n("Add history entry"))
btn_add_history = QPushButton(i18n("Add History Entry"))
btn_add_history.clicked.connect(self.slot_add_history_item)
self.chkIncludeTranslatorComments = QCheckBox()
self.chkIncludeTranslatorComments.setText(i18n("Include Translator's Comments"))
self.chkIncludeTranslatorComments.setText(i18n("Include translator's comments"))
self.chkIncludeTranslatorComments.setToolTip(i18n("A PO file can contain translator's comments. If this is checked, the translations comments will be added as references into the ACBF file."))
self.lnTranslatorHeader = QLineEdit()
ACBFform.addRow(i18n("Source:"), self.lnACBFSource)
ACBFform.addRow(i18n("ACBF UID:"), self.lnACBFID)
ACBFform.addRow(i18n("Version:"), self.spnACBFVersion)
ACBFform.addRow(i18n("Version History:"), acbfHistoryList)
ACBFform.addRow(i18n("Version history:"), acbfHistoryList)
ACBFform.addRow("", btn_add_history)
ACBFform.addRow("", self.chkIncludeTranslatorComments)
ACBFform.addRow(i18n("Translator Header:"), self.lnTranslatorHeader)
ACBFform.addRow(i18n("Translator header:"), self.lnTranslatorHeader)
ACBFAuthorInfo = QWidget()
acbfAVbox = QVBoxLayout(ACBFAuthorInfo)
......@@ -333,10 +333,10 @@ class comic_export_setting_dialog(QDialog):
self.ACBFauthorTable.verticalHeader().setSectionsMovable(True)
self.ACBFauthorTable.verticalHeader().sectionMoved.connect(self.slot_reset_author_row_visual)
AuthorButtons = QHBoxLayout()
btn_add_author = QPushButton(i18n("Add author"))
btn_add_author = QPushButton(i18n("Add Author"))
btn_add_author.clicked.connect(self.slot_add_author)
AuthorButtons.addWidget(btn_add_author)
btn_remove_author = QPushButton(i18n("Remove author"))
btn_remove_author = QPushButton(i18n("Remove Author"))
btn_remove_author.clicked.connect(self.slot_remove_author)
AuthorButtons.addWidget(btn_remove_author)
acbfAVbox.addLayout(AuthorButtons)
......@@ -349,7 +349,7 @@ class comic_export_setting_dialog(QDialog):
ACBFStyle.layout().addWidget(self.ACBFStyleClass)
ACBFStyleEdit = QWidget()
ACBFStyleEditVB = QVBoxLayout(ACBFStyleEdit)
self.ACBFuseFont = QCheckBox(i18n("Use Font"))
self.ACBFuseFont = QCheckBox(i18n("Use font"))
self.ACBFFontList = QListView()
self.ACBFFontList.setItemDelegate(font_list_delegate())
self.ACBFuseFont.toggled.connect(self.font_slot_enable_font_view)
......@@ -411,7 +411,7 @@ class comic_export_setting_dialog(QDialog):
self.EPUBgroupResize = comic_export_resize_widget("EPUB")
EPUBexportSettings.layout().addWidget(self.EPUBgroupResize)
self.EPUBactive.clicked.connect(self.EPUBgroupResize.setEnabled)
mainWidget.addTab(EPUBexportSettings, "EPUB")
mainWidget.addTab(EPUBexportSettings, i18n("EPUB"))
# For Print. Crop, no resize.
TIFFExportSettings = QWidget()
......@@ -421,12 +421,12 @@ class comic_export_setting_dialog(QDialog):
self.TIFFgroupResize = comic_export_resize_widget("TIFF")
TIFFExportSettings.layout().addWidget(self.TIFFgroupResize)
self.TIFFactive.clicked.connect(self.TIFFgroupResize.setEnabled)
mainWidget.addTab(TIFFExportSettings, "TIFF")
mainWidget.addTab(TIFFExportSettings, i18n("TIFF"))
# SVG, crop, resize, embed vs link.
#SVGExportSettings = QWidget()
#mainWidget.addTab(SVGExportSettings, "SVG")
#mainWidget.addTab(SVGExportSettings, i18n("SVG"))
"""
Add a history item to the acbf version history list.
......@@ -434,7 +434,7 @@ class comic_export_setting_dialog(QDialog):
def slot_add_history_item(self):
newItem = QStandardItem()
newItem.setText("v" + str(self.spnACBFVersion.value()) + "-" + i18n("in this version..."))
newItem.setText(str(i18n("v{version}-in this version...")).format(version=str(self.spnACBFVersion.value())))
self.ACBFhistoryModel.appendRow(newItem)
"""
......
......@@ -146,8 +146,8 @@ class comicsExporter():
sizesList["TIFF"] = self.configDictionary["TIFF"]
# Export the pngs according to the sizeslist.
# Create a progress dialog.
self.progress = QProgressDialog("Preparing export.", str(), 0, lengthProcess)
self.progress.setWindowTitle("Exporting comic...")
self.progress = QProgressDialog(i18n("Preparing export."), str(), 0, lengthProcess)
self.progress.setWindowTitle(i18n("Exporting Comic..."))
self.progress.setCancelButton(None)
self.timer = QElapsedTimer()
self.timer.start()
......@@ -165,7 +165,7 @@ class comicsExporter():
self.acbfLocation = str(exportPath / "metadata" / str(title + ".acbf"))
locationStandAlone = str(exportPath / str(title + ".acbf"))
self.progress.setLabelText("Saving out ACBF and\nACBF standalone")
self.progress.setLabelText(i18n("Saving out ACBF and\nACBF standalone"))
self.progress.setValue(self.progress.value()+2)
export_success = exporters.ACBF.write_xml(self.configDictionary, self.acbfPageData, self.pagesLocationList["CBZ"], self.acbfLocation, locationStandAlone, self.projectURL)
print("CPMT: Exported to ACBF", export_success)
......@@ -176,12 +176,12 @@ class comicsExporter():
export_success = self.export_to_cbz(exportPath)
print("CPMT: Exported to CBZ", export_success)
if "EPUB" in sizesList.keys():
self.progress.setLabelText("Saving out EPUB")
self.progress.setLabelText(i18n("Saving out EPUB"))
self.progress.setValue(self.progress.value()+1)
export_success = exporters.EPUB.export(self.configDictionary, self.projectURL, self.pagesLocationList["EPUB"])
print("CPMT: Exported to EPUB", export_success)
else:
QMessageBox.warning(self, i18n("Export not possible"), i18n("Nothing to export,\nurl not set."), QMessageBox.Ok)
QMessageBox.warning(self, i18n("Export not Possible"), i18n("Nothing to export, URL not set."), QMessageBox.Ok)
print("CPMT: Nothing to export, url not set.")
return export_success
......@@ -194,12 +194,12 @@ class comicsExporter():
title = self.configDictionary["projectName"]
if "title" in self.configDictionary.keys():
title = self.configDictionary["title"]
self.progress.setLabelText("Saving out CoMet\nmetadata file")
self.progress.setLabelText(i18n("Saving out CoMet\nmetadata file"))
self.progress.setValue(self.progress.value()+1)
self.cometLocation = str(exportPath / "metadata" / str(title + " CoMet.xml"))
export_success = exporters.CoMet.write_xml(self.configDictionary, self.pagesLocationList["CBZ"], self.cometLocation)
self.comicRackInfo = str(exportPath / "metadata" / "ComicInfo.xml")
self.progress.setLabelText("Saving out Comicrack\nmetadata file")
self.progress.setLabelText(i18n("Saving out Comicrack\nmetadata file"))
self.progress.setValue(self.progress.value()+1)
export_success = exporters.comic_rack_xml.write_xml(self.configDictionary, self.pagesLocationList["CBZ"], self.comicRackInfo)
self.package_cbz(exportPath)
......@@ -374,7 +374,7 @@ class comicsExporter():
print("CPMT: Export has finished. If there are memory leaks, they are caused by file layers.")
return True
print("CPMT: Export not happening because there aren't any pages.")
QMessageBox.warning(self, i18n("Export not possible"), i18n("Export not happening because\nthere aren't any pages."), QMessageBox.Ok)
QMessageBox.warning(self, i18n("Export not Possible"), i18n("Export not happening because there are no pages."), QMessageBox.Ok)
return False
"""
......@@ -631,7 +631,7 @@ class comicsExporter():
cbzArchive.write(self.cometLocation, Path(self.cometLocation).name)
cbzArchive.write(self.comicRackInfo, Path(self.comicRackInfo).name)
comic_book_info_json_dump = str()
self.progress.setLabelText("Saving out Comicbook\ninfo metadata file")
self.progress.setLabelText(i18n("Saving out Comicbook\ninfo metadata file"))
self.progress.setValue(self.progress.value()+1)
comic_book_info_json_dump = exporters.comic_book_info.writeJson(self.configDictionary)
cbzArchive.comment = comic_book_info_json_dump.encode("utf-8")
......@@ -641,7 +641,7 @@ class comicsExporter():
for page in self.pagesLocationList["CBZ"]:
if (Path(page).exists()):
cbzArchive.write(page, Path(page).name)
self.progress.setLabelText("Packaging CBZ")
self.progress.setLabelText(i18n("Packaging CBZ"))
self.progress.setValue(self.progress.value()+1)
# Close the zip file when done.
cbzArchive.close()
......@@ -270,7 +270,7 @@ class comic_meta_data_editor(QDialog):
genreCompletion.setModel(QStringListModel(self.genreKeysList))
self.lnGenre.setCompleter(genreCompletion)
genreCompletion.setCaseSensitivity(False)
self.lnGenre.setToolTip(i18n("The genre of the work. Prefilled values are from the ACBF, but you can fill in your own. Separate genres with commas. Try to limit the amount to about two or three"))
self.lnGenre.setToolTip(i18n("The genre of the work. Prefilled values are from the ACBF, but you can fill in your own. Separate genres with commas. Try to limit the amount to about two or three."))
self.lnCharacters = QLineEdit()
characterCompletion = multi_entry_completer()
......@@ -299,9 +299,9 @@ class comic_meta_data_editor(QDialog):
self.lnSeriesName = QLineEdit()
self.lnSeriesName.setToolTip(i18n("If this is part of a series, enter the name of the series and the number."))
self.spnSeriesNumber = QSpinBox()
self.spnSeriesNumber.setPrefix("No. ")
self.spnSeriesNumber.setPrefix(i18n("No. "))
self.spnSeriesVol = QSpinBox()
self.spnSeriesVol.setPrefix("Vol. ")
self.spnSeriesVol.setPrefix(i18n("Vol. "))
seriesLayout = QHBoxLayout()
seriesLayout.addWidget(self.lnSeriesName)
seriesLayout.addWidget(self.spnSeriesVol)
......@@ -313,7 +313,7 @@ class comic_meta_data_editor(QDialog):
otherCompletion.setFilterMode(Qt.MatchContains)
self.lnOtherKeywords = QLineEdit()
self.lnOtherKeywords.setCompleter(otherCompletion)
self.lnOtherKeywords.setToolTip(i18n("Other keywords that don't fit in the previously mentioned sets. As always, comma-separated"))
self.lnOtherKeywords.setToolTip(i18n("Other keywords that do not fit in the previously mentioned sets. As always, comma-separated."))
self.cmbLanguage = language_combo_box()
self.cmbCountry = country_combo_box()
......@@ -323,14 +323,14 @@ class comic_meta_data_editor(QDialog):
self.cmbReadingMode.addItem(i18n("Right to Left"))
self.cmbCoverPage = QComboBox()
self.cmbCoverPage.setToolTip(i18n("Which page is the cover page? This will be empty if there's no pages."))
self.cmbCoverPage.setToolTip(i18n("Which page is the cover page? This will be empty if there are no pages."))
mformLayout.addRow(i18n("Title:"), self.lnTitle)
mformLayout.addRow(i18n("Cover Page:"), self.cmbCoverPage)
mformLayout.addRow(i18n("Cover page:"), self.cmbCoverPage)
mformLayout.addRow(i18n("Summary:"), self.teSummary)
mformLayout.addRow(i18n("Language:"), self.cmbLanguage)
mformLayout.addRow("", self.cmbCountry)
mformLayout.addRow(i18n("Reading Direction:"), self.cmbReadingMode)
mformLayout.addRow(i18n("Reading direction:"), self.cmbReadingMode)
mformLayout.addRow(i18n("Genre:"), self.lnGenre)
mformLayout.addRow(i18n("Characters:"), self.lnCharacters)
mformLayout.addRow(i18n("Format:"), self.lnFormat)
......@@ -343,7 +343,7 @@ class comic_meta_data_editor(QDialog):
# The page for the authors.
authorPage = QWidget()
authorPage.setLayout(QVBoxLayout())
explanation = QLabel(i18n("The following is a table of the authors that contributed to this comic. You can set their nickname, proper names (first, middle, last), Role (Penciller, Inker, etc), email and homepage."))
explanation = QLabel(i18n("The following is a table of the authors that contributed to this comic. You can set their nickname, proper names (first, middle, last), role (penciller, inker, etc), email and homepage."))
explanation.setWordWrap(True)
self.authorModel = QStandardItemModel(0, 8)
labels = [i18n("Nick Name"), i18n("Given Name"), i18n("Middle Name"), i18n("Family Name"), i18n("Role"), i18n("Email"), i18n("Homepage"), i18n("Language")]
......@@ -393,7 +393,7 @@ class comic_meta_data_editor(QDialog):
self.license.completer().setCompletionMode(QCompleter.PopupCompletion)
dataBaseReference = QVBoxLayout()
self.ln_database_name = QLineEdit()
self.ln_database_name.setToolTip(i18n("If there's an entry in a comics data base, that should be added here. It is unlikely to be a factor for comics from scratch, but useful when doing a conversion."))
self.ln_database_name.setToolTip(i18n("If there is an entry in a comics data base, that should be added here. It is unlikely to be a factor for comics from scratch, but useful when doing a conversion."))
self.cmb_entry_type = QComboBox()
self.cmb_entry_type.addItems(["IssueID", "SeriesID", "URL"])
self.cmb_entry_type.setEditable(True)
......
......@@ -285,7 +285,7 @@ class comics_project_manager_docker(DockWidget):
self.action_add_page = QAction(i18n("Add Page"), self)
self.action_add_page.triggered.connect(self.slot_add_new_page_single)
self.action_add_template = QAction(i18n("Add Page From Template"), self)
self.action_add_template = QAction(i18n("Add Page from Template"), self)
self.action_add_template.triggered.connect(self.slot_add_new_page_from_template)
self.action_add_existing = QAction(i18n("Add Existing Pages"), self)
self.action_add_existing.triggered.connect(self.slot_add_page_from_url)
......@@ -297,7 +297,7 @@ class comics_project_manager_docker(DockWidget):
self.action_show_page_viewer = QAction(i18n("View Page In Window"), self)
self.action_show_page_viewer.triggered.connect(self.slot_show_page_viewer)
self.action_scrape_authors = QAction(i18n("Scrape Author Info"), self)
self.action_scrape_authors.setToolTip(i18n("Search for author information in documents and add it to the author list. This doesn't check for duplicates."))
self.action_scrape_authors.setToolTip(i18n("Search for author information in documents and add it to the author list. This does not check for duplicates."))
self.action_scrape_authors.triggered.connect(self.slot_scrape_author_list)
self.action_scrape_translations = QAction(i18n("Scrape Text for Translation"), self)
self.action_scrape_translations.triggered.connect(self.slot_scrape_translations)
......@@ -342,7 +342,7 @@ class comics_project_manager_docker(DockWidget):
"""
def slot_open_config(self):
self.path_to_config = QFileDialog.getOpenFileName(caption=i18n("Please select the json comic config file."), filter=str(i18n("json files") + "(*.json)"))[0]
self.path_to_config = QFileDialog.getOpenFileName(caption=i18n("Please select the JSON comic config file."), filter=str(i18n("JSON files") + "(*.json)"))[0]
if os.path.exists(self.path_to_config) is True:
configFile = open(self.path_to_config, "r", newline="", encoding="utf-16")
self.setupDictionary = json.load(configFile)
......@@ -374,7 +374,7 @@ class comics_project_manager_docker(DockWidget):
progress = QProgressDialog()
progress.setMinimum(0)
progress.setMaximum(len(pagesList))
progress.setWindowTitle(i18n("Loading pages..."))
progress.setWindowTitle(i18n("Loading Pages..."))
for url in pagesList:
absurl = os.path.join(self.projecturl, url)
if (os.path.exists(absurl)):
......@@ -784,7 +784,7 @@ class comics_project_manager_docker(DockWidget):
exportSuccess = exporter.export()
if exportSuccess:
print("CPMT: Export success! The files have been written to the export folder!")
QMessageBox.information(self, "Export success!", "The files have been written to the export folder!", QMessageBox.Ok)
QMessageBox.information(self, i18n("Export success"), i18n("The files have been written to the export folder."), QMessageBox.Ok)
"""
Calls up the comics project setup wizard so users can create a new json file with the basic information.
......@@ -833,7 +833,7 @@ class comics_project_manager_docker(DockWidget):
def slot_batch_resize(self):
dialog = QDialog()
dialog.setWindowTitle(i18n("Resize all pages."))
dialog.setWindowTitle(i18n("Resize all Pages"))
buttons = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
buttons.accepted.connect(dialog.accept)
buttons.rejected.connect(dialog.reject)
......@@ -845,7 +845,7 @@ class comics_project_manager_docker(DockWidget):
if dialog.exec_() == QDialog.Accepted:
progress = QProgressDialog(i18n("Resizing pages..."), str(), 0, len(self.setupDictionary["pages"]))
progress.setWindowTitle(i18n("Resizing pages."))
progress.setWindowTitle(i18n("Resizing Pages"))
progress.setCancelButton(None)
timer = QElapsedTimer()
timer.start()
......@@ -907,7 +907,7 @@ class comics_project_manager_docker(DockWidget):
metadata["keywords"] = ", ".join(self.setupDictionary.get("otherKeywords", [""]))
metadata["transnotes"] = self.setupDictionary.get("translatorHeader", "Translator's Notes")
scraper.start(self.setupDictionary["pages"], language, metadata)
QMessageBox.information(self, i18n("Scraping success!"), i18n("POT file has been written to: ")+fullTranslationPath, QMessageBox.Ok)
QMessageBox.information(self, i18n("Scraping success"), str(i18n("POT file has been written to: {file}")).format(file=fullTranslationPath), QMessageBox.Ok)
"""
This is required by the dockwidget class, otherwise unused.
"""
......
......@@ -129,14 +129,14 @@ class comics_project_details_editor(QDialog):
self.keyLocation.setToolTip(i18n("The location for extra autocompletion keys in the metadata editor. Point this at a folder containing key_characters/key_format/key_genre/key_rating/key_author_roles/key_other with inside txt files (csv for rating) containing the extra auto-completion keys, each on a new line. This path is stored in the Krita configuration, and not the project configuration."))
self.templateLocation.locationChanged.connect(self.refill_templates)
layout.addRow(i18n("Project Name:"), self.lnProjectName)
layout.addRow(i18n("Project Concept:"), self.lnProjectConcept)
layout.addRow(i18n("Pages Folder:"), self.pagesLocation)
layout.addRow(i18n("Export Folder:"), self.exportLocation)
layout.addRow(i18n("Template Folder:"), self.templateLocation)
layout.addRow(i18n("Translation Folder:"), self.translationLocation)
layout.addRow(i18n("Default Template:"), self.cmb_defaultTemplate)
layout.addRow(i18n("Extra Keys Folder:"), self.keyLocation)
layout.addRow(i18n("Project name:"), self.lnProjectName)
layout.addRow(i18n("Project concept:"), self.lnProjectConcept)
layout.addRow(i18n("Pages folder:"), self.pagesLocation)
layout.addRow(i18n("Export folder:"), self.exportLocation)
layout.addRow(i18n("Template folder:"), self.templateLocation)
layout.addRow(i18n("Translation folder:"), self.translationLocation)
layout.addRow(i18n("Default template:"), self.cmb_defaultTemplate)
layout.addRow(i18n("Extra keys folder:"), self.keyLocation)
self.layout().addWidget(buttons)
......
......@@ -85,7 +85,7 @@ class ComicsProjectSetupWizard():
projectLayout.addWidget(self.lnProjectName)
projectLayout.addWidget(btnRandom)
lnConcept = QLineEdit()
lnConcept.setToolTip(i18n("What is your comic about? This is mostly for your own convenience so don't worry about what it says too much."))
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."))
self.cmbLanguage = comics_metadata_dialog.language_combo_box()
self.cmbLanguage.setToolTip(i18n("The main language the comic is in"))
self.cmbLanguage.setEntryToCode(str(QLocale.system().name()).split("_")[0])
......@@ -105,10 +105,10 @@ class ComicsProjectSetupWizard():
self.chkMakeProjectDirectory.setChecked(True)
self.lnPagesDirectory = QLineEdit()
self.lnPagesDirectory.setText(i18n("pages"))
self.lnPagesDirectory.setToolTip(i18n("The name for the folder where the pages are contained. If it doesn't exist, it will be created."))
self.lnPagesDirectory.setToolTip(i18n("The name for the folder where the pages are contained. If it does not exist, it will be created."))
self.lnExportDirectory = QLineEdit()
self.lnExportDirectory.setText(i18n("export"))
self.lnExportDirectory.setToolTip(i18n("The name for the folder where the export is put. If it doesn't exist, it will be created."))
self.lnExportDirectory.setToolTip(i18n("The name for the folder where the export is put. If it does not exist, it will be created."))
self.lnTemplateLocation = QLineEdit()
self.lnTemplateLocation.setText(i18n("templates"))
self.lnTemplateLocation.setToolTip(i18n("The name for the folder where the page templates are sought in."))
......@@ -116,9 +116,9 @@ class ComicsProjectSetupWizard():
self.lnTranslationLocation = QLineEdit()
self.lnTranslationLocation.setText(i18n("translations"))
self.lnTranslationLocation.setToolTip("This is the location that POT files will be stored to and PO files will be read from.")
formLayout.addRow(i18n("Comic Concept:"), lnConcept)
formLayout.addRow(i18n("Project Name:"), projectLayout)
formLayout.addRow(i18n("Main Language:"), self.cmbLanguage)
formLayout.addRow(i18n("Comic concept:"), lnConcept)
formLayout.addRow(i18n("Project name:"), projectLayout)
formLayout.addRow(i18n("Main language:"), self.cmbLanguage)
formLayout.addRow("", self.cmbCountry)
buttonMetaData = QPushButton(i18n("Meta Data"))
......@@ -130,12 +130,12 @@ class ComicsProjectSetupWizard():
foldersPage.setTitle(i18n("Folder names and other."))
folderFormLayout = QFormLayout()
foldersPage.setLayout(folderFormLayout)
folderFormLayout.addRow(i18n("Project Directory:"), self.lnProjectDirectory)
folderFormLayout.addRow(i18n("Project directory:"), self.lnProjectDirectory)
folderFormLayout.addRow(self.chkMakeProjectDirectory, labelDirectory)
folderFormLayout.addRow(i18n("Pages Directory"), self.lnPagesDirectory)
folderFormLayout.addRow(i18n("Export Directory"), self.lnExportDirectory)
folderFormLayout.addRow(i18n("Template Directory"), self.lnTemplateLocation)
folderFormLayout.addRow(i18n("Translation Directory"), self.lnTranslationLocation)
folderFormLayout.addRow(i18n("Pages directory"), self.lnPagesDirectory)
folderFormLayout.addRow(i18n("Export directory"), self.lnExportDirectory)
folderFormLayout.addRow(i18n("Template directory"), self.lnTemplateLocation)
folderFormLayout.addRow(i18n("Translation directory"), self.lnTranslationLocation)
folderFormLayout.addRow("", buttonMetaData)
wizard.addPage(foldersPage)
......
......@@ -84,7 +84,7 @@ class comics_template_dialog(QDialog):
def __init__(self, templateDirectory):
super().__init__()
self.templateDirectory = templateDirectory
self.setWindowTitle(i18n("Add new template"))
self.setWindowTitle(i18n("Add new Template"))
self.setLayout(QVBoxLayout())
self.templates = QComboBox()
......@@ -100,9 +100,9 @@ class comics_template_dialog(QDialog):
self.layout().addWidget(self.buttons)
mainWidget.setLayout(QVBoxLayout())
btn_create = QPushButton(i18n("Create a template"))
btn_create = QPushButton(i18n("Create Template"))
btn_create.clicked.connect(self.slot_create_template)
btn_import = QPushButton(i18n("Import templates"))
btn_import = QPushButton(i18n("Import Templates"))
btn_import.clicked.connect(self.slot_import_template)
mainWidget.layout().addWidget(self.templates)
mainWidget.layout().addWidget(btn_create)
......@@ -142,7 +142,7 @@ class comics_template_create(QDialog):
def __init__(self, templateDirectory):
super().__init__()
self.templateDirectory = templateDirectory
self.setWindowTitle(i18n("Create new template"))
self.setWindowTitle(i18n("Create new Template"))
self.setLayout(QVBoxLayout())
buttons = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
buttons.accepted.connect(self.accept)
......
......@@ -22,8 +22,8 @@ class DocumentToolsExtension(krita.Extension):
pass
def createActions(self, window):
action = window.createAction("document_tools", "Document Tools")
action.setToolTip("Plugin to manipulate properties of selected documents")
action = window.createAction("document_tools", i18n("Document Tools"))
action.setToolTip(i18n("Plugin to manipulate properties of selected documents."))
action.triggered.connect(self.initialize)
def initialize(self):
......
......@@ -25,7 +25,7 @@ class UIDocumentTools(object):
self.mainLayout = QVBoxLayout(self.mainDialog)
self.formLayout = QFormLayout()
self.documentLayout = QVBoxLayout()
self.refreshButton = QPushButton("Refresh")
self.refreshButton = QPushButton(i18n("Refresh"))
self.widgetDocuments = QListWidget()
self.tabTools = QTabWidget()
self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
......@@ -48,7 +48,7 @@ class UIDocumentTools(object):
self.documentLayout.addWidget(self.widgetDocuments)
self.documentLayout.addWidget(self.refreshButton)
self.formLayout.addRow('Documents', self.documentLayout)
self.formLayout.addRow(i18n("Documents:"), self.documentLayout)
self.formLayout.addRow(self.tabTools)
self.line = QFrame()
......@@ -60,7 +60,7 @@ class UIDocumentTools(object):
self.mainLayout.addWidget(self.buttonBox)
self.mainDialog.resize(500, 300)
self.mainDialog.setWindowTitle("Document Tools")
self.mainDialog.setWindowTitle(i18n("Document Tools"))
self.mainDialog.setSizeGripEnabled(True)
self.mainDialog.show()
self.mainDialog.activateWindow()
......@@ -101,7 +101,7 @@ class UIDocumentTools(object):
if selectedDocuments:
widget = self.tabTools.currentWidget()
widget.adjust(selectedDocuments)
self.msgBox.setText("The selected documents has been modified.")
self.msgBox.setText(i18n("The selected documents has been modified."))
else:
self.msgBox.setText("Select at least one document.")
self.msgBox.setText(i18n("Select at least one document."))
self.msgBox.exec_()
......@@ -22,8 +22,8 @@ class ExportLayersExtension(krita.Extension):