novelWriter i18n and portuguese translation
This commit is contained in:
+14
-12
@@ -27,7 +27,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
import nw
|
||||
import logging
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtCore import QCoreApplication, Qt
|
||||
from PyQt5.QtGui import QFont, QPixmap
|
||||
from PyQt5.QtWidgets import QWidget, QGridLayout, QLabel
|
||||
|
||||
@@ -67,7 +67,7 @@ class GuiItemDetails(QWidget):
|
||||
self.fntValue.setPointSizeF(0.9*fPt)
|
||||
|
||||
# Label
|
||||
self.labelName = QLabel("Label")
|
||||
self.labelName = QLabel(self.tr("Label"))
|
||||
self.labelName.setFont(self.fntLabel)
|
||||
self.labelName.setAlignment(Qt.AlignLeft | Qt.AlignBaseline)
|
||||
|
||||
@@ -80,7 +80,7 @@ class GuiItemDetails(QWidget):
|
||||
self.labelData.setWordWrap(True)
|
||||
|
||||
# Status
|
||||
self.statusName = QLabel("Status")
|
||||
self.statusName = QLabel(self.tr("Status"))
|
||||
self.statusName.setFont(self.fntLabel)
|
||||
self.statusName.setAlignment(Qt.AlignLeft)
|
||||
|
||||
@@ -92,7 +92,7 @@ class GuiItemDetails(QWidget):
|
||||
self.statusData.setAlignment(Qt.AlignLeft)
|
||||
|
||||
# Class
|
||||
self.className = QLabel("Class")
|
||||
self.className = QLabel(self.tr("Class"))
|
||||
self.className.setFont(self.fntLabel)
|
||||
self.className.setAlignment(Qt.AlignLeft)
|
||||
|
||||
@@ -105,7 +105,7 @@ class GuiItemDetails(QWidget):
|
||||
self.classData.setAlignment(Qt.AlignLeft)
|
||||
|
||||
# Layout
|
||||
self.layoutName = QLabel("Layout")
|
||||
self.layoutName = QLabel(self.tr("Layout"))
|
||||
self.layoutName.setFont(self.fntLabel)
|
||||
self.layoutName.setAlignment(Qt.AlignLeft)
|
||||
|
||||
@@ -118,7 +118,7 @@ class GuiItemDetails(QWidget):
|
||||
self.layoutData.setAlignment(Qt.AlignLeft)
|
||||
|
||||
# Character Count
|
||||
self.cCountName = QLabel(" Characters")
|
||||
self.cCountName = QLabel(self.tr(" Characters"))
|
||||
self.cCountName.setFont(self.fntLabel)
|
||||
self.cCountName.setAlignment(Qt.AlignRight)
|
||||
|
||||
@@ -127,7 +127,7 @@ class GuiItemDetails(QWidget):
|
||||
self.cCountData.setAlignment(Qt.AlignRight)
|
||||
|
||||
# Word Count
|
||||
self.wCountName = QLabel(" Words")
|
||||
self.wCountName = QLabel(self.tr(" Words"))
|
||||
self.wCountName.setFont(self.fntLabel)
|
||||
self.wCountName.setAlignment(Qt.AlignRight)
|
||||
|
||||
@@ -136,7 +136,7 @@ class GuiItemDetails(QWidget):
|
||||
self.wCountData.setAlignment(Qt.AlignRight)
|
||||
|
||||
# Paragraph Count
|
||||
self.pCountName = QLabel(" Paragraphs")
|
||||
self.pCountName = QLabel(self.tr(" Paragraphs"))
|
||||
self.pCountName.setFont(self.fntLabel)
|
||||
self.pCountName.setAlignment(Qt.AlignRight)
|
||||
|
||||
@@ -259,17 +259,19 @@ class GuiItemDetails(QWidget):
|
||||
|
||||
iPx = int(round(0.8*self.theTheme.baseIconSize))
|
||||
self.statusFlag.setPixmap(flagIcon.pixmap(iPx, iPx))
|
||||
self.classFlag.setText(nwLabels.CLASS_FLAG[nwItem.itemClass])
|
||||
self.classFlag.setText(nwLabels.CLASS_FLAG[nwItem.itemClass]) # NO-I18N
|
||||
|
||||
if nwItem.itemLayout == nwItemLayout.NO_LAYOUT:
|
||||
self.layoutFlag.setText("-")
|
||||
else:
|
||||
self.layoutFlag.setText(nwLabels.LAYOUT_FLAG[nwItem.itemLayout])
|
||||
self.layoutFlag.setText(nwLabels.LAYOUT_FLAG[nwItem.itemLayout]) # NO-I18N
|
||||
|
||||
self.labelData.setText(theLabel)
|
||||
self.statusData.setText(nwItem.itemStatus)
|
||||
self.classData.setText(nwLabels.CLASS_NAME[nwItem.itemClass])
|
||||
self.layoutData.setText(nwLabels.LAYOUT_NAME[nwItem.itemLayout])
|
||||
self.classData.setText(QCoreApplication.translate(
|
||||
"Constant", nwLabels.CLASS_NAME[nwItem.itemClass]))
|
||||
self.layoutData.setText(QCoreApplication.translate(
|
||||
"Constant", nwLabels.LAYOUT_NAME[nwItem.itemLayout]))
|
||||
|
||||
if nwItem.itemType == nwItemType.FILE:
|
||||
self.cCountData.setText(f"{nwItem.charCount:n}")
|
||||
|
||||
Reference in New Issue
Block a user