Reduce to only two constant types

This commit is contained in:
Veronica Berglyd Olsen
2025-02-16 20:40:56 +01:00
parent 8b238f3767
commit c0bb0fa54a
5 changed files with 29 additions and 26 deletions
+7 -4
View File
@@ -23,8 +23,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
from __future__ import annotations
from typing import Literal
from PyQt5.QtCore import QT_TRANSLATE_NOOP, QCoreApplication
from novelwriter.enum import (
@@ -32,9 +30,14 @@ from novelwriter.enum import (
)
def trConst(text: str, context: Literal["Constant", "Stats"] = "Constant") -> str:
def trConst(text: str) -> str:
"""Wrapper function for locally translating constants."""
return QCoreApplication.translate(context, text)
return QCoreApplication.translate("Constant", text)
def trStats(text: str) -> str:
"""Wrapper function for locally translating stats constants."""
return QCoreApplication.translate("Stats", text)
class nwConst: