novelWriter i18n and portuguese translation
This commit is contained in:
+8
-5
@@ -29,7 +29,7 @@ import logging
|
||||
|
||||
from time import time
|
||||
|
||||
from PyQt5.QtCore import Qt, QSize
|
||||
from PyQt5.QtCore import QCoreApplication, Qt, QSize
|
||||
from PyQt5.QtWidgets import (
|
||||
QTreeWidget, QTreeWidgetItem, QMenu, QAction, QAbstractItemView
|
||||
)
|
||||
@@ -149,7 +149,8 @@ class GuiOutline(QTreeWidget):
|
||||
"""
|
||||
self.clear()
|
||||
self.setColumnCount(1)
|
||||
self.setHeaderLabel(nwLabels.OUTLINE_COLS[nwOutline.TITLE])
|
||||
self.setHeaderLabel(
|
||||
QCoreApplication.translate("Constant", nwLabels.OUTLINE_COLS[nwOutline.TITLE]))
|
||||
|
||||
self.treeOrder = []
|
||||
self.colWidth = {}
|
||||
@@ -355,7 +356,8 @@ class GuiOutline(QTreeWidget):
|
||||
if self.firstView:
|
||||
theLabels = []
|
||||
for i, hItem in enumerate(self.treeOrder):
|
||||
theLabels.append(nwLabels.OUTLINE_COLS[hItem])
|
||||
theLabels.append(
|
||||
QCoreApplication.translate("Constant", nwLabels.OUTLINE_COLS[hItem]))
|
||||
self.colIndex[hItem] = i
|
||||
|
||||
self.setHeaderLabels(theLabels)
|
||||
@@ -474,7 +476,7 @@ class GuiOutlineHeaderMenu(QMenu):
|
||||
self.theParent = theParent
|
||||
self.acceptToggle = True
|
||||
|
||||
mnuHead = QAction("Select Columns", self)
|
||||
mnuHead = QAction(self.tr("Select Columns"), self)
|
||||
self.addAction(mnuHead)
|
||||
self.addSeparator()
|
||||
|
||||
@@ -482,7 +484,8 @@ class GuiOutlineHeaderMenu(QMenu):
|
||||
for hItem in nwOutline:
|
||||
if hItem == nwOutline.TITLE:
|
||||
continue
|
||||
self.actionMap[hItem] = QAction(nwLabels.OUTLINE_COLS[hItem], self)
|
||||
self.actionMap[hItem] = QAction(
|
||||
QCoreApplication.translate("Constant", nwLabels.OUTLINE_COLS[hItem]), self)
|
||||
self.actionMap[hItem].setCheckable(True)
|
||||
self.actionMap[hItem].toggled.connect(
|
||||
lambda isChecked, tItem=hItem : self._columnToggled(isChecked, tItem)
|
||||
|
||||
Reference in New Issue
Block a user