Merge branch 'release' into from_2.6.3
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
{
|
||||
"Synopsis": "Synopse",
|
||||
"Short Description": "Krátký popis",
|
||||
"Footnotes": "Poznámky pod čarou",
|
||||
"Comment": "Komentář",
|
||||
"Notes": "Poznámka",
|
||||
"Tag": "Štítek",
|
||||
"Point of View": "Úhel pohledu",
|
||||
"Focus": "Zaměření",
|
||||
"Characters": "Postavy",
|
||||
"Plot": "Zápletka",
|
||||
"Timeline": "Časová osa",
|
||||
"Locations": "Lokality",
|
||||
"Objects": "Objekty",
|
||||
"Entities": "Subjekty",
|
||||
"Custom": "Vlastní",
|
||||
"New Page": "Nová stránka",
|
||||
"0": "Nula",
|
||||
"1": "Jedna",
|
||||
"2": "Dva",
|
||||
"3": "Tři",
|
||||
"4": "Čtyři",
|
||||
"5": "Pět",
|
||||
"6": "Šest",
|
||||
"7": "Sedm",
|
||||
"8": "Osm",
|
||||
"9": "Devět",
|
||||
"10": "Deset",
|
||||
"11": "Jedenáct",
|
||||
"12": "Dvanáct",
|
||||
"13": "Třináct",
|
||||
"14": "Čtrnáct",
|
||||
"15": "Patnáct",
|
||||
"16": "Šestnáct",
|
||||
"17": "Sedmnáct",
|
||||
"18": "Osmnáct",
|
||||
"19": "Devatenáct",
|
||||
"20": "Dvacet",
|
||||
"21": "Dvacet jedna",
|
||||
"22": "Dvacet dva",
|
||||
"23": "Dvacet tři",
|
||||
"24": "Dvacet čtyři",
|
||||
"25": "Dvacet pět",
|
||||
"26": "Dvacet šest",
|
||||
"27": "Dvacet sedm",
|
||||
"28": "Dvacet osm",
|
||||
"29": "Dvacet devět",
|
||||
"30": "Třicet",
|
||||
"31": "Třicet jedna",
|
||||
"32": "Třicet dva",
|
||||
"33": "Třicet tři",
|
||||
"34": "Třicet čtyři",
|
||||
"35": "Třicet pět",
|
||||
"36": "Třicet šest",
|
||||
"37": "Třicet sedm",
|
||||
"38": "Třicet osm",
|
||||
"39": "Třicet devět",
|
||||
"40": "Čtyřicet",
|
||||
"41": "Čtyřicet jedna",
|
||||
"42": "Čtyřicet dva",
|
||||
"43": "Čtyřicet tři",
|
||||
"44": "Čtyřicet čtyři",
|
||||
"45": "Čtyřicet pět",
|
||||
"46": "Čtyřicet šest",
|
||||
"47": "Čtyřicet sedm",
|
||||
"48": "Deset osm",
|
||||
"49": "Čtyřicet devět",
|
||||
"50": "Padesát",
|
||||
"51": "Padesát jedna",
|
||||
"52": "Padesát dva",
|
||||
"53": "Padesát tři",
|
||||
"54": "Padesát čtyři",
|
||||
"55": "Padesát pět",
|
||||
"56": "Padesát šest",
|
||||
"57": "Padesát sedm",
|
||||
"58": "Padesát osm",
|
||||
"59": "Padesát devět",
|
||||
"60": "Šedesát",
|
||||
"61": "Šedesát jedna",
|
||||
"62": "Šedesát dva",
|
||||
"63": "Šedesát tři",
|
||||
"64": "Šedesát čtyři",
|
||||
"65": "Šedesát pět",
|
||||
"66": "Šedesát šest",
|
||||
"67": "Šedesát sedm",
|
||||
"68": "Šedesát osm",
|
||||
"69": "Šedesát devět",
|
||||
"70": "Sedmdesát",
|
||||
"71": "Sedmdesát jedna",
|
||||
"72": "Sedmdesát dva",
|
||||
"73": "Sedmdesát tři",
|
||||
"74": "Sedmdesát čtyři",
|
||||
"75": "Sedmdesát pět",
|
||||
"76": "Sedmdesát šest",
|
||||
"77": "Sedmdesát sedm",
|
||||
"78": "Sedmnáct osm",
|
||||
"79": "Sedmdesát devět",
|
||||
"80": "Osmdesát",
|
||||
"81": "Osmdesát jedna",
|
||||
"82": "Osmdesát dva",
|
||||
"83": "Osmdesát tři",
|
||||
"84": "Osmdesát čtyři",
|
||||
"85": "Osmdesát pět",
|
||||
"86": "Osmdesát šest",
|
||||
"87": "Osmdesát sedm",
|
||||
"88": "Osmdesát osum",
|
||||
"89": "Osmdesát devět",
|
||||
"90": "Devadesát",
|
||||
"91": "Devadesát jedna",
|
||||
"92": "Devadesát dva",
|
||||
"93": "Devadesát tři",
|
||||
"94": "Devadesát čtyři",
|
||||
"95": "Devadesát pět",
|
||||
"96": "Devadesát šest",
|
||||
"97": "Devadesát sedm",
|
||||
"98": "Devadesát osm",
|
||||
"99": "Devadesát devět"
|
||||
}
|
||||
@@ -26,6 +26,7 @@
|
||||
translators for the languages currently available:</p>
|
||||
|
||||
<ul>
|
||||
<li><b>Czech:</b> Tomáš Zmek (perteus)</li>
|
||||
<li><b>Dutch:</b> Martijn van der Kleijn (mvdkleijn)</li>
|
||||
<li><b>French:</b> Jan Lüdke (jyhelle)</li>
|
||||
<li><b>German:</b> Myian (HeyMyian)</li>
|
||||
|
||||
+25
-20
@@ -35,6 +35,11 @@ def trConst(text: str) -> str:
|
||||
return QCoreApplication.translate("Constant", text)
|
||||
|
||||
|
||||
def trStats(text: str) -> str:
|
||||
"""Wrapper function for locally translating stats constants."""
|
||||
return QCoreApplication.translate("Stats", text)
|
||||
|
||||
|
||||
class nwConst:
|
||||
|
||||
# Date and Time Formats
|
||||
@@ -370,32 +375,32 @@ class nwLabels:
|
||||
nwBuildFmt.J_NWD: ".json",
|
||||
}
|
||||
SHAPES_PLAIN = {
|
||||
nwStatusShape.SQUARE: QT_TRANSLATE_NOOP("Shape", "Square"),
|
||||
nwStatusShape.TRIANGLE: QT_TRANSLATE_NOOP("Shape", "Triangle"),
|
||||
nwStatusShape.NABLA: QT_TRANSLATE_NOOP("Shape", "Nabla"),
|
||||
nwStatusShape.DIAMOND: QT_TRANSLATE_NOOP("Shape", "Diamond"),
|
||||
nwStatusShape.PENTAGON: QT_TRANSLATE_NOOP("Shape", "Pentagon"),
|
||||
nwStatusShape.HEXAGON: QT_TRANSLATE_NOOP("Shape", "Hexagon"),
|
||||
nwStatusShape.STAR: QT_TRANSLATE_NOOP("Shape", "Star"),
|
||||
nwStatusShape.PACMAN: QT_TRANSLATE_NOOP("Shape", "Pacman"),
|
||||
nwStatusShape.SQUARE: QT_TRANSLATE_NOOP("Constant", "Square"),
|
||||
nwStatusShape.TRIANGLE: QT_TRANSLATE_NOOP("Constant", "Triangle"),
|
||||
nwStatusShape.NABLA: QT_TRANSLATE_NOOP("Constant", "Nabla"),
|
||||
nwStatusShape.DIAMOND: QT_TRANSLATE_NOOP("Constant", "Diamond"),
|
||||
nwStatusShape.PENTAGON: QT_TRANSLATE_NOOP("Constant", "Pentagon"),
|
||||
nwStatusShape.HEXAGON: QT_TRANSLATE_NOOP("Constant", "Hexagon"),
|
||||
nwStatusShape.STAR: QT_TRANSLATE_NOOP("Constant", "Star"),
|
||||
nwStatusShape.PACMAN: QT_TRANSLATE_NOOP("Constant", "Pacman"),
|
||||
}
|
||||
SHAPES_CIRCLE = {
|
||||
nwStatusShape.CIRCLE_Q: QT_TRANSLATE_NOOP("Shape", "1/4 Circle"),
|
||||
nwStatusShape.CIRCLE_H: QT_TRANSLATE_NOOP("Shape", "Half Circle"),
|
||||
nwStatusShape.CIRCLE_T: QT_TRANSLATE_NOOP("Shape", "3/4 Circle"),
|
||||
nwStatusShape.CIRCLE: QT_TRANSLATE_NOOP("Shape", "Full Circle"),
|
||||
nwStatusShape.CIRCLE_Q: QT_TRANSLATE_NOOP("Constant", "1/4 Circle"),
|
||||
nwStatusShape.CIRCLE_H: QT_TRANSLATE_NOOP("Constant", "Half Circle"),
|
||||
nwStatusShape.CIRCLE_T: QT_TRANSLATE_NOOP("Constant", "3/4 Circle"),
|
||||
nwStatusShape.CIRCLE: QT_TRANSLATE_NOOP("Constant", "Full Circle"),
|
||||
}
|
||||
SHAPES_BARS = {
|
||||
nwStatusShape.BARS_1: QT_TRANSLATE_NOOP("Shape", "1 Bar"),
|
||||
nwStatusShape.BARS_2: QT_TRANSLATE_NOOP("Shape", "2 Bars"),
|
||||
nwStatusShape.BARS_3: QT_TRANSLATE_NOOP("Shape", "3 Bars"),
|
||||
nwStatusShape.BARS_4: QT_TRANSLATE_NOOP("Shape", "4 Bars"),
|
||||
nwStatusShape.BARS_1: QT_TRANSLATE_NOOP("Constant", "1 Bar"),
|
||||
nwStatusShape.BARS_2: QT_TRANSLATE_NOOP("Constant", "2 Bars"),
|
||||
nwStatusShape.BARS_3: QT_TRANSLATE_NOOP("Constant", "3 Bars"),
|
||||
nwStatusShape.BARS_4: QT_TRANSLATE_NOOP("Constant", "4 Bars"),
|
||||
}
|
||||
SHAPES_BLOCKS = {
|
||||
nwStatusShape.BLOCK_1: QT_TRANSLATE_NOOP("Shape", "1 Block"),
|
||||
nwStatusShape.BLOCK_2: QT_TRANSLATE_NOOP("Shape", "2 Blocks"),
|
||||
nwStatusShape.BLOCK_3: QT_TRANSLATE_NOOP("Shape", "3 Blocks"),
|
||||
nwStatusShape.BLOCK_4: QT_TRANSLATE_NOOP("Shape", "4 Blocks"),
|
||||
nwStatusShape.BLOCK_1: QT_TRANSLATE_NOOP("Constant", "1 Block"),
|
||||
nwStatusShape.BLOCK_2: QT_TRANSLATE_NOOP("Constant", "2 Blocks"),
|
||||
nwStatusShape.BLOCK_3: QT_TRANSLATE_NOOP("Constant", "3 Blocks"),
|
||||
nwStatusShape.BLOCK_4: QT_TRANSLATE_NOOP("Constant", "4 Blocks"),
|
||||
}
|
||||
FILE_FILTERS = {
|
||||
"*.txt": QT_TRANSLATE_NOOP("Constant", "Text files"),
|
||||
|
||||
@@ -326,7 +326,7 @@ class ProjectModel(QAbstractItemModel):
|
||||
|
||||
def parent(self, index: QModelIndex) -> QModelIndex:
|
||||
"""Get the parent model index of another index."""
|
||||
if index.isValid() and (parent := index.internalPointer().parent()):
|
||||
if index.isValid() and (node := index.internalPointer()) and (parent := node.parent()):
|
||||
return self.createIndex(parent.row(), 0, parent)
|
||||
return QModelIndex()
|
||||
|
||||
@@ -377,7 +377,9 @@ class ProjectModel(QAbstractItemModel):
|
||||
row: int, column: int, parent: QModelIndex
|
||||
) -> bool:
|
||||
"""Check if mime data can be dropped on the current location."""
|
||||
return data.hasFormat(nwConst.MIME_HANDLE) and action == Qt.DropAction.MoveAction
|
||||
if parent.isValid() and parent.internalPointer() is not self._root:
|
||||
return data.hasFormat(nwConst.MIME_HANDLE) and action == Qt.DropAction.MoveAction
|
||||
return False
|
||||
|
||||
def dropMimeData(
|
||||
self, data: QMimeData, action: Qt.DropAction,
|
||||
|
||||
@@ -32,7 +32,7 @@ from PyQt6.QtWidgets import QGridLayout, QLabel, QWidget
|
||||
|
||||
from novelwriter import SHARED
|
||||
from novelwriter.common import elide
|
||||
from novelwriter.constants import nwLabels, nwStats, trConst
|
||||
from novelwriter.constants import nwLabels, nwStats, trConst, trStats
|
||||
from novelwriter.enum import nwChange
|
||||
from novelwriter.types import (
|
||||
QtAlignLeft, QtAlignLeftBase, QtAlignRight, QtAlignRightBase,
|
||||
@@ -62,9 +62,9 @@ class GuiItemDetails(QWidget):
|
||||
fntValue = self.font()
|
||||
fntValue.setPointSizeF(0.9*fPt)
|
||||
|
||||
trStats1 = trConst(nwLabels.STATS_NAME[nwStats.CHARS])
|
||||
trStats2 = trConst(nwLabels.STATS_NAME[nwStats.WORDS])
|
||||
trStats3 = trConst(nwLabels.STATS_NAME[nwStats.PARAGRAPHS])
|
||||
trStats1 = trStats(nwLabels.STATS_NAME[nwStats.CHARS])
|
||||
trStats2 = trStats(nwLabels.STATS_NAME[nwStats.WORDS])
|
||||
trStats3 = trStats(nwLabels.STATS_NAME[nwStats.PARAGRAPHS])
|
||||
|
||||
# Label
|
||||
self.labelName = QLabel(self.tr("Label"), self)
|
||||
|
||||
@@ -36,7 +36,7 @@ from novelwriter import CONFIG, SHARED
|
||||
from novelwriter.common import openExternalPath, qtAddAction, qtAddMenu, qtLambda
|
||||
from novelwriter.constants import (
|
||||
nwConst, nwKeyWords, nwLabels, nwShortcode, nwStats, nwStyles, nwUnicode,
|
||||
trConst
|
||||
trConst, trStats
|
||||
)
|
||||
from novelwriter.enum import nwDocAction, nwDocInsert, nwFocus, nwView
|
||||
from novelwriter.extensions.eventfilters import StatusTipFilter
|
||||
@@ -602,7 +602,7 @@ class GuiMainMenu(QMenuBar):
|
||||
self.mInsField = qtAddMenu(self.insMenu, self.tr("Word/Character Count"))
|
||||
for field in nwStats.ALL_FIELDS:
|
||||
value = nwShortcode.FIELD_VALUE.format(field)
|
||||
action = qtAddAction(self.mInsField, trConst(nwLabels.STATS_NAME[field]))
|
||||
action = qtAddAction(self.mInsField, trStats(nwLabels.STATS_NAME[field]))
|
||||
action.triggered.connect(qtLambda(self.requestDocInsertText.emit, value))
|
||||
|
||||
# Insert > Breaks and Vertical Space
|
||||
|
||||
@@ -43,7 +43,7 @@ from PyQt6.QtWidgets import (
|
||||
|
||||
from novelwriter import CONFIG, SHARED
|
||||
from novelwriter.common import checkInt, formatFileFilter
|
||||
from novelwriter.constants import nwKeyWords, nwLabels, nwStats, nwStyles, trConst
|
||||
from novelwriter.constants import nwKeyWords, nwLabels, nwStats, nwStyles, trConst, trStats
|
||||
from novelwriter.enum import nwChange, nwDocMode, nwItemClass, nwItemLayout, nwItemType, nwOutline
|
||||
from novelwriter.error import logException
|
||||
from novelwriter.extensions.configlayout import NColorLabel
|
||||
@@ -818,9 +818,9 @@ class GuiOutlineDetails(QScrollArea):
|
||||
|
||||
bFont = SHARED.theme.guiFontB
|
||||
|
||||
trStats1 = trConst(nwLabels.STATS_NAME[nwStats.CHARS])
|
||||
trStats2 = trConst(nwLabels.STATS_NAME[nwStats.WORDS])
|
||||
trStats3 = trConst(nwLabels.STATS_NAME[nwStats.PARAGRAPHS])
|
||||
trStats1 = trStats(nwLabels.STATS_NAME[nwStats.CHARS])
|
||||
trStats2 = trStats(nwLabels.STATS_NAME[nwStats.WORDS])
|
||||
trStats3 = trStats(nwLabels.STATS_NAME[nwStats.PARAGRAPHS])
|
||||
|
||||
# Details Area
|
||||
self.titleLabel = QLabel(self.tr("Title"), self)
|
||||
|
||||
@@ -177,6 +177,7 @@ class GuiProjectView(QWidget):
|
||||
self.projTree.addAction(trash)
|
||||
rename.triggered.connect(self.renameTreeItem)
|
||||
delete.triggered.connect(self.projTree.processDeleteRequest)
|
||||
trash.triggered.connect(self.projTree.emptyTrash)
|
||||
return
|
||||
|
||||
##
|
||||
|
||||
@@ -43,7 +43,7 @@ from PyQt6.QtWidgets import (
|
||||
|
||||
from novelwriter import CONFIG, SHARED
|
||||
from novelwriter.common import fuzzyTime, qtLambda
|
||||
from novelwriter.constants import nwLabels, nwStats, trConst
|
||||
from novelwriter.constants import nwLabels, nwStats, trStats
|
||||
from novelwriter.core.buildsettings import BuildCollection, BuildSettings
|
||||
from novelwriter.core.docbuild import NWBuildDocument
|
||||
from novelwriter.extensions.modified import NIconToggleButton, NIconToolButton, NToolDialog
|
||||
@@ -1024,17 +1024,17 @@ class _StatsWidget(QWidget):
|
||||
|
||||
def _buildBottomPanel(self) -> None:
|
||||
"""Build the bottom page."""
|
||||
trAllChars = trConst(nwLabels.STATS_NAME[nwStats.CHARS])
|
||||
trTextChars = trConst(nwLabels.STATS_NAME[nwStats.CHARS_TEXT])
|
||||
trTitleChars = trConst(nwLabels.STATS_NAME[nwStats.CHARS_TITLE])
|
||||
trParagraphCount = trConst(nwLabels.STATS_NAME[nwStats.PARAGRAPHS])
|
||||
trTitleCount = trConst(nwLabels.STATS_NAME[nwStats.TITLES])
|
||||
trAllWordChars = trConst(nwLabels.STATS_NAME[nwStats.WCHARS_ALL])
|
||||
trTextWordChars = trConst(nwLabels.STATS_NAME[nwStats.WCHARS_TEXT])
|
||||
trTitleWordChars = trConst(nwLabels.STATS_NAME[nwStats.WCHARS_TITLE])
|
||||
trAllWords = trConst(nwLabels.STATS_NAME[nwStats.WORDS])
|
||||
trTextWords = trConst(nwLabels.STATS_NAME[nwStats.WORDS_TEXT])
|
||||
trTitleWords = trConst(nwLabels.STATS_NAME[nwStats.WORDS_TITLE])
|
||||
trAllChars = trStats(nwLabels.STATS_NAME[nwStats.CHARS])
|
||||
trTextChars = trStats(nwLabels.STATS_NAME[nwStats.CHARS_TEXT])
|
||||
trTitleChars = trStats(nwLabels.STATS_NAME[nwStats.CHARS_TITLE])
|
||||
trParagraphCount = trStats(nwLabels.STATS_NAME[nwStats.PARAGRAPHS])
|
||||
trTitleCount = trStats(nwLabels.STATS_NAME[nwStats.TITLES])
|
||||
trAllWordChars = trStats(nwLabels.STATS_NAME[nwStats.WCHARS_ALL])
|
||||
trTextWordChars = trStats(nwLabels.STATS_NAME[nwStats.WCHARS_TEXT])
|
||||
trTitleWordChars = trStats(nwLabels.STATS_NAME[nwStats.WCHARS_TITLE])
|
||||
trAllWords = trStats(nwLabels.STATS_NAME[nwStats.WORDS])
|
||||
trTextWords = trStats(nwLabels.STATS_NAME[nwStats.WORDS_TEXT])
|
||||
trTitleWords = trStats(nwLabels.STATS_NAME[nwStats.WORDS_TITLE])
|
||||
|
||||
# Minimal Form
|
||||
self.minWordCount = QLabel(self)
|
||||
|
||||
Reference in New Issue
Block a user