Updated translation files and added more labels to translation

Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
This commit is contained in:
TheJackiMonster 2022-08-09 13:44:53 +02:00
parent ecf4d6b0b4
commit 0e342337dd
No known key found for this signature in database
GPG key ID: D850A5F772E880F9
47 changed files with 13192 additions and 28157 deletions

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -10,6 +10,7 @@ from manuskript.searchLabels import CharacterSearchLabels
from manuskript.models.searchableModel import searchableModel from manuskript.models.searchableModel import searchableModel
from manuskript.models.searchableItem import searchableItem from manuskript.models.searchableItem import searchableItem
class characterModel(QAbstractItemModel, searchableModel): class characterModel(QAbstractItemModel, searchableModel):
def __init__(self, parent): def __init__(self, parent):
@ -168,17 +169,17 @@ class characterModel(QAbstractItemModel, searchableModel):
# ADDING / REMOVING # ADDING / REMOVING
############################################################################### ###############################################################################
def addCharacter(self, importance = 0, name="New character"): def addCharacter(self, importance=0, name=None):
""" """
Creates a new character Creates a new character
@param importance: the importance level of the character @param importance: the importance level of the character
@return: the character @return: the character
""" """
if not name: if not name:
name="New Character" name = self.tr("New character")
c = Character(model=self, name=self.tr(name), importance = importance)
self.beginInsertRows(QModelIndex(), len( c = Character(model=self, name=self.tr(name), importance=importance)
self.characters), len(self.characters)) self.beginInsertRows(QModelIndex(), len(self.characters), len(self.characters))
self.characters.append(c) self.characters.append(c)
self.endInsertRows() self.endInsertRows()
return c return c
@ -212,7 +213,10 @@ class characterModel(QAbstractItemModel, searchableModel):
c = self.getCharacterByID(ID) c = self.getCharacterByID(ID)
self.beginInsertRows(c.index(), len(c.infos), len(c.infos)) self.beginInsertRows(c.index(), len(c.infos), len(c.infos))
c.infos.append(CharacterInfo( c.infos.append(CharacterInfo(
c, description="Description", value="Value")) c,
description=self.tr("Description"),
value=self.tr("Value")
))
self.endInsertRows() self.endInsertRows()
mainWindow().updatePersoInfoView() mainWindow().updatePersoInfoView()
@ -239,13 +243,17 @@ class characterModel(QAbstractItemModel, searchableModel):
# CHARACTER # CHARACTER
############################################################################### ###############################################################################
class Character(searchableItem): class Character(searchableItem):
def __init__(self, model, name="No name", importance = 0):
def __init__(self, model, name=None, importance=0):
self._model = model self._model = model
self.lastPath = "" self.lastPath = ""
self._data = {} if not name:
self._data[C.name.value] = name name = self.translate("Unknown")
self._data = {C.name.value: name}
self.assignUniqueID() self.assignUniqueID()
self.assignRandomColor() self.assignRandomColor()
self._data[C.importance.value] = str(importance) self._data[C.importance.value] = str(importance)

View file

@ -105,9 +105,10 @@ class plotModel(QStandardItemModel, searchableModel):
# ADDING / REMOVING # ADDING / REMOVING
############################################################################### ###############################################################################
def addPlot(self, name="New plot"): def addPlot(self, name=None):
if not name: if not name:
name="New Plot" name = self.tr("New plot")
p = QStandardItem(self.tr(name)) p = QStandardItem(self.tr(name))
_id = QStandardItem(self.getUniqueID()) _id = QStandardItem(self.getUniqueID())
importance = QStandardItem(str(0)) importance = QStandardItem(str(0))

View file

@ -6,7 +6,9 @@ from manuskript.models.searchResultModel import searchResultModel
from manuskript.functions import search from manuskript.functions import search
from PyQt5.QtCore import QCoreApplication from PyQt5.QtCore import QCoreApplication
class searchableItem():
class searchableItem:
def __init__(self, searchColumnLabels): def __init__(self, searchColumnLabels):
self._searchColumnLabels = searchColumnLabels self._searchColumnLabels = searchColumnLabels